Ir para conteúdo
  • 0

Consegui O Script, Mais Veio Com Erro


kevinloko

Pergunta

Ola, consegui o script que eu queria para meu ot, nao sei se vai dar certo, mais vou tentar, ai vai o script:

function onKillPlayer(cid, lastHitKiller, mostDamageKiller)

if isPlayer(cid) then

if isPlayer(lastHitKiller) then

doPlayerAddSoul(lastHitKiller, 1)

doSendAnimatedText(getCreaturePosition(lastHitKiller), "FRAG!", 144, lastHitKiller)

if isPlayer(mostDamageKiller) and mostDamageKiller ~= lastHitKiller then

doPlayerAddSoul(mostDamageKiller, 1)

doSendAnimatedText(getCreaturePosition(mostDamageKiller), "FRAG!", 150, mostDamageKiller)

end

if getBooleanFromString(getConfigValue("experienceByKillingPlayers")) and lastHitKiller ~= cid

 

then

if BAG_OF_SSA and lastHitKiller ~= cid then

doPlayerBuyItemContainer(lastHitKiller, 1996, 2197, 1, 0, 5)

if mostDamageKiller ~= lastHitKiller then

doPlayerBuyItemContainer(mostDamageKiller, 1996, 2197, 1, 0, 5)

end

end

local gainLevel = LEVEL_GAIN_FOR_KILL

if tonumber(gainLevel) == nil then

gainLevel = math.floor(getPlayerLevel(cid) * 999990) --Aqui você muda a quantidade

 

de experiencia que vai ser adicionado nos Killers

local gold = (math.random (getPlayerLevel(cid)/50, getPlayerLevel(cid)/10))

doPlayerAddItem(mostDamageKiller, 2148, gold)

end

--print("lastHitKiller: ".. lastHitKiller) print("mostDamageKiller: ".. mostDamageKiller)

 

print("cid: ".. cid) print("MAXIMUM_LEVEL:") print(MAXIMUM_LEVEL)

--print("\n\n\n") print(lastHitKiller ~= cid) print(MAXIMUM_LEVEL == nil) print

 

(getPlayerLevel(mostDamageKiller) < MAXIMUM_LEVEL)

if (lastHitKiller ~= cid) and ((MAXIMUM_LEVEL == nil) or (getPlayerLevel(lastHitKiller) <

 

MAXIMUM_LEVEL)) then

doPlayerAddExperience(lastHitKiller, gainLevel)

end

if ((mostDamageKiller ~= lastHitKiller) and (mostDamageKiller ~= cid)) and ((MAXIMUM_LEVEL

 

== nil) or (getPlayerLevel(mostDamageKiller) < MAXIMUM_LEVEL)) then

doPlayerAddExperience(mostDamageKiller, gainLevel)

doPlayerAddItem(mostDamageKiller, 2148, gold)

end

end

end

 

e da o seguinte erro no console:

erroeq.png

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0

tenta assim

function onKillPlayer(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) then
if isPlayer(lastHitKiller) then
doPlayerAddSoul(lastHitKiller, 1)
doSendAnimatedText(getCreaturePosition(lastHitKiller), "FRAG!", 144, lastHitKiller)
if isPlayer(mostDamageKiller) and mostDamageKiller ~= lastHitKiller then
doPlayerAddSoul(mostDamageKiller, 1)
doSendAnimatedText(getCreaturePosition(mostDamageKiller), "FRAG!", 150, mostDamageKiller)
end
if getBooleanFromString(getConfigValue("experienceByKillingPlayers")) and lastHitKiller ~= cid
then
if BAG_OF_SSA and lastHitKiller ~= cid then
doPlayerBuyItemContainer(lastHitKiller, 1996, 2197, 1, 0, 5)
if mostDamageKiller ~= lastHitKiller then
doPlayerBuyItemContainer(mostDamageKiller, 1996, 2197, 1, 0, 5)
end
end
local gainLevel = LEVEL_GAIN_FOR_KILL
if tonumber(gainLevel) == nil then
gainLevel = math.floor(getPlayerLevel(cid) * 999990) --Aqui você muda a quantidade
--de experiencia que vai ser adicionado nos Killers
local gold = (math.random (getPlayerLevel(cid)/50, getPlayerLevel(cid)/10))
doPlayerAddItem(mostDamageKiller, 2148, gold)
end
--print("lastHitKiller: ".. lastHitKiller) print("mostDamageKiller: ".. mostDamageKiller)
--print("cid: ".. cid) print("MAXIMUM_LEVEL:") print(MAXIMUM_LEVEL)
--print("\n\n\n") print(lastHitKiller ~= cid) print(MAXIMUM_LEVEL == nil) print
if (getPlayerLevel(mostDamageKiller) < MAXIMUM_LEVEL) then
if (lastHitKiller ~= cid) and ((MAXIMUM_LEVEL == nil) or (getPlayerLevel(lastHitKiller) <
MAXIMUM_LEVEL)) then
doPlayerAddExperience(lastHitKiller, gainLevel)
end
if ((mostDamageKiller ~= lastHitKiller) and (mostDamageKiller ~= cid)) and ((MAXIMUM_LEVEL
== nil) or (getPlayerLevel(mostDamageKiller) < MAXIMUM_LEVEL)) then
doPlayerAddExperience(mostDamageKiller, gainLevel)
doPlayerAddItem(mostDamageKiller, 2148, gold)
end
end
end
end
end
end

Editado por notle2012
Link para o comentário
Compartilhar em outros sites

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