Ir para conteúdo

Featured Replies

Postado
23 minutos atrás, trancx123 disse:

Reds, vc conseguiria botar um check por ip pro pessoal n criar mc e ficar dando rep nele mesmo? Algo do tipo só poder dar rep 1 vez em determinado player e dps de 24h somente o mesmo char poder dar rep nele denovo seria bom tb pra n burlarem o sistema

Spoiler

function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
        return true
    end

    local t = string.explode(param, ",")
    local pid = getPlayerByNameWildcard(t[1])
    if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")
        return true
    end
    
    local storage_qreps = getPlayerStorageValue(cid, 90000)
    
    if (pid == cid) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao poder dar rep a voce mesmo")
    return true
    elseif storage_qreps < 1 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode dar mais reps")
    return true
    end
    
    ip1 = getPlayerIp(pid)
    ip2 = getPlayerIp(cid)
    
    if ip1 == ip2 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Nao pode dar rep a si mesmo")
    setPlayerStorageValue(cid, 90000, storage_qreps - 1)
    return true
    end
    
    local storage_nreps = getPlayerStorageValue(pid, 90001)
    setPlayerStorageValue(pid, 90001, storage_nreps + 1)
    setPlayerStorageValue(cid, 90000, storage_qreps - 1)
    return true
end

testa ai

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

  • Respostas 11
  • Visualizações 357
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • jaja crio o global event ou algo do tipo para conseguir os reps diários, segue o script para dar rep:           <talkaction log="yes" words="/rep;/reputacao" event="script" va

Postado
  • Autor
4 minutos atrás, Reds disse:
  Ocultar conteúdo

function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
        return true
    end

    local t = string.explode(param, ",")
    local pid = getPlayerByNameWildcard(t[1])
    if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")
        return true
    end
    
    local storage_qreps = getPlayerStorageValue(cid, 90000)
    
    if (pid == cid) then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao poder dar rep a voce mesmo")
    return true
    elseif storage_qreps < 1 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode dar mais reps")
    return true
    end
    
    ip1 = getPlayerIp(pid)
    ip2 = getPlayerIp(cid)
    
    if ip1 == ip2 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Nao pode dar rep a si mesmo")
    setPlayerStorageValue(cid, 90000, storage_qreps - 1)
    return true
    end
    
    local storage_nreps = getPlayerStorageValue(pid, 90001)
    setPlayerStorageValue(pid, 90001, storage_nreps + 1)
    setPlayerStorageValue(cid, 90000, storage_qreps - 1)
    return true
end

testa ai

esse eu boto aonde?

Postado
Agora, trancx123 disse:

esse eu boto aonde?

reputacao.lua

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

Postado
Agora, trancx123 disse:

ta com sistema de nao poder reputar por ip ne? vou precisar de outro pc pra testar hahaha, mas parece estar certo, jaja confirmo

 

acho q msm em outro pc o ip é o mesmo

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo