Ir para conteúdo
  • 0

Ganhar 500Gp No Frag


Pergunta

Pessoal queria saber uma coisa no meu ot de war os player não ganha mais lv por exemplo um lv 200 nao ganha xp se matar um 150 e nem os 500gp como de costume, gostaria de saber oque esta de errado no meu código, ou se possível também alguém me falar como ponho para dar xp com diferença de até 200lv de diferença pq mesmo que o cara mate um level 150 vai ganhar xp.

 

 

o script é:

 

 

 

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)

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

 

 

 

 

e no creaturescripts.xml ta assim:

 

<event type="kill" name="FragReward" event="script" value="onkill.lua"/>

Link para o comentário
https://xtibia.com/forum/topic/190015-ganhar-500gp-no-frag/
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...