Ir para conteúdo
  • 0

Alguem poderia me ajuda nesses erros ?


AwakeGamer

Pergunta

Alguem poderia me ajuda como resolvo esses erros ?

 

[15/02/2013 19:38:18] [Error - CreatureScript Interface]

[15/02/2013 19:38:18] data/creaturescripts/scripts/pokeexp.lua:onDeath

[15/02/2013 19:38:18] Description:

[15/02/2013 19:38:18] data/creaturescripts/scripts/pokeexp.lua:18: attempt to call global 'givePokemonExp' (a nil value)

[15/02/2013 19:38:18] stack traceback:

[15/02/2013 19:38:18] data/creaturescripts/scripts/pokeexp.lua:18: in function 'giveExpToPlayer'

[15/02/2013 19:38:18] data/creaturescripts/scripts/pokeexp.lua:94: in function <data/creaturescripts/scripts/pokeexp.lua:42>

 

 

ESSE >>

 

 

[15/02/2013 19:38:17] [Error - TalkAction Interface]

[15/02/2013 19:38:17] data/talkactions/scripts/move1.lua:onSay

[15/02/2013 19:38:17] Description:

[15/02/2013 19:38:17] data/lib/cooldown bar.lua:151: attempt to call global 'getLevel' (a nil value)

[15/02/2013 19:38:17] stack traceback:

[15/02/2013 19:38:17] data/lib/cooldown bar.lua:151: in function 'doUpdateCooldowns'

[15/02/2013 19:38:17] data/talkactions/scripts/move1.lua:176: in function <data/talkactions/scripts/move1.lua:20>

 

 

E ESSE >>

 

[15/02/2013 19:38:17] [Error - CreatureScript Interface]

[15/02/2013 19:38:17] data/creaturescripts/scripts/pokeexp.lua:onDeath

[15/02/2013 19:38:17] Description:

[15/02/2013 19:38:17] data/creaturescripts/scripts/pokeexp.lua:18: attempt to call global 'givePokemonExp' (a nil value)

[15/02/2013 19:38:17] stack traceback:

[15/02/2013 19:38:17] data/creaturescripts/scripts/pokeexp.lua:18: in function 'giveExpToPlayer'

[15/02/2013 19:38:17] data/creaturescripts/scripts/pokeexp.lua:94: in function <data/creaturescripts/scripts/pokeexp.lua:42>

 

Alguem poderia me ajudar ?

Link para o comentário
Compartilhar em outros sites

8 respostass a esta questão

Posts Recomendados

  • 0

O POKEXP.LUA AQUI

 

 

local balls = {11826, 11828, 11829, 11831, 11832, 11834, 11835, 11837,

11737, 11739, 11740, 11742, 11743, 11745, 11746, 11748}

 

local function playerAddExp(cid, exp)

doPlayerAddExp(cid, exp)

doSendAnimatedText(getThingPos(cid), exp, 215)

end

 

local function giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7

playerAddExp(pk, expTotal)

 

local firstball = getPlayerSlotItem(pk, 8)

 

if not isInParty(pk) and firstball and getItemAttribute(firstball.uid, expstring) and getItemAttribute(firstball.uid, expstring) > 0 then

local percent = getItemAttribute(firstball.uid, expstring) <= 1 and getItemAttribute(firstball.uid, expstring) or 1

local gainexp = math.ceil(percent * givenexp)

doItemSetAttribute(firstball.uid, expstring, 0)

givePokemonExp(pk, firstball, expTotal) --alterado v2.7

elseif isInParty(pk) and firstball.uid ~= 0 then

givePokemonExp(pk, firstball, expTotal*3) --alterado v2.7

end

 

for b = 1, #balls do

local pokes = getItemsInContainerById(getPlayerSlotItem(pk, 3).uid, balls)

if #pokes >= 1 then

for _, uid in pairs (pokes) do

if not isInParty(pk) and getItemAttribute(uid, expstring) and getItemAttribute(uid, expstring) > 0 then

local percent = getItemAttribute(uid, expstring) <= 1 and getItemAttribute(uid, expstring) or 1

local gainexp = math.ceil(percent * givenexp)

doItemSetAttribute(uid, expstring, 0)

givePokemonExpInBp(pk, uid, gainexp, balls) --alterado v2.7

elseif isInParty(pk) and getItemAttribute(uid, expstring) and getItemAttribute(uid, expstring) > 0 then

givePokemonExpInBp(pk, uid, expTotal*3, balls)

end

end

end

end

end

 

 

 

function onDeath(cid, corpse, deathList)

 

if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v2.8

 

-------------Edited Golden Arena------------------------- --alterado v2.7 \/\/

if getPlayerStorageValue(cid, 22546) == 1 then

setGlobalStorageValue(22548, getGlobalStorageValue(22548)-1)

if corpse.itemid ~= 0 then doItemSetAttribute(corpse.uid, "golden", 1) end --alterado v2.8

end

if getPlayerStorageValue(cid, 22546) == 1 and getGlobalStorageValue(22548) <= 0 then

local wave = getGlobalStorageValue(22547)

for _, sid in ipairs(getPlayersOnline()) do

if isPlayer(sid) and getPlayerStorageValue(sid, 22545) == 1 then

if getGlobalStorageValue(22547) < #wavesGolden+1 then

doPlayerSendTextMessage(sid, 21, "Wave "..wave.." will begin in "..timeToWaves.."seconds!")

doPlayerSendTextMessage(sid, 28, "Wave "..wave.." will begin in "..timeToWaves.."seconds!")

addEvent(creaturesInGolden, 100, GoldenUpper, GoldenLower, false, true, true)

addEvent(doWave, timeToWaves*1000)

elseif getGlobalStorageValue(22547) == #wavesGolden+1 then

doPlayerSendTextMessage(sid, 20, "You have win the golden arena! Take your reward!")

doPlayerAddItem(sid, 2152, getPlayerStorageValue(sid, 22551)*2) --premio

setPlayerStorageValue(sid, 22545, -1)

doTeleportThing(sid, getClosestFreeTile(sid, posBackGolden), false)

setPlayerRecordWaves(sid)

end

end

end

if getGlobalStorageValue(22547) == #wavesGolden+1 then

endGoldenArena()

end

end

--------------------------------------------------- /\/\

 

local givenexp = getWildPokemonExp(cid)

local expstring = ""..cid.."expEx"

 

if givenexp > 0 then

for a = 1, #deathList do

local pk = deathList[a]

if isCreature(pk) then

local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false)

local expTotal = math.floor(playerExperienceRate * givenexp * getDamageMapPercent(pk, cid))

local party = getPartyMembers(pk)

 

if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then

expTotal = math.floor(expTotal/#party) --alterado v2.6.1

for i = 1, #party do

if isInArray(list, party) and getDamageMapPercent(party, cid) > 0 then --alterado v2.8

giveExpToPlayer(party, expTotal, givenexp, expstring)--alterado v2.7

end

end

else

giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7

end

 

end

end

end

 

if isNpcSummon(cid) then

local master = getCreatureMaster(cid)

doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000))

doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1)

doRemoveCreature(cid)

return false

end

 

if corpse.itemid ~= 0 then --alterado v2.8

doItemSetAttribute(corpse.uid, "offense", getPlayerStorageValue(cid, 1011))

doItemSetAttribute(corpse.uid, "defense", getPlayerStorageValue(cid, 1012))

doItemSetAttribute(corpse.uid, "speed", getPlayerStorageValue(cid, 1013))

doItemSetAttribute(corpse.uid, "vitality", getPlayerStorageValue(cid, 1014))

doItemSetAttribute(corpse.uid, "spattack", getPlayerStorageValue(cid, 1015))

doItemSetAttribute(corpse.uid, "level", getLevel(cid))

doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid))

end

return true

end

 

 

E O move1,lua

 

 

local msgs = {"use ", ""}

 

function doAlertReady(cid, id, movename, n, cd)

if not isCreature(cid) then return true end

local myball = getPlayerSlotItem(cid, 8)

if myball.itemid > 0 and getItemAttribute(myball.uid, cd) == "cd:"..id.."" then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(myball.uid).." - "..movename.." (m"..n..") is ready!")

return true

end

local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)

if not p or #p <= 0 then return true end

for a = 1, #p do

if getItemAttribute(p[a], cd) == "cd:"..id.."" then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(p[a]).." - "..movename.." (m"..n..") is ready!")

return true

end

end

end

 

function onSay(cid, words, param, channel)

 

 

if param ~= "" then return true end

if string.len(words) > 3 then return true end

 

if #getCreatureSummons(cid) == 0 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.")

return 0

end

--alterado v1.5

local mypoke = getCreatureSummons(cid)[1]

 

if getCreatureCondition(cid, CONDITION_EXHAUST) then return true end

if getCreatureName(mypoke) == "Evolution" then return true end

 

if getCreatureName(mypoke) == "Ditto" or getCreatureName(mypoke) == "Shiny Ditto" then

name = getPlayerStorageValue(mypoke, 1010) --edited

else

name = getCreatureName(mypoke)

end

 

--local name = getCreatureName(mypoke) == "Ditto" and getPlayerStorageValue(mypoke, 1010) or getCreatureName(mypoke)

 

local it = string.sub(words, 2, 3)

local move = movestable[name].move1

if getPlayerStorageValue(mypoke, 212123) >= 1 then

cdzin = "cm_move"..it..""

else

cdzin = "move"..it.."" --alterado v1.5

end

 

if it == "2" then

move = movestable[name].move2

elseif it == "3" then

move = movestable[name].move3

elseif it == "4" then

move = movestable[name].move4

elseif it == "5" then

move = movestable[name].move5

elseif it == "6" then

move = movestable[name].move6

elseif it == "7" then

move = movestable[name].move7

elseif it == "8" then

move = movestable[name].move8

elseif it == "9" then

move = movestable[name].move9

elseif it == "10" then

move = movestable[name].move10

elseif it == "11" then

move = movestable[name].move11

elseif it == "12" then

move = movestable[name].move12

elseif it == "13" then

move = movestable[name].move13

end

 

if not move then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.")

return true

end

 

if getPlayerLevel(cid) < move.level then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need be atleast level "..move.level.." to use this move.")

return true

end

 

if getCD(getPlayerSlotItem(cid, 8).uid, cdzin) > 0 and getCD(getPlayerSlotItem(cid, 8).uid, cdzin) < (move.cd + 2) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." seconds to use "..move.name.." again.")

return true

end

 

if getTileInfo(getThingPos(mypoke)).protection then

doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.")

return true

end

 

if getPlayerStorageValue(mypoke, 3894) >= 1 then

return doPlayerSendCancel(cid, "You can't attack because you is with fear") --alterado v1.3

end

--alterado v1.6

if (move.name == "Team Slice" or move.name == "Team Claw") and #getCreatureSummons(cid) < 2 then

doPlayerSendCancel(cid, "Your pokemon need be in a team for use this move!")

return true

end

--alterado v1.6

if isCreature(getCreatureTarget(cid)) and isInArray(specialabilities["evasion"], getCreatureName(getCreatureTarget(cid))) and math.random(1, 100) <= 10 then

local target = getCreatureTarget(cid)

 

if isCreature(getMasterTarget(target)) then --alterado v1.6

doSendMagicEffect(getThingPos(target), 211)

doSendAnimatedText(getThingPos(target), "TOO BAD", 215)

doTeleportThing(target, getClosestFreeTile(target, getThingPos(mypoke)), false)

doSendMagicEffect(getThingPos(target), 211)

doFaceCreature(target, getThingPos(mypoke))

return true --alterado v1.6

end

end

 

 

if move.target == 1 then

 

if not isCreature(getCreatureTarget(cid)) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.")

return 0

end

 

if getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then

return 0

end

 

if getCreatureHealth(getCreatureTarget(cid)) <= 0 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your have already defeated your target.")

return 0

end

 

if not isCreature(getCreatureSummons(cid)[1]) then

return true

end

 

if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid))) > move.dist then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to use this move.")

return 0

end

 

if not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then

return 0

end

end

 

local newid = 0

 

if isSleeping(mypoke) or isSilence(mypoke) then --alterado v1.5

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't do that right now.")

return 0

else

newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd)

end

 

doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY)

 

local summons = getCreatureSummons(cid) --alterado v1.6

 

addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin)

 

for i = 2, #summons do

if isCreature(summons) and getPlayerStorageValue(cid, 637501) >= 1 then

docastspell(summons, move.name) --alterado v1.6

end

end

 

docastspell(mypoke, move.name)

doCreatureAddCondition(cid, playerexhaust)

 

if useKpdoDlls then

doUpdateCooldowns(cid)

end

 

return 0

end

 

esse server e o do gabrieltxu eu tirei o level system dos pokemons e bugo isso e Copser dos pokemons que quando morre nao aparece os corpos como me ajuda nisso tambem ?

Link para o comentário
Compartilhar em outros sites

  • 0

Tenta isso:

local balls = {11826, 11828, 11829, 11831, 11832, 11834, 11835, 11837,
11737, 11739, 11740, 11742, 11743, 11745, 11746, 11748}

local function playerAddExp(cid, exp)
doPlayerAddExp(cid, exp)
doSendAnimatedText(getThingPos(cid), exp, 215)
end

local function giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7
playerAddExp(pk, expTotal) 

local firstball = getPlayerSlotItem(pk, 8)

if not isInParty(pk) and firstball and getItemAttribute(firstball.uid, expstring) and getItemAttribute(firstball.uid, expstring) > 0 then
local percent = getItemAttribute(firstball.uid, expstring) <= 1 and getItemAttribute(firstball.uid, expstring) or 1
local gainexp = math.ceil(percent * givenexp)
doItemSetAttribute(firstball.uid, expstring, 0)
elseif isInParty(pk) and firstball.uid ~= 0 then
end

end



function onDeath(cid, corpse, deathList)

if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v2.8

-------------Edited Golden Arena------------------------- --alterado v2.7 \/\/
if getPlayerStorageValue(cid, 22546) == 1 then
setGlobalStorageValue(22548, getGlobalStorageValue(22548)-1)
if corpse.itemid ~= 0 then doItemSetAttribute(corpse.uid, "golden", 1) end --alterado v2.8 
end 
if getPlayerStorageValue(cid, 22546) == 1 and getGlobalStorageValue(22548) <= 0 then
local wave = getGlobalStorageValue(22547)
for _, sid in ipairs(getPlayersOnline()) do
if isPlayer(sid) and getPlayerStorageValue(sid, 22545) == 1 then
if getGlobalStorageValue(22547) < #wavesGolden+1 then
doPlayerSendTextMessage(sid, 21, "Wave "..wave.." will begin in "..timeToWaves.."seconds!") 
doPlayerSendTextMessage(sid, 28, "Wave "..wave.." will begin in "..timeToWaves.."seconds!") 
addEvent(creaturesInGolden, 100, GoldenUpper, GoldenLower, false, true, true)
addEvent(doWave, timeToWaves*1000)
elseif getGlobalStorageValue(22547) == #wavesGolden+1 then
doPlayerSendTextMessage(sid, 20, "You have win the golden arena! Take your reward!")
doPlayerAddItem(sid, 2152, getPlayerStorageValue(sid, 22551)*2) --premio
setPlayerStorageValue(sid, 22545, -1)
doTeleportThing(sid, getClosestFreeTile(sid, posBackGolden), false) 
setPlayerRecordWaves(sid)
end
end
end
if getGlobalStorageValue(22547) == #wavesGolden+1 then
endGoldenArena()
end
end 
--------------------------------------------------- /\/\

local givenexp = getWildPokemonExp(cid)
local expstring = ""..cid.."expEx" 

if givenexp > 0 then
for a = 1, #deathList do 
local pk = deathList[a]
if isCreature(pk) then
local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false) 
local expTotal = math.floor(playerExperienceRate * givenexp * getDamageMapPercent(pk, cid))
local party = getPartyMembers(pk)

if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then
expTotal = math.floor(expTotal/#party) --alterado v2.6.1
for i = 1, #party do
if isInArray(list, party[i]) and getDamageMapPercent(party[i], cid) > 0 then --alterado v2.8
giveExpToPlayer(party[i], expTotal, givenexp, expstring)--alterado v2.7
end
end
else
giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7
end

end
end
end

if isNpcSummon(cid) then
local master = getCreatureMaster(cid)
doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000))
doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1)
doRemoveCreature(cid)
return false
end

if corpse.itemid ~= 0 then --alterado v2.8
doItemSetAttribute(corpse.uid, "offense", getPlayerStorageValue(cid, 1011))
doItemSetAttribute(corpse.uid, "defense", getPlayerStorageValue(cid, 1012))
doItemSetAttribute(corpse.uid, "speed", getPlayerStorageValue(cid, 1013))
doItemSetAttribute(corpse.uid, "vitality", getPlayerStorageValue(cid, 1014))
doItemSetAttribute(corpse.uid, "spattack", getPlayerStorageValue(cid, 1015))
doItemSetAttribute(corpse.uid, "level", getLevel(cid))
doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid))
end
return true
end

 

Esse é o pokeexp.lua, vou tentar resolver ele primeiro

se der erro poste.

Link para o comentário
Compartilhar em outros sites

  • 0

Continua msmo erro olhe

 

 

[15/02/2013 20:23:14] [Error - CreatureScript Interface]

[15/02/2013 20:23:14] data/creaturescripts/scripts/pokeexp.lua:onDeath

[15/02/2013 20:23:14] Description:

[15/02/2013 20:23:14] data/creaturescripts/scripts/pokeexp.lua:98: attempt to call global 'getLevel' (a nil value)

[15/02/2013 20:23:14] stack traceback:

[15/02/2013 20:23:14] data/creaturescripts/scripts/pokeexp.lua:98: in function <data/creaturescripts/scripts/pokeexp.lua:25>

 

 

Acho que esta dando esse erro por causa do CD BAR quando tirei level system deve ter desconfigurado o :

 

[15/02/2013 20:20:55] [Error - TalkAction Interface]

[15/02/2013 20:20:55] In a timer event called from:

[15/02/2013 20:20:55] data/talkactions/scripts/cdbar.lua:onSay

[15/02/2013 20:20:55] Description:

[15/02/2013 20:20:55] data/lib/some functions.lua:883: attempt to perform arithmetic on global 'pokemonMaxLevelAbovePlayer' (a nil value)

[15/02/2013 20:20:55] stack traceback:

[15/02/2013 20:20:55] data/lib/some functions.lua:883: in function 'doGoPokemon'

[15/02/2013 20:20:55] data/lib/cooldown bar.lua:178: in function 'doChangeBalls'

[15/02/2013 20:20:55] data/talkactions/scripts/cdbar.lua:9: in function <data/talkactions/scripts/cdbar.lua:1>

 

 

E o cooldow bar tambem olha :

 

[15/02/2013 20:20:56] [Error - Action Interface]

[15/02/2013 20:20:57] In a timer event called from:

[15/02/2013 20:20:57] data/actions/scripts/goback.lua:onUse

[15/02/2013 20:20:57] Description:

[15/02/2013 20:20:57] data/lib/cooldown bar.lua:151: attempt to call global 'getLevel' (a nil value)

[15/02/2013 20:20:57] stack traceback:

[15/02/2013 20:20:57] data/lib/cooldown bar.lua:151: in function <data/lib/cooldown bar.lua:122>

Link para o comentário
Compartilhar em outros sites

  • 0

Acho que assim vai:

 

local balls = {11826, 11828, 11829, 11831, 11832, 11834, 11835, 11837,
11737, 11739, 11740, 11742, 11743, 11745, 11746, 11748}

local function playerAddExp(cid, exp)
doPlayerAddExp(cid, exp)
doSendAnimatedText(getThingPos(cid), exp, 215)
end

local function giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7
playerAddExp(pk, expTotal) 

local firstball = getPlayerSlotItem(pk, 8)

if not isInParty(pk) and firstball and getItemAttribute(firstball.uid, expstring) and getItemAttribute(firstball.uid, expstring) > 0 then
local percent = getItemAttribute(firstball.uid, expstring) <= 1 and getItemAttribute(firstball.uid, expstring) or 1
local gainexp = math.ceil(percent * givenexp)
doItemSetAttribute(firstball.uid, expstring, 0)
elseif isInParty(pk) and firstball.uid ~= 0 then
end

end



function onDeath(cid, corpse, deathList)

if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v2.8

-------------Edited Golden Arena------------------------- --alterado v2.7 \/\/
if getPlayerStorageValue(cid, 22546) == 1 then
setGlobalStorageValue(22548, getGlobalStorageValue(22548)-1)
if corpse.itemid ~= 0 then doItemSetAttribute(corpse.uid, "golden", 1) end --alterado v2.8 
end 
if getPlayerStorageValue(cid, 22546) == 1 and getGlobalStorageValue(22548) <= 0 then
local wave = getGlobalStorageValue(22547)
for _, sid in ipairs(getPlayersOnline()) do
if isPlayer(sid) and getPlayerStorageValue(sid, 22545) == 1 then
if getGlobalStorageValue(22547) < #wavesGolden+1 then
doPlayerSendTextMessage(sid, 21, "Wave "..wave.." will begin in "..timeToWaves.."seconds!") 
doPlayerSendTextMessage(sid, 28, "Wave "..wave.." will begin in "..timeToWaves.."seconds!") 
addEvent(creaturesInGolden, 100, GoldenUpper, GoldenLower, false, true, true)
addEvent(doWave, timeToWaves*1000)
elseif getGlobalStorageValue(22547) == #wavesGolden+1 then
doPlayerSendTextMessage(sid, 20, "You have win the golden arena! Take your reward!")
doPlayerAddItem(sid, 2152, getPlayerStorageValue(sid, 22551)*2) --premio
setPlayerStorageValue(sid, 22545, -1)
doTeleportThing(sid, getClosestFreeTile(sid, posBackGolden), false) 
setPlayerRecordWaves(sid)
end
end
end
if getGlobalStorageValue(22547) == #wavesGolden+1 then
endGoldenArena()
end
end 
--------------------------------------------------- /\/\

local givenexp = getWildPokemonExp(cid)
local expstring = ""..cid.."expEx" 

if givenexp > 0 then
for a = 1, #deathList do 
local pk = deathList[a]
if isCreature(pk) then
local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false) 
local expTotal = math.floor(playerExperienceRate * givenexp * getDamageMapPercent(pk, cid))
local party = getPartyMembers(pk)

if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then
expTotal = math.floor(expTotal/#party) --alterado v2.6.1
for i = 1, #party do
if isInArray(list, party[i]) and getDamageMapPercent(party[i], cid) > 0 then --alterado v2.8
giveExpToPlayer(party[i], expTotal, givenexp, expstring)--alterado v2.7
end
end
else
giveExpToPlayer(pk, expTotal, givenexp, expstring) --alterado v2.7
end

end
end
end

if isNpcSummon(cid) then
local master = getCreatureMaster(cid)
doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000))
doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1)
doRemoveCreature(cid)
return false
end

if corpse.itemid ~= 0 then --alterado v2.8
doItemSetAttribute(corpse.uid, "offense", getPlayerStorageValue(cid, 1011))
doItemSetAttribute(corpse.uid, "defense", getPlayerStorageValue(cid, 1012))
doItemSetAttribute(corpse.uid, "speed", getPlayerStorageValue(cid, 1013))
doItemSetAttribute(corpse.uid, "vitality", getPlayerStorageValue(cid, 1014))
doItemSetAttribute(corpse.uid, "spattack", getPlayerStorageValue(cid, 1015))
doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid))
end
return true
end

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...