Estou com o mesmo problema... Vou ficar seguindo o topico esperando por respostas também..! vlws
HA
dúvida
Algo Errado Com Meu Onkill.lua
Por hadamais, 05 de out. de 2012 em Scripts
não está mais subindo xp
4
924
info
Grupo: Campones
Registrado: 30/09/12
Posts: 4
Reputação: 0

05 de outubro de 2012 às 23:35
info
Grupo: Cavaleiro
Registrado: 02/11/08
Posts: 195
Reputação: +2
Gênero: Masculino
Char no Tibia: Addamuuss

08 de outubro de 2012 às 19:06
Ainda espero.
08 de outubro de 2012 às 21:24
testa assim:
local function doPlayerAddLevel(cid, levels)
local currentExp, newLevel = getPlayerExperience(cid), getPlayerLevel(cid) + levels
local expNeeded = ((50 * newLevel * newLevel * newLevel) - (150 * newLevel * newLevel) + (400 * newLevel)) / 3
doPlayerAddExperience(cid, expNeeded - currentExp)
end
function onKill(cid, target)
--config----------------------------
local addLevels = 5
--end-------------------------------
if isPlayer(target) == TRUE then
if getPlayerIp(cid) ~= getPlayerIp(target) then
doPlayerAddLevel(cid, addLevels)
doPlayerAddMoney(cid, 20)
doCreatureSetDropLoot(target, false)
doSendAnimatedText(getPlayerPosition(cid), "Orgasmic~", 198)
else
doPlayerAddExperience(cid, -50000)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
end
end
return TRUE
end




info
Grupo: Cavaleiro
Registrado: 02/11/08
Posts: 195
Reputação: +2
Gênero: Masculino
Char no Tibia: Addamuuss
Eis meu OnKill.lua
function onKill(cid, target) --config---------------------------- local lvl = getPlayerLevel(cid) --players level local nlvl = getPlayerLevel(cid) + 5 -- add 5 levels --end------------------------------- if isPlayer(target) == TRUE then if getPlayerIp(cid) ~= getPlayerIp(target) then local exp = (50 * (lvl) * (lvl) * (lvl) - 150 * (lvl) * (lvl) + 400 * (lvl)) / 5 local nexp = (50 * (nlvl) * (nlvl) * (nlvl) - 150 * (nlvl) * (nlvl) + 400 * (nlvl)) / 5 local newexp = nexp - exp doPlayerAddExp(cid,newexp) doPlayerAddMoney(cid, 20) doCreatureSetDropLoot(target, false) doSendAnimatedText(getPlayerPosition(cid), "Orgasmic~", 198) else doPlayerAddExperience(cid, -50000) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.") end end return TRUE endPORQUE NÃO ESTÁ MAIS SUBINDO XP?
Obs: Servidor Enforced!