Postado Junho 14, 2014 11 anos Autor Vai no onlogin.lua e coloca isso junto dos outros: registerCreatureEvent(cid, "FragReward") Valeeeeu caraa! Não to acreditando que deu certo!!! Toma outro rep Mas ae, tem como coloca pro player que matar outro do mesmo ip não ganhar nada?
Postado Junho 14, 2014 11 anos Solução local config = { --{exp, item, quantidade} {500000, 2152, 50}, -- menor {1000000, 2160, 1}, -- mesmo {2000000, 2160, 2}, -- maior } function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then return true end if getPlayerLevel(target) < getPlayerLevel(cid) then doPlayerAddItem(cid, config[1][2], config[1][3]) doPlayerAddExp(cid, config[1][1]) elseif getPlayerLevel(target) == getPlayerLevel(cid) then doPlayerAddItem(cid, config[2][2], config[2][3]) doPlayerAddExp(cid, config[2][1]) elseif getPlayerLevel(target) > getPlayerLevel(cid) then doPlayerAddItem(cid, config[3][2], config[3][3]) doPlayerAddExp(cid, config[3][1]) end end return true end
Postado Junho 14, 2014 11 anos Autor local config = { --{exp, item, quantidade} {500000, 2152, 50}, -- menor {1000000, 2160, 1}, -- mesmo {2000000, 2160, 2}, -- maior } function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then return true end if getPlayerLevel(target) < getPlayerLevel(cid) then doPlayerAddItem(cid, config[1][2], config[1][3]) doPlayerAddExp(cid, config[1][1]) elseif getPlayerLevel(target) == getPlayerLevel(cid) then doPlayerAddItem(cid, config[2][2], config[2][3]) doPlayerAddExp(cid, config[2][1]) elseif getPlayerLevel(target) > getPlayerLevel(cid) then doPlayerAddItem(cid, config[3][2], config[3][3]) doPlayerAddExp(cid, config[3][1]) end end return true end Valeeu cara! Deu certinho. Obrigado por ter ajudado!
Postado Fevereiro 25, 2015 10 anos local config = { --{exp, item, quantidade} {500000, 2152, 50}, -- menor {1000000, 2160, 1}, -- mesmo {2000000, 2160, 2}, -- maior } function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerLevel(target) < getPlayerLevel(cid) then doPlayerAddItem(cid, config[1][2], config[1][3]) doPlayerAddExp(cid, config[1][1]) elseif getPlayerLevel(target) == getPlayerLevel(cid) then doPlayerAddItem(cid, config[2][2], config[2][3]) doPlayerAddExp(cid, config[2][1]) elseif getPlayerLevel(target) > getPlayerLevel(cid) then doPlayerAddItem(cid, config[3][2], config[3][3]) doPlayerAddExp(cid, config[3][1]) end end return true end mano explica em que local devo colar isto por favor obrigado
Postado Fevereiro 26, 2015 10 anos Autor mano explica em que local devo colar isto por favor obrigado Vc coloca em creaturescripts, não esquece de registrar a tag no creaturescript.xml e no login.lua
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.