Ir para conteúdo

[Encerrado] Error pokeexp


Lordfireot

Posts Recomendados

[04/08/2013 02:11:01] [Error - CreatureScript Interface]

[04/08/2013 02:11:01] data/creaturescripts/scripts/pokeexp.lua:onDeath

[04/08/2013 02:11:01] Description:

[04/08/2013 02:11:01] (luaGetCreatureMaxHealth) Creature not found


[04/08/2013 02:11:01] [Error - CreatureScript Interface]

[04/08/2013 02:11:01] data/creaturescripts/scripts/pokeexp.lua:onDeath

[04/08/2013 02:11:01] Description:

[04/08/2013 02:11:01] (luaDoCreatureAddHealth) Creature not found


meu data/creaturescripts/scripts/pokeexp

 

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 Exps = {

{minL = 1, maxL = 5, multipler = 1},

{minL = 5, maxL = 10, multipler = 1},

{minL = 10, maxL = 30, multipler = 1},

{minL = 30, maxL = 80, multipler = 1},

{minL = 80, maxL = 299, multipler = 0.9},

}


local function calculaExp(cid, expTotal)

if not isPlayer(cid) then return 0 end

local expFinal = expTotal

local flag = false

for _, TABLE in pairs(Exps) do

if getPlayerLevel(cid) >= TABLE.minL and getPlayerLevel(cid) <= TABLE.maxL then

flag = true

expFinal = expFinal * TABLE.multipler

break

end

end

if not flag then expFinal = expFinal * 0.1 end --lvl 300+

return math.floor(expFinal)

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

 


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

testa esse

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


function onDeath(cid, corpse, deathList)

if not isCreature(cid) then return true end
if isSummon(cid) or not deathList or corpse.itemid == 0 or getCreatureName(cid) == "Evolution" then return true end

local givenexp = getWildPokemonExp(cid)
local expstring = ""..cid.."expEx"
local killer = getItemAttribute(corpse.uid, "corpseowner")

if givenexp > 0 then
for a = 1, #deathList do
local pk = deathList[a]
if isCreature(pk) then
playerAddExp(pk, math.floor(playerExperienceRate * givenexp * getDamageMapPercent(pk, cid)))
local firstball = getPlayerSlotItem(pk, 8)

if 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, gainexp)
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 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)
end
end
end
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

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))
return true
end

 

 

Link para o comentário
Compartilhar em outros sites

Tópico Movido para a devida Área. Amigo novamente preste mais atenção quando for postar um pedido de ajuda ou algo do tipo relacionado a servidores derivados etc.. como Pokemon,Naruto,Dbo etc..

 

Área correta: Pedidos e dúvidas - Servidores derivados

Link para o comentário
Compartilhar em outros sites

Não e querendo falar mal galera mais tem pessoas que vem aqui so para falar

 

 

 

Tópico Movido para a devida Área. Amigo novamente preste mais atenção quando for postar um pedido de ajuda ou algo do tipo relacionado a servidores derivados etc.. como Pokemon,Naruto,Dbo etc..

Área correta: Pedidos e dúvidas - Servidores derivados

 

Pow o servidor e desse cara ele podia ajudar.

Link para o comentário
Compartilhar em outros sites

testa ai

 

 

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[b])
    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[b])                  --alterado v2.7
           elseif isInParty(pk) and getItemAttribute(uid,  expstring) and getItemAttribute(uid,  expstring) > 0 then
              givePokemonExpInBp(pk, uid, expTotal*3, balls[b])
           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[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

 

 

Link para o comentário
Compartilhar em outros sites

Gabrieltxu se ta certo arruma o xtibia parabéns cara ta certo mais nao foi tu que crio o servidor

?


Amigo nao deu quando eu fui evuluir 1 pokemon tipo pikachu para raichu

 

[05/08/2013 01:57:22] [Error - CreatureScript Interface]
[05/08/2013 01:57:22] data/creaturescripts/scripts/pokeexp.lua:onDeath
[05/08/2013 01:57:22] Description:
[05/08/2013 01:57:22] (luaGetCreatureMaxHealth) Creature not found
[05/08/2013 01:57:22] [Error - CreatureScript Interface]
[05/08/2013 01:57:22] data/creaturescripts/scripts/pokeexp.lua:onDeath
[05/08/2013 01:57:22] Description:
[05/08/2013 01:57:22] (luaDoCreatureAddHealth) Creature not found

Galera esse erro da quando algum pokemon evolui com level ou com stone.

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

 

local special = specialevo

local types = {
[leaf] = {"Bulbasaur", "Ivysaur", "Oddish", "Gloom", "Bellsprout", "Weepinbell", "Exeggcute", "Chikorita", "Bayleef", "Hoppip", "Skiploom", "Sunkern"},
[water] = {"Squirtle", "Wartortle", "Horsea", "Goldeen", "Magikarp", "Psyduck", "Poliwag", "Poliwhirl", "Tentacool", "Krabby", "Staryu", "Omanyte", "Eevee", "Totodile", "Croconow", "Chinchou", "Marill", "Wooper", "Slowpoke", "Remoraid", "Seadra"},
[venom] = {"Zubat", "Ekans", "Nidoran male", "Nidoran female", "Nidorino", "Nidorina", "Gloom", "Venonat", "Tentacool", "Grimer", "Koffing", "Spinarak", "Golbat"},
[thunder] = {"Magnemite", "Pikachu", "Voltorb", "Eevee", "Chinchou", "Pichu", "Mareep", "Flaaffy", "Elekid"},
[rock] = {"Geodude", "Graveler", "Rhyhorn", "Kabuto", "Slugma", "Pupitar"},
[punch] = {"Machop", "Machoke", "Mankey", "Poliwhirl", "Tyrogue"},
[fire] = {"Charmander", "Charmeleon", "Vulpix", "Growlithe", "Ponyta", "Eevee", "Cyndaquil", "Quilava", "Slugma", "Houndour", "Magby"},
[coccon] = {"Caterpie", "Metapod", "Weedle", "Kakuna", "Paras", "Venonat", "Scyther", "Ledyba", "Spinarak", "Pineco"},
[crystal] = {"Snorunt", "Dratini", "Dragonair", "Magikarp", "Omanyte", "Kabuto", "Seadra"},
[dark] = {"Gastly", "Haunter", "Eevee", "Houndour", "Pupitar"},
[earth] = {"Cubone", "Sandshrew", "Nidorino", "Nidorina", "Diglett", "Onix", "Rhyhorn", "Wooper", "Swinub", "Phanpy", "Larvitar"},
[enigma] = {"Abra", "Togepi", "Togetic", "Kadabra", "Psyduck", "Slowpoke", "Drowzee", "Eevee", "Natu", "Smoochum"},
[heart] = {"Rattata", "Pidgey", "Pidgeotto", "Spearow", "Clefairy", "Jigglypuff", "Meowth", "Doduo", "Porygon", "Chansey", "Sentret", "Hoothoot", "Cleffa", "Igglybuff", "Togepi", "Snubull", "Teddiursa"},
[ice] = {"Seel", "Shellder", "Smoochum", "Swinub"},
[king] = {"Slowpoke", "Poliwhirl", "Seadra"},
[metal] = {"Onix", "Scyther"},
[upgrade] = {"Porygon"},
[sun] = {"Sunkern", "Gloom"},
--[fire] = {"Shiny Charmander", "Shiny Charmeleon", "Shiny Vulpix", "Shiny Growlithe", "Shiny Ponyta", "Shiny Eevee"},
[water] = {"Shiny Squirtle", "Shiny Wartortle", "Shiny Horsea", "Shiny Goldeen", "Shiny Magikarp", "Shiny Psyduck", "Shiny Poliwag", "Shiny Poliwhirl", "Shiny Tentacool", "Shiny Krabby", "Shiny Staryu", "Shiny Omanyte", "Shiny Eevee"},
[leaf] = {"Shiny Bulbasaur", "Shiny Ivysaur", "Shiny Oddish", "Shiny Gloom", "Shiny Bellsprout", "Shiny Weepinbell", "Shiny Exeggcute"},
[heart] = {"Shiny Rattata", "Shiny Pidgey", "Shiny Pidgeotto", "Shiny Spearow", "Shiny Clefairy", "Shiny Jigglypuff", "Shiny Meowth", "Shiny Doduo", "Shiny Porygon", "Shiny Chansey"},
[enigma] = {"Shiny Abra", "Shiny Kadabra", "Shiny Psyduck", "Shiny Slowpoke", "Shiny Drowzee", "Shiny Eevee"},
[rock] = {"Shiny Geodude", "Shiny Graveler", "Shiny Rhyhorn", "Shiny Kabuto"},
[venom] = {"Shiny Zubat", "Shiny Ekans", "Shiny Nidoran male", "Shiny Nidoran female", "Shiny Nidorino", "Shiny Nidorina", "Shiny Gloom", "Shiny Venonat", "Shiny Tentacool", "Shiny Grimer", "Shiny Koffing"},
[ice] = {"Shiny Seel", "Shiny Shellder", "Shiny Rattata"},
[thunder] = {"Shiny Magnemite", "Shiny Pikachu", "Shiny Voltorb", "Shiny Eevee"},
[crystal] = {"Shiny Dratini", "Shiny Dragonair", "Shiny Magikarp", "Shiny Omanyte", "Shiny Kabuto"},
[coccon] = {"Shiny Caterpie", "Shiny Metapod", "Shiny Weedle", "Shiny Kakuna", "Shiny Paras", "Shiny Venonat", "Shiny Scyther"},
[dark] = {"Shiny Gastly", "Shiny Haunter", "Shiny Eevee"},
[punch] = {"Shiny Machop", "Shiny Machoke", "Shiny Mankey", "Shiny Poliwhirl"},
[earth] = {"Shiny Cubone", "Shiny Sandshrew", "Shiny Nidorino", "Shiny Nidorina", "Shiny Diglett", "Shiny Onix", "Shiny Rhyhorn", "Shiny Onix"}
}
function onUse(cid, item, frompos, item2, topos)
local pokeball = getPlayerSlotItem(cid, 8)
if not isMonster(item2.uid) or not isSummon(item2.uid) then
return true
end
if getCreatureCondition(item2.uid, CONDITION_INVISIBLE) then return true end
local pevo = poevo[getCreatureName(item2.uid)]
if not isInArray(specialevo, getCreatureName(item2.uid)) then
if not pevo then
doPlayerSendCancel(cid, "This pokemon can't evolve.")
return true
end
if pevo.level ~= 1 and not allEvolutionsCanBeInduzedByStone then
doPlayerSendCancel(cid, "This pokemon doesn't evolve using stones.")
return true
end
if not isPlayer(getCreatureMaster(item2.uid)) or getCreatureMaster(item2.uid) ~= cid then
doPlayerSendCancel(cid, "You can only use stones on pokemons you own.")
return true
end
if pevo.stoneid ~= item.itemid and pevo.stoneid2 ~= item.itemid then
doPlayerSendCancel(cid, "This isn't the needed stone to evolve this pokemon.")
return true
end
end
local minlevel = 0
if getPokemonName(item2.uid) == "Eevee" then
local eevee = ""
if item.itemid == thunder then
eevee = "Jolteon"
elseif item.itemid == water then
eevee = "Vaporeon"
elseif item.itemid == fire then
eevee = "Flareon"
elseif item.itemid == enigma and allEvolutionsCanBeInduzedByStone then
eevee = "Espeon"
elseif item.itemid == dark and allEvolutionsCanBeInduzedByStone then
eevee = "Umbreon"
else
doPlayerSendCancel(cid, "This isn't the required stone to evolve this pokemon.")
return true
end
minlevel = pokes[eevee].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPokemonLevel(item2.uid) < 20 then
return doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (20).")
end
doRemoveItem(item.uid, 1)
doEvolvePokemon(cid, item2, eevee, 0, 0)
return true
end
if getPokemonName(item2.uid) == "Shiny Eevee" then
local eevee = ""
if item.itemid == sthunder then
eevee = "Shiny Jolteon"
elseif item.itemid == swater then
eevee = "Shiny Vaporeon"
elseif item.itemid == sfire then
eevee = "Shiny Flareon"
else
doPlayerSendCancel(cid, "This isn't the required stone to evolve this pokemon.")
return true
end
minlevel = pokes[eevee].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPokemonLevel(item2.uid) < 20 then
return doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (20).")
end
doRemoveItem(item.uid, 1)
doEvolvePokemon(cid, item2, eevee, 0, 0)
return true
end
if isInArray(specialevo, getPokemonName(item2.uid)) then
if getPokemonName(item2.uid) == "Poliwhirl" then
local evolution = 0
local theevo = ""
local nlevel = 15
if item.itemid == water then
if getPokemonLevel(item2.uid) >= 30 and getPlayerItemCount(cid, king) >= 1 then
evolution = king
theevo = "Politoed"
elseif getPokemonLevel(item2.uid) >= 30 and getPlayerItemCount(cid, punch) >= 1 and allEvolutionsCanBeInduzedByStone then
evolution = punch
theevo = "Poliwrath"
else
if getPokemonLevel(item2.uid) < 30 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (36).")
return true
end
if allEvolutionsCanBeInduzedByStone then
if getPlayerItemCount(cid, king) <= 0 and getPlayerItemCount(cid, punch) <= 0 then
doPlayerSendCancel(cid, "You need a water stone and a punch stone (Poliwrath) or a King's Rock (Politoed) to evolve this pokemon.")
return true
end
else
if getPlayerItemCount(cid, king) <= 0 then
doPlayerSendCancel(cid, "You need a Water Stone and a King's Rock to evolve this pokemon to a Politoed.")
return true
end
end
end
minlevel = pokes[theevo].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if theevo == "Poliwrath" and getPokemonLevel(item2.uid) < 30 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (36).")
return true
end
if getPlayerItemCount(cid, punch) >= 1 and getPlayerItemCount(cid, king) >= 1 and allEvolutionsCanBeInduzedByStone then
doPlayerSendCancel(cid, "Please, use your Punch Stone to evolve this pokemon to a Poliwrath, or a King's Rock to a Politoed.")
return true
end
if evolution == 0 then
if allEvolutionsCanBeInduzedByStone then
doPlayerSendCancel(cid, "You need at least one Water Stone, and a Punch Stone (Poliwrath) or a King's Rock (Politoed) to evolve this pokemon.")
else
doPlayerSendCancel(cid, "You need at least one Water Stone and a King's Rock to evolve this pokemon.")
end
return true
end
if evolution ~= 0 then
doEvolvePokemon(cid, item2, theevo, evolution, water)
return true
end
elseif item.itemid == punch then
minlevel = pokes["Poliwrath"].level
if not allEvolutionsCanBeInduzedByStone then
doPlayerSendCancel(cid, "This is not the required stone to evolve this pokemon.")
return true
end
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPokemonLevel(item2.uid) < 30 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (45).")
return true
end
if getPlayerItemCount(cid, water) <= 0 then
doPlayerSendCancel(cid, "You need at least one Punch Stone and one Water Stone to evolve this pokemon.")
return true
end
local theevo = "Poliwrath"
doEvolvePokemon(cid, item2, theevo, water, punch)
elseif item.itemid == king then
minlevel = pokes["Politoed"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPlayerItemCount(cid, water) <= 0 then
doPlayerSendCancel(cid, "You need at least one Punch Stone and one King's Rock to evolve this pokemon.")
return true
end
local theevo = "Politoed"
doEvolvePokemon(cid, item2, theevo, water, king)
end
elseif getPokemonName(item2.uid) == "Shiny Poliwhirl" then
local evolution = 0
local theevo = ""
local nlevel = 45
if item.itemid == swater then
if getPokemonLevel(item2.uid) >= 36 and getPlayerItemCount(cid, punch) >= 1 and allEvolutionsCanBeInduzedByStone then
evolution = spunch
theevo = "Shiny Poliwrath"
else
if getPokemonLevel(item2.uid) < 36 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (36).")
return true
end
if allEvolutionsCanBeInduzedByStone then
if getPlayerItemCount(cid, punch) <= 0 then
doPlayerSendCancel(cid, "You need a shining water stone and a shining punch stone Shiny Poliwrath to evolve this pokemon.")
return true
end
else
end
end
minlevel = pokes[theevo].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if theevo == "Shiny Poliwrath" and getPokemonLevel(item2.uid) < 36 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (36).")
return true
end
if getPlayerItemCount(cid, spunch) >= 1 and allEvolutionsCanBeInduzedByStone then
doPlayerSendCancel(cid, "Please, use your shining Punch Stone to evolve this pokemon to a Poliwrath.")
return true
end
if evolution == 0 then
if allEvolutionsCanBeInduzedByStone then
doPlayerSendCancel(cid, "You need at least one shining Water Stone and a shining Punch Stone ,Shiny Poliwrath to evolve this pokemon.")
else
doPlayerSendCancel(cid, "You need at least one shining Water Stone evolve this pokemon.")
end
return true
end
if evolution ~= 0 then
doEvolvePokemon(cid, item2, theevo, evolution, swater)
return true
end
elseif item.itemid == spunch then
minlevel = pokes["Shiny Poliwrath"].level
if not allEvolutionsCanBeInduzedByStone then
doPlayerSendCancel(cid, "This is not the required shining stone to evolve this pokemon.")
return true
end
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPokemonLevel(item2.uid) < 36 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (45).")
return true
end
if getPlayerItemCount(cid, swater) <= 0 then
doPlayerSendCancel(cid, "You need at least one shining Punch Stone and one shining Water Stone to evolve this pokemon.")
return true
end
local theevo = "Shiny Poliwrath"
doEvolvePokemon(cid, item2, theevo, swater, spunch)
end
elseif getPokemonName(item2.uid) == "Gloom" then
if getPokemonLevel(item2.uid) < 18 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (18).")
return true
end
if item.itemid == leaf then
local theevo = ""
local evolution = 0
if getPlayerItemCount(cid, venom) >= 1 and getPlayerItemCount(cid, sun) >= 1 then
doPlayerSendCancel(cid, "Please, use your Venom Stone to evolve this pokemon to a Vileplume, or a Sun Stone to a Bellossom.")
return true
end
if getPlayerItemCount(cid, venom) <= 0 and getPlayerItemCount(cid, sun) <= 0 then
doPlayerSendCancel(cid, "You need at least one Leaf Stone, and a Sun Stone (Bellossom) or a Venom Stone (Vileplume) to evolve this pokemon.")
return true
end
if getPlayerItemCount(cid, venom) >= 1 then
theevo = "Vileplume"
evolution = venom
elseif getPlayerItemCount(cid, sun) >= 1 then
theevo = "Bellossom"
evolution = sun
end
minlevel = pokes[theevo].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
doEvolvePokemon(cid, item2, theevo, evolution, leaf)
elseif item.itemid == venom then
minlevel = pokes["Vileplume"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPlayerItemCount(cid, leaf) <= 0 then
doPlayerSendCancel(cid, "You need at least one Leaf Stone and one Venom Stone to evolve this pokemon.")
return true
end
doEvolvePokemon(cid, item2, "Vileplume", venom, leaf)
elseif item.itemid == sun then
minlevel = pokes["Bellossom"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPlayerItemCount(cid, leaf) <= 0 then
doPlayerSendCancel(cid, "You need at least one Leaf Stone and one Sun Stone to evolve this pokemon.")
return true
end
doEvolvePokemon(cid, item2, "Bellossom", sun, leaf)
end
elseif getPokemonName(item2.uid) == "Golbat" then
if item.itemid == venom then
local theevo = ""
local evolution = 0
if getPlayerItemCount(cid, venom) >= 1 and getPlayerItemCount(cid, dragon) >= 1 then
doPlayerSendCancel(cid, "Please, use your Venom Stone to evolve this pokemon to a Crobat, or a Shiny Stone to a Shiny Golbat.")
return true
end
if getPlayerItemCount(cid, venom) <= 0 and getPlayerItemCount(cid, dragon) <= 0 then
doPlayerSendCancel(cid, "You need at least 2x Venom Stone (Crobat) or a Shiny Stone (Shiny Golbat) to evolve this pokemon.")
return true
end
if getPlayerItemCount(cid, venom) >= 1 then
theevo = "Crobat"
evolution = venom
end
minlevel = pokes[theevo].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
minlevel = pokes["Crobat"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPlayerItemCount(cid, venom) <= 1 then
doPlayerSendCancel(cid, "You need at least 2x Venom Stone to evolve this pokemon.")
return true
end
doEvolvePokemon(cid, item2, "Crobat", venom, venom)
elseif item.itemid == dragon then
minlevel = pokes["Shiny Golbat"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPlayerItemCount(cid, dragon) <= 0 then
doPlayerSendCancel(cid, "You need at least one Shiny Stone to evolve this pokemon.")
return true
end
doEvolvePokemon(cid, item2, "Shiny Golbat", dragon, 0)
end
elseif getPokemonName(item2.uid) == "Onix" then
if item.itemid == metal then
local theevo = ""
local evolution = 0
if getPlayerItemCount(cid, metal) >= 1 and getPlayerItemCount(cid, dragon) >= 1 then
doPlayerSendCancel(cid, "Please, use your Metal Coat to evolve this pokemon to a Steelix, or a Shiny Stone to a Shiny Onix.")
return true
end
if getPlayerItemCount(cid, metal) <= 0 and getPlayerItemCount(cid, dragon) <= 0 then
doPlayerSendCancel(cid, "You need at least a Metal Coat (Steelix) or a Shiny Stone (Shiny Onix) to evolve this pokemon.")
return true
end
if getPlayerItemCount(cid, metal) >= 1 then
theevo = "Steelix"
evolution = metal
end
minlevel = pokes[theevo].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
minlevel = pokes["Steelix"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPlayerItemCount(cid, metal) <= 0 then
doPlayerSendCancel(cid, "You need at least a Metal Coat to evolve this pokemon.")
return true
end
doEvolvePokemon(cid, item2, "Steelix", metal, 0)
elseif item.itemid == dragon then
minlevel = pokes["Shiny Onix"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPlayerItemCount(cid, dragon) <= 0 then
doPlayerSendCancel(cid, "You need at least one Shiny Stone to evolve this pokemon.")
return true
end
doEvolvePokemon(cid, item2, "Shiny Onix", dragon, 0)
end
elseif getPokemonName(item2.uid) == "Scyther" then
if item.itemid == metal then
local theevo = ""
local evolution = 0
if getPlayerItemCount(cid, metal) >= 1 and getPlayerItemCount(cid, dragon) >= 1 then
doPlayerSendCancel(cid, "Please, use your Metal Coat to evolve this pokemon to a Scizor, or a Shiny Stone to a Shiny Scyther.")
return true
end
if getPlayerItemCount(cid, metal) <= 0 and getPlayerItemCount(cid, dragon) <= 0 then
doPlayerSendCancel(cid, "You need at least a Metal Coat (Scizor) or a Shiny Stone (Shiny Scyther) to evolve this pokemon.")
return true
end
if getPlayerItemCount(cid, metal) >= 1 then
theevo = "Scizor"
evolution = metal
end
minlevel = pokes[theevo].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
minlevel = pokes["Scizor"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPlayerItemCount(cid, metal) <= 0 then
doPlayerSendCancel(cid, "You need at least a Metal Coat to evolve this pokemon.")
return true
end
doEvolvePokemon(cid, item2, "Scizor", metal, 0)
elseif item.itemid == dragon then
minlevel = pokes["Shiny Scyther"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPlayerItemCount(cid, dragon) <= 0 then
doPlayerSendCancel(cid, "You need at least one Shiny Stone to evolve this pokemon.")
return true
end
doEvolvePokemon(cid, item2, "Shiny Scyther", dragon, 0)
end
elseif getPokemonName(item2.uid) == "Shiny Gloom" then
if getPokemonLevel(item2.uid) < 31 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (31).")
return true
end
if item.itemid == sleaf then
local theevo = ""
local evolution = 0
if getPlayerItemCount(cid, svenom) >= 1 then
doPlayerSendCancel(cid, "Please, use your shining Venom Stone to evolve this pokemon to a Shiny Vileplume.")
return true
end
if getPlayerItemCount(cid, svenom) <= 0 then
doPlayerSendCancel(cid, "You need at least one shining Leaf Stone or a shining Venom Stone (Shiny Vileplume) to evolve this pokemon.")
return true
end
if getPlayerItemCount(cid, svenom) >= 1 then
theevo = "Shiny Vileplume"
evolution = svenom
end
minlevel = pokes[theevo].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
doEvolvePokemon(cid, item2, theevo, evolution, sleaf)
elseif item.itemid == svenom then
minlevel = pokes["Shiny Vileplume"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPlayerItemCount(cid, sleaf) <= 0 then
doPlayerSendCancel(cid, "You need at least one Leaf Stone and one shining Venom Stone to evolve this pokemon.")
return true
end
doEvolvePokemon(cid, item2, "Shiny Vileplume", svenom, sleaf)
end
elseif getPokemonName(item2.uid) == "Slowpoke" then
if item.itemid == enigma then
if getPokemonLevel(item2.uid) < 28 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (28).")
return true
end
if not allEvolutionsCanBeInduzedByStone then
doPlayerSendCancel(cid, "This is not the required stone to evolve this pokemon.")
return true
end
minlevel = pokes["Slowbro"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
doEvolvePokemon(cid, item2, "Slowbro", enigma, 0)
elseif item.itemid == king then
minlevel = pokes["Slowking"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
doEvolvePokemon(cid, item2, "Slowking", king, 0)
end
elseif getPokemonName(item2.uid) == "Shiny Slowpoke" then
if getPokemonLevel(item2.uid) < 28 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (28).")
return true
end
if item.itemid == senigma then
if not allEvolutionsCanBeInduzedByStone then
doPlayerSendCancel(cid, "This is not the required stone to evolve this pokemon.")
return true
end
minlevel = pokes["Shiny Slowbro"].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
doEvolvePokemon(cid, item2, "Shiny Slowbro", senigma, 0)
end
elseif getPokemonName(item2.uid) == "Tyrogue" then
if getPokemonLevel(item2.uid) < 20 then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve (20).")
return true
end
if not allEvolutionsCanBeInduzedByStone then
doPlayerSendCancel(cid, "This pokemon doesn't evolve using stones.")
return true
end
local evolution = ""
if getOffense(item2.uid) == getDefense(item2.uid) then
evolution = "Hitmontop"
elseif getOffense(item2.uid) > getDefense(item2.uid) then
evolution = "Hitmonlee"
else
evolution = "Hitmonchan"
end
minlevel = pokes[evolution].level
if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
doEvolvePokemon(cid, item2, evolution, punch, 0)
end
return true
end
local count = poevo[getPokemonName(item2.uid)].count
local stnid = poevo[getPokemonName(item2.uid)].stoneid
local stnid2 = poevo[getPokemonName(item2.uid)].stoneid2
local evo = poevo[getPokemonName(item2.uid)].evolution
local nlevel = poevo[getPokemonName(item2.uid)].level
local count = poevo[getPokemonName(item2.uid)].count
local stnid = poevo[getPokemonName(item2.uid)].stoneid
local stnid2 = poevo[getPokemonName(item2.uid)].stoneid2
local evo = poevo[getPokemonName(item2.uid)].evolution
local nlevel = poevo[getPokemonName(item2.uid)].level
if stnid2 > 1 and (getPlayerItemCount(cid, stnid2) < count or getPlayerItemCount(cid, stnid) < count) then
doPlayerSendCancel(cid, "You need at least one "..getItemNameById(stnid).." and one "..getItemNameById(stnid2).." to evolve this pokemon!")
return true
end
if getPlayerItemCount(cid, stnid) < count then
local str = ""
if count >= 2 then
str = "s"
end
return doPlayerSendCancel(cid, "You need at least "..count.." "..getItemNameById(stnid)..""..str.." to evolve this pokemon!")
end
minlevel = pokes[evo].level
if getPlayerLevel(cid) < minlevel and evolutionByStoneRequireLevel then
doPlayerSendCancel(cid, "You don't have enough level to evolve this pokemon ("..minlevel..").")
return true
end
if getPokemonLevel(item2.uid) < nlevel and evolutionByStoneRequireLevel then
doPlayerSendCancel(cid, "Sorry, your pokemon doesn't have the required level to evolve ("..nlevel..").")
return true
end
if count >= 2 then
stnid2 = stnid
end
doEvolvePokemon(cid, item2, evo, stnid, stnid2)
return TRUE
end

 

 


UPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP

Link para o comentário
Compartilhar em outros sites

  • 4 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

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