Weverton Siri 0 Postado Junho 16, 2017 Share Postado Junho 16, 2017 tou com este erro Spoiler [15/06/2017 23:47:39] [Error - Action Interface] [15/06/2017 23:47:39] data/actions/scripts/tm.lua:onUse [15/06/2017 23:47:39] Description: [15/06/2017 23:47:39] data/lib/050-function.lua:696: attempt to index global 'cp' (a nil value) [15/06/2017 23:47:39] stack traceback: [15/06/2017 23:47:40] data/lib/050-function.lua:696: in function 'isMoveTm' [15/06/2017 23:47:40] data/lib/050-function.lua:735: in function 'addTM' [15/06/2017 23:47:40] data/actions/scripts/tm.lua:132: in function <data/actions/scripts/tm.lua:2> função1 Spoiler function isMoveTm(pokenick,idtm) checkistm = cp[pokenick] ----- linha 696 nicktm = TM[idtm].spell nicktm2 = string.lower(nicktm) nmovestm = checkistm["!cd"].nmoves for xtm = 1, nmovestm do stringmoment = checkistm["m"..xtm..""].spell --if string.find(string.lower(stringmoment),nicktm2) then if string.lower(stringmoment) == nicktm2 then return true end end return false end função2 Spoiler function addTM(cid,item,tm,itemid) if isTM(item.uid) then doPlayerSendCancel(cid, "You can only add 1 TM each pokemon") return false end local Checktm = TMCHECK[tm] local nicktm5 = getItemAttribute(item.uid, "nome") if isShiny(nicktm5) then nicktm5 = nicktm5:gsub("Shiny ", "") end if isMoveTm(nicktm5,tm) then ------ linha 735 doPlayerSendCancel(cid, "You cant add this move, this pokemon have") return false end if isInArray(Checktm,nicktm5) then doItemSetAttribute(item.uid, "T1", tm) else local tmhave = "Pokemon's have This TM\n" for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, itemid,tmhave) return false end return true end tm.lua Spoiler function onUse(cid, item, frompos, item2, topos) if item2.uid == cid then local tmhave = "Pokemon's have This TM\n" local tmd = 1 if item.itemid == 7756 then tmd =11 elseif item.itemid == 15594 then tmd =17 elseif item.itemid == 7758 then tmd =6 elseif item.itemid == 7759 then tmd =20 elseif item.itemid == 7760 then tmd =21 elseif item.itemid == 7761 then tmd =22 elseif item.itemid == 7762 then tmd =16 elseif item.itemid == 7763 then tmd =1 elseif item.itemid == 7764 then tmd =3 elseif item.itemid == 7765 then tmd =4 elseif item.itemid == 7766 then tmd =7 elseif item.itemid == 7767 then tmd =8 elseif item.itemid == 7768 then tmd =9 elseif item.itemid == 7769 then tmd =5 elseif item.itemid == 7770 then tmd =10 elseif item.itemid == 7771 then tmd =18 elseif item.itemid == 7772 then tmd =15 elseif item.itemid == 7773 then tmd =12 elseif item.itemid == 7774 then tmd =19 elseif item.itemid == 7775 then tmd =13 elseif item.itemid == 7776 then tmd =2 elseif item.itemid == 7777 then tmd =14 end local Checktm = TMCHECK[tmd] for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, item.itemid,tmhave) return true end if isCreature(item2.uid) then local tmhave = "Pokemon's have This TM\n" local tmd = 1 if item.itemid == 7756 then tmd =11 elseif item.itemid == 15594 then tmd =17 elseif item.itemid == 7758 then tmd =6 elseif item.itemid == 7759 then tmd =20 elseif item.itemid == 7760 then tmd =21 elseif item.itemid == 7761 then tmd =22 elseif item.itemid == 7762 then tmd =16 elseif item.itemid == 7763 then tmd =1 elseif item.itemid == 7764 then tmd =3 elseif item.itemid == 7765 then tmd =4 elseif item.itemid == 7766 then tmd =7 elseif item.itemid == 7767 then tmd =8 elseif item.itemid == 7768 then tmd =9 elseif item.itemid == 7769 then tmd =5 elseif item.itemid == 7770 then tmd =10 elseif item.itemid == 7771 then tmd =18 elseif item.itemid == 7772 then tmd =15 elseif item.itemid == 7773 then tmd =12 elseif item.itemid == 7774 then tmd =19 elseif item.itemid == 7775 then tmd =13 elseif item.itemid == 7776 then tmd =2 elseif item.itemid == 7777 then tmd =14 end local Checktm = TMCHECK[tmd] for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, item.itemid,tmhave) return doPlayerSendCancel(cid, "You can only use tm in pokeballs in Feet Slot!") end if item2.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then return doPlayerSendCancel(cid, "You can only use tm in pokeballs in Feet Slot!") end if #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "need back you poke for use TM") end if item2.uid == getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then local nick = getItemAttribute(item2.uid, "nome") if item.itemid == 7756 then if addTM(cid,item2,11,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 15594 then if addTM(cid,item2,17,item.itemid) then ----linha 132 doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7758 then if addTM(cid,item2,6,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7759 then if addTM(cid,item2,20,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7760 then if addTM(cid,item2,21,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7761 then if addTM(cid,item2,22,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7762 then if addTM(cid,item2,16,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7763 then if addTM(cid,item2,1,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7764 then if addTM(cid,item2,3,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7765 then if addTM(cid,item2,4,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7766 then if addTM(cid,item2,7,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7767 then if addTM(cid,item2,8,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7768 then if addTM(cid,item2,9,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7769 then if addTM(cid,item2,5,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7770 then if addTM(cid,item2,10,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7771 then if addTM(cid,item2,18,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7772 then if addTM(cid,item2,15,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7773 then if addTM(cid,item2,12,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7774 then if addTM(cid,item2,19,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7775 then if addTM(cid,item2,13,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7776 then if addTM(cid,item2,2,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7777 then if addTM(cid,item2,14,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true end end return true end Link para o comentário Compartilhar em outros sites More sharing options...
Weverton Siri 0 Postado Junho 17, 2017 Autor Share Postado Junho 17, 2017 @Poccnn se eu te passar o sistema completo você pode adaptar para meu servidor? eu estou disposto a pagar pelo serviço Link para o comentário Compartilhar em outros sites More sharing options...
DarkWore 112 Postado Junho 17, 2017 Share Postado Junho 17, 2017 Eu Analisei o Script e não consegui achar á fonte do problema o script foi muito mal feito está aparentemente uma desorganização. Link para o comentário Compartilhar em outros sites More sharing options...
Poccnn 385 Postado Junho 18, 2017 Share Postado Junho 18, 2017 Eu não tenho pokelixo e nem vou ter pra ficar testando o sistema. Se quiser que eu le ajude me passe o sistema completo que irei analisar e repassa-lo pra ti com as modificações feitas. Link para o comentário Compartilhar em outros sites More sharing options...
Weverton Siri 0 Postado Junho 18, 2017 Autor Share Postado Junho 18, 2017 (editado) 6 horas atrás, Poccnn disse: Eu não tenho pokelixo e nem vou ter pra ficar testando o sistema. Se quiser que eu le ajude me passe o sistema completo que irei analisar e repassa-lo pra ti com as modificações feitas. ok esse sistema esta funcionando 100% porem um uma base diferente da minha e eu quero por na minha porem existem algumas diferenças entre as bases vou postar o sistema completo e logo abaixo irei postar os arquivos do meu servidor em actions existe 2 arquivos tm.lua Spoiler function onUse(cid, item, frompos, item2, topos) if item2.uid == cid then local tmhave = "Pokemon's have This TM\n" local tmd = 1 if item.itemid == 7756 then tmd =11 elseif item.itemid == 7757 then tmd =17 elseif item.itemid == 7758 then tmd =6 elseif item.itemid == 7759 then tmd =20 elseif item.itemid == 7760 then tmd =21 elseif item.itemid == 7761 then tmd =22 elseif item.itemid == 7762 then tmd =16 elseif item.itemid == 7763 then tmd =1 elseif item.itemid == 7764 then tmd =3 elseif item.itemid == 7765 then tmd =4 elseif item.itemid == 7766 then tmd =7 elseif item.itemid == 7767 then tmd =8 elseif item.itemid == 7768 then tmd =9 elseif item.itemid == 7769 then tmd =5 elseif item.itemid == 7770 then tmd =10 elseif item.itemid == 7771 then tmd =18 elseif item.itemid == 7772 then tmd =15 elseif item.itemid == 7773 then tmd =12 elseif item.itemid == 7774 then tmd =19 elseif item.itemid == 7775 then tmd =13 elseif item.itemid == 7776 then tmd =2 elseif item.itemid == 7777 then tmd =14 end local Checktm = TMCHECK[tmd] for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, item.itemid,tmhave) return true end if isCreature(item2.uid) then local tmhave = "Pokemon's have This TM\n" local tmd = 1 if item.itemid == 7756 then tmd =11 elseif item.itemid == 7757 then tmd =17 elseif item.itemid == 7758 then tmd =6 elseif item.itemid == 7759 then tmd =20 elseif item.itemid == 7760 then tmd =21 elseif item.itemid == 7761 then tmd =22 elseif item.itemid == 7762 then tmd =16 elseif item.itemid == 7763 then tmd =1 elseif item.itemid == 7764 then tmd =3 elseif item.itemid == 7765 then tmd =4 elseif item.itemid == 7766 then tmd =7 elseif item.itemid == 7767 then tmd =8 elseif item.itemid == 7768 then tmd =9 elseif item.itemid == 7769 then tmd =5 elseif item.itemid == 7770 then tmd =10 elseif item.itemid == 7771 then tmd =18 elseif item.itemid == 7772 then tmd =15 elseif item.itemid == 7773 then tmd =12 elseif item.itemid == 7774 then tmd =19 elseif item.itemid == 7775 then tmd =13 elseif item.itemid == 7776 then tmd =2 elseif item.itemid == 7777 then tmd =14 end local Checktm = TMCHECK[tmd] for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, item.itemid,tmhave) return doPlayerSendCancel(cid, "You can only use tm in pokeballs in Feet Slot!") end if item2.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then return doPlayerSendCancel(cid, "You can only use tm in pokeballs in Feet Slot!") end if #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "need back you poke for use TM") end if item2.uid == getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then local nick = getItemAttribute(item2.uid, "nome") if item.itemid == 7756 then if addTM(cid,item2,11,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7757 then if addTM(cid,item2,17,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7758 then if addTM(cid,item2,6,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7759 then if addTM(cid,item2,20,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7760 then if addTM(cid,item2,21,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7761 then if addTM(cid,item2,22,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7762 then if addTM(cid,item2,16,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7763 then if addTM(cid,item2,1,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7764 then if addTM(cid,item2,3,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7765 then if addTM(cid,item2,4,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7766 then if addTM(cid,item2,7,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7767 then if addTM(cid,item2,8,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7768 then if addTM(cid,item2,9,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7769 then if addTM(cid,item2,5,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7770 then if addTM(cid,item2,10,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7771 then if addTM(cid,item2,18,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7772 then if addTM(cid,item2,15,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7773 then if addTM(cid,item2,12,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7774 then if addTM(cid,item2,19,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7775 then if addTM(cid,item2,13,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7776 then if addTM(cid,item2,2,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true elseif item.itemid == 7777 then if addTM(cid,item2,14,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true end end return true end e tmclean.lua Spoiler function onUse(cid, item, frompos, item2, topos) if isCreature(item2.uid) then return doPlayerSendCancel(cid, "You can only use tm clean in pokeballs in Feet Slot!") end if item2.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then return doPlayerSendCancel(cid, "You can only use tm clean in pokeballs in Feet Slot!") end if #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "need back you poke for use TM Clean") end if item2.uid == getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then if isTM(item2.uid) then TMClean(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) else return doPlayerSendCancel(cid, "this pokemon dont have tm to clean") end end return true end em talkactions outros 2 tm.lua Spoiler local pokeis = {'Bulbasaur','Ivysaur','Venusaur','Charmander','Charmeleon','Charizard','Squirtle','Wartortle','Blastoise','Caterpie', 'Metapod','Butterfree','Weedle','Kakuna','Beedrill','Pidgey','Pidgeotto','Pidgeot','Rattata','Raticate','Spearow','Fearow','Ekans','Arbok', 'Pikachu','Raichu','Sandshrew','Sandslash','Nidoran Female','Nidorina','Nidoqueen','Nidoran Male','Nidorino','Nidoking','Clefairy', 'Clefable','Vulpix','Ninetales','Jigglypuff','Wigglytuff','Zubat','Golbat','Oddish','Gloom','Vileplume','Paras','Parasect','Venonat', 'Venomoth','Diglett','Dugtrio','Meowth','Persian','Psyduck','Golduck','Mankey','Primeape','Growlithe','Arcanine','Poliwag','Poliwhirl', 'Poliwrath','Abra','Kadabra','Alakazam','Machop','Machoke','Machamp','Bellsprout','Weepinbell','Victreebel','Tentacool','Tentacruel', 'Geodude','Graveler','Golem','Ponyta','Rapidash','Slowpoke','Slowbro','Magnemite','Magneton','Farfetchd','Doduo','Dodrio','Seel', 'Dewgong','Grimer','Muk','Shellder','Cloyster','Gastly','Haunter','Gengar','Onix','Drowzee','Hypno','Krabby','Kingler','Voltorb', 'Electrode','Exeggcute','Exeggutor','Cubone','Marowak','Hitmonlee','Hitmonchan','Lickitung','Koffing','Weezing','Rhyhorn','Rhydon', 'Chansey','Tangela','Kangaskhan','Horsea','Seadra','Goldeen','Seaking','Staryu','Starmie','Mr. Mime','Scyther','Jynx','Electabuzz', 'Magmar','Pinsir','Tauros','Magikarp','Gyarados','Lapras','Ditto','Eevee','Vaporeon','Jolteon','Flareon','Porygon','Omanyte','Omastar', 'Kabuto','Kabutops','Aerodactyl','Snorlax','Articuno','Zapdos','Moltres','Dratini','Dragonair','Dragonite','Mewtwo','Mew','Crystal Onix','Elder Charizard','Shiny abra'} function onSay(cid, words, param) if #getCreatureSummons(cid) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a back pokemon for change TM") return true end local pokemon = getPlayerSlotItem(cid, if pokemon.itemid >= 1 then if isTM(pokemon.uid) then doOpenTM(cid) return true else return doPlayerSendCancel(cid, "This pokemon don't Have TM") end return true else return doPlayerSendCancel(cid, "You need a equip pokemon in feet sloot to change TM.") end return true end e move1.lua --- lembrando que meu server ja existe esse move1.lua e aqui começa a diferença vou postar a do sistema e também a que já existe em meu serve move1.lua do sistema Spoiler local cdtec = { ["cold"] = { ["m1"] = { cd= 31000}, ["m2"]= { cd= 31001}, ["m3"]= { cd= 31002}, ["m4"]= { cd= 31003}, ["m5"]={ cd= 31004}, ["m6"]={ cd= 31005}, ["m7"]={ cd= 31006}, ["m8"]={ cd= 31007}, ["m9"]= { cd= 31008}, ["m10"]={ cd= 31009}, ["m11"]={ cd= 31010}, ["m12"]={ cd= 31011}, } } local cdtec2 = { ["cold"] = { ["m1"] = { cd= 30015}, ["m2"]= { cd= 30016}, ["m3"]= { cd= 30017}, ["m4"]= { cd= 30018}, ["m5"]={ cd= 30019}, ["m6"]={ cd= 30020}, ["m7"]={ cd= 30021}, ["m8"]={ cd= 30022}, ["m9"]= { cd= 30023}, ["m10"]={ cd= 30024}, ["m11"]={ cd= 30025}, ["m12"]={ cd= 30026}, } } function isPlayerInParty(uid1, uid2) if getTileInfo(getThingPos(uid1)).pvp and getTileInfo(getThingPos(uid2)).pvp then return true end --if getPlayerParty(uid1) then -- if getPlayerParty(uid1) == getPlayerParty(uid2) then -- return true -- end --end return false end local config = { jumps = 10, walktime = 500 } combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, PSYCHICDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 134) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -15, 5, 5, 1.8, 3, -20, -40) function movesx(cid, pos, n,dmg,dmg2) local n = n or 0 if (n < config.jumps) then if (isCreature(cid)) then local dmg = getPlayerStorageValue(cid, 985) local dmg2 = getPlayerStorageValue(cid, 986) local pos = pos or getCreaturePosition(cid) local target = getCreatureTarget(cid) local dir = (target ~= 0) and getDirectionTo(pos, getCreaturePosition(target)) or getCreatureLookDirection(cid) local tpos = (target ~= 0) and getCreaturePosition(target) local newPos if ((target ~= 0) and ((pos.x == tpos.x) and (pos.y == tpos.y))) then newPos = tpos else newPos = getPosByDir(pos, dir) end --if ((getTopCreature(newPos).uid == 0) and doTileQueryAdd(cid, newPos) ~= 1) then return false end doAreaCombatHealth(cid, PSYCHICDAMAGE, newPos, 0, -dmg, -dmg2, 182) --doCombat(cid, combat, { -- pos = newPos, -- type = 2 -- }) addEvent(movesx, config.walktime, cid, newPos, n + 1) end end end local config = { jumps = 10, walktime = 500 } combatx = createCombatObject() setCombatParam(combatx, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combatx, COMBAT_PARAM_TYPE, GHOSTDAMAGE) setCombatParam(combatx, COMBAT_PARAM_EFFECT, 38) setCombatFormula(combatx, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -15, 5, 5, 1.8, 3, -20, -40) function ghostmew(cid, pos, n,dmg,dmg2) local n = n or 0 if (n < config.jumps) then if (isCreature(cid)) then local dmg = getPlayerStorageValue(cid, 985) local dmg2 = getPlayerStorageValue(cid, 986) local pos = pos or getCreaturePosition(cid) local target = getCreatureTarget(cid) local dir = (target ~= 0) and getDirectionTo(pos, getCreaturePosition(target)) or getCreatureLookDirection(cid) local tpos = (target ~= 0) and getCreaturePosition(target) local newPos if ((target ~= 0) and ((pos.x == tpos.x) and (pos.y == tpos.y))) then newPos = tpos else newPos = getPosByDir(pos, dir) end --if ((getTopCreature(newPos).uid == 0) and doTileQueryAdd(cid, newPos) ~= 1) then return false end doSendMagicEffect(newPos, 187) doAreaCombatHealth(cid, GHOSTDAMAGE, newPos, 0, -dmg, -dmg2, 186) addEvent(ghostmew, config.walktime, cid, newPos, n + 1) end end end function Poison(inpoison, ef, rounds) if rounds == 0 then return false end if not inpoison then return false end if isMonster(inpoison) then local p = getCreaturePosition(inpoison) doAreaCombatHealth(pet, POISONDAMAGE, p, 0, -10, -10, ef) return addEvent(Poison, 800, inpoison, ef, rounds-1) end end local naotemcd = {''} local pokeis = {'Bulbasaur','Ivysaur','Venusaur','Charmander','Charmeleon','Charizard','Squirtle','Wartortle','Blastoise','Caterpie', 'Metapod','Butterfree','Weedle','Kakuna','Beedrill','Pidgey','Pidgeotto','Pidgeot','Rattata','Raticate','Spearow','Fearow','Ekans','Arbok', 'Pikachu','Raichu','Sandshrew','Sandslash','Nidoran Female','Nidorina','Nidoqueen','Nidoran Male','Nidorino','Nidoking','Clefairy', 'Clefable','Vulpix','Ninetales','Jigglypuff','Wigglytuff','Zubat','Golbat','Oddish','Gloom','Vileplume','Paras','Parasect','Venonat', 'Venomoth','Diglett','Dugtrio','Meowth','Persian','Psyduck','Golduck','Mankey','Primeape','Growlithe','Arcanine','Poliwag','Poliwhirl', 'Poliwrath','Abra','Kadabra','Alakazam','Machop','Machoke','Machamp','Bellsprout','Weepinbell','Victreebel','Tentacool','Tentacruel', 'Geodude','Graveler','Golem','Ponyta','Rapidash','Slowpoke','Slowbro','Magnemite','Magneton','Farfetchd','Doduo','Dodrio','Seel', 'Dewgong','Grimer','Muk','Shellder','Cloyster','Gastly','Haunter','Gengar','Onix','Drowzee','Hypno','Krabby','Kingler','Voltorb', 'Electrode','Exeggcute','Exeggutor','Cubone','Marowak','Hitmonlee','Hitmonchan','Lickitung','Koffing','Weezing','Rhyhorn','Rhydon', 'Chansey','Tangela','Kangaskhan','Horsea','Seadra','Goldeen','Seaking','Staryu','Starmie','Mr. Mime','Scyther','Jynx','Electabuzz', 'Magmar','Pinsir','Tauros','Magikarp','Gyarados','Lapras','Ditto','Eevee','Vaporeon','Jolteon','Flareon','Porygon','Omanyte','Omastar', 'Kabuto','Kabutops','Aerodactyl','Snorlax','Articuno','Zapdos','Moltres','Dratini','Dragonair','Dragonite','Mewtwo','Mew','Elder Charizard','Crystal Onix'} function onSay(cid, words, param) local sumomdonego = getCreatureSummons(cid)[1] if not sumomdonego then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemos to moves.") return 0 end local pokemon = cp[getCreatureName(sumomdonego)][words] if isInArray({"Ditto","Smeargle"}, getCreatureName(sumomdonego)) then if isInArray({"28"}, getCreatureOutfit(sumomdonego).lookType) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a transform to use moves.") return 0 end if exhaustion.get(cid, 548798) then dittocold = math.floor(((exhaustion.get(cid, 548798)) )) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ths pokemon needs "..dittocold.." seconds to learn the moves") return 0 end local ditto = getPlayerSlotItem(cid, local ropax = getItemAttribute(ditto.uid, "nomepoke") if words == "!cd" then pokemon = cp[ropax][words] if not pokemon then if getPlayerStorageValue(sumomdonego, 1236) <= 0 then return true end end pokemon.pokenome = "Ditto" if ropax == "Smeargle" then pokemon.pokenome = "Smeargle" end else pokemon = cp[ropax][words] if not pokemon then if getPlayerStorageValue(sumomdonego, 1236) <= 0 then return true end end end else if not pokemon then if getPlayerStorageValue(sumomdonego, 1236) <= 0 then return true end end end local tmitem = getPlayerSlotItem(cid, local leveldopoke = 0 if pokemon then leveldopoke = pokemon.minLv end if words ~= "!cd" then if isTM(tmitem.uid) and getPlayerStorageValue(cid, 888) <= 0 then local idtm = words:gsub("m", "T") local tmspell = "" if getTM(tmitem.uid,idtm) then tmspell = TM[getTM(tmitem.uid,idtm)] pokemon = tmspell leveldopoke = getPlayerStorageValue(sumomdonego, 1236) elseif not pokemon then return true end end end if words == "!cd" then if getPlayerStorageValue(cid, 888) >= 1 then return true end local numerodamsg = 25 if pokemon.nmoves == 1 then local tmspell = "" if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."") end if pokemon.nmoves == 2 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."") end if pokemon.nmoves == 3 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end if getTM(tmitem.uid,"T3") then tmspell = TM[getTM(tmitem.uid,"T3")] pokemon.spellm3 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end if exhaustion.get(cid, 31002) then seconds3 = math.floor(((exhaustion.get(cid, 31002)) + 1)) frasecd3 = ""..pokemon.spellm3.." - m3: wait "..seconds3.." seconds." else frasecd3 = ""..pokemon.spellm3.." - m3: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."\n"..frasecd3.."") end if pokemon.nmoves == 4 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end if getTM(tmitem.uid,"T3") then tmspell = TM[getTM(tmitem.uid,"T3")] pokemon.spellm3 = tmspell.spell end if getTM(tmitem.uid,"T4") then tmspell = TM[getTM(tmitem.uid,"T4")] pokemon.spellm4 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end if exhaustion.get(cid, 31002) then seconds3 = math.floor(((exhaustion.get(cid, 31002)) + 1)) frasecd3 = ""..pokemon.spellm3.." - m3: wait "..seconds3.." seconds." else frasecd3 = ""..pokemon.spellm3.." - m3: ready." end if exhaustion.get(cid, 31003) then seconds4 = math.floor(((exhaustion.get(cid, 31003)) + 1)) frasecd4 = ""..pokemon.spellm4.." - m4: wait "..seconds4.." seconds." else frasecd4 = ""..pokemon.spellm4.." - m4: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."\n"..frasecd3.."\n"..frasecd4.."") end if pokemon.nmoves == 5 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end if getTM(tmitem.uid,"T3") then tmspell = TM[getTM(tmitem.uid,"T3")] pokemon.spellm3 = tmspell.spell end if getTM(tmitem.uid,"T4") then tmspell = TM[getTM(tmitem.uid,"T4")] pokemon.spellm4 = tmspell.spell end if getTM(tmitem.uid,"T5") then tmspell = TM[getTM(tmitem.uid,"T5")] pokemon.spellm5 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end if exhaustion.get(cid, 31002) then seconds3 = math.floor(((exhaustion.get(cid, 31002)) + 1)) frasecd3 = ""..pokemon.spellm3.." - m3: wait "..seconds3.." seconds." else frasecd3 = ""..pokemon.spellm3.." - m3: ready." end if exhaustion.get(cid, 31003) then seconds4 = math.floor(((exhaustion.get(cid, 31003)) + 1)) frasecd4 = ""..pokemon.spellm4.." - m4: wait "..seconds4.." seconds." else frasecd4 = ""..pokemon.spellm4.." - m4: ready." end if exhaustion.get(cid, 31004) then seconds5 = math.floor(((exhaustion.get(cid, 31004)) + 1)) frasecd5 = ""..pokemon.spellm5.." - m5: wait "..seconds5.." seconds." else frasecd5 = ""..pokemon.spellm5.." - m5: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."\n"..frasecd3.."\n"..frasecd4.."\n"..frasecd5.."") end if pokemon.nmoves == 6 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end if getTM(tmitem.uid,"T3") then tmspell = TM[getTM(tmitem.uid,"T3")] pokemon.spellm3 = tmspell.spell end if getTM(tmitem.uid,"T4") then tmspell = TM[getTM(tmitem.uid,"T4")] pokemon.spellm4 = tmspell.spell end if getTM(tmitem.uid,"T5") then tmspell = TM[getTM(tmitem.uid,"T5")] pokemon.spellm5 = tmspell.spell end if getTM(tmitem.uid,"T6") then tmspell = TM[getTM(tmitem.uid,"T6")] pokemon.spellm6 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end if exhaustion.get(cid, 31002) then seconds3 = math.floor(((exhaustion.get(cid, 31002)) + 1)) frasecd3 = ""..pokemon.spellm3.." - m3: wait "..seconds3.." seconds." else frasecd3 = ""..pokemon.spellm3.." - m3: ready." end if exhaustion.get(cid, 31003) then seconds4 = math.floor(((exhaustion.get(cid, 31003)) + 1)) frasecd4 = ""..pokemon.spellm4.." - m4: wait "..seconds4.." seconds." else frasecd4 = ""..pokemon.spellm4.." - m4: ready." end if exhaustion.get(cid, 31004) then seconds5 = math.floor(((exhaustion.get(cid, 31004)) + 1)) frasecd5 = ""..pokemon.spellm5.." - m5: wait "..seconds5.." seconds." else frasecd5 = ""..pokemon.spellm5.." - m5: ready." end if exhaustion.get(cid, 31005) then seconds6 = math.floor(((exhaustion.get(cid, 31005)) + 1)) frasecd6 = ""..pokemon.spellm6.." - m6: wait "..seconds6.." seconds." else frasecd6 = ""..pokemon.spellm6.." - m6: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."\n"..frasecd3.."\n"..frasecd4.."\n"..frasecd5.."\n"..frasecd6.."") end if pokemon.nmoves == 7 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end if getTM(tmitem.uid,"T3") then tmspell = TM[getTM(tmitem.uid,"T3")] pokemon.spellm3 = tmspell.spell end if getTM(tmitem.uid,"T4") then tmspell = TM[getTM(tmitem.uid,"T4")] pokemon.spellm4 = tmspell.spell end if getTM(tmitem.uid,"T5") then tmspell = TM[getTM(tmitem.uid,"T5")] pokemon.spellm5 = tmspell.spell end if getTM(tmitem.uid,"T6") then tmspell = TM[getTM(tmitem.uid,"T6")] pokemon.spellm6 = tmspell.spell end if getTM(tmitem.uid,"T7") then tmspell = TM[getTM(tmitem.uid,"T7")] pokemon.spellm7 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end if exhaustion.get(cid, 31002) then seconds3 = math.floor(((exhaustion.get(cid, 31002)) + 1)) frasecd3 = ""..pokemon.spellm3.." - m3: wait "..seconds3.." seconds." else frasecd3 = ""..pokemon.spellm3.." - m3: ready." end if exhaustion.get(cid, 31003) then seconds4 = math.floor(((exhaustion.get(cid, 31003)) + 1)) frasecd4 = ""..pokemon.spellm4.." - m4: wait "..seconds4.." seconds." else frasecd4 = ""..pokemon.spellm4.." - m4: ready." end if exhaustion.get(cid, 31004) then seconds5 = math.floor(((exhaustion.get(cid, 31004)) + 1)) frasecd5 = ""..pokemon.spellm5.." - m5: wait "..seconds5.." seconds." else frasecd5 = ""..pokemon.spellm5.." - m5: ready." end if exhaustion.get(cid, 31005) then seconds6 = math.floor(((exhaustion.get(cid, 31005)) + 1)) frasecd6 = ""..pokemon.spellm6.." - m6: wait "..seconds6.." seconds." else frasecd6 = ""..pokemon.spellm6.." - m6: ready." end if exhaustion.get(cid, 31006) then seconds7 = math.floor(((exhaustion.get(cid, 31006)) + 1)) frasecd7 = ""..pokemon.spellm7.." - m7: wait "..seconds7.." seconds." else frasecd7 = ""..pokemon.spellm7.." - m7: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."\n"..frasecd3.."\n"..frasecd4.."\n"..frasecd5.."\n"..frasecd6.."\n"..frasecd7.."") end if pokemon.nmoves == 8 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end if getTM(tmitem.uid,"T3") then tmspell = TM[getTM(tmitem.uid,"T3")] pokemon.spellm3 = tmspell.spell end if getTM(tmitem.uid,"T4") then tmspell = TM[getTM(tmitem.uid,"T4")] pokemon.spellm4 = tmspell.spell end if getTM(tmitem.uid,"T5") then tmspell = TM[getTM(tmitem.uid,"T5")] pokemon.spellm5 = tmspell.spell end if getTM(tmitem.uid,"T6") then tmspell = TM[getTM(tmitem.uid,"T6")] pokemon.spellm6 = tmspell.spell end if getTM(tmitem.uid,"T7") then tmspell = TM[getTM(tmitem.uid,"T7")] pokemon.spellm7 = tmspell.spell end if getTM(tmitem.uid,"T8") then tmspell = TM[getTM(tmitem.uid,"T8")] pokemon.spellm8 = tmspell.spell end end if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end if exhaustion.get(cid, 31002) then seconds3 = math.floor(((exhaustion.get(cid, 31002)) + 1)) frasecd3 = ""..pokemon.spellm3.." - m3: wait "..seconds3.." seconds." else frasecd3 = ""..pokemon.spellm3.." - m3: ready." end if exhaustion.get(cid, 31003) then seconds4 = math.floor(((exhaustion.get(cid, 31003)) + 1)) frasecd4 = ""..pokemon.spellm4.." - m4: wait "..seconds4.." seconds." else frasecd4 = ""..pokemon.spellm4.." - m4: ready." end if exhaustion.get(cid, 31004) then seconds5 = math.floor(((exhaustion.get(cid, 31004)) + 1)) frasecd5 = ""..pokemon.spellm5.." - m5: wait "..seconds5.." seconds." else frasecd5 = ""..pokemon.spellm5.." - m5: ready." end if exhaustion.get(cid, 31005) then seconds6 = math.floor(((exhaustion.get(cid, 31005)) + 1)) frasecd6 = ""..pokemon.spellm6.." - m6: wait "..seconds6.." seconds." else frasecd6 = ""..pokemon.spellm6.." - m6: ready." end if exhaustion.get(cid, 31006) then seconds7 = math.floor(((exhaustion.get(cid, 31006)) + 1)) frasecd7 = ""..pokemon.spellm7.." - m7: wait "..seconds7.." seconds." else frasecd7 = ""..pokemon.spellm7.." - m7: ready." end if exhaustion.get(cid, 31007) then seconds8 = math.floor(((exhaustion.get(cid, 31007)) + 1)) frasecd8 = ""..pokemon.spellm8.." - m8: wait "..seconds8.." seconds." else frasecd8 = ""..pokemon.spellm8.." - m8: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."\n"..frasecd3.."\n"..frasecd4.."\n"..frasecd5.."\n"..frasecd6.."\n"..frasecd7.."\n"..frasecd8.."") end if pokemon.nmoves == 9 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end if getTM(tmitem.uid,"T3") then tmspell = TM[getTM(tmitem.uid,"T3")] pokemon.spellm3 = tmspell.spell end if getTM(tmitem.uid,"T4") then tmspell = TM[getTM(tmitem.uid,"T4")] pokemon.spellm4 = tmspell.spell end if getTM(tmitem.uid,"T5") then tmspell = TM[getTM(tmitem.uid,"T5")] pokemon.spellm5 = tmspell.spell end if getTM(tmitem.uid,"T6") then tmspell = TM[getTM(tmitem.uid,"T6")] pokemon.spellm6 = tmspell.spell end if getTM(tmitem.uid,"T7") then tmspell = TM[getTM(tmitem.uid,"T7")] pokemon.spellm7 = tmspell.spell end if getTM(tmitem.uid,"T8") then tmspell = TM[getTM(tmitem.uid,"T8")] pokemon.spellm8 = tmspell.spell end if getTM(tmitem.uid,"T9") then tmspell = TM[getTM(tmitem.uid,"T9")] pokemon.spellm9 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end if exhaustion.get(cid, 31002) then seconds3 = math.floor(((exhaustion.get(cid, 31002)) + 1)) frasecd3 = ""..pokemon.spellm3.." - m3: wait "..seconds3.." seconds." else frasecd3 = ""..pokemon.spellm3.." - m3: ready." end if exhaustion.get(cid, 31003) then seconds4 = math.floor(((exhaustion.get(cid, 31003)) + 1)) frasecd4 = ""..pokemon.spellm4.." - m4: wait "..seconds4.." seconds." else frasecd4 = ""..pokemon.spellm4.." - m4: ready." end if exhaustion.get(cid, 31004) then seconds5 = math.floor(((exhaustion.get(cid, 31004)) + 1)) frasecd5 = ""..pokemon.spellm5.." - m5: wait "..seconds5.." seconds." else frasecd5 = ""..pokemon.spellm5.." - m5: ready." end if exhaustion.get(cid, 31005) then seconds6 = math.floor(((exhaustion.get(cid, 31005)) + 1)) frasecd6 = ""..pokemon.spellm6.." - m6: wait "..seconds6.." seconds." else frasecd6 = ""..pokemon.spellm6.." - m6: ready." end if exhaustion.get(cid, 31006) then seconds7 = math.floor(((exhaustion.get(cid, 31006)) + 1)) frasecd7 = ""..pokemon.spellm7.." - m7: wait "..seconds7.." seconds." else frasecd7 = ""..pokemon.spellm7.." - m7: ready." end if exhaustion.get(cid, 31007) then seconds8 = math.floor(((exhaustion.get(cid, 31007)) + 1)) frasecd8 = ""..pokemon.spellm8.." - m8: wait "..seconds8.." seconds." else frasecd8 = ""..pokemon.spellm8.." - m8: ready." end if exhaustion.get(cid, 31008) then seconds9 = math.floor(((exhaustion.get(cid, 31008)) + 1)) frasecd9 = ""..pokemon.spellm9.." - m9: wait "..seconds9.." seconds." else frasecd9 = ""..pokemon.spellm9.." - m9: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."\n"..frasecd3.."\n"..frasecd4.."\n"..frasecd5.."\n"..frasecd6.."\n"..frasecd7.."\n"..frasecd8.."\n"..frasecd9.."") end if pokemon.nmoves == 10 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end if getTM(tmitem.uid,"T3") then tmspell = TM[getTM(tmitem.uid,"T3")] pokemon.spellm3 = tmspell.spell end if getTM(tmitem.uid,"T4") then tmspell = TM[getTM(tmitem.uid,"T4")] pokemon.spellm4 = tmspell.spell end if getTM(tmitem.uid,"T5") then tmspell = TM[getTM(tmitem.uid,"T5")] pokemon.spellm5 = tmspell.spell end if getTM(tmitem.uid,"T6") then tmspell = TM[getTM(tmitem.uid,"T6")] pokemon.spellm6 = tmspell.spell end if getTM(tmitem.uid,"T7") then tmspell = TM[getTM(tmitem.uid,"T7")] pokemon.spellm7 = tmspell.spell end if getTM(tmitem.uid,"T8") then tmspell = TM[getTM(tmitem.uid,"T8")] pokemon.spellm8 = tmspell.spell end if getTM(tmitem.uid,"T9") then tmspell = TM[getTM(tmitem.uid,"T9")] pokemon.spellm9 = tmspell.spell end if getTM(tmitem.uid,"T10") then tmspell = TM[getTM(tmitem.uid,"T10")] pokemon.spellm10 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end if exhaustion.get(cid, 31002) then seconds3 = math.floor(((exhaustion.get(cid, 31002)) + 1)) frasecd3 = ""..pokemon.spellm3.." - m3: wait "..seconds3.." seconds." else frasecd3 = ""..pokemon.spellm3.." - m3: ready." end if exhaustion.get(cid, 31003) then seconds4 = math.floor(((exhaustion.get(cid, 31003)) + 1)) frasecd4 = ""..pokemon.spellm4.." - m4: wait "..seconds4.." seconds." else frasecd4 = ""..pokemon.spellm4.." - m4: ready." end if exhaustion.get(cid, 31004) then seconds5 = math.floor(((exhaustion.get(cid, 31004)) + 1)) frasecd5 = ""..pokemon.spellm5.." - m5: wait "..seconds5.." seconds." else frasecd5 = ""..pokemon.spellm5.." - m5: ready." end if exhaustion.get(cid, 31005) then seconds6 = math.floor(((exhaustion.get(cid, 31005)) + 1)) frasecd6 = ""..pokemon.spellm6.." - m6: wait "..seconds6.." seconds." else frasecd6 = ""..pokemon.spellm6.." - m6: ready." end if exhaustion.get(cid, 31006) then seconds7 = math.floor(((exhaustion.get(cid, 31006)) + 1)) frasecd7 = ""..pokemon.spellm7.." - m7: wait "..seconds7.." seconds." else frasecd7 = ""..pokemon.spellm7.." - m7: ready." end if exhaustion.get(cid, 31007) then seconds8 = math.floor(((exhaustion.get(cid, 31007)) + 1)) frasecd8 = ""..pokemon.spellm8.." - m8: wait "..seconds8.." seconds." else frasecd8 = ""..pokemon.spellm8.." - m8: ready." end if exhaustion.get(cid, 31008) then seconds9 = math.floor(((exhaustion.get(cid, 31008)) + 1)) frasecd9 = ""..pokemon.spellm9.." - m9: wait "..seconds9.." seconds." else frasecd9 = ""..pokemon.spellm9.." - m9: ready." end if exhaustion.get(cid, 31009) then seconds10 = math.floor(((exhaustion.get(cid, 31009)) + 1)) frasecd10 = ""..pokemon.spellm10.." - m10: wait "..seconds10.." seconds." else frasecd10 = ""..pokemon.spellm10.." - m10: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."\n"..frasecd3.."\n"..frasecd4.."\n"..frasecd5.."\n"..frasecd6.."\n"..frasecd7.."\n"..frasecd8.."\n"..frasecd9.."\n"..frasecd10.."") end if pokemon.nmoves == 11 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end if getTM(tmitem.uid,"T3") then tmspell = TM[getTM(tmitem.uid,"T3")] pokemon.spellm3 = tmspell.spell end if getTM(tmitem.uid,"T4") then tmspell = TM[getTM(tmitem.uid,"T4")] pokemon.spellm4 = tmspell.spell end if getTM(tmitem.uid,"T5") then tmspell = TM[getTM(tmitem.uid,"T5")] pokemon.spellm5 = tmspell.spell end if getTM(tmitem.uid,"T6") then tmspell = TM[getTM(tmitem.uid,"T6")] pokemon.spellm6 = tmspell.spell end if getTM(tmitem.uid,"T7") then tmspell = TM[getTM(tmitem.uid,"T7")] pokemon.spellm7 = tmspell.spell end if getTM(tmitem.uid,"T8") then tmspell = TM[getTM(tmitem.uid,"T8")] pokemon.spellm8 = tmspell.spell end if getTM(tmitem.uid,"T9") then tmspell = TM[getTM(tmitem.uid,"T9")] pokemon.spellm9 = tmspell.spell end if getTM(tmitem.uid,"T10") then tmspell = TM[getTM(tmitem.uid,"T10")] pokemon.spellm10 = tmspell.spell end if getTM(tmitem.uid,"T11") then tmspell = TM[getTM(tmitem.uid,"T11")] pokemon.spellm11 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end if exhaustion.get(cid, 31002) then seconds3 = math.floor(((exhaustion.get(cid, 31002)) + 1)) frasecd3 = ""..pokemon.spellm3.." - m3: wait "..seconds3.." seconds." else frasecd3 = ""..pokemon.spellm3.." - m3: ready." end if exhaustion.get(cid, 31003) then seconds4 = math.floor(((exhaustion.get(cid, 31003)) + 1)) frasecd4 = ""..pokemon.spellm4.." - m4: wait "..seconds4.." seconds." else frasecd4 = ""..pokemon.spellm4.." - m4: ready." end if exhaustion.get(cid, 31004) then seconds5 = math.floor(((exhaustion.get(cid, 31004)) + 1)) frasecd5 = ""..pokemon.spellm5.." - m5: wait "..seconds5.." seconds." else frasecd5 = ""..pokemon.spellm5.." - m5: ready." end if exhaustion.get(cid, 31005) then seconds6 = math.floor(((exhaustion.get(cid, 31005)) + 1)) frasecd6 = ""..pokemon.spellm6.." - m6: wait "..seconds6.." seconds." else frasecd6 = ""..pokemon.spellm6.." - m6: ready." end if exhaustion.get(cid, 31006) then seconds7 = math.floor(((exhaustion.get(cid, 31006)) + 1)) frasecd7 = ""..pokemon.spellm7.." - m7: wait "..seconds7.." seconds." else frasecd7 = ""..pokemon.spellm7.." - m7: ready." end if exhaustion.get(cid, 31007) then seconds8 = math.floor(((exhaustion.get(cid, 31007)) + 1)) frasecd8 = ""..pokemon.spellm8.." - m8: wait "..seconds8.." seconds." else frasecd8 = ""..pokemon.spellm8.." - m8: ready." end if exhaustion.get(cid, 31008) then seconds9 = math.floor(((exhaustion.get(cid, 31008)) + 1)) frasecd9 = ""..pokemon.spellm9.." - m9: wait "..seconds9.." seconds." else frasecd9 = ""..pokemon.spellm9.." - m9: ready." end if exhaustion.get(cid, 31009) then seconds10 = math.floor(((exhaustion.get(cid, 31009)) + 1)) frasecd10 = ""..pokemon.spellm10.." - m10: wait "..seconds10.." seconds." else frasecd10 = ""..pokemon.spellm10.." - m10: ready." end if exhaustion.get(cid, 31010) then seconds11 = math.floor(((exhaustion.get(cid, 31010)) + 1)) frasecd11 = ""..pokemon.spellm11.." - m11: wait "..seconds11.." seconds." else frasecd11 = ""..pokemon.spellm11.." - m11: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."\n"..frasecd3.."\n"..frasecd4.."\n"..frasecd5.."\n"..frasecd6.."\n"..frasecd7.."\n"..frasecd8.."\n"..frasecd9.."\n"..frasecd10.."\n"..frasecd11.."") end if pokemon.nmoves == 12 then if isTM(tmitem.uid) then if getTM(tmitem.uid,"T1") then tmspell = TM[getTM(tmitem.uid,"T1")] pokemon.spellm1 = tmspell.spell end if getTM(tmitem.uid,"T2") then tmspell = TM[getTM(tmitem.uid,"T2")] pokemon.spellm2 = tmspell.spell end if getTM(tmitem.uid,"T3") then tmspell = TM[getTM(tmitem.uid,"T3")] pokemon.spellm3 = tmspell.spell end if getTM(tmitem.uid,"T4") then tmspell = TM[getTM(tmitem.uid,"T4")] pokemon.spellm4 = tmspell.spell end if getTM(tmitem.uid,"T5") then tmspell = TM[getTM(tmitem.uid,"T5")] pokemon.spellm5 = tmspell.spell end if getTM(tmitem.uid,"T6") then tmspell = TM[getTM(tmitem.uid,"T6")] pokemon.spellm6 = tmspell.spell end if getTM(tmitem.uid,"T7") then tmspell = TM[getTM(tmitem.uid,"T7")] pokemon.spellm7 = tmspell.spell end if getTM(tmitem.uid,"T8") then tmspell = TM[getTM(tmitem.uid,"T8")] pokemon.spellm8 = tmspell.spell end if getTM(tmitem.uid,"T9") then tmspell = TM[getTM(tmitem.uid,"T9")] pokemon.spellm9 = tmspell.spell end if getTM(tmitem.uid,"T10") then tmspell = TM[getTM(tmitem.uid,"T10")] pokemon.spellm10 = tmspell.spell end if getTM(tmitem.uid,"T11") then tmspell = TM[getTM(tmitem.uid,"T11")] pokemon.spellm11 = tmspell.spell end if getTM(tmitem.uid,"T12") then tmspell = TM[getTM(tmitem.uid,"T12")] pokemon.spellm12 = tmspell.spell end end if exhaustion.get(cid, 31000) then seconds1 = math.floor(((exhaustion.get(cid, 31000)) + 1)) frasename = "Pokemon: "..pokemon.pokenome.."" frasecd = ""..pokemon.spellm1.." - m1: wait "..seconds1.." seconds." else frasename = "Pokemon: "..pokemon.pokenome.." " frasecd = ""..pokemon.spellm1.." - m1: ready." end if exhaustion.get(cid, 31001) then seconds2 = math.floor(((exhaustion.get(cid, 31001)) + 1)) frasecd2 = ""..pokemon.spellm2.." - m2: wait "..seconds2.." seconds." else frasecd2 = ""..pokemon.spellm2.." - m2: ready." end if exhaustion.get(cid, 31002) then seconds3 = math.floor(((exhaustion.get(cid, 31002)) + 1)) frasecd3 = ""..pokemon.spellm3.." - m3: wait "..seconds3.." seconds." else frasecd3 = ""..pokemon.spellm3.." - m3: ready." end if exhaustion.get(cid, 31003) then seconds4 = math.floor(((exhaustion.get(cid, 31003)) + 1)) frasecd4 = ""..pokemon.spellm4.." - m4: wait "..seconds4.." seconds." else frasecd4 = ""..pokemon.spellm4.." - m4: ready." end if exhaustion.get(cid, 31004) then seconds5 = math.floor(((exhaustion.get(cid, 31004)) + 1)) frasecd5 = ""..pokemon.spellm5.." - m5: wait "..seconds5.." seconds." else frasecd5 = ""..pokemon.spellm5.." - m5: ready." end if exhaustion.get(cid, 31005) then seconds6 = math.floor(((exhaustion.get(cid, 31005)) + 1)) frasecd6 = ""..pokemon.spellm6.." - m6: wait "..seconds6.." seconds." else frasecd6 = ""..pokemon.spellm6.." - m6: ready." end if exhaustion.get(cid, 31006) then seconds7 = math.floor(((exhaustion.get(cid, 31006)) + 1)) frasecd7 = ""..pokemon.spellm7.." - m7: wait "..seconds7.." seconds." else frasecd7 = ""..pokemon.spellm7.." - m7: ready." end if exhaustion.get(cid, 31007) then seconds8 = math.floor(((exhaustion.get(cid, 31007)) + 1)) frasecd8 = ""..pokemon.spellm8.." - m8: wait "..seconds8.." seconds." else frasecd8 = ""..pokemon.spellm8.." - m8: ready." end if exhaustion.get(cid, 31008) then seconds9 = math.floor(((exhaustion.get(cid, 31008)) + 1)) frasecd9 = ""..pokemon.spellm9.." - m9: wait "..seconds9.." seconds." else frasecd9 = ""..pokemon.spellm9.." - m9: ready." end if exhaustion.get(cid, 31009) then seconds10 = math.floor(((exhaustion.get(cid, 31009)) + 1)) frasecd10 = ""..pokemon.spellm10.." - m10: wait "..seconds10.." seconds." else frasecd10 = ""..pokemon.spellm10.." - m10: ready." end if exhaustion.get(cid, 31010) then seconds11 = math.floor(((exhaustion.get(cid, 31010)) + 1)) frasecd11 = ""..pokemon.spellm11.." - m11: wait "..seconds11.." seconds." else frasecd11 = ""..pokemon.spellm11.." - m11: ready." end if exhaustion.get(cid, 31011) then seconds12 = math.floor(((exhaustion.get(cid, 31011)) + 1)) frasecd12 = ""..pokemon.spellm12.." - m12: wait "..seconds12.." seconds." else frasecd12 = ""..pokemon.spellm12.." - m12: ready." end doPlayerSendTextMessage(cid, numerodamsg, ""..frasename.."\n"..frasecd.."\n"..frasecd2.."\n"..frasecd3.."\n"..frasecd4.."\n"..frasecd5.."\n"..frasecd6.."\n"..frasecd7.."\n"..frasecd8.."\n"..frasecd9.."\n"..frasecd10.."\n"..frasecd11.."\n"..frasecd12.."") end return 0 end if getTileInfo(getCreaturePosition(sumomdonego)).protection or getTileInfo(getCreaturePosition(cid)).protection then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cant use moves in protection zone") return true end if getPlayerLevel(cid) < leveldopoke then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have enough level ,need "..leveldopoke.." to this move.") return 0 end if getPlayerStorageValue(sumomdonego, >= 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry You pokemon sleeping.") return true end if getPlayerStorageValue(sumomdonego, 10) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry your pokemon scared to battle") return true end if getPlayerStorageValue(sumomdonego, 9) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry your pokemon dont have target ,evasive pokemon") setPlayerStorageValue(sumomdonego, 9,0) return true end if exhaustion.get(cid, 5545789) then --doPlayerSendCancel(cid, "You Pokemon are Exausted!") return true end exhaustion.set(cid, 5545789, 0.3) local exaustcd = cdtec["cold"][words] if getPlayerStorageValue(cid, 888) >= 1 then exaustcd = cdtec2["cold"][words] end if exhaustion.get(cid, exaustcd.cd) then seconds = math.floor(((exhaustion.get(cid, exaustcd.cd))))+1 spell = pokemon.spell doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..seconds.." seconds to "..spell..".") return 0 end if pokemon.target ~= "no" then if not isMonster(getCreatureTarget(cid)) and not isPlayer(getCreatureTarget(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.") return 0 end if getDistanceBetween(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid))) > pokemon.dista then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to this move.") return 0 end if not isSightClear(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), false) then return 0 end end local leveldoplayer = getPlayerLevel(cid) local multvoc = 1 if getPlayerStorageValue(cid, 9340) == 1 then multvoc = 2 end if pokemon.type == "flying" then if getPlayerVocation(cid) == 15 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end elementa = FLYDAMAGE elseif pokemon.type == "ground" then if getPlayerVocation(cid) == 8 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end elementa = GROUNDDAMAGE elseif pokemon.type == "electric" then if getPlayerVocation(cid) == 16 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end --if getPlayerStorageValue(cid, 9359) == 1 then --leveldoplayer = leveldoplayer+25 --end elementa = ELECTRICDAMAGE elseif pokemon.type == "ghost" then if getPlayerVocation(cid) == 4 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end elementa = GHOSTDAMAGE elseif pokemon.type == "normal" then if getPlayerVocation(cid) == 7 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end --if getPlayerStorageValue(cid, 9360) == 1 then --leveldoplayer = leveldoplayer+30 --end elementa = NORMALDAMAGE elseif pokemon.type == "fighting" then if getPlayerVocation(cid) == 14 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end elementa = FIGHTDAMAGE elseif pokemon.type == "poison" then if getPlayerVocation(cid) == 13 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end --if getPlayerStorageValue(cid, 9356) == 1 then --leveldoplayer = leveldoplayer+25 --end elementa = POISONDAMAGE elseif pokemon.type == "rock" then if getPlayerVocation(cid) == 10 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end --if getPlayerStorageValue(cid, 9353) == 1 then --leveldoplayer = leveldoplayer+20 --end elementa = ROCKDAMAGE elseif pokemon.type == "bug" then if getPlayerVocation(cid) == 17 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end elementa = BUGDAMAGE elseif pokemon.type == "fire" then if getPlayerVocation(cid) == 6 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end --if getPlayerStorageValue(cid, 9354) == 1 then --leveldoplayer = leveldoplayer+20 --end elementa = FIREDAMAGE elseif pokemon.type == "water" then if getPlayerVocation(cid) == 11 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end --if getPlayerStorageValue(cid, 9355) == 1 then --leveldoplayer = leveldoplayer+20 --end elementa = WATERDAMAGE elseif pokemon.type == "grass" then if getPlayerVocation(cid) == 5 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end --if getPlayerStorageValue(cid, 9358) == 1 then --leveldoplayer = leveldoplayer+25 --end elementa = GRASSDAMAGE elseif pokemon.type == "psychic" then if getPlayerVocation(cid) == 9 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end --if getPlayerStorageValue(cid, 9357) == 1 then --leveldoplayer = leveldoplayer+20 --end elementa = PSYCHICDAMAGE elseif pokemon.type == "ice" then if getPlayerVocation(cid) == 12 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end elementa = ICEDAMAGE elseif pokemon.type == "dragon" then if getPlayerVocation(cid) == 3 then leveldoplayer = getPlayerLevel(cid)+30*multvoc end elementa = DRAGONDAMAGE elseif pokemon.type == "dark" then elementa = DARKDAMAGE elseif pokemon.type == "steel" then elementa = STEELDAMAGE end local element = elementa local num1 = (leveldopoke*1.5) local num2 = (leveldopoke*2) local item2 = getPlayerSlotItem(cid, local boost = getItemAttribute(item2.uid, "boost")/3 local candy = getItemAttribute(item2.uid, "candy") local num3 = (pokemon.bonus) if isShiny(getItemAttribute(item2.uid, "nome")) then num3 = (pokemon.bonus)*1.5 end local lvpokemon = boost+leveldoplayer if candy then lvpokemon = boost+leveldoplayer+candy end leveldoplayer = 0 local modeFight = getModeFight(cid) if modeFight == 1 then num3 = num3 * 1.2 elseif modeFight == 3 then num3 = num3 * 0.8 end local apelidoounome = getItemAttribute(item2.uid, "apelido") if pokemon.spell == "Selfdestruct" then if exhaustion.get(cid, 31015) then seconds = math.floor(((exhaustion.get(cid, 31015))))+1 spell = pokemon.spell doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..seconds.." seconds to "..spell..".") return 0 end exhaustion.set(cid, 31015, 200) end if apelidoounome then doPlayerSay(cid, apelidoounome.." , "..pokemon.spell..".", 1) else doPlayerSay(cid, getCreatureName(sumomdonego).." , "..pokemon.spell..".", 1) end --doCreatureSay(sumomdonego, pokemon.spell.."!!!",TALKTYPE_MONSTER) --if isPremium(cid) then --exhaustion.set(cid, exaustcd.cd, pokemon.cd*0.7) --else exhaustion.set(cid, exaustcd.cd, pokemon.cd) --end setPlayerStorageValue(cid,31020,1) if (hasCondition(sumomdonego, CONDITION_HASTE)) then if math.random(1,100) <= 33 then local soundenabled2 = soundskpdo[string.lower(pokemon.spell)] if soundenabled2 then local d2 = getCreaturesInRange(getThingPos(sumomdonego), 5, 5, 0, 1) for _,pid in pairs(d2) do if isSound(pid) then doPlayerSendCancel(pid,"sounds/236.wav") end end end doSendAnimatedText(getThingPos(sumomdonego), "MISS", 215) return true end end if (hasCondition(sumomdonego, CONDITION_DRUNK)) then if math.random(1,100) <= 33 then local soundenabled2 = soundskpdo[string.lower(pokemon.spell)] if soundenabled2 then local d2 = getCreaturesInRange(getThingPos(sumomdonego), 5, 5, 0, 1) for _,pid in pairs(d2) do if isSound(pid) then doPlayerSendCancel(pid,"sounds/236.wav") end end end doSendAnimatedText(getThingPos(sumomdonego), "SELF HIT", 180) local levels = getPlayerLevel(cid) doTargetCombatHealth(cid, sumomdonego, COMBAT_PHYSICALDAMAGE, -(math.random((levels*3),(levels*5))), -((math.random((levels*3),(levels*5))+10)), 3) return true end end local soundenabled = soundskpdo[string.lower(pokemon.spell)] if soundenabled then local d = getCreaturesInRange(getThingPos(sumomdonego), 5, 5, 0, 1) for _,pid in pairs(d) do if isSound(pid) then doPlayerSendCancel(pid,"sounds/"..soundenabled.file) end end end if getPlayerStorageValue(sumomdonego, 254) >= 1 then num3 = num3 * 1.8 setPlayerStorageValue(sumomdonego, 254, 0) end if getPlayerStorageValue(sumomdonego, 255) >= 1 then if math.random(1,100) <= 50 then doSendMagicEffect(getThingPos(sumomdonego), 239) num3 = num3 * 1.8 end end if getItemAttribute(item2.uid, "sexy") == 5 then num3 = num3 * 1.1 end local aura = getItemAttribute(item2.uid, "aura") if aura and aura >= 1 then if math.random(1,100) <= 20 then num3 = num3 * 2 local nada = 0 if pokemon.spell == "Rest" then nada = 1 else doSendAnimatedText(getThingPos(sumomdonego), "Critical", 215) end end end if pokemon.spell == "Dynamic Punch" then local function throw(params) if isCreature(params.cid) then if isCreature(params.target) then doSendDistanceShoot(getThingPos(params.cid), getThingPos(params.target),26) end end end local function damage(params) if isCreature(params.cid) then if isCreature(params.target) then doAreaCombatHealth(params.cid, element, getThingPos(params.target), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 112) end end end local sumonado = sumomdonego local target = getCreatureTarget(cid) addEvent(throw, 0, {cid = sumonado}) addEvent(throw, 150, {cid = sumonado,target = target}) addEvent(throw, 250, {cid = sumonado,target = target}) addEvent(throw, 350, {cid = sumonado,target = target}) addEvent(throw, 550, {cid = sumonado,target = target}) addEvent(damage, 0, {cid = sumonado,target = target}) addEvent(damage, 150, {cid = sumonado,target = target}) addEvent(damage, 250, {cid = sumonado,target = target}) addEvent(damage, 350, {cid = sumonado,target = target}) addEvent(damage, 550, {cid = sumonado,target = target}) return 0 elseif pokemon.spell == "Iron Head" then local target = getCreatureTarget(cid) local monsterpos = getCreatureLookDir(target) local monstertp = getCreaturePosition(target) local evasiontp = getCreaturePosition(sumomdonego) if monsterpos == 0 then monstertp.z = monstertp.z monstertp.x = monstertp.x monstertp.y = monstertp.y+1 if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end elseif monsterpos == 2 then monstertp.z = monstertp.z monstertp.x = monstertp.x monstertp.y = monstertp.y-1 if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end elseif monsterpos == 1 then monstertp.z = monstertp.z monstertp.x = monstertp.x-1 monstertp.y = monstertp.y if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end elseif monsterpos == 3 then monstertp.z = monstertp.z monstertp.x = monstertp.x+1 monstertp.y = monstertp.y if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end end doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 160) return 0 elseif pokemon.spell == "Metal Claw" then --doSetCreatureOutfit(sumomdonego, {lookType = 660}, 1000) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 160) return 0 elseif pokemon.spell == "Fury Splinter" then local function spark(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), params.cidpos, 13) doAreaCombatHealth(sumomdonego, element, params.cidpos, 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) end end end for a = -5, 5 do for b = -5, 5 do cidpos = getThingPos(sumomdonego) cidpos.x = cidpos.x+a cidpos.y = cidpos.y+b addEvent(spark, math.abs(a)*350 + math.abs(b)*650, {cid = cid, cidpos = cidpos}) end end return 0 elseif pokemon.spell == "Quick Attack" then local target = getCreatureTarget(cid) local monsterpos = getCreatureLookDir(target) local monstertp = getCreaturePosition(target) local evasiontp = getCreaturePosition(sumomdonego) if monsterpos == 0 then monstertp.z = monstertp.z monstertp.x = monstertp.x monstertp.y = monstertp.y+1 if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end elseif monsterpos == 2 then monstertp.z = monstertp.z monstertp.x = monstertp.x monstertp.y = monstertp.y-1 if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end elseif monsterpos == 1 then monstertp.z = monstertp.z monstertp.x = monstertp.x-1 monstertp.y = monstertp.y if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end elseif monsterpos == 3 then monstertp.z = monstertp.z monstertp.x = monstertp.x+1 monstertp.y = monstertp.y if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end end doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) return 0 elseif pokemon.spell == "Pluck" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) return 0 elseif pokemon.spell == "Slam" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) return 0 elseif pokemon.spell == "Body Slam" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) return 0 elseif pokemon.spell == "Rapid Hit" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) local hitalvo = getCreatureTarget(cid) local function hit(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then doAreaCombatHealth(getCreatureSummons(params.cid)[1], NORMALDAMAGE, getThingPos(getCreatureTarget(params.cid)), 0, -0, -0, 3) end end end end addEvent(hit, 80, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 280, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 480, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 680, {cid = cid, hitalvo = hitalvo}) return 0 elseif pokemon.spell == "Drill Peck" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 110) local hitalvo = getCreatureTarget(cid) local function hit(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(params.cid)),0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 110) end end end end addEvent(hit, 380, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 680, {cid = cid, hitalvo = hitalvo}) return 0 elseif pokemon.spell == "Triple Kick" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 110) local hitalvo = getCreatureTarget(cid) local function hit(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(params.cid)),0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 113) end end end end addEvent(hit, 380, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 680, {cid = cid, hitalvo = hitalvo}) return 0 elseif pokemon.spell == "Multi-Kick" then local hitalvo = getCreatureTarget(cid) local function hit(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then local outfitx = {lookType = 527} if isInArray({"Elite Hitmonlee"}, getCreatureName(getCreatureSummons(params.cid)[1])) then doSetCreatureOutfit(getCreatureSummons(params.cid)[1], outfitx, 800) elseif isInArray({"Hitmonlee"}, getCreatureName(getCreatureSummons(params.cid)[1])) then doSetCreatureOutfit(getCreatureSummons(params.cid)[1], lee, 800) elseif isInArray({"Hitmontop"}, getCreatureName(getCreatureSummons(params.cid)[1])) then doSetCreatureOutfit(getCreatureSummons(params.cid)[1], {lookType = 436}, 800) end doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 110) end end end end local hitalvo = getCreatureTarget(cid) local function hit2(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then local outfitx = {lookType = 527} if isInArray({"Elite Hitmonlee"}, getCreatureName(getCreatureSummons(params.cid)[1])) then doSetCreatureOutfit(getCreatureSummons(params.cid)[1], outfitx, 800) elseif isInArray({"Hitmonlee"}, getCreatureName(getCreatureSummons(params.cid)[1])) then doSetCreatureOutfit(getCreatureSummons(params.cid)[1], lee, 800) elseif isInArray({"Hitmontop"}, getCreatureName(getCreatureSummons(params.cid)[1])) then doSetCreatureOutfit(getCreatureSummons(params.cid)[1], {lookType = 436}, 800) end doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 113) end end end end addEvent(hit, 380, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 680, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 980, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 1180, {cid = cid, hitalvo = hitalvo}) return 0 elseif pokemon.spell == "Triple Kick Lee" then local hitalvo = getCreatureTarget(cid) local function hit(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then local outfitx = {lookType = 527} if isInArray({"Elite Hitmonlee"}, getCreatureName(getCreatureSummons(params.cid)[1])) then doSetCreatureOutfit(getCreatureSummons(params.cid)[1], outfitx, 800) elseif isInArray({"Hitmonlee"}, getCreatureName(getCreatureSummons(params.cid)[1])) then doSetCreatureOutfit(getCreatureSummons(params.cid)[1], lee, 800) elseif isInArray({"Hitmontop"}, getCreatureName(getCreatureSummons(params.cid)[1])) then doSetCreatureOutfit(getCreatureSummons(params.cid)[1], {lookType = 436}, 800) end doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, 0, 0, 110) end end end end local hitalvo = getCreatureTarget(cid) local function hit2(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 113) end end end end addEvent(hit, 380, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 480, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 680, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 780, {cid = cid, hitalvo = hitalvo}) return 0 elseif pokemon.spell == "Triple Punch" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 110) local hitalvo = getCreatureTarget(cid) local function hit(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(params.cid)),0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 112) end end end end addEvent(hit, 380, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 680, {cid = cid, hitalvo = hitalvo}) return 0 elseif pokemon.spell == "Punch-Machine" then local hitalvo = getCreatureTarget(cid) local function hit(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then doSendMagicEffect(getThingPos(getCreatureTarget(params.cid)), 224) end end end end local function hit2(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 112) end end end end addEvent(hit, 500, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 1000, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 1500, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 2000, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 2500, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 3000, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 3500, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 4000, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 4500, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 5000, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 5500, {cid = cid, hitalvo = hitalvo}) addEvent(hit2, 6000, {cid = cid, hitalvo = hitalvo}) return 0 elseif pokemon.spell == "Karate Chop" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 112) return 0 elseif pokemon.spell == "Bite" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 146) return 0 elseif pokemon.spell == "Slash" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 160) return 0 elseif pokemon.spell == "StickSlash" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 212) return 0 elseif pokemon.spell == "Splash" then doSendMagicEffect(getThingPos(sumomdonego), 53) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 53) return 0 elseif pokemon.spell == "Doubleslap" then local function slap(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) end end end addEvent(slap, 0, {cid = cid}) addEvent(slap, 600, {cid = cid}) return 0 elseif pokemon.spell == "Earth Punch" then local function slap(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 112) end end end addEvent(slap, 200, {cid = cid}) doAreaCombatHealth(sumonado, element, getThingPos(getCreatureTarget(cid)), 0, 0, 0 ,161) doSendMagicEffect(getThingPos(getCreatureTarget(cid)), 180) return 0 elseif pokemon.spell == "Mega Punch" then local function slap(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 112) end end end addEvent(slap, 200, {cid = cid}) doSendMagicEffect(getThingPos(getCreatureTarget(cid)), 180) return 0 elseif pokemon.spell == "Comet Punch" then local function slap(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 112) end end end addEvent(slap, 200, {cid = cid}) doSendMagicEffect(getThingPos(getCreatureTarget(cid)), 180) return 0 elseif pokemon.spell == "Toxic Spikes" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 15) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) return 0 elseif pokemon.spell == "Mega Kick" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 112) local hitalvo = getCreatureTarget(cid) local function hit(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.hitalvo then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(params.cid)),0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 112) end end end end addEvent(hit, 380, {cid = cid, hitalvo = hitalvo}) addEvent(hit, 680, {cid = cid, hitalvo = hitalvo}) return 0 elseif pokemon.spell == "Thunder Punch" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 40) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 11) return 0 elseif pokemon.spell == "Fire Punch" then doSendMagicEffect(getThingPos(getCreatureTarget(cid)), 230) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 229) return 0 elseif pokemon.spell == "Thunder Fang" then doSendMagicEffect(getThingPos(getCreatureTarget(cid)), 146) doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 40) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 11) return 0 elseif pokemon.spell == "Shadow Punch" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 18) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 185) return 0 elseif pokemon.spell == "Scratch" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 142) return 0 elseif pokemon.spell == "Iron Tail" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 160) return 0 elseif pokemon.spell == "Confusion" then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), confusionx, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 136) local d = getCreaturesInRange(getThingPos(sumomdonego), 2, 2, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end end return 0 elseif pokemon.spell == "Psy Target" then setPlayerStorageValue(sumomdonego, 985, ((num1)+(lvpokemon*(num3)))) setPlayerStorageValue(sumomdonego, 986, ((num2)+(lvpokemon*(num3)))) movesx(sumomdonego,false,false,false,false) return 0 elseif pokemon.spell == "Dark Target" then setPlayerStorageValue(sumomdonego, 985, ((num1)+(lvpokemon*(num3)))) setPlayerStorageValue(sumomdonego, 986, ((num2)+(lvpokemon*(num3)))) ghostmew(sumomdonego,false,false,false,false) return 0 elseif pokemon.spell == "Psy beam" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), bmn, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 108) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), bms, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 109) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), bme, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 107) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), bmw, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 106) end return 0 elseif pokemon.spell == "Aurora Beam" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), bmn, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 108) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), bms, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 109) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), bme, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 107) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), bmw, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 106) end return 0 elseif pokemon.spell == "Psy Wave" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 133) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 133) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 133) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave4, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 133) end return 0 elseif pokemon.spell == "Fury Wave" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), furywave, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 128) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), furywave2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 131) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), furywave3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 129) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), furywave4, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 130) end return 0 elseif pokemon.spell == "Hyper Voice" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 22) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 22) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 22) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave4, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 22) end return 0 elseif pokemon.spell == "Thunder Wave" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 48) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 48) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 48) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave4, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 48) end return 0 elseif pokemon.spell == "Squishy Licking" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 145) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 145) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 145) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave4, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 145) end return 0 elseif pokemon.spell == "Icy Wind" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 41) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 41) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 41) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psywave4, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 41) end return 0 elseif pokemon.spell == "Psychic" then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psychic, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 251) return 0 elseif pokemon.spell == "Thunder" then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), Thunder, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 48) return 0 elseif pokemon.spell == "Pin Missile" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 13) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) return 0 elseif pokemon.spell == "Thrash" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 10) local target = getCreatureTarget(cid) local monsterpos = getCreatureLookDir(target) local monstertp = getCreaturePosition(target) local evasiontp = getCreaturePosition(sumomdonego) if monsterpos == 0 then monstertp.z = monstertp.z monstertp.x = monstertp.x monstertp.y = monstertp.y+1 if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end elseif monsterpos == 2 then monstertp.z = monstertp.z monstertp.x = monstertp.x monstertp.y = monstertp.y-1 if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end elseif monsterpos == 1 then monstertp.z = monstertp.z monstertp.x = monstertp.x-1 monstertp.y = monstertp.y if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end elseif monsterpos == 3 then monstertp.z = monstertp.z monstertp.x = monstertp.x+1 monstertp.y = monstertp.y if isWalkable(monstertp,true,true,cid) then doSendMagicEffect(evasiontp, 211) doTeleportThing(sumomdonego,monstertp) setPlayerStorageValue(target, 9,1) end end doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) return 0 elseif pokemon.spell == "Night Shade" then doSendMagicEffect(getCreaturePosition(sumomdonego), 246) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psychic, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 186) return 0 elseif pokemon.spell == "Absorb" then local life = getCreatureHealth(getCreatureTarget(cid)) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 14) local newlife = life - getCreatureHealth(getCreatureTarget(cid)) doSendMagicEffect(getThingPos(sumomdonego), 14) doCreatureAddHealth(sumomdonego, newlife) doSendAnimatedText(getThingPos(sumomdonego), "+"..newlife.."", 35) return 0 elseif pokemon.spell == "Leech Life" then local life = getCreatureHealth(getCreatureTarget(cid)) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 14) local newlife = life - getCreatureHealth(getCreatureTarget(cid)) doSendMagicEffect(getThingPos(sumomdonego), 14) doCreatureAddHealth(sumomdonego, newlife) doSendAnimatedText(getThingPos(sumomdonego), "+"..newlife.."", 35) return 0 elseif pokemon.spell == "Super Vines" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 213) return 0 elseif pokemon.spell == "Mud Shot" then local pid = getCreatureTarget(cid) if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 1) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 34) return 0 elseif pokemon.spell == "Mud Slap" then local pid = getCreatureTarget(cid) if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 1) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) return 0 elseif pokemon.spell == "Lovey Kiss" then local pid = getCreatureTarget(cid) if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 16) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 147) return 0 elseif pokemon.spell == "Mud Bomb" then setPlayerStorageValue(getCreatureTarget(cid), 3, 1) local mudalvo = getCreatureTarget(cid) local function ver(params) if isCreature(params.mudalvo) then if getPlayerStorageValue(params.mudalvo, 3) >= 1 then setPlayerStorageValue(params.mudalvo, 3, -1) end end end local function sleepxx(params) if isMonster(params.mudalvo) then doSendMagicEffect(getCreaturePosition(params.mudalvo), 34) else return True end end Paralize(getCreatureTarget(cid)) addEvent(sleepxx, 1000,{mudalvo = mudalvo}) addEvent(sleepxx, 2000,{mudalvo = mudalvo}) addEvent(sleepxx, 3000,{mudalvo = mudalvo}) addEvent(sleepxx, 4000,{mudalvo = mudalvo}) addEvent(ver, 4500, {mudalvo = mudalvo}) doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 1) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), bomb, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 116) return 0 elseif pokemon.spell == "Sludge" then setPlayerStorageValue(getCreatureTarget(cid), 3, 1) local mudalvo = getCreatureTarget(cid) local function ver(params) if isCreature(params.mudalvo) then if getPlayerStorageValue(params.mudalvo, 3) >= 1 then setPlayerStorageValue(params.mudalvo, 3, -1) end end end local function sleepxx(params) if isMonster(params.mudalvo) then doSendMagicEffect(getCreaturePosition(params.mudalvo), 116) else return True end end Paralize(getCreatureTarget(cid)) addEvent(sleepxx, 1000,{mudalvo = mudalvo}) addEvent(sleepxx, 2000,{mudalvo = mudalvo}) addEvent(sleepxx, 3000,{mudalvo = mudalvo}) addEvent(sleepxx, 4000,{mudalvo = mudalvo}) addEvent(ver, 4500, {mudalvo = mudalvo}) doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 1) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), bomb, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 116) return 0 elseif pokemon.spell == "Bubbles" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)),2) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 68) end end end local function damage2(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 25) end end end addEvent(damage, 100, {cid = cid}) addEvent(damage2, 600, {cid = cid}) addEvent(throw, 0, {cid = cid}) addEvent(throw, 550, {cid = cid}) return 0 elseif pokemon.spell == "Clamp" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)),2) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 1) end end end local function damage2(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 25) end end end addEvent(damage, 100, {cid = cid}) addEvent(damage, 600, {cid = cid}) addEvent(throw, 0, {cid = cid}) addEvent(throw, 550, {cid = cid}) return 0 elseif pokemon.spell == "Ice Shards" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)),28) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 41) end end end local function damage2(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 52) end end end addEvent(damage, 100, {cid = cid}) addEvent(damage2, 600, {cid = cid}) addEvent(throw, 0, {cid = cid}) addEvent(throw, 550, {cid = cid}) return 0 elseif pokemon.spell == "Ice Punch" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)),28) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 43) end end end addEvent(damage, 100, {cid = cid}) addEvent(throw, 0, {cid = cid}) return 0 elseif pokemon.spell == "Aqua tail" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)), 2) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 25) end end end addEvent(throw, 0, {cid = cid}) addEvent(damage, 0, {cid = cid}) return 0 elseif pokemon.spell == "Dream Eather" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)), 18) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then if getPlayerStorageValue(getCreatureTarget(params.cid), >= 1 then local life = getCreatureHealth(getCreatureTarget(cid)) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 138) local newlife = life - getCreatureHealth(getCreatureTarget(cid)) doSendMagicEffect(getThingPos(sumomdonego), 14) doCreatureAddHealth(sumomdonego, newlife) doSendAnimatedText(getThingPos(sumomdonego), "+"..newlife.."", 35) end end end end addEvent(throw, 0, {cid = cid}) addEvent(damage, 0, {cid = cid}) return 0 elseif pokemon.spell == "Nightmare" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)), 18) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then if getPlayerStorageValue(getCreatureTarget(params.cid), >= 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 138) end end end end addEvent(throw, 0, {cid = cid}) addEvent(damage, 0, {cid = cid}) return 0 elseif pokemon.spell == "String Shot" then setPlayerStorageValue(getCreatureTarget(cid), 3, 1) local alvo = getCreatureTarget(cid) doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 23) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 137) local function string(params) if isCreature(params.alvo) then if getPlayerStorageValue(params.alvo, 3) >= 1 then doSendMagicEffect(getThingPos(params.alvo), 137) end end end local function normalstr(params) if isCreature(params.alvo) then if getPlayerStorageValue(params.alvo, 3) >= 1 then setPlayerStorageValue(params.alvo, 3, -1) end end end addEvent(string, 250, {alvo = alvo}) addEvent(string, 500, {alvo = alvo}) addEvent(string, 750, {alvo = alvo}) addEvent(string, 1000, {alvo = alvo}) addEvent(string, 1250, {alvo = alvo}) addEvent(string, 1500, {alvo = alvo}) addEvent(string, 1750, {alvo = alvo}) addEvent(string, 2000, {alvo = alvo}) addEvent(string, 2250, {alvo = alvo}) addEvent(string, 2500, {alvo = alvo}) addEvent(string, 2750, {alvo = alvo}) addEvent(string, 3000, {alvo = alvo}) addEvent(normalstr, 3050, {alvo = alvo}) return 0 elseif pokemon.spell == "Falling Rocks" then sendstorm(sumomdonego,11,183,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Team Slice" then if isInArray({"Shiny Scyther"}, getItemAttribute(item2.uid, "nome")) then sendstorm(sumomdonego,20,129,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) else sendstorm(sumomdonego,19,129,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) end return 0 elseif pokemon.spell == "Pay Day" then sendstorm(sumomdonego,6,9,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Metronome" then local metronomerandom = math.random(1,6) if metronomerandom == 1 then sendstorm(sumomdonego,3,181,DRAGONDAMAGE,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) elseif metronomerandom == 2 then sendstorm(sumomdonego,18,140,GHOSTDAMAGE,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) elseif metronomerandom == 3 then sendstorm(sumomdonego,2,53,WATERDAMAGE,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) elseif metronomerandom == 4 then sendstorm(sumomdonego,28,52,ICEDAMAGE,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) elseif metronomerandom == 5 then sendstorm(sumomdonego,11,44,ROCKDAMAGE,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) elseif metronomerandom == 6 then sendstorm(sumomdonego,40,11,ELECTRICDAMAGE,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) end return 0 elseif pokemon.spell == "Electric Storm" then sendstorm(sumomdonego,40,48,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Blizzard" then sendstorm(sumomdonego,28,52,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Hydro Rain" then sendstorm(sumomdonego,2,53,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Bone Rain" then sendstorm(sumomdonego,7,242,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Sludge Rain" then sendstorm(sumomdonego,38,254,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Mortal Gas" then sendstorm(sumomdonego,23,114,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Hydro Pump" then local function fall2(params) if isCreature(params.cid) then local pos1 = getThingPos(params.cid) pos1.x = pos1.x + 3 local pos2 = getThingPos(params.cid) pos2.x = pos2.x - 3 local pos3 = getThingPos(params.cid) pos3.x = pos3.x + 3 pos3.y = pos3.y + 3 local pos4 = getThingPos(params.cid) pos4.x = pos4.x + 3 pos4.y = pos4.y - 3 local pos5 = getThingPos(params.cid) pos5.y = pos5.y + 3 local pos6 = getThingPos(params.cid) pos6.y = pos6.y - 3 local pos7 = getThingPos(params.cid) pos7.x = pos7.x - 3 pos7.y = pos7.y - 3 local pos8 = getThingPos(params.cid) pos8.x = pos8.x - 3 pos8.y = pos8.y + 3 doSendDistanceShoot(getThingPos(params.cid),pos1 , 2) doSendDistanceShoot(getThingPos(params.cid),pos2 , 2) doSendDistanceShoot(getThingPos(params.cid),pos3 , 2) doSendDistanceShoot(getThingPos(params.cid),pos4 , 2) doSendDistanceShoot(getThingPos(params.cid),pos5 , 2) doSendDistanceShoot(getThingPos(params.cid),pos6 , 2) doSendDistanceShoot(getThingPos(params.cid),pos7 , 2) doSendDistanceShoot(getThingPos(params.cid),pos8 , 2) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), pump2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 53) end end local function fall3(params) if isCreature(params.cid) then local pos1 = getThingPos(params.cid) pos1.x = pos1.x + 1 local pos2 = getThingPos(params.cid) pos2.x = pos2.x - 1 local pos3 = getThingPos(params.cid) pos3.y = pos3.y + 1 local pos4 = getThingPos(params.cid) pos3.y = pos3.y - 1 local pos5 = getThingPos(params.cid) pos5.x = pos5.x + 1 pos5.y = pos5.y + 1 local pos6 = getThingPos(params.cid) pos6.x = pos6.x + 1 pos6.y = pos6.y - 1 local pos7 = getThingPos(params.cid) pos7.x = pos7.x - 1 pos7.y = pos7.y + 1 local pos8 = getThingPos(params.cid) pos8.x = pos8.x - 1 pos8.y = pos8.y - 1 doSendDistanceShoot(getThingPos(params.cid),pos1 , 2) doSendDistanceShoot(getThingPos(params.cid),pos2 , 2) doSendDistanceShoot(getThingPos(params.cid),pos3 , 2) doSendDistanceShoot(getThingPos(params.cid),pos4 , 2) doSendDistanceShoot(getThingPos(params.cid),pos5 , 2) doSendDistanceShoot(getThingPos(params.cid),pos6 , 2) doSendDistanceShoot(getThingPos(params.cid),pos7 , 2) doSendDistanceShoot(getThingPos(params.cid),pos8 , 2) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), pump, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 53) end end local sumonado = sumomdonego addEvent(fall2, 300, {cid = sumonado}) addEvent(fall3, 0, {cid = sumonado}) return 0 elseif pokemon.spell == "Mega Horn" then sendstorm(sumomdonego,25,29,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Shadow Storm" then local sumonado = sumomdonego sendstorm(sumomdonego,18,140,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Magma Meteor" then local sumonado = sumomdonego sendstorm(sumonado,3,181,element,-((num1)+(lvpokemon*(num3))),-((num2)+(lvpokemon*(num3)))) return 0 elseif pokemon.spell == "Reflect" then doSendMagicEffect(getThingPos(sumomdonego), 135) setPlayerStorageValue(sumomdonego, 34, 1) return 0 elseif pokemon.spell == "Water Gun" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 74) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 75) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 76) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 77) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 75) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3s,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 78) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 69) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 70) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3e,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 71) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1w,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 72) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2w, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 70) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3w,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 73) end return 0 elseif pokemon.spell == "Ground Chop" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) local function area1(params) if isCreature(getCreatureSummons(params.cid)[1]) then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) end end local function area2(params) if isCreature(getCreatureSummons(params.cid)[1]) then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wg3n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) end end addEvent(area1, 200,{cid = cid}) addEvent(area2, 300,{cid = cid}) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) local function area1(params) if isCreature(getCreatureSummons(params.cid)[1]) then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2s,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) end end local function area2(params) if isCreature(getCreatureSummons(params.cid)[1]) then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wg3s,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) end end addEvent(area1, 200,{cid = cid}) addEvent(area2, 300,{cid = cid}) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) local function area1(params) if isCreature(getCreatureSummons(params.cid)[1]) then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2e,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) end end local function area2(params) if isCreature(getCreatureSummons(params.cid)[1]) then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wg3e,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) end end addEvent(area1, 200,{cid = cid}) addEvent(area2, 300,{cid = cid}) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1w,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) local function area1(params) if isCreature(getCreatureSummons(params.cid)[1]) then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2w,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) end end local function area2(params) if isCreature(getCreatureSummons(params.cid)[1]) then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wg3w,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 111) end end addEvent(area1, 200,{cid = cid}) addEvent(area2, 300,{cid = cid}) end return 0 elseif pokemon.spell == "Poison Gun" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 20) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 7) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 20) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3s,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 7) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 20) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 7) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3e,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1w,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 20) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2w, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 7) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3w,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), end return 0 elseif pokemon.spell == "Toxic" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 20) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3n,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 20) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3s,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 20) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3e,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1w,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2w, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 20) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3w,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) end return 0 elseif pokemon.spell == "Water Spout" then doSendDistanceShoot(getThingPos(sumomdonego), {x=getThingPos(sumomdonego).x, y=getThingPos(sumomdonego).y-5, z=getThingPos(sumomdonego).z}, 2) local function spout(params) if isCreature(getCreatureSummons(params.cid)[1]) then for x = -2,2 do for y = -2,2 do local newpos = getThingPos(getCreatureSummons(params.cid)[1]) newpos.x = newpos.x+x newpos.y = newpos.y+y doSendDistanceShoot({x=getThingPos(getCreatureSummons(params.cid)[1]).x, y=getThingPos(getCreatureSummons(params.cid)[1]).y-5, z=getThingPos(getCreatureSummons(params.cid)[1]).z}, newpos, 2) end end end end local function spdmg(params) if isCreature(getCreatureSummons(params.cid)[1]) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureSummons(params.cid)[1]), waterspout, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 68) end end addEvent(spout, 300, {cid = cid}) addEvent(spdmg, 450, {cid = cid}) return 0 elseif pokemon.spell == "Fire Blast" then posit = getThingPos(sumomdonego) local function gust(params) if #getCreatureSummons(params.cid) >= 1 then doAreaCombatHealth(getCreatureSummons(params.cid)[1], null, params.ar, sand1, 0, 0, params.eee) doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, whirl3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 35) end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(gust, 0, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(gust, 0, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(gust, 0, {cid = cid, eee = 61, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 61, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 61, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 61, ar = {x=posicao.x+4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 61, ar = {x=posicao.x+5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 61, ar = {x=posicao.x+6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+5, y=posicao.y, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(gust, 0, {cid = cid, eee = 63, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 63, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 63, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 63, ar = {x=posicao.x-4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 63, ar = {x=posicao.x-5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 63, ar = {x=posicao.x-6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-5, y=posicao.y, z=posicao.z}}) end return 0 elseif pokemon.spell == "Swagger" then doSendMagicEffect(getThingPos(sumomdonego), 14) local function roll(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid), 14) if isCreature(getCreatureTarget(params.cid)) then if getDistanceBetween(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid))) == 1 then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end end end local sumonado = sumomdonego for r = 1, 10 do addEvent(roll, 800*r, {cid = sumonado}) end posit = getThingPos(sumomdonego) local function gust(params) if #getCreatureSummons(params.cid) >= 1 then doAreaCombatCondition(getCreatureSummons(params.cid)[1], params.ar, whirl3, tonto, 31) --doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, whirl3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 31) end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(gust, 0, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(gust, 0, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(gust, 0, {cid = cid, eee = 61, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 61, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 61, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 61, ar = {x=posicao.x+4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 61, ar = {x=posicao.x+5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 61, ar = {x=posicao.x+6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+5, y=posicao.y, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(gust, 0, {cid = cid, eee = 63, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 63, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 63, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 63, ar = {x=posicao.x-4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 63, ar = {x=posicao.x-5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 63, ar = {x=posicao.x-6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-5, y=posicao.y, z=posicao.z}}) end return 0 elseif pokemon.spell == "Ancient Power" then posit = getThingPos(sumomdonego) local function gust(params) if #getCreatureSummons(params.cid) >= 1 then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, whirl3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 18) end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(gust, 0, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 60, ar = {x=posicao.x, y=posicao.y-6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(gust, 0, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 62, ar = {x=posicao.x, y=posicao.y+6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(gust, 0, {cid = cid, eee = 61, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 61, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 61, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 61, ar = {x=posicao.x+4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 61, ar = {x=posicao.x+5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 61, ar = {x=posicao.x+6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+5, y=posicao.y, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(gust, 0, {cid = cid, eee = 63, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 63, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 63, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 63, ar = {x=posicao.x-4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 63, ar = {x=posicao.x-5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 63, ar = {x=posicao.x-6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-5, y=posicao.y, z=posicao.z}}) end return 0 elseif pokemon.spell == "Stickmerang" then local function area1(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), params.arr, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 212) end end local sumonado = sumomdonego if getCreatureLookDir(sumomdonego) == 0 then addEvent(area1,100,{cid = sumonado,arr = Stick04}) addEvent(area1,400,{cid = sumonado,arr = Stick04a}) addEvent(area1,800,{cid = sumonado,arr = Stick04b}) addEvent(area1,1200,{cid = sumonado,arr = Stick04c}) addEvent(area1,1600,{cid = sumonado,arr = Stick04d}) addEvent(area1,2000,{cid = sumonado,arr = Stick04e}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(area1,100,{cid = sumonado,arr = Stick01}) addEvent(area1,400,{cid = sumonado,arr = Stick01a}) addEvent(area1,800,{cid = sumonado,arr = Stick01b}) addEvent(area1,1200,{cid = sumonado,arr = Stick01c}) addEvent(area1,1600,{cid = sumonado,arr = Stick01d}) addEvent(area1,2000,{cid = sumonado,arr = Stick01e}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(area1,100,{cid = sumonado,arr = Stick03}) addEvent(area1,400,{cid = sumonado,arr = Stick03a}) addEvent(area1,800,{cid = sumonado,arr = Stick03b}) addEvent(area1,1200,{cid = sumonado,arr = Stick03c}) addEvent(area1,1600,{cid = sumonado,arr = Stick03d}) addEvent(area1,2000,{cid = sumonado,arr = Stick03e}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(area1,100,{cid = sumonado,arr = Stick02}) addEvent(area1,400,{cid = sumonado,arr = Stick02a}) addEvent(area1,800,{cid = sumonado,arr = Stick02b}) addEvent(area1,1200,{cid = sumonado,arr = Stick02c}) addEvent(area1,1600,{cid = sumonado,arr = Stick02d}) addEvent(area1,2000,{cid = sumonado,arr = Stick02e}) end return 0 elseif pokemon.spell == "Bonemerang" then local function area1(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), params.arr, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 117) end end local sumonado = sumomdonego if getCreatureLookDir(sumomdonego) == 0 then addEvent(area1,100,{cid = sumonado,arr = Stick04}) addEvent(area1,400,{cid = sumonado,arr = Stick04a}) addEvent(area1,800,{cid = sumonado,arr = Stick04b}) addEvent(area1,1200,{cid = sumonado,arr = Stick04c}) addEvent(area1,1600,{cid = sumonado,arr = Stick04d}) addEvent(area1,2000,{cid = sumonado,arr = Stick04e}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(area1,100,{cid = sumonado,arr = Stick01}) addEvent(area1,400,{cid = sumonado,arr = Stick01a}) addEvent(area1,800,{cid = sumonado,arr = Stick01b}) addEvent(area1,1200,{cid = sumonado,arr = Stick01c}) addEvent(area1,1600,{cid = sumonado,arr = Stick01d}) addEvent(area1,2000,{cid = sumonado,arr = Stick01e}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(area1,100,{cid = sumonado,arr = Stick03}) addEvent(area1,400,{cid = sumonado,arr = Stick03a}) addEvent(area1,800,{cid = sumonado,arr = Stick03b}) addEvent(area1,1200,{cid = sumonado,arr = Stick03c}) addEvent(area1,1600,{cid = sumonado,arr = Stick03d}) addEvent(area1,2000,{cid = sumonado,arr = Stick03e}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(area1,100,{cid = sumonado,arr = Stick02}) addEvent(area1,400,{cid = sumonado,arr = Stick02a}) addEvent(area1,800,{cid = sumonado,arr = Stick02b}) addEvent(area1,1200,{cid = sumonado,arr = Stick02c}) addEvent(area1,1600,{cid = sumonado,arr = Stick02d}) addEvent(area1,2000,{cid = sumonado,arr = Stick02e}) end return 0 elseif pokemon.spell == "Fist Machine" then posit = getThingPos(sumomdonego) local function gust(params) if #getCreatureSummons(params.cid) >= 1 then doAreaCombatHealth(getCreatureSummons(params.cid)[1], null, params.ar, sand1, 0, 0, params.eee) doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, whirl3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 112) else end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(gust, 0, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(gust, 0, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(gust, 0, {cid = cid, eee = 215, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 215, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 215, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 215, ar = {x=posicao.x+4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 215, ar = {x=posicao.x+5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 215, ar = {x=posicao.x+6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+5, y=posicao.y, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(gust, 0, {cid = cid, eee = 216, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 216, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 216, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 216, ar = {x=posicao.x-4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 216, ar = {x=posicao.x-5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 216, ar = {x=posicao.x-6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-5, y=posicao.y, z=posicao.z}}) end return 0 elseif pokemon.spell == "Destroyer Hand" then posit = getThingPos(sumomdonego) local function gust(params) if #getCreatureSummons(params.cid) >= 1 then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]),params.ar,26) doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, champ, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) else end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(gust, 0, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 217, ar = {x=posicao.x, y=posicao.y-6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(gust, 0, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 218, ar = {x=posicao.x, y=posicao.y+6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(gust, 0, {cid = cid, eee = 215, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 215, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 215, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 215, ar = {x=posicao.x+4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 215, ar = {x=posicao.x+5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 215, ar = {x=posicao.x+6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+5, y=posicao.y, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(gust, 0, {cid = cid, eee = 216, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 216, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 216, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 216, ar = {x=posicao.x-4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 216, ar = {x=posicao.x-5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 216, ar = {x=posicao.x-6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-5, y=posicao.y, z=posicao.z}}) end return 0 elseif pokemon.spell == "Gust" then posit = getThingPos(sumomdonego) local function gust(params) if #getCreatureSummons(params.cid) >= 1 then doAreaCombatHealth(getCreatureSummons(params.cid)[1], null, params.ar, sand1, 0, 0, params.eee) doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, whirl3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 42) else end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(gust, 0, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y-4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y-5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y-6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(gust, 0, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y+4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y+5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 42, ar = {x=posicao.x, y=posicao.y+6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(gust, 0, {cid = cid, eee = 42, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 42, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 42, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 42, ar = {x=posicao.x+4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 42, ar = {x=posicao.x+5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 42, ar = {x=posicao.x+6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+5, y=posicao.y, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(gust, 0, {cid = cid, eee = 42, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 42, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 42, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 42, ar = {x=posicao.x-4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 42, ar = {x=posicao.x-5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 42, ar = {x=posicao.x-6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-5, y=posicao.y, z=posicao.z}}) end return 0 elseif pokemon.spell == "Spark" then local function spark(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), params.cidpos, 40) doAreaCombatHealth(sumomdonego, element, params.cidpos, 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 48) end end end for a = -1, 1 do for b = -1, 1 do cidpos = getThingPos(sumomdonego) cidpos.x = cidpos.x+a cidpos.y = cidpos.y+b addEvent(spark, math.abs(a)*350 + math.abs(b)*650, {cid = cid, cidpos = cidpos}) end end return 0 elseif pokemon.spell == "Thunder Spoof" then local function spark(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), params.cidpos, 40) doAreaCombatHealth(sumomdonego, element, params.cidpos, 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 48) end end end for a = -5, 5 do for b = -5, 5 do cidpos = getThingPos(sumomdonego) cidpos.x = cidpos.x+a cidpos.y = cidpos.y+b addEvent(spark, math.abs(a)*350 + math.abs(b)*650, {cid = cid, cidpos = cidpos}) end end return 0 elseif pokemon.spell == "Power Gem" then local function spark(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), params.cidpos, 11) doAreaCombatHealth(sumomdonego, element, params.cidpos, 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 118) end end end for a = -5, 5 do for b = -5, 5 do cidpos = getThingPos(sumomdonego) cidpos.x = cidpos.x+a cidpos.y = cidpos.y+b addEvent(spark, math.abs(a)*350 + math.abs(b)*650, {cid = cid, cidpos = cidpos}) end end return 0 elseif pokemon.spell == "Stick Wave" then posit = getThingPos(sumomdonego) local function gust(params) if #getCreatureSummons(params.cid) >= 1 then doAreaCombatHealth(getCreatureSummons(params.cid)[1], null, params.ar, sand1, 0, 0, params.eee) doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, whirl3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) else end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(gust, 0, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y-4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y-5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y-6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(gust, 0, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y+4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y+5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 212, ar = {x=posicao.x, y=posicao.y+6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(gust, 0, {cid = cid, eee = 212, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 212, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 212, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 212, ar = {x=posicao.x+4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 212, ar = {x=posicao.x+5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 212, ar = {x=posicao.x+6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+5, y=posicao.y, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(gust, 0, {cid = cid, eee = 212, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 212, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 212, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 212, ar = {x=posicao.x-4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 212, ar = {x=posicao.x-5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 212, ar = {x=posicao.x-6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-5, y=posicao.y, z=posicao.z}}) end return 0 elseif pokemon.spell == "Hydro Cannon" then posit = getThingPos(sumomdonego) local function gust(params) if #getCreatureSummons(params.cid) >= 1 then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, sand1, 0, 0, params.eee) doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, whirl3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 68) else end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(gust, 0, {cid = cid, eee = 64, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 64, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 64, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 64, ar = {x=posicao.x, y=posicao.y-4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 64, ar = {x=posicao.x, y=posicao.y-5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 64, ar = {x=posicao.x, y=posicao.y-6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(gust, 0, {cid = cid, eee = 66, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 66, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+1, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 66, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+2, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 66, ar = {x=posicao.x, y=posicao.y+4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+3, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 66, ar = {x=posicao.x, y=posicao.y+5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+4, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 66, ar = {x=posicao.x, y=posicao.y+6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(gust, 0, {cid = cid, eee = 65, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 65, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 65, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 65, ar = {x=posicao.x+4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 65, ar = {x=posicao.x+5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 65, ar = {x=posicao.x+6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+5, y=posicao.y, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(gust, 0, {cid = cid, eee = 67, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = cid, eee = 67, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = cid, eee = 67, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = cid, eee = 67, ar = {x=posicao.x-4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = cid, eee = 67, ar = {x=posicao.x-5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = cid, eee = 67, ar = {x=posicao.x-6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-5, y=posicao.y, z=posicao.z}}) end return 0 elseif pokemon.spell == "Fire Fang" then doSendMagicEffect(getThingPos(getCreatureTarget(cid)), 146) local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 5) end end end addEvent(damage, 200, {cid = cid}) return 0 elseif pokemon.spell == "Poison Fang" then doSendMagicEffect(getThingPos(getCreatureTarget(cid)), 146) local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), end end end addEvent(damage, 200, {cid = cid}) return 0 elseif pokemon.spell == "Fireball" then local function throw(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)), 3) end end end local function damage(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), waba, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 6) end end end addEvent(damage, 100, {cid = cid}) addEvent(throw, 0, {cid = cid}) return 0 elseif pokemon.spell == "Water ball" then local function throw(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(getCreatureTarget(params.cid)), 2) end end end local function damage(params) if isCreature(getCreatureSummons(params.cid)[1]) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), waba, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 68) end end end addEvent(damage, 100, {cid = cid}) addEvent(throw, 0, {cid = cid}) return 0 elseif pokemon.spell == "Ember" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 3) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 15) return 0 elseif pokemon.spell == "Rollout" then local summons = sumomdonego local mon = getCreatureName(summons) local spd = getCreatureSpeed(summons) local bspd = getCreatureBaseSpeed(summons) doChangeSpeed(summons, -spd) doChangeSpeed(summons, bspd+100) if getItemAttribute(item2.uid, "nome") == "Shiny Golem" then doSetCreatureOutfit(sumomdonego, {lookType = 702}, 8300) elseif getItemAttribute(item2.uid, "nome") == "Shiny Voltorb" then doSetCreatureOutfit(sumomdonego, shinyvoltorb, 8300) elseif getItemAttribute(item2.uid, "nome") == "Shiny Sandshrew" then doSetCreatureOutfit(sumomdonego, {lookType = 690}, 8300) elseif getItemAttribute(item2.uid, "nome") == "Shiny Sandslash" then doSetCreatureOutfit(sumomdonego, {lookType = 673}, 8300) elseif getItemAttribute(item2.uid, "nome") == "Shiny Electrode" then doSetCreatureOutfit(sumomdonego, shinyelectrode, 8300) elseif getCreatureName(sumomdonego) == "Sandslash" then doSetCreatureOutfit(sumomdonego, sandslash, 8300) elseif getCreatureName(sumomdonego) == "Golem" then doSetCreatureOutfit(sumomdonego, golem, 8300) elseif getCreatureName(sumomdonego) == "Electrode" then doSetCreatureOutfit(sumomdonego, electrode, 8300) elseif getCreatureName(sumomdonego) == "Voltorb" then doSetCreatureOutfit(sumomdonego, voltorb, 8300) elseif getCreatureName(sumomdonego) == "Sandshrew" then doSetCreatureOutfit(sumomdonego, sandshrew, 8300) elseif getCreatureName(sumomdonego) == "Miltank" then doSetCreatureOutfit(sumomdonego, {lookType = 654}, 8300) elseif getCreatureName(sumomdonego) == "Donphan" then doSetCreatureOutfit(sumomdonego, {lookType = 586}, 8300) elseif getCreatureName(sumomdonego) == "Phanpy" then doSetCreatureOutfit(sumomdonego, {lookType = 656}, 8300) elseif getItemAttribute(item2.uid, "nome") == "Shiny Miltank" then doSetCreatureOutfit(sumomdonego, {lookType = 1078}, 8300) elseif getItemAttribute(item2.uid, "nome") == "Shiny Phanpy" then doSetCreatureOutfit(sumomdonego, {lookType = 1080}, 8300) elseif getItemAttribute(item2.uid, "nome") == "Shiny Donphan" then doSetCreatureOutfit(sumomdonego, {lookType = 1086}, 8300) end setPlayerStorageValue(sumomdonego, 4, 1) local function roll(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getCreatureCondition(getCreatureSummons(params.cid)[1], CONDITION_OUTFIT) == true then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), rollout, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 255) end end end end for r = 1, 15 do addEvent(roll, 500*r, {cid = cid}) end local function stoproll(params) if isCreature(params.cid) then doChangeSpeed(params.cid, bspd-100) if getPlayerStorageValue(params.cid, 4) >= 1 then setPlayerStorageValue(params.cid, 4, 0) doChangeSpeed(params.cid, -spd) doChangeSpeed(params.cid, bspd) end end end viado = summons addEvent(stoproll, 8300, {cid = viado}) return 0 elseif pokemon.spell == "Bone Slash" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 7) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 117) return 0 elseif pokemon.spell == "Hyper Fang" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 159) return 0 elseif pokemon.spell == "Horn Attack" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 15) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) return 0 elseif pokemon.spell == "Rock Throw" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 11) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) return 0 elseif pokemon.spell == "Psy Pulse" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)),24) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 136) end end end local sumonado = sumomdonego addEvent(damage, 100, {cid = sumonado }) addEvent(damage, 600, {cid = sumonado }) addEvent(throw, 0, {cid = sumonado }) addEvent(throw, 550, {cid = sumonado }) return 0 elseif pokemon.spell == "Bone Club" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)),7) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end end local sumonado = sumomdonego addEvent(damage, 100, {cid = sumonado}) addEvent(damage, 600, {cid = sumonado}) addEvent(throw, 0, {cid = sumonado}) addEvent(throw, 550, {cid = sumonado}) return 0 elseif pokemon.spell == "Thunder Bolt" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then local pos = getThingPos(getCreatureTarget(params.cid)) local frompos = getThingPos(params.cid) frompos.x = pos.x+2 frompos.y = pos.y+2 doSendDistanceShoot(pos, frompos, 40) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 11) end end end local sumonado = sumomdonego addEvent(damage, 100, {cid = sumonado}) addEvent(damage, 600, {cid = sumonado}) addEvent(throw, 0, {cid = sumonado}) addEvent(throw, 550, {cid = sumonado}) return 0 elseif pokemon.spell == "Dark Pulse" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)),18) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 187) end end end local function damage2(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 186) end end end local sumonado = sumomdonego addEvent(throw, 0, {cid = sumonado}) addEvent(damage2, 100, {cid = sumonado}) addEvent(throw, 550, {cid = sumonado}) addEvent(damage, 600, {cid = sumonado}) return 0 elseif pokemon.spell == "Restore" then doSendMagicEffect(getThingPos(sumomdonego), 132) local summon = sumomdonego local lifequeta = getCreatureHealth(summon) local lifemax = getCreatureMaxHealth(summon) curar = lifemax-lifequeta doCreatureAddHealth(sumomdonego, curar) doSendAnimatedText(getThingPos(sumomdonego), "+"..curar.."", 35) return 0 elseif pokemon.spell == "Self Heal" then doSendMagicEffect(getThingPos(sumomdonego), 132) local summon = sumomdonego local lifequeta = getCreatureHealth(summon) local lifemax = getCreatureMaxHealth(summon) curar = lifemax-lifequeta doCreatureAddHealth(sumomdonego, curar) doSendAnimatedText(getThingPos(sumomdonego), "+"..curar.."", 35) return 0 elseif pokemon.spell == "Rest" then doSendMagicEffect(getThingPos(sumomdonego), 32) local summon = sumomdonego local lifequeta = getCreatureHealth(summon) local lifemax = getCreatureMaxHealth(summon) local curar = lifemax-lifequeta doCreatureAddHealth(sumomdonego, curar) rest(summon) return 0 elseif pokemon.spell == "Healera" then local summon = sumomdonego local lifemax = getCreatureMaxHealth(summon) local curar = lifemax local curarachan = (getCreatureMaxHealth(summon)-getCreatureHealth(summon)) if curarachan >= 1 then doCreatureAddHealth(sumomdonego,curarachan) doSendAnimatedText(getThingPos(sumomdonego), "+"..curarachan.."", 35) end doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), sleeparea, curar, curar*1.2, 12) local d = getCreaturesInRange(getThingPos(sumomdonego), 3, 3, 0, 1) for _,pid in pairs(d) do if isPlayer(pid) then local curarachan = (getCreatureMaxHealth(pid)-getCreatureHealth(pid)) if curarachan >= 1 then doCreatureAddHealth(pid,curarachan) doSendAnimatedText(getThingPos(pid), "+"..curarachan.."", 35) end end end return 0 elseif pokemon.spell == "Earth Quake" then xxe = getCreatureName(sumomdonego) local function go14(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) else return true end end local function go13(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go14, 500, cid) else return true end end local function go12(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go13, 500, cid) else return true end end local function go11(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go12, 500, cid) else return true end end local function go10(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go11, 500, cid) else return true end end local function go9(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go10, 500, cid) else return true end end local function go8(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go9, 500, cid) else return true end end local function go7(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go8, 500, cid) else return true end end local function go6(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go7, 500, cid) else return true end end local function go5(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go6, 500, cid) else return true end end local function go4(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go5, 500, cid) else return true end end local function go3(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go4, 500, cid) else return true end end local function go2(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go3, 500, cid) else return true end end local function go(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go2, 500, cid) else return true end end doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 252) addEvent(go, 500, cid) return 0 elseif pokemon.spell == "Stunning Confusion" then xxe = getCreatureName(sumomdonego) local function go14(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) else return true end end local function go13(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go14, 500, cid) else return true end end local function go12(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go13, 500, cid) else return true end end local function go11(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go12, 500, cid) else return true end end local function go10(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go11, 500, cid) else return true end end local function go9(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go10, 500, cid) else return true end end local function go8(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go9, 500, cid) else return true end end local function go7(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go8, 500, cid) else return true end end local function go6(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go7, 500, cid) else return true end end local function go5(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go6, 500, cid) else return true end end local function go4(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go5, 500, cid) else return true end end local function go3(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go4, 500, cid) else return true end end local function go2(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go3, 500, cid) else return true end end local function go(params) if #getCreatureSummons(cid) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go2, 500, cid) else return true end end doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), quake, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 136) addEvent(go, 500, cid) return 0 elseif pokemon.spell == "Calm Mind" then doSendMagicEffect(getThingPos(sumomdonego), 172) setPlayerStorageValue(sumomdonego, 254, 1) local function quiet(params) if isCreature(params.cid) then if getPlayerStorageValue(params.cid, 254) >= 1 then doSendMagicEffect(getThingPos(params.cid), 249) end end end local function desc(params) if isCreature(params.cid) then if getPlayerStorageValue(params.cid, 254) >= 1 then setPlayerStorageValue(params.cid, 254, 0) end end end local sumonado = sumomdonego addEvent(quiet, 4000, {cid = sumonado}) addEvent(desc, 5000, {cid = sumonado}) return 0 elseif pokemon.spell == "Focus" then doSendMagicEffect(getThingPos(sumomdonego), 132) setPlayerStorageValue(sumomdonego, 254, 1) local function desc(params) if isCreature(params.cid) then if getPlayerStorageValue(params.cid, 254) >= 1 then setPlayerStorageValue(params.cid, 254, 0) end end end local sumonado = sumomdonego addEvent(desc, 12*500, {cid = sumonado}) return 0 elseif pokemon.spell == "Ancient Fury" then local xsx = getCreatureName(sumomdonego) if xsx == "Elder Charizard" then doSetCreatureOutfit(sumomdonego, elder, 8300) elseif xsx == "Ancient Blastoise" then doSetCreatureOutfit(sumomdonego, blastoise, 8300) elseif xsx == "Typhlosion" then doSetCreatureOutfit(sumomdonego,{lookType = 466}, 8300) elseif xsx == "Quilava" then doSetCreatureOutfit(sumomdonego,{lookType = 465}, 8300) elseif xsx == "Cyndaquil" then doSetCreatureOutfit(sumomdonego,{lookType = 464}, 8300) end setPlayerStorageValue(sumomdonego, 254, 1) local function desc(params) if isCreature(params.cid) then if getPlayerStorageValue(params.cid, 254) >= 1 then setPlayerStorageValue(params.cid, 254, 0) end end end local function roll(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid), 208) doSendMagicEffect(getThingPos(params.cid), 29) if isCreature(getCreatureTarget(params.cid)) then if getDistanceBetween(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid))) == 1 then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end end end local sumonado = sumomdonego for r = 1, 10 do addEvent(roll, 800*r, {cid = sumonado}) end addEvent(desc, 10*800, {cid = sumonado}) return 0 elseif pokemon.spell == "Furious Legs" then local function roll(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid), 208) doSendMagicEffect(getThingPos(params.cid), 29) if isCreature(getCreatureTarget(params.cid)) then if getDistanceBetween(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid))) == 1 then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end end end local sumonado = sumomdonego for r = 1, 10 do addEvent(roll, 800*r, {cid = sumonado}) end return 0 elseif pokemon.spell == "Ultimate Champion" then local function roll(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid), 208) doSendMagicEffect(getThingPos(params.cid), 28) if isCreature(getCreatureTarget(params.cid)) then if getDistanceBetween(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid))) == 1 then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end end end local sumonado = sumomdonego for r = 1, 10 do addEvent(roll, 800*r, {cid = sumonado}) end return 0 elseif pokemon.spell == "Electric Charge" then setPlayerStorageValue(sumomdonego, 254, 1) local function desc(params) if isCreature(params.cid) then if getPlayerStorageValue(params.cid, 254) >= 1 then setPlayerStorageValue(params.cid, 254, 0) end end end local function roll(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid), 207) if isCreature(getCreatureTarget(params.cid)) then if getDistanceBetween(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid))) == 1 then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end end end local sumonado = sumomdonego for r = 1, 10 do addEvent(roll, 800*r, {cid = sumonado}) end addEvent(desc, 10*800, {cid = sumonado}) return 0 elseif pokemon.spell == "Fury" then doSendMagicEffect(getThingPos(sumomdonego), 28) setPlayerStorageValue(sumomdonego, 4, 1) local function roll(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid), 208) doSendMagicEffect(getThingPos(params.cid), 28) if isCreature(getCreatureTarget(params.cid)) then if getDistanceBetween(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid))) == 1 then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end end end local function chard(params) if isCreature(params.cid) then if getPlayerStorageValue(params.cid, 4) >= 1 then setPlayerStorageValue(params.cid, 4, -1) end end end local sumonado = sumomdonego for r = 1, 10 do addEvent(roll, 800*r, {cid = sumonado}) end addEvent(chard, 6000, {cid = sumonado}) return 0 elseif pokemon.spell == "Rage" then doSendMagicEffect(getThingPos(sumomdonego), 14) local function roll(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid), 14) if isCreature(getCreatureTarget(params.cid)) then if getDistanceBetween(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid))) == 1 then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end end end local sumonado = sumomdonego for r = 1, 10 do addEvent(roll, 800*r, {cid = sumonado}) end return 0 elseif pokemon.spell == "Strafe" then local summons = sumomdonego local mon = getCreatureName(summons) local spd = getCreatureSpeed(summons) local bspd = getCreatureBaseSpeed(summons) doChangeSpeed(summons, -spd) doChangeSpeed(summons, bspd+100) doSendMagicEffect(getThingPos(sumomdonego), 14) local function roll(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid), 14) if isCreature(getCreatureTarget(params.cid)) then if getDistanceBetween(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid))) == 1 then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end end end local function stopspeed(params) if isCreature(params.cid) then doChangeSpeed(summons, -spd) doChangeSpeed(summons, bspd) end end local sumonado = sumomdonego addEvent(stopspeed, 6000, {cid = sumonado}) for r = 1, 10 do addEvent(roll, 800*r, {cid = sumonado}) end return 0 elseif pokemon.spell == "Agility" then local summons = sumomdonego local mon = getCreatureName(summons) local spd = getCreatureSpeed(summons) local bspd = getCreatureBaseSpeed(summons) doChangeSpeed(summons, -spd) doChangeSpeed(summons, bspd+200) doSendMagicEffect(getThingPos(sumomdonego), 14) local function roll(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid), 14) if isCreature(getCreatureTarget(params.cid)) then if getDistanceBetween(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid))) == 1 then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end end end local function stopspeed(params) if isCreature(params.cid) then doChangeSpeed(summons, -spd) doChangeSpeed(summons, bspd) end end local sumonado = sumomdonego addEvent(stopspeed, 6000, {cid = sumonado}) for r = 1, 15 do addEvent(roll, 500*r, {cid = sumonado}) end return 0 elseif pokemon.spell == "Headbutt" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) return 0 elseif pokemon.spell == "Razor Leaf" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)), end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 79) end end end local sumonado = sumomdonego addEvent(damage, 100, {cid = sumonado}) addEvent(damage, 600, {cid = sumonado}) addEvent(throw, 0, {cid = sumonado}) addEvent(throw, 550, {cid = sumonado}) return 0 elseif pokemon.spell == "Shockwave" then posit = getThingPos(sumomdonego) local function sandattack(params) if #getCreatureSummons(params.cid) >= 1 then doAreaCombatHealth(getCreatureSummons(params.cid)[1], null, params.ar, 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), params.ef) doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, params.wave, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(sandattack, 0, {cid = cid, ar = {x=posicao.x+1, y=posicao.y-1, z=posicao.z}, ef = 126, wave = swaven}) addEvent(sandattack, 400, {cid = cid, ar = {x=posicao.x+1, y=posicao.y-2, z=posicao.z}, ef = 126, wave = swaven}) addEvent(sandattack, 800, {cid = cid, ar = {x=posicao.x+1, y=posicao.y-3, z=posicao.z}, ef = 126, wave = swaven}) addEvent(sandattack, 1200, {cid = cid, ar = {x=posicao.x+1, y=posicao.y-4, z=posicao.z}, ef = 126, wave = swaven}) addEvent(sandattack, 1600, {cid = cid, ar = {x=posicao.x+1, y=posicao.y-5, z=posicao.z}, ef = 126, wave = swaven}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(sandattack, 0, {cid = cid, ar = {x=posicao.x+1, y=posicao.y+2, z=posicao.z}, ef = 125, wave = swaves}) addEvent(sandattack, 400, {cid = cid, ar = {x=posicao.x+1, y=posicao.y+3, z=posicao.z}, ef = 125, wave = swaves}) addEvent(sandattack, 800, {cid = cid, ar = {x=posicao.x+1, y=posicao.y+4, z=posicao.z}, ef = 125, wave = swaves}) addEvent(sandattack, 1200, {cid = cid, ar = {x=posicao.x+1, y=posicao.y+5, z=posicao.z}, ef = 125, wave = swaves}) addEvent(sandattack, 1600, {cid = cid, ar = {x=posicao.x+1, y=posicao.y+6, z=posicao.z}, ef = 125, wave = swaves}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(sandattack, 0, {cid = cid, ar = {x=posicao.x+2, y=posicao.y+1, z=posicao.z}, ef = 124, wave = swavee}) addEvent(sandattack, 400, {cid = cid, ar = {x=posicao.x+3, y=posicao.y+1, z=posicao.z}, ef = 124, wave = swavee}) addEvent(sandattack, 800, {cid = cid, ar = {x=posicao.x+4, y=posicao.y+1, z=posicao.z}, ef = 124, wave = swavee}) addEvent(sandattack, 1200, {cid = cid, ar = {x=posicao.x+5, y=posicao.y+1, z=posicao.z}, ef = 124, wave = swavee}) addEvent(sandattack, 1600, {cid = cid, ar = {x=posicao.x+6, y=posicao.y+1, z=posicao.z}, ef = 124, wave = swavee}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(sandattack, 0, {cid = cid, ar = {x=posicao.x-1, y=posicao.y+1, z=posicao.z}, ef = 123, wave = swavew}) addEvent(sandattack, 400, {cid = cid, ar = {x=posicao.x-2, y=posicao.y+1, z=posicao.z}, ef = 123, wave = swavew}) addEvent(sandattack, 800, {cid = cid, ar = {x=posicao.x-3, y=posicao.y+1, z=posicao.z}, ef = 123, wave = swavew}) addEvent(sandattack, 1200, {cid = cid, ar = {x=posicao.x-4, y=posicao.y+1, z=posicao.z}, ef = 123, wave = swavew}) addEvent(sandattack, 1600, {cid = cid, ar = {x=posicao.x-5, y=posicao.y+1, z=posicao.z}, ef = 123, wave = swavew}) end return 0 elseif pokemon.spell == "Horn Drill" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)), 25) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 25) end end end local sumonado = sumomdonego addEvent(damage, 100, {cid = sumonado}) addEvent(damage, 600, {cid = sumonado}) addEvent(throw, 0, {cid = sumonado}) addEvent(throw, 550, {cid = sumonado}) return 0 elseif pokemon.spell == "Fury Attack" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)), 15) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 25) end end end local sumonado = sumomdonego addEvent(damage, 100, {cid = sumonado}) addEvent(damage, 600, {cid = sumonado}) addEvent(throw, 0, {cid = sumonado}) addEvent(throw, 550, {cid = sumonado}) return 0 elseif pokemon.spell == "Rock Tomb" then if getCreatureLookDir(sumomdonego) == 0 then rock1 = {x=getThingPos(sumomdonego).x+1, y=getThingPos(sumomdonego).y-1, z=getThingPos(sumomdonego).z} rock2 = {x=getThingPos(sumomdonego).x+0, y=getThingPos(sumomdonego).y-1, z=getThingPos(sumomdonego).z} rock3 = {x=getThingPos(sumomdonego).x-1, y=getThingPos(sumomdonego).y-1, z=getThingPos(sumomdonego).z} doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tombn, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 118) elseif getCreatureLookDir(sumomdonego) == 2 then rock1 = {x=getThingPos(sumomdonego).x+1, y=getThingPos(sumomdonego).y+1, z=getThingPos(sumomdonego).z} rock2 = {x=getThingPos(sumomdonego).x+0, y=getThingPos(sumomdonego).y+1, z=getThingPos(sumomdonego).z} rock3 = {x=getThingPos(sumomdonego).x-1, y=getThingPos(sumomdonego).y+1, z=getThingPos(sumomdonego).z} doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tombs, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 118) elseif getCreatureLookDir(sumomdonego) == 3 then rock1 = {x=getThingPos(sumomdonego).x-1, y=getThingPos(sumomdonego).y+1, z=getThingPos(sumomdonego).z} rock2 = {x=getThingPos(sumomdonego).x-1, y=getThingPos(sumomdonego).y+0, z=getThingPos(sumomdonego).z} rock3 = {x=getThingPos(sumomdonego).x-1, y=getThingPos(sumomdonego).y-1, z=getThingPos(sumomdonego).z} doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tombw, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 118) elseif getCreatureLookDir(sumomdonego) == 1 then rock1 = {x=getThingPos(sumomdonego).x+1, y=getThingPos(sumomdonego).y+1, z=getThingPos(sumomdonego).z} rock2 = {x=getThingPos(sumomdonego).x+1, y=getThingPos(sumomdonego).y+0, z=getThingPos(sumomdonego).z} rock3 = {x=getThingPos(sumomdonego).x+1, y=getThingPos(sumomdonego).y-1, z=getThingPos(sumomdonego).z} doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tombe, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 118) end doSendDistanceShoot(getThingPos(sumomdonego), rock1, 11) doSendDistanceShoot(getThingPos(sumomdonego), rock2, 11) doSendDistanceShoot(getThingPos(sumomdonego), rock3, 11) return 0 elseif pokemon.spell == "Cross Chop" then if getCreatureLookDir(sumomdonego) == 0 then rock1 = {x=getThingPos(sumomdonego).x+1, y=getThingPos(sumomdonego).y-1, z=getThingPos(sumomdonego).z} rock2 = {x=getThingPos(sumomdonego).x+0, y=getThingPos(sumomdonego).y-1, z=getThingPos(sumomdonego).z} rock3 = {x=getThingPos(sumomdonego).x-1, y=getThingPos(sumomdonego).y-1, z=getThingPos(sumomdonego).z} doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tombn, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 118) elseif getCreatureLookDir(sumomdonego) == 2 then rock1 = {x=getThingPos(sumomdonego).x+1, y=getThingPos(sumomdonego).y+1, z=getThingPos(sumomdonego).z} rock2 = {x=getThingPos(sumomdonego).x+0, y=getThingPos(sumomdonego).y+1, z=getThingPos(sumomdonego).z} rock3 = {x=getThingPos(sumomdonego).x-1, y=getThingPos(sumomdonego).y+1, z=getThingPos(sumomdonego).z} doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tombs, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 118) elseif getCreatureLookDir(sumomdonego) == 3 then rock1 = {x=getThingPos(sumomdonego).x-1, y=getThingPos(sumomdonego).y+1, z=getThingPos(sumomdonego).z} rock2 = {x=getThingPos(sumomdonego).x-1, y=getThingPos(sumomdonego).y+0, z=getThingPos(sumomdonego).z} rock3 = {x=getThingPos(sumomdonego).x-1, y=getThingPos(sumomdonego).y-1, z=getThingPos(sumomdonego).z} doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tombw, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 118) elseif getCreatureLookDir(sumomdonego) == 1 then rock1 = {x=getThingPos(sumomdonego).x+1, y=getThingPos(sumomdonego).y+1, z=getThingPos(sumomdonego).z} rock2 = {x=getThingPos(sumomdonego).x+1, y=getThingPos(sumomdonego).y+0, z=getThingPos(sumomdonego).z} rock3 = {x=getThingPos(sumomdonego).x+1, y=getThingPos(sumomdonego).y-1, z=getThingPos(sumomdonego).z} doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tombe, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 118) end doSendDistanceShoot(getThingPos(sumomdonego), rock1, 26) doSendDistanceShoot(getThingPos(sumomdonego), rock2, 26) doSendDistanceShoot(getThingPos(sumomdonego), rock3, 26) return 0 elseif pokemon.spell == "Psycho Shift" then local pos = getThingPos(getCreatureTarget(cid)) local pos2 = getThingPos(getCreatureTarget(cid)) pos.x = pos.x + 1 if hasSqm(pos) and isSightClear(getThingPos(sumomdonego), pos, false) then if getTileThingByPos(pos) and getTileThingByPos(pos).itemid >= 1 and not isInArray({919, 460, 4820, 4821, 4822, 4823, 4824, 4825}, getTileThingByPos(pos).itemid) and isWalkable(pos) then pos = getClosestFreeTile(getCreatureTarget(cid), pos) doSendDistanceShoot(pos2, pos, 39) doTeleportThing(getCreatureTarget(cid), pos, false) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 238) doSendMagicEffect(pos2, 134) else local newpos = getClosestFreeTile(getCreatureTarget(cid), pos) doSendDistanceShoot(pos2, newpos, 39) doTeleportThing(getCreatureTarget(cid), newpos, false) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 238) doSendMagicEffect(pos2, 134) end else doSendDistanceShoot(pos2, getThingPos(getCreatureTarget(cid)), 39) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 238) doSendMagicEffect(pos2, 134) end return 0 elseif pokemon.spell == "Sand Attack" then posit = getThingPos(sumomdonego) local function sandattack(params) if #getCreatureSummons(params.cid) >= 1 then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, sand1, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), params.ef) end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(sandattack, 0, {cid = cid, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, ef = 120}) addEvent(sandattack, 400, {cid = cid, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, ef = 120}) addEvent(sandattack, 800, {cid = cid, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, ef = 120}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(sandattack, 0, {cid = cid, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, ef = 122}) addEvent(sandattack, 400, {cid = cid, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, ef = 122}) addEvent(sandattack, 800, {cid = cid, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, ef = 122}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(sandattack, 0, {cid = cid, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, ef = 121}) addEvent(sandattack, 400, {cid = cid, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, ef = 121}) addEvent(sandattack, 800, {cid = cid, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, ef = 121}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(sandattack, 0, {cid = cid, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, ef = 119}) addEvent(sandattack, 400, {cid = cid, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, ef = 119}) addEvent(sandattack, 800, {cid = cid, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, ef = 119}) end return 0 elseif pokemon.spell == "Flamethrower" then if getCreatureLookDir(sumomdonego) == 0 then local flamepos2 = getThingPos(sumomdonego) flamepos2.x = flamepos2.x+1 flamepos2.y = flamepos2.y-1 doSendMagicEffect(flamepos2, 225)--55 doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), flamen, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) elseif getCreatureLookDir(sumomdonego) == 1 then local flamepos1 = getThingPos(sumomdonego) flamepos1.x = flamepos1.x+3 flamepos1.y = flamepos1.y+1 doSendMagicEffect(flamepos1, 58)--58 doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), flamee, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) elseif getCreatureLookDir(sumomdonego) == 2 then local flamepos = getThingPos(sumomdonego) flamepos.x = flamepos.x+1 flamepos.y = flamepos.y+3 doSendMagicEffect(flamepos, 226)--56 doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), flames, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) elseif getCreatureLookDir(sumomdonego) == 3 then local flamepos = getThingPos(sumomdonego) flamepos.x = flamepos.x-1 flamepos.y = flamepos.y+1 doSendMagicEffect(flamepos, 57)--57 doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), flamew, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) end return 0 elseif pokemon.spell == "Mind Blast" then local function go2(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), psy2, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 134) end end local function go(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), psy4, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 137) end end local function go1(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), AREA_GREATLOVE, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 133) end end local sumonado = sumomdonego doSendMagicEffect(getCreaturePosition(sumonado), 249) addEvent(go, 1000, {cid = sumonado}) addEvent(go1, 300, {cid = sumonado}) addEvent(go2, 600, {cid = sumonado}) return 0 elseif pokemon.spell == "Great Love" then local function go2(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), AREA_GREATLOVE2, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 147) end end local function go(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), AREA_GREATLOVE3, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 147) end end local function go1(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), AREA_GREATLOVE4, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 147) end end local d = getCreaturesInRange(getThingPos(sumomdonego), 3, 3, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) love(sumomdonego) else love(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) love(sumomdonego) else love(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) love(sumomdonego) else love(pid) end end end local sumonado = sumomdonego addEvent(go, 1000, {cid = sumonado}) addEvent(go1, 300, {cid = sumonado}) addEvent(go2, 600, {cid = sumonado}) return 0 elseif pokemon.spell == "Super Sonic" then local pid = getCreatureTarget(cid) if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(pid), 24) return 0 elseif pokemon.spell == "Roar" then local d = getCreaturesInRange(getThingPos(sumomdonego), 2, 2, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Roar(sumomdonego) else Roar(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Roar(sumomdonego) else Roar(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Roar(sumomdonego) else Roar(pid) end end end return 0 elseif pokemon.spell == "Scary Face" then doSendMagicEffect(getThingPos(sumomdonego), 177) local d = getCreaturesInRange(getThingPos(sumomdonego), 2, 2, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) fear(sumomdonego) else fear(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) fear(sumomdonego) else fear(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) fear(sumomdonego) else fear(pid) end end end return 0 elseif pokemon.spell == "Sonic Boom" then local pid = getCreatureTarget(cid) if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(pid), 24) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 48) return 0 elseif pokemon.spell == "Dizzy Punch" then local pid = getCreatureTarget(cid) if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Confunso(sumomdonego) else Confunso(pid) end end return 0 elseif pokemon.spell == "Acrobatics" then local function blast1(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), params.ar, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), params.ef) end end local function blast2(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), params.ar, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), params.ef) end end local sumonado = sumomdonego addEvent(blast1, 0, {cid = sumonado,ar = AREA_BLAST1,ef = 232}) addEvent(blast1, 500, {cid = sumonado,ar = AREA_BLAST2,ef = 232}) addEvent(blast1, 800, {cid = sumonado,ar = AREA_BLAST3,ef = 232}) addEvent(blast2, 300, {cid = sumonado,ar = AREA_BLAST1,ef = 42}) addEvent(blast2, 800, {cid = sumonado,ar = AREA_BLAST2,ef = 42}) addEvent(blast2, 1100, {cid = sumonado,ar = AREA_BLAST3,ef = 42}) addEvent(blast1, 1500, {cid = sumonado,ar = AREA_BLAST1,ef = 232}) addEvent(blast1, 1200, {cid = sumonado,ar = AREA_BLAST2,ef = 232}) addEvent(blast1, 1000, {cid = sumonado,ar = AREA_BLAST3,ef = 232}) addEvent(blast2, 1600, {cid = sumonado,ar = AREA_BLAST1,ef = 42}) addEvent(blast2, 1300, {cid = sumonado,ar = AREA_BLAST2,ef = 42}) addEvent(blast2, 1100, {cid = sumonado,ar = AREA_BLAST3,ef = 42}) return 0 elseif pokemon.spell == "Windstorm" then posit = getThingPos(sumomdonego) local function storm(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, params.el, posit, params.ar, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), params.ef) end end local sumonado = sumomdonego addEvent(storm, 0, {cid = sumonado, el = element, ar = ws1, ef = 42}) addEvent(storm, 500, {cid = sumonado, el = element, ar = ws2, ef = 232}) addEvent(storm, 1000, {cid = sumonado, el = element, ar = ws3, ef = 42}) addEvent(storm, 1500, {cid = sumonado, el = element, ar = ws4, ef = 232}) addEvent(storm, 700, {cid = sumonado, el = null, ar = ws4, ef = CONST_ME_POFF}) addEvent(storm, 1200, {cid = sumonado, el = null, ar = ws1, ef = CONST_ME_POFF}) addEvent(storm, 1800, {cid = sumonado, el = null, ar = ws3, ef = CONST_ME_POFF}) return 0 elseif pokemon.spell == "Poison Sting" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 15) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), return 0 elseif pokemon.spell == "Vine Whip" then if getCreatureLookDir(sumomdonego) == 0 then area = vinen dano = whipn effect = 80 elseif getCreatureLookDir(sumomdonego) == 1 then area = vinee dano = whipe effect = 83 elseif getCreatureLookDir(sumomdonego) == 2 then area = vines dano = whips effect = 81 elseif getCreatureLookDir(sumomdonego) == 3 then area = vinew dano = whipw effect = 82 end doAreaCombatHealth(sumomdonego, null, getThingPos(sumomdonego), area, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), effect) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), dano, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 255) return 0 elseif pokemon.spell == "Raging Blast" then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), rageblast1, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 181) local function damage(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), params.x, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 36) end end local sumonado = sumomdonego addEvent(damage, 200, {cid = sumonado, x = rageblast2}) addEvent(damage, 400, {cid = sumonado, x = rageblast3}) addEvent(damage, 600, {cid = sumonado, x = rageblast4}) return 0 elseif pokemon.spell == "Leech Seed" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 5) local alvo = getCreatureTarget(cid) local leecher = sumomdonego local function suck(params) if isCreature(params.leecher) then if isCreature(params.alvo) then doSendMagicEffect(getThingPos(params.leecher), 14) local life = getCreatureHealth(alvo) doAreaCombatHealth(params.leecher, element, getThingPos(params.alvo), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 45) local newlife = life - getCreatureHealth(params.alvo) if newlife >= 1 then doCreatureAddHealth(params.leecher, newlife) doSendAnimatedText(getThingPos(params.leecher), "+"..newlife.."", 35) end end end end addEvent(suck, 2000, {cid = cid, alvo = alvo,leecher = leecher}) addEvent(suck, 4000, {cid = cid, alvo = alvo,leecher = leecher}) addEvent(suck, 6000, {cid = cid, alvo = alvo,leecher = leecher}) addEvent(suck, 8000, {cid = cid, alvo = alvo,leecher = leecher}) addEvent(suck, 10000, {cid = cid, alvo = alvo,leecher = leecher}) return 0 elseif pokemon.spell == "Leaf Blade" then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), rageblast1, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 79) local function damage(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), params.x, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 79) end end local sumonado = sumomdonego addEvent(damage, 200, {cid = sumonado, x = rageblast2}) addEvent(damage, 400, {cid = sumonado, x = rageblast3}) addEvent(damage, 600, {cid = sumonado, x = rageblast4}) return 0 elseif pokemon.spell == "Earthshock" then doAreaCombatHealth(sumomdonego, GROUNDDAMAGE, getThingPos(sumomdonego), eshock, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) local sps = getThingPos(sumomdonego) sps.x = sps.x+1 sps.y = sps.y+1 doSendMagicEffect(sps, 127) return 0 elseif pokemon.spell == "Multi-Slap" then doAreaCombatHealth(sumomdonego, NORMALDAMAGE, getThingPos(sumomdonego), eshock, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) return 0 elseif pokemon.spell == "Thundershock" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 40) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 48) return 0 elseif pokemon.spell == "Solar Beam" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolard1 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar, 0, 0, 95) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar2, 0, 0, 163) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar3, 0, 0, 164) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wsolard2 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar4 , 0, 0, 88) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar5, 0, 0, 89) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar6, 0, 0, 90) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wsolard4 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolakd, 0, 0, 87) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolapd, 0, 0, 91) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolatd, 0, 0, 92) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wsolard3 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolak , 0, 0, 93) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolap, 0, 0, 91) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolat, 0, 0, 94) end return 0 elseif pokemon.spell == "Charge Beam" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolard1 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar, 0, 0, 95) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar2, 0, 0, 163) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar3, 0, 0, 164) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wsolard2 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar4 , 0, 0, 88) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar5, 0, 0, 89) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar6, 0, 0, 90) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wsolard4 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolakd, 0, 0, 87) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolapd, 0, 0, 91) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolatd, 0, 0, 92) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wsolard3 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolak , 0, 0, 93) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolap, 0, 0, 91) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolat, 0, 0, 94) end return 0 elseif pokemon.spell == "Zap Cannon" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolard1 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar, 0, 0, 95) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar2, 0, 0, 163) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar3, 0, 0, 164) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wsolard2 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar4 , 0, 0, 88) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar5, 0, 0, 89) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolar6, 0, 0, 90) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wsolard4 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolakd, 0, 0, 87) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolapd, 0, 0, 91) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolatd, 0, 0, 92) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wsolard3 ,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 255) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolak , 0, 0, 93) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolap, 0, 0, 91) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego),wsolat, 0, 0, 94) end return 0 elseif pokemon.spell == "Stun Spore" then local d = getCreaturesInRange(getThingPos(sumomdonego), 2, 2, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) end else Paralize(pid) end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Paralize(sumomdonego) else Paralize(pid) end end end doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), sleeparea, 0, 0, 85) return 0 elseif pokemon.spell == "Whirlwind" then posit = getThingPos(sumomdonego) local function gust(params) if #getCreatureSummons(params.cid) >= 1 then doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, params.ar, params.br, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 42) end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(gust, 0, {cid = cid, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, br = sand1}) addEvent(gust, 500, {cid = cid, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, br = whirl3}) addEvent(gust, 1000, {cid = cid, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, br = whirl5}) addEvent(gust, 1500, {cid = cid, ar = {x=posicao.x, y=posicao.y-4, z=posicao.z}, br = whirl5}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(gust, 0, {cid = cid, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, br = sand1}) addEvent(gust, 500, {cid = cid, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, br = whirl3}) addEvent(gust, 1000, {cid = cid, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, br = whirl5}) addEvent(gust, 1500, {cid = cid, ar = {x=posicao.x, y=posicao.y+4, z=posicao.z}, br = whirl5}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(gust, 0, {cid = cid, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, br = sand1}) addEvent(gust, 500, {cid = cid, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, br = whirl32}) addEvent(gust, 1000, {cid = cid, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, br = whirl52}) addEvent(gust, 1500, {cid = cid, ar = {x=posicao.x+4, y=posicao.y, z=posicao.z}, br = whirl52}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(gust, 0, {cid = cid, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, br = sand1}) addEvent(gust, 500, {cid = cid, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, br = whirl32}) addEvent(gust, 1000, {cid = cid, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, br = whirl52}) addEvent(gust, 1500, {cid = cid, ar = {x=posicao.x-4, y=posicao.y, z=posicao.z}, br = whirl52}) end return 0 elseif pokemon.spell == "Sing" then local d = getCreaturesInRange(getThingPos(sumomdonego), 3, 3, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sing(sumomdonego) else Sing(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sing(sumomdonego) else Sing(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sing(sumomdonego) else Sing(pid) end end end doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), AREA_CIRCLE3X3, 0, 0, 22) return 0 elseif pokemon.spell == "Melody" then local d = getCreaturesInRange(getThingPos(sumomdonego), 3, 3, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sing(sumomdonego) else Sing(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sing(sumomdonego) else Sing(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sing(sumomdonego) else Sing(pid) end end end doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), AREA_CIRCLE3X3, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 32) return 0 elseif pokemon.spell == "Stomp" then local d = getCreaturesInRange(getThingPos(sumomdonego), 2, 2, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then Paralize(pid) end elseif isPlayerInParty(getCreatureMaster(pid),cid) then Paralize(pid) end elseif isMonster(pid) then Paralize(pid) end end doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), sleeparea, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 118) return 0 elseif pokemon.spell == "Sleep Powder" then local d = getCreaturesInRange(getThingPos(sumomdonego), 2, 2, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sleep(sumomdonego) else Sleep(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sleep(sumomdonego) else Sleep(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sleep(sumomdonego) else Sleep(pid) end end end doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), sleeparea,0,0, 27) return 0 elseif pokemon.spell == "Spider Web" then local d = getCreaturesInRange(getThingPos(sumomdonego), 2, 2, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sleep(sumomdonego) else Sleep(pid) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sleep(sumomdonego) else Sleep(pid) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Sleep(sumomdonego) else Sleep(pid) end end end doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), sleeparea,-((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 27) return 0 elseif pokemon.spell == "Hypnosis" then doSendMagicEffect(getThingPos(getCreatureTarget(cid)), 136) local summons = getCreatureTarget(cid) if getPlayerStorageValue(summons, 34) >= 1 then setPlayerStorageValue(summons, 34, 0) doSendMagicEffect(getThingPos(summons), 135) doSendAnimatedText(getThingPos(summons), "REFLECT", 215) doSendMagicEffect(getThingPos(sumomdonego), 136) Hypnosis(sumomdonego) return 0 end if isMonster(summons) then Hypnosis(summons) end return 0 elseif pokemon.spell == "Lick" then doSendMagicEffect(getThingPos(getCreatureTarget(cid)), 145) local summons = getCreatureTarget(cid) if getPlayerStorageValue(summons, 34) >= 1 then setPlayerStorageValue(summons, 34, 0) doSendMagicEffect(getThingPos(summons), 135) doSendAnimatedText(getThingPos(summons), "REFLECT", 215) doSendMagicEffect(getThingPos(sumomdonego), 145) Paralize(sumomdonego) return 0 end if isMonster(summons) then Paralize(summons) end return 0 elseif pokemon.spell == "Invisible" then local summons = sumomdonego doSendMagicEffect(getCreaturePosition(summons), 219) --local outfitx = {lookType = 0, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} doSetCreatureOutfit(summons, {lookType = 0}, 3000) --doSetMonsterOutfit(summons, 'Tall Grass', 3000) --doSetItemOutfit(summons, outfitx, summons) doAddCondition(summons , conditioninvi) return 0 elseif pokemon.spell == "Element Hand" then local summons = sumomdonego doSendMagicEffect(getCreaturePosition(summons), 219) if getCreatureName(sumomdonego) == "Hitmonchan" then if isInArray({"631"}, getCreatureOutfit(sumomdonego).lookType) then outfitx = {lookType = 630, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} doCreatureChangeOutfit(summons, outfitx) elseif isInArray({"630"}, getCreatureOutfit(sumomdonego).lookType) then outfitx = {lookType = 629, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} doCreatureChangeOutfit(summons, outfitx) elseif isInArray({"629"}, getCreatureOutfit(sumomdonego).lookType) then outfitx = {lookType = 628, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} doCreatureChangeOutfit(summons, outfitx) elseif isInArray({"628"}, getCreatureOutfit(sumomdonego).lookType) then outfitx = {lookType = 631, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} doCreatureChangeOutfit(summons, outfitx) end elseif getCreatureName(sumomdonego) == "Elite Hitmonchan" then if isInArray({"625"}, getCreatureOutfit(sumomdonego).lookType) then outfitx = {lookType = 624, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} doCreatureChangeOutfit(summons, outfitx) elseif isInArray({"624"}, getCreatureOutfit(sumomdonego).lookType) then outfitx = {lookType = 626, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} doCreatureChangeOutfit(summons, outfitx) elseif isInArray({"626"}, getCreatureOutfit(sumomdonego).lookType) then outfitx = {lookType = 627, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} doCreatureChangeOutfit(summons, outfitx) elseif isInArray({"627"}, getCreatureOutfit(sumomdonego).lookType) then outfitx = {lookType = 625, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} doCreatureChangeOutfit(summons, outfitx) end end return 0 elseif pokemon.spell == "Bug Bite" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) return 0 elseif pokemon.spell == "Crabhammer" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 146) return 0 elseif pokemon.spell == "Guillotine" then doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 146) local function guilo(params) if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 156) end end local sumonado = sumomdonego addEvent(guilo, 300, {cid = sumonado}) return 0 elseif pokemon.spell == "Horn Drill" then local function damage(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 25) end end local function damage2(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 25) end end local sumonado = sumomdonego addEvent(damage, 100, {cid = sumonado}) addEvent(damage2, 600, {cid = sumonado}) return 0 elseif pokemon.spell == "Leaf Storm" then local function leaf1x(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), leaf1, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 79) end end local function leaf2x(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), leaf2, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 79) end end local function leaf3x(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), leaf3, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 79) end end local function leaf4x(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), leaf4, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 79) end end local function leaf5x(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), leaf5, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 79) end end local sumonado = sumomdonego addEvent(leaf1x, 100, {cid = sumonado}) addEvent(leaf2x, 300, {cid = sumonado}) addEvent(leaf3x, 600, {cid = sumonado}) addEvent(leaf4x, 800, {cid = sumonado}) addEvent(leaf5x, 900, {cid = sumonado}) addEvent(leaf1x, 1100, {cid = sumonado}) addEvent(leaf2x, 1300, {cid = sumonado}) addEvent(leaf3x, 1500, {cid = sumonado}) addEvent(leaf4x, 1700, {cid = sumonado}) addEvent(leaf5x, 1800, {cid = sumonado}) return 0 elseif pokemon.spell == "Selfdestruct" then local function death(params) if isCreature(params.cid) then local damage = getCreatureHealth(params.cid) doAreaCombatHealth(params.cid, element, getThingPos(sumomdonego), AREA_CIRCLE3X3, -damage, -damage, 181) doCreatureAddHealth(params.cid, -getCreatureHealth(params.cid)) if getPlayerStorageValue(cid, 8888) >= 1 then local player = cid local monstrohe = getPlayerStorageValue(cid, 6569) local spd = getCreatureBaseSpeed(monstrohe) setPlayerStorageValue(monstrohe, 8, 1) doSendAnimatedText(getCreaturePosition(player), "Poke Down", 210) local cont = getPlayerStorageValue(player, 4578) local numeromonstro = getPlayerStorageValue(player, 7787) if getPlayerStorageValue(cid, 8333) >= numeromonstro then local npc = getPlayerStorageValue(cid, 9999) local posx = getPlayerStorageValue(cid, 4982) local posy = getPlayerStorageValue(cid, 4983) local posz = getPlayerStorageValue(cid, 4984) local pos = getCreaturePosition(cid) pos.stackpos = 0 pos.z = posz pos.x = posx pos.y = posy local pos2 = getCreaturePosition(cid) pos2.stackpos = 0 pos2.z = posz pos2.x = posx pos2.y = posy+2 if #getCreatureSummons(cid) == 1 then doTeleportThing(getCreatureSummons(cid)[1], pos2) end doTeleportThing(npc, pos) doTeleportThing(cid, pos2) --setPlayerStorageValue(cid, 9999, 0) --setPlayerStorageValue(cid, 8888, 0) setPlayerStorageValue(npc, 5000, 0) --setPlayerStorageValue(cid, 4578, 0) --setPlayerStorageValue(cid, 8333, 0) --setPlayerStorageValue(cid, 19987,0) doCleanStorage(cid,19987) doCleanStorage(cid,8333) doCleanStorage(cid,4578) doCleanStorage(cid,8888) doCleanStorage(cid,9999) local nome = getCreatureName(cid) local criatura = getPlayerStorageValue(cid, 6569) doSendMagicEffect(getCreaturePosition(criatura), 10) doRemoveCreature(criatura) setPlayerGroupId(cid, 1) doCreatureSay(npc, "Hey "..nome.." you are a loser Trainer", 1) return True end local function gymback(params) if getPlayerStorageValue(player, 6445) >= 1 then local npc = getPlayerStorageValue(player, 9999) setPlayerStorageValue(player, 9999, 0) setPlayerStorageValue(player, 8888, 0) setPlayerStorageValue(npc, 5000, 0) setPlayerStorageValue(player, 4578, 0) setPlayerStorageValue(player, 8333, 0) local nome = getCreatureName(player) local criatura = getPlayerStorageValue(player, 6569) doSendMagicEffect(getCreaturePosition(criatura), 10) doRemoveCreature(criatura) doCreatureSetNoMove(player, 0) doCreatureSay(npc, "Hey "..nome.." you are a loser Trainer", 1) end end setPlayerStorageValue(player, 6445, 1) doSendAnimatedText(getCreaturePosition(player), "Poke Down", 210) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 20 seconds to go you pokemon or lose duel") local function ginasio19(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 1 seconds to go you pokemon or lose battle") addEvent(gymback,1000, cid) end end local function ginasio18(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 2 seconds to go you pokemon or lose battle") addEvent(ginasio19,1000, cid) end end local function ginasio17(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 3 seconds to go you pokemon or lose battle") addEvent(ginasio18,1000, cid) end end local function ginasio16(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 4 seconds to go you pokemon or lose battle") addEvent(ginasio17,1000, cid) end end local function ginasio15(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 5 seconds to go you pokemon or lose battle") addEvent(ginasio16,1000, cid) end end local function ginasio14(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 6 seconds to go you pokemon or lose battle") addEvent(ginasio15,1000, cid) end end local function ginasio13(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 7 seconds to go you pokemon or lose battle") addEvent(ginasio14,1000, cid) end end local function ginasio12(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 8 seconds to go you pokemon or lose battle") addEvent(ginasio13,1000, cid) end end local function ginasio11(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 9 seconds to go you pokemon or lose battle") addEvent(ginasio12,1000, cid) end end local function ginasio10(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 10 seconds to go you pokemon or lose battle") addEvent(ginasio11,1000, cid) end end local function ginasio9(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 11 seconds to go you pokemon or lose battle") addEvent(ginasio10,1000, cid) end end local function ginasio8(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 12 seconds to go you pokemon or lose battle") addEvent(ginasio9,1000, cid) end end local function ginasio7(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 13 seconds to go you pokemon or lose battle") addEvent(ginasio8,1000, cid) end end local function ginasio6(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 14 seconds to go you pokemon or lose battle") addEvent(ginasio7,1000, cid) end end local function ginasio5(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 15 seconds to go you pokemon or lose battle") addEvent(ginasio6,1000, cid) end end local function ginasio4(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 16 seconds to go you pokemon or lose battle") addEvent(ginasio5,1000, cid) end end local function ginasio3(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 17 seconds to go you pokemon or lose battle") addEvent(ginasio4,1000, cid) end end local function ginasio2(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 18 seconds to go you pokemon or lose battle") addEvent(ginasio3,1000, cid) end end local function ginasio(params) if getPlayerStorageValue(player, 6445) >= 1 then doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "You have 19 seconds to go you pokemon or lose battle") addEvent(ginasio2,1000, cid) end end addEvent(ginasio,1000, cid) end end end local function explode(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid),29) end end addEvent(explode, 450, {cid = sumomdonego}) addEvent(explode, 1050, {cid = sumomdonego}) addEvent(explode, 2050, {cid = sumomdonego}) addEvent(explode, 3050, {cid = sumomdonego}) addEvent(explode, 3550, {cid = sumomdonego}) addEvent(explode, 4050, {cid = sumomdonego}) addEvent(explode, 4550, {cid = sumomdonego}) addEvent(death, 4900, {cid = sumomdonego}) return 0 elseif pokemon.spell == "Harden" then setPlayerStorageValue(sumomdonego, 4, 1) local function efect(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid), 144) end end local function chard(params) if isCreature(params.cid) then if getPlayerStorageValue(params.cid, 4) >= 1 then setPlayerStorageValue(params.cid, 4, -1) end end end local sumonado = sumomdonego addEvent(efect, 100, {cid = sumonado}) addEvent(efect, 1600, {cid = sumonado}) addEvent(efect, 3100, {cid = sumonado}) addEvent(efect, 4600, {cid = sumonado}) addEvent(efect, 6100, {cid = sumonado}) addEvent(efect, 7600, {cid = sumonado}) addEvent(chard, 8000, {cid = sumonado}) return 0 elseif pokemon.spell == "Rock Slide" then local posalvo = getThingPos(getCreatureTarget(cid)) local boltalvo = getCreatureTarget(cid) posalvo.x = posalvo.x-2 posalvo.y = posalvo.y-6 doSendDistanceShoot(posalvo, getThingPos(getCreatureTarget(cid)), 11) local function bolt(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.boltalvo then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 44) end end end end local function bolt2(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then if getCreatureTarget(params.cid) == params.boltalvo then doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)), 11) doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 3) end end end end local sumonado = sumomdonego addEvent(bolt2, 500, {cid = sumonado, boltalvo = boltalvo}) addEvent(bolt, 800, {cid = sumonado, boltalvo = boltalvo}) return 0 elseif pokemon.spell == "Dragon Rush" then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), psy1, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 253) local function go1(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), psy1, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 5) end end local sumonado = sumomdonego addEvent(go1, 500, {cid = sumonado}) return 0 elseif pokemon.spell == "Flame Blast" then local function blast1(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), params.ar, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), params.ef) end end local function blast2(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), params.ar, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), params.ef) end end local sumonado = sumomdonego addEvent(blast1, 0, {cid = sumonado,ar = AREA_BLAST1,ef = 181}) addEvent(blast1, 500, {cid = sumonado,ar = AREA_BLAST2,ef = 181}) addEvent(blast1, 800, {cid = sumonado,ar = AREA_BLAST3,ef = 181}) addEvent(blast2, 300, {cid = sumonado,ar = AREA_BLAST1,ef = 179}) addEvent(blast2, 800, {cid = sumonado,ar = AREA_BLAST2,ef = 179}) addEvent(blast2, 1100, {cid = sumonado,ar = AREA_BLAST3,ef = 179}) addEvent(blast1, 1500, {cid = sumonado,ar = AREA_BLAST1,ef = 181}) addEvent(blast1, 1200, {cid = sumonado,ar = AREA_BLAST2,ef = 181}) addEvent(blast1, 1000, {cid = sumonado,ar = AREA_BLAST3,ef = 181}) addEvent(blast2, 1600, {cid = sumonado,ar = AREA_BLAST1,ef = 179}) addEvent(blast2, 1300, {cid = sumonado,ar = AREA_BLAST2,ef = 179}) addEvent(blast2, 1100, {cid = sumonado,ar = AREA_BLAST3,ef = 179}) return 0 elseif pokemon.spell == "Giga Impact" then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), AREA_GIGAEF, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 127) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), AREA_GIGA, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 255) return 0 elseif pokemon.spell == "Fire Sprint" then local function go(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), combat_arr2, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 179) end end local sumonado = sumomdonego addEvent(go, 1000, {cid = sumonado}) local sumonado = sumomdonego addEvent(go, 300, {cid = sumonado}) return 0 elseif pokemon.spell == "Hyper Beam" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1n, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 152) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2n, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 158) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3n, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 156) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 151) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 158) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 155) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 149) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 157) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 153) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1w, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 150) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2w, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 157) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3w, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 154) end return 0 elseif pokemon.spell == "Ice Beam" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1n, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 99) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2n, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 105) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3n, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 103) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 98) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 105) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3s, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 102) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 96) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 104) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3e, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 100) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg1w, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 97) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg2w, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 104) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wg3w, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 101) end return 0 elseif pokemon.spell == "Tri Flames" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tri1, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 6) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tri2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 6) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tri3, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 6) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), tri4, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 6) end return 0 elseif pokemon.spell == "Dragon Breath" then posit = getThingPos(sumomdonego) local function gust(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, null, params.ar, sand1, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), params.eee) doAreaCombatHealth(params.cid, element, params.ar, arr1, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 253) else end end local posicao = getThingPos(sumomdonego) if getCreatureLookDir(sumomdonego) == 0 then addEvent(gust, 0, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y-1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y-2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-1, z=posicao.z}}) addEvent(gust, 600, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y-3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-2, z=posicao.z}}) addEvent(gust, 900, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y-4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-3, z=posicao.z}}) addEvent(gust, 1200, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y-5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-4, z=posicao.z}}) addEvent(gust, 1500, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y-6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y-5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 2 then addEvent(gust, 0, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y+1, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y+2, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+1, z=posicao.z}}) addEvent(gust, 600, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y+3, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+2, z=posicao.z}}) addEvent(gust, 900, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y+4, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+3, z=posicao.z}}) addEvent(gust, 1200, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y+5, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+4, z=posicao.z}}) addEvent(gust, 1500, {cid = sumomdonego, eee = 5, ar = {x=posicao.x, y=posicao.y+6, z=posicao.z}, arr = {x=posicao.x, y=posicao.y+5, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 1 then addEvent(gust, 0, {cid = sumomdonego, eee = 5, ar = {x=posicao.x+1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = sumomdonego, eee = 5, ar = {x=posicao.x+2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = sumomdonego, eee = 5, ar = {x=posicao.x+3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = sumomdonego, eee = 5, ar = {x=posicao.x+4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = sumomdonego, eee = 5, ar = {x=posicao.x+5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = sumomdonego, eee = 5, ar = {x=posicao.x+6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x+5, y=posicao.y, z=posicao.z}}) elseif getCreatureLookDir(sumomdonego) == 3 then addEvent(gust, 0, {cid = sumomdonego, eee = 5, ar = {x=posicao.x-1, y=posicao.y, z=posicao.z}, arr = posicao}) addEvent(gust, 300, {cid = sumomdonego, eee = 5, ar = {x=posicao.x-2, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-1, y=posicao.y, z=posicao.z}}) addEvent(gust, 600, {cid = sumomdonego, eee = 5, ar = {x=posicao.x-3, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-2, y=posicao.y, z=posicao.z}}) addEvent(gust, 900, {cid = sumomdonego, eee = 5, ar = {x=posicao.x-4, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-3, y=posicao.y, z=posicao.z}}) addEvent(gust, 1200, {cid = sumomdonego, eee = 5, ar = {x=posicao.x-5, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-4, y=posicao.y, z=posicao.z}}) addEvent(gust, 1500, {cid = sumomdonego, eee = 5, ar = {x=posicao.x-6, y=posicao.y, z=posicao.z}, arr = {x=posicao.x-5, y=posicao.y, z=posicao.z}}) end return 0 elseif pokemon.spell == "Dragon Pulse" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)),24) end end end local function damage(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 136) end end end local sumonado = sumomdonego addEvent(damage, 100, {cid = sumonado}) addEvent(damage, 600, {cid = sumonado}) addEvent(throw, 0, {cid = sumonado}) addEvent(throw, 550, {cid = sumonado}) return 0 elseif pokemon.spell == "Egg Bomb" then local function throw(params) if isCreature(params.cid) then if isCreature(getCreatureTarget(params.cid)) then doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)),3) end end end local function damage(params) if isCreature(params.cid) then if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(getCreatureTarget(params.cid)), egg, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 5) end end end local sumonado = sumomdonego addEvent(damage, 100, {cid = sumonado}) addEvent(throw, 0, {cid = sumonado}) return 0 elseif pokemon.spell == "Acid" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 14) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 20) return 0 elseif pokemon.spell == "Poison Bomb" then doSendDistanceShoot(getThingPos(sumomdonego), getThingPos(getCreatureTarget(cid)), 14) doAreaCombatHealth(sumomdonego, element, getThingPos(getCreatureTarget(cid)), bomb, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) return 0 elseif pokemon.spell == "Poison Gas" then local function gas(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), confusionx, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 114) end end local sumonado = sumomdonego addEvent(gas, 000, {cid = sumonado, cb = cb}) addEvent(gas, 500, {cid = sumonado, cb = cb}) addEvent(gas, 1000, {cid = sumonado, cb = cb}) addEvent(gas, 1500, {cid = sumonado, cb = cb}) addEvent(gas, 2200, {cid = sumonado, cb = cb}) addEvent(gas, 2700, {cid = sumonado, cb = cb}) addEvent(gas, 3200, {cid = sumonado, cb = cb}) addEvent(gas, 3900, {cid = sumonado, cb = cb}) addEvent(gas, 4400, {cid = sumonado, cb = cb}) addEvent(gas, 4900, {cid = sumonado, cb = cb}) return 0 elseif pokemon.spell == "Psy Condition" then local function psycon(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), mew, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 251) end end local function psycon2(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid),172) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), mew, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 136) end end local function psycon3(params) if isCreature(params.cid) then doSendMagicEffect(getThingPos(params.cid),182) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), mew2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 137) end end local sumonado = sumomdonego doAreaCombatHealth(sumonado, element, getThingPos(sumonado), mew2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 133) addEvent(psycon, 000, {cid = sumonado, cb = cb}) addEvent(psycon2, 500, {cid = sumonado, cb = cb}) addEvent(psycon, 800, {cid = sumonado, cb = cb}) addEvent(psycon3, 1200, {cid = sumonado, cb = cb}) addEvent(psycon, 1600, {cid = sumonado, cb = cb}) addEvent(psycon2, 2000, {cid = sumonado, cb = cb}) addEvent(psycon, 2400, {cid = sumonado, cb = cb}) addEvent(psycon3, 2800, {cid = sumonado, cb = cb}) addEvent(psycon, 3200, {cid = sumonado, cb = cb}) addEvent(psycon2, 3500, {cid = sumonado, cb = cb}) addEvent(psycon, 4000, {cid = sumonado, cb = cb}) addEvent(psycon3,4400, {cid = sumonado, cb = cb}) addEvent(psycon, 4800, {cid = sumonado, cb = cb}) addEvent(psycon2,5200, {cid = sumonado, cb = cb}) addEvent(psycon, 5600, {cid = sumonado, cb = cb}) addEvent(psycon3,6000, {cid = sumonado, cb = cb}) addEvent(psycon, 6400, {cid = sumonado, cb = cb}) addEvent(psycon2, 6800, {cid = sumonado, cb = cb}) addEvent(psycon, 7200, {cid = sumonado, cb = cb}) addEvent(psycon3, 7500, {cid = sumonado, cb = cb}) addEvent(psycon, 8000, {cid = sumonado, cb = cb}) return 0 elseif pokemon.spell == "Dark Condition" then local function darkcon(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), mew, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 140) end end local function darkcon2(params) if isCreature(params.cid) then doSendMagicEffect(getCreaturePosition(params.cid), 246) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), mew2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 186) end end local function darkcon3(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), mew2, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 38) end end local sumonado = sumomdonego addEvent(darkcon, 000, {cid = sumonado, cb = cb}) addEvent(darkcon2, 500, {cid = sumonado, cb = cb}) addEvent(darkcon, 800, {cid = sumonado, cb = cb}) addEvent(darkcon3, 1200, {cid = sumonado, cb = cb}) addEvent(darkcon, 1600, {cid = sumonado, cb = cb}) addEvent(darkcon2, 2000, {cid = sumonado, cb = cb}) addEvent(darkcon, 2400, {cid = sumonado, cb = cb}) addEvent(darkcon3, 2800, {cid = sumonado, cb = cb}) addEvent(darkcon, 3200, {cid = sumonado, cb = cb}) addEvent(darkcon2, 3500, {cid = sumonado, cb = cb}) addEvent(darkcon, 4000, {cid = sumonado, cb = cb}) addEvent(darkcon3,4400, {cid = sumonado, cb = cb}) addEvent(darkcon, 4800, {cid = sumonado, cb = cb}) addEvent(darkcon2,5200, {cid = sumonado, cb = cb}) addEvent(darkcon, 5600, {cid = sumonado, cb = cb}) addEvent(darkcon3,6000, {cid = sumonado, cb = cb}) addEvent(darkcon, 6400, {cid = sumonado, cb = cb}) addEvent(darkcon2, 6800, {cid = sumonado, cb = cb}) addEvent(darkcon, 7200, {cid = sumonado, cb = cb}) addEvent(darkcon3, 7500, {cid = sumonado, cb = cb}) addEvent(darkcon, 8000, {cid = sumonado, cb = cb}) return 0 elseif pokemon.spell == "Poison Powder" then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), sleeparea, -((num1)+(lvpokemon*(num3))), -((num1)+(lvpokemon*(num3))), 85) local d = getCreaturesInRange(getThingPos(sumomdonego), 2, 2, 1, 0) for _,pid in pairs(d) do if isSummon(pid) then if getPlayerStorageValue(cid, 3333) >= 1 then if getPlayerStorageValue(cid, 6333) == getCreatureMaster(pid) and getPlayerStorageValue(cid, 1333) >= 1 then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Poison(sumomdonego, 8, 10) else Poison(pid, 8, 10) end end elseif isPlayerInParty(getCreatureMaster(pid),cid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Poison(sumomdonego, 8, 10) else Poison(pid, 8, 10) end end elseif isMonster(pid) then if getPlayerStorageValue(pid, 34) >= 1 then setPlayerStorageValue(pid, 34, 0) doSendMagicEffect(getThingPos(pid), 135) doSendAnimatedText(getThingPos(pid), "REFLECT", 215) Poison(sumomdonego, 8, 10) else Poison(pid, 8, 10) end end end return 0 elseif pokemon.spell == "Wing Attack" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, COMBAT_PDAMAGE, getThingPos(sumomdonego), wingn, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 128) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wingdn, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, COMBAT_PDAMAGE, getThingPos(sumomdonego), winge, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 129) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wingde, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, COMBAT_PDAMAGE, getThingPos(sumomdonego), wings, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 131) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wingds, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, COMBAT_PDAMAGE, getThingPos(sumomdonego), wingw, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 130) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wingdw, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) end return 0 elseif pokemon.spell == "Fury Cutter" then if getCreatureLookDir(sumomdonego) == 0 then doAreaCombatHealth(sumomdonego, COMBAT_PDAMAGE, getThingPos(sumomdonego), wingn, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 128) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wingdn, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) elseif getCreatureLookDir(sumomdonego) == 1 then doAreaCombatHealth(sumomdonego, COMBAT_PDAMAGE, getThingPos(sumomdonego), winge, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 129) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wingde, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) elseif getCreatureLookDir(sumomdonego) == 2 then doAreaCombatHealth(sumomdonego, COMBAT_PDAMAGE, getThingPos(sumomdonego), wings, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 131) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wingds, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) elseif getCreatureLookDir(sumomdonego) == 3 then doAreaCombatHealth(sumomdonego, COMBAT_PDAMAGE, getThingPos(sumomdonego), wingw, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 130) doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), wingdw, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) end local function fury(params) if isCreature(params.cid) then if getCreatureLookDir(params.cid) == 0 then doAreaCombatHealth(params.cid, COMBAT_PDAMAGE, getThingPos(params.cid), wingn, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 128) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), wingdn, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) elseif getCreatureLookDir(params.cid) == 1 then doAreaCombatHealth(params.cid, COMBAT_PDAMAGE, getThingPos(params.cid), winge, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 129) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), wingde, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) elseif getCreatureLookDir(params.cid) == 2 then doAreaCombatHealth(params.cid, COMBAT_PDAMAGE, getThingPos(params.cid), wings, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 131) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), wingds, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) elseif getCreatureLookDir(params.cid) == 3 then doAreaCombatHealth(params.cid, COMBAT_PDAMAGE, getThingPos(params.cid), wingw, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 130) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), wingdw, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), CONST_ME_NONE) end end end local sumonado = sumomdonego addEvent(fury, 500, {cid = sumonado}) return 0 elseif pokemon.spell == "Twister" then doAreaCombatHealth(sumomdonego, element, getThingPos(sumomdonego), rageblast1, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 142) local function damage(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, element, getThingPos(params.cid), params.x, -((num1)+(lvpokemon*(num3))), -((num2)+(lvpokemon*(num3))), 42) end end local sumonado = sumomdonego addEvent(damage, 200, {cid = sumonado, x = rageblast2}) addEvent(damage, 400, {cid = sumonado, x = rageblast3}) addEvent(damage, 600, {cid = sumonado, x = rageblast4}) return 0 end end move1.lua do meu server que deverá ser adaptado Spoiler local msgs = {"use ", ""} function doAlertReady(cid, id, movename, n, cd) if not isCreature(cid) then return true end local myball = getPlayerSlotItem(cid, 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 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 it = string.sub(words, 2, 3) local idd = getPlayerSlotItem(cid, 8).uid local move = (getCreatureName(mypoke) == "Smeargle" and getItemAttribute(idd, "skt1") and movestable[getItemAttribute(idd, "skt1")].move1 or movestable[name].move1) or (getCreatureName(mypoke) == "Shiny Smeargle" and getItemAttribute(idd, "skt1") and movestable[getItemAttribute(idd, "skt1")].move1 or movestable[name].move1) if getPlayerStorageValue(mypoke, 212123) >= 1 then cdzin = "cm_move"..it.."" else cdzin = "move"..it.."" end if it == "2" then if getItemAttribute(idd, "skt2") then move = movestable[getItemAttribute(idd, "skt2")].move2 else move = movestable[name].move2 end elseif it == "3" then if getItemAttribute(idd, "skt3") then move = movestable[getItemAttribute(idd, "skt3")].move3 else move = movestable[name].move3 end elseif it == "4" then if getItemAttribute(idd, "skt4") then move = movestable[getItemAttribute(idd, "skt4")].move4 else move = movestable[name].move4 end elseif it == "4" then if getItemAttribute(idd, "skt4") then move = movestable[getItemAttribute(idd, "skt4")].move4 else move = movestable[name].move4 end elseif it == "5" then if getItemAttribute(idd, "skt5") then move = movestable[getItemAttribute(idd, "skt5")].move5 else move = movestable[name].move5 end elseif it == "6" then if getItemAttribute(idd, "skt6") then move = movestable[getItemAttribute(idd, "skt6")].move6 else move = movestable[name].move6 end elseif it == "7" then if getItemAttribute(idd, "skt7") then move = movestable[getItemAttribute(idd, "skt7")].move7 else move = movestable[name].move7 end elseif it == "8" then if getItemAttribute(idd, "skt8") then move = movestable[getItemAttribute(idd, "skt8")].move8 else move = movestable[name].move8 end 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 local isMega = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "megaStone") if not isMega or name:find("Mega") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end local moveTable, index = getNewMoveTable(movestable[name]), 0 for i = 1, 12 do if not moveTable then index = i break end end if tonumber(it) ~= index then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end local needCds = false --Coloque false se o pokémon puder mega evoluir mesmo com spells em cooldown. if needCds then for i = 1, 12 do if getCD(getPlayerSlotItem(cid, 8).uid, "move"..i) > 0 then return doPlayerSendCancel(cid, "para mega evoluir os cds do pokemon devem estar carregados.") end end end move = {name = "Mega Evolution", level = 0, cd = 0, dist = 1, target = 0, f = 0, t = "?"} 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 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 if isCreature(getCreatureTarget(cid)) and isInArray(specialabilities["evasion"], getCreatureName(getCreatureTarget(cid))) then local target = getCreatureTarget(cid) if math.random(1, 100) <= passivesChances["Evasion"][getCreatureName(target)] then 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 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 local spellMessage = msgs[math.random(#msgs)]..""..move.name.."!" if move.name == "Mega Evolution" then spellMessage = "Mega Evolve!" end doCreatureSay(cid, getPokeName(mypoke)..", "..spellMessage, 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 agora na pasta lib mais 2 arquivos (acredito que as funções possam ser colocadas em apenas 1 arquivo) tm.lua -- obs: nesse arquivo esta escrito spell e no meu serve costuma ser Move então talvez tenha q alterar você vera do que estou falando no move1.lua ja postado acima e tb só configurei os que o F ja tenha um valor o Spoiler TMCHECK = { [1] = {"Honchkrow","Stunky","Skuntank","Spiritomb","Drapion","Weavile","Drifloon","Drifblim","Mismagius","Spiritomb","Dusknoir","Froslass","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","PorygonZ","Poochyena","Mightyena","Nuzleaf","Shiftry","Sableye","Carvanha","Sharpedo","Cacturne","Crawdaunt","Absol","Shedinja","Shuppet","Banette","Duskull","Dusclops","Gengar","Sudowoodo","Pupitar","Larvitar","Tyranitar","Haunter","Espeon","Houndour","Houndoom","Gastly","Alakazam","Abra","Dark Abra","Kadabra","Porygon"}, [2] = {"Chingling","Bronzor","Bronzong","Mime Jr","Gallade","Uxie","Mesprit","Azelf","Cresselia","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Beautifly","Dustox","Ralts","Kirlia","Gardevoir","Sableye","Meditite","Medicham","Spoink","Grumpig","Spinda","Lunatone","Solrock","Baltoy","Claydol","Shuppet","Banette","Duskull","Dusclops","Chimecho","Gorebyss","Metang","Metagross","Abra","Snubbull","Miltank","Granbull","Ariados","Spinarak","Croconaw","Houndour","Houndoom","Totodile","Feraligatr","Dark Abra","Alakazam","Butterfree","Chansey","Blissey","Clefable","Clefairy","Drowzee","Electabuzz","Exeggcute","Exeggutor","Gastly","Gengar","Haunter","Hypno","Jigglypuff","Jynx","Kadabra","Lapras","Magmar","Mewtwo","Mew","Mr Mime","Poliwag","Poliwhirl","Poliwrath","Porygon","Slowbro","Slowpoke","Snorlax","Starmie","Staryu","Venomoth","Venonat","Wigglytuff"}, [3] = {"Chimchar","Monferno","Infernape","Magmortar","Heatran","Gible","Gabite","Garchomp","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Torchic","Combusken","Blaziken","Numel","Camerupt","Torkoal","Vibrava","Flygon","Altaria","Bagon","Shelgon","Salamence","Slaking","Exploud","Spinda","Zangoose","Kecleon","Ancient Aerodactyl","Ancient Aerodactyl","Aerodactyl","Arcanine","Typhlosion","Charizard","Elder Charizard","Charmander","Charmeleon","Dragonair","Dragonite","Dratini","Growlithe","Gyarados","Lapras","Mew"}, [4] = {"Shinx","Luxio","Luxray","Pachirisu","Magnezone","Electivire","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Slaking","Exploud","Spinda","Zangoose","Kecleon","Manectric","Plusle","Minun","Chansey","Royal Porygon","Blissey","Clefable","Clefairy","Dragonair","Dragonite","Dratini","Electabuzz","Electrode","Gastly","Gengar","Grimer","Gyarados","Haunter","Jigglypuff","Jolteon","Kangaskhan","Koffing","Lapras","Lickitung","Magnemite","Magneton","Mankey","Meowth","Mewtwo","Mew","Mr Mime","Muk","Nidoking","Nidoqueen","Nidoranfe","Nidoran","Nidorina","Nidorino","Persian","Pikachu","Porygon","Primeape","Raichu","Raticate","Rattata","Rhydon","Rhyhorn","Snorlax","Starmie","Staryu","Tauros","Voltorb","Weezing","Wigglytuff","Zapdos"}, [5] = {"Turtwig","Grotle","Torterra","Budew","Roserade","Wormadam","Cherubi","Cherrim","Carnivine","Snover","Abomasnow","Tangrowth","Leafeon","Shaymin","Shaymin","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Treecko","Grovyle","Sceptile","Blaziken","Beautifly","Dustox","Lotad","Lombre","Ludicolo","Seedot","Nuzleaf","Shiftry","Surskit","Masquerain","Shroomish","Breloom","Slakoth","Vigoroth","Slaking","Nincada","Ninjask","Shedinja","Whismur","Loudred","Exploud","Skitty","Delcatty","Mawile","Aggron","Volbeat","Illumise","Roselia","Gulpin","Swalot","Camerupt","Torkoal","Trapinch","Vibrava","Flygon","Cacnea","Cacturne","Swablu","Altaria","Zangoose","Solrock","Baltoy","Claydol","Lileep","Cradily","Kecleon","Tropius","Bellsprout","Slowking","Bulbasaur","Butterfree","Chansey","Blissey","Clefable","Clefairy","Exeggutor","Gloom","Ivysaur","Jigglypuff","Lapras","Mewtwo","Mew","Mr Mime","Oddish","Parasect","Paras","Snorlax","Tangela","Venomoth","Venonat","Venusaur","Sunkern","Sunflora","Victreebel","Vileplume","Weepinbell","Wigglytuff"}, [6] = {"Shinx","Luxio","Luxray","Pachirisu","Magnezone","Electivire","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Zigzagoon","Linoone","Slakoth","Vigoroth","Slaking","Nosepass","Skitty","Delcatty","Aggron","Electrike","Manectric","Plusle","Minun","Volbeat","Illumise","Zangoose","Castform","Kecleon","Shuppet","Banette","Absol","Chansey","Teddiursa","Ursaring","Blissey","Furret","Sentret","Clefable","Clefairy","Dragonair","Dragonite","Dratini","Electabuzz","Electrode","Gastly","Gengar","Grimer","Gyarados","Haunter","Jigglypuff","Jolteon","Kangaskhan","Koffing","Lapras","Lickitung","Magnemite","Magneton","Mankey","Meowth","Mewtwo","Mew","Mr Mime","Muk","Nidoking","Nidoqueen","Nidoranfe","Nidoran","Nidorina","Nidorino","Persian","Pikachu","Porygon","Primeape","Raichu","Raticate","Rattata","Rhydon","Rhyhorn","Snorlax","Starmie","Staryu","Tauros","Voltorb","Weezing","Wigglytuff","Zapdos"}, [7] = {"Monferno","Infernape","Riolu","Lucario","Croagunk","Toxicroak","Gallade","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Combusken","Blaziken","Breloom","Makuhita","Hariyama","Meditite","Medicham","Slaking","Exploud","Spinda","Zangoose","Kecleon","Abra","Blissey","Alakazam","Marill","Azumarill","Croconaw","Totodile","Feraligatr","Blastoise","Ancient Blastoise","Chansey","Charizard","Elder Charizard","Charmander","Charmeleon","Clefable","Clefairy","Cubone","Drowzee","Electabuzz","Gengar","Geodude","Golduck","Golem","Graveler","Hitmonchan","Hitmonlee","Elite Hitmonlee","Elite Hitmonchan","Hypno","Jigglypuff","Jynx","Kadabra","Kangaskhan","Lickitung","Machamp","Machoke","Machop","Magmar","Mankey","Marowak","Mewtwo","Mew","Mr Mime","Nidoking","Nidoqueen","Pikachu","Poliwhirl","Poliwrath","Primeape","Psyduck","Raichu","Rhydon","Slowbro","Snorlax","Squirtle","Wartortle","Wigglytuff"}, [8] = {"Chimchar","Monferno","Infernape","Magmortar","Heatran","Gible","Gabite","Garchomp","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Torchic","Combusken","Blaziken","Slakoth","Vigoroth","Slaking","Whismur","Loudred","Exploud","Mawile","Aggron","Numel","Camerupt","Torkoal","Flygon","Altaria","Zangoose","Solrock","Castform","Kecleon","Absol","Bagon","Shelgon","Salamence","Arcanine","Growlithe","Arcanine","Rapidash","Ponyta","Ninetales","Vulpix"}, [9] = {"Starly","Staravia","Staraptor","Mothim","Combee","Vespiquen","Drifloon","Drifblim","Honchkrow","Chatot","Mantyke","Togekiss","Yanmega","Gliscor","Vibrava","Flygon","Altaria","Bagon","Shelgon","Salamence","Beautifly","Swellow","Pelipper","Masquerain","Ninjask","Tropius","Slaking","Zangoose","Kecleon","Charizard","Elder Charizard","Heracross","Scizor","Dragonite","Gyarados","Butterfree","Beedrill","Scyther","Doduo","Dodrio","Golbat","Zubat","Venomoth","Ancient Aerodactyl","Ancient Aerodactyl","Aerodactyl"}, [10] = {"Snover","Abomasnow","Weavile","Glaceon","Mamoswine","Froslass","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Mudkip","Marshtomp","Swampert","Zigzagoon","Linoone","Lotad","Lombre","Ludicolo","Wingull","Pelipper","Surskit","Masquerain","Slakoth","Vigoroth","Slaking","Whismur","Loudred","Exploud","Azurill","Skitty","Delcatty","Aggron","Carvanha","Sharpedo","Wailmer","Wailord","Zangoose","Lunatone","Barboach","Whiscash","Corphish","Crawdaunt","Feebas","Milotic","Kecleon","Duskull","Dusclops","Absol","Clamperl","Huntail","Gorebyss","Relicanth","Luvdisc","Articuno","Royal Porygon","Togepi","Miltank","Blissey","Marill","Azumarill","Togetic","Blastoise","Ancient Blastoise","Chansey","Clefable","Clefairy","Cloyster","Cubone","Dewgong","Dragonair","Dragonite","Dratini","Goldeen","Golduck","Gyarados","Horsea","Jigglypuff","Jynx","Kabutops","Kabuto","Kangaskhan","Kingler","Krabby","Lapras","Lickitung","Marowak","Mewtwo","Mew","Nidoking","Nidoqueen","Nidoranfe","Nidoran","Nidorina","Nidorino","Omanyte","Omastar","Poliwag","Poliwhirl","Poliwrath","Porygon","Psyduck","Raticate","Rattata","Rhydon","Seadra","Seaking","Seel","Shellder","Slowbro","Slowpoke","Snorlax","Squirtle","Starmie","Staryu","Tauros","Tentacool","Tentacruel","Vaporeon","Wartortle","Wigglytuff"}, [11] = {"Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Sceptile","Blaziken","Swampert","Mightyena","Linoone","Beautifly","Dustox","Ludicolo","Nuzleaf","Shiftry","Swellow","Pelipper","Gardevoir","Masquerain","Breloom","Slaking","Ninjask","Shedinja","Exploud","Hariyama","Delcatty","Mawile","Aggron","Medicham","Manectric","Swalot","Sharpedo","Wailord","Camerupt","Torkoal","Grumpig","Trapinch","Vibrava","Flygon","Cacturne","Altaria","Lunatone","Solrock","Whiscash","Crawdaunt","Claydol","Cradily","Armaldo","Milotic","Banette","Dusclops","Tropius","Absol","Glalie","Walrein","Huntail","Gorebyss","Relicanth","Salamence","Metang","Metagross","Ancient Aerodactyl","Ancient Aerodactyl","Aerodactyl","Blissey","Ariados","Spinarak","Espeon","Furret","Sentret","Alakazam","Arbok","Arcanine","Articuno","Beedrill","Ancient Blastoise","Blastoise","Butterfree","Chansey","Charizard","Elder Charizard","Clefable","Cloyster","Dewgong","Dodrio","Dragonite","Dugtrio","Electabuzz","Electrode","Exeggutor","Fearow","Flareon","Gengar","Golbat","Golduck","Golem","Gyarados","Hypno","Jolteon","Jynx","Kabutops","Kangaskhan","Kingler","Lapras","Lickitung","Machamp","Magmar","Magneton","Marowak","Mewtwo","Mew","Moltres","Mr Mime","Muk","Nidoking","Nidoqueen","Ninetales","Omastar","Parasect","Persian","Pidgeot","Pinsir","Poliwrath","Porygon","Primeape","Raichu","Rapidash","Raticate","Rhydon","Sandslash","Scyther","Seadra","Seaking","Slowbro","Snorlax","Starmie","Tangela","Tauros","Tentacruel","Vaporeon","Venomoth","Venusaur","Sunkern","Sunflora","Victreebel","Vileplume","Weezing","Wigglytuff","Zapdos"}, [12] = {"Torterra","Wormadam","Gastrodon","Gible","Gabite","Garchomp","Hippopotas","Hippowdon","Rhyperior","Gliscor","Mamoswine","Cranidos","Rampardos","Shieldon","Bastiodon","Bonsly","Probopass","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Blaziken","Marshtomp","Swampert","Vigoroth","Slaking","Loudred","Exploud","Makuhita","Hariyama","Nosepass","Aron","Lairon","Aggron","Swalot","Sharpedo","Wailmer","Wailord","Numel","Camerupt","Torkoal","Trapinch","Vibrava","Flygon","Altaria","Seviper","Lunatone","Solrock","Barboach","Whiscash","Baltoy","Claydol","Cradily","Armaldo","Dusclops","Tropius","Glalie","Spheal","Sealeo","Walrein","Relicanth","Arbok","Kangaskhan","Blastoise","Miltank","Teddiursa","Ursaring","Ancient Blastoise","Charizard","Elder Charizard","Cubone","Diglett","Dugtrio","Ekans","Geodude","Golem","Graveler","Kangaskhan","Lickitung","Machamp","Machoke","Machop","Marowak","Mew","Nidoking","Nidoqueen","Onix","Poliwhirl","Poliwrath","Rhydon","Rhyhorn","Sandshrew","Sandslash","Slowbro","Slowpoke","Snorlax","Tauros"}, [13] = {"Rhyperior","Gliscor","Probopass","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Nuzleaf","Shiftry","Nosepass","Gulpin","Swalot","Wailmer","Wailord","Camerupt","Torkoal","Lunatone","Solrock","Baltoy","Claydol","Glalie","Metang","Metagross","Cloyster","Slowking","Togetic","Furret","Sentret","Feraligatr","Typhlosion","Electrode","Exeggcute","Exeggutor","Gastly","Gengar","Geodude","Golem","Graveler","Grimer","Haunter","Koffing","Mewtwo","Mew","Muk","Onix","Shellder","Snorlax","Voltorb","Weezing"}, [14] = {"Chimchar","Monferno","Infernape","Magmortar","Heatran","Gible","Gabite","Garchomp","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Torchic","Combusken","Blaziken","Slakoth","Vigoroth","Slaking","Whismur","Loudred","Exploud","Mawile","Aggron","Numel","Camerupt","Torkoal","Flygon","Altaria","Zangoose","Solrock","Castform","Kecleon","Absol","Bagon","Shelgon","Salamence","Ancient Aerodactyl","Aerodactyl","Arcanine","Chansey","Blissey","Charizard","Elder Charizard","Charmander","Charmeleon","Clefable","Clefairy","Cubone","Dragonair","Dragonite","Dratini","Flareon","Geodude","Golem","Graveler","Grimer","Growlithe","Gyarados","Jigglypuff","Kangaskhan","Koffing","Lickitung","Machamp","Machoke","Machop","Magmar","Marowak","Mewtwo","Mew","Moltres","Muk","Nidoking","Nidoqueen","Ninetales","Ponyta","Rapidash","Rhydon","Rhyhorn","Slowbro","Slowpoke","Snorlax","Tauros","Vulpix","Weezing","Wigglytuff"}, [15] = {"Chingling","Bronzor","Bronzong","Mime Jr","Gallade","Uxie","Mesprit","Azelf","Cresselia","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Beautifly","Dustox","Ralts","Kirlia","Gardevoir","Sableye","Meditite","Medicham","Spoink","Grumpig","Spinda","Lunatone","Solrock","Baltoy","Claydol","Shuppet","Banette","Duskull","Dusclops","Chimecho","Gorebyss","Metang","Metagross","Gengar","Haunter","Houndour","Houndoom","Togetic","Togepi","Natu","Xatu","Gastly","Alakazam","Abra","Kadabra","Porygon"}, [16] = {"Shinx","Luxio","Luxray","Pachirisu","Magnezone","Electivire","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Zigzagoon","Linoone","Slakoth","Vigoroth","Slaking","Nosepass","Skitty","Delcatty","Aggron","Electrike","Manectric","Plusle","Minun","Volbeat","Illumise","Zangoose","Castform","Kecleon","Shuppet","Banette","Absol","Chansey","Blissey","Clefable","Clefairy","Dragonair","Dragonite","Dratini","Electabuzz","Electrode","Gastly","Gengar","Grimer","Gyarados","Haunter","Jigglypuff","Jolteon","Kangaskhan","Koffing","Lapras","Lickitung","Magnemite ","Magneton","Mankey","Meowth","Mewtwo","Mew","Mr Mime","Muk","Nidoking","Nidoqueen","Nidoranfe","Nidoran","Nidorina","Nidorino","Persian","Pikachu","Porygon","Primeape","Raichu","Raticate","Rattata","Rhydon","Rhyhorn","Snorlax","Starmie","Staryu","Tauros","Voltorb","Weezing","Wigglytuff","Zapdos"}, [17] = {"Shinx","Luxio","Luxray","Pachirisu","Magnezone","Electivire","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Grovyle","Sceptile","Torchic","Combusken","Blaziken","Mudkip","Marshtomp","Swampert","Poochyena","Mightyena","Zigzagoon","Linoone","Wurmple","Silcoon","Beautifly","Cascoon","Dustox","Lotad","Lombre","Ludicolo","Seedot","Nuzleaf","Shiftry","Taillow","Swellow","Wingull","Pelipper","Ralts","Kirlia","Gardevoir","Surskit","Masquerain","Shroomish","Breloom","Slakoth","Vigoroth","Slaking","Nincada","Ninjask","Shedinja","Whismur","Loudred","Exploud","Makuhita","Hariyama","Azurill","Nosepass","Skitty","Delcatty","Sableye","Mawile","Aron","Lairon","Aggron","Meditite","Medicham","Electrike","Manectric","Plusle","Minun","Volbeat","Illumise","Roselia","Gulpin","Swalot","Carvanha","Sharpedo","Wailmer","Wailord","Numel","Camerupt","Torkoal","Spoink","Grumpig","Spinda","Trapinch","Vibrava","Flygon","Cacnea","Cacturne","Swablu","Altaria","Zangoose","Seviper","Lunatone","Solrock","Barboach","Whiscash","Corphish","Crawdaunt","Baltoy","Claydol","Lileep","Cradily","Anorith","Armaldo","Feebas","Milotic","Kecleon","Shuppet","Banette","Duskull","Dusclops","Tropius","Chimecho","Absol","Wynaut","Snorunt","Glalie","Spheal","Sealeo","Walrein","Clamperl","Huntail","Gorebyss","Relicanth","Luvdisc","Bagon","Shelgon","Salamence","Beldum","Metang","Metagross","Abra","Blissey","Heracross","Snubbull","Granbull","Sudowoodo","Pupitar","Larvitar","Tyranitar","Typhlosion","Marill","Azumarill","Croconaw","Totodile","Feraligatr","Ancient Aerodactyl","Aerodactyl","Alakazam","Arbok","Arcanine","Articuno","Beedrill","Bellsprout","Blastoise","Ancient Blastoise","Bulbasaur","Butterfree","Chansey","Charizard","Elder Charizard","Charmander","Charmeleon","Clefable","Clefairy","Cloyster","Cubone","Dewgong","Diglett","Dodrio","Doduo","Flareon","Fearow","Farfetchd","Exeggutor","Exeggcute","Electrode","Electabuzz","Ekans","Eevee","Dugtrio","Drowzee","Dratini","Dragonite","Dragonair","Gastly","Gengar","Geodude","Gloom","Golbat","Goldeen","Golduck","Golem","Graveler","Grimer","Growlithe","Gyarados","Haunter","Hitmonchan","Hitmonlee","Elite Hitmonlee","Elite Hitmonchan","Horsea","Hypno","Ivysaur","Jigglypuff","Jolteon","Jynx","Kabutops","Kabuto","Kadabra","Mankey","Magneton","Magnemite","Magmar","Machop","Machoke","Machamp","Lickitung","Lapras","Krabby","Koffing","Kingler","Kangaskhan","Marowak","Meowth","Mewtwo","Mew","Moltres","Mr Mime","Rattata","Raticate","Rapidash","Raichu","Psyduck","Primeape","Porygon","Ponyta","Poliwrath","Poliwhirl","Poliwag","Pinsir","Muk","Nidoking","Nidoqueen","Nidoranfe","Nidoran","Nidorina","Nidorino","Ninetales","Oddish","Omanyte","Omastar","Onix","Parasect","Paras","Persian","Pidgeotto","Pidgeot","Pidgey","Pikachu","Rhydon","Rhyhorn","Sandshrew","Sandslash","Scyther","Seadra","Seaking","Seel","Shellder","Slowbro","Slowpoke","Snorlax","Spearow","Squirtle","Starmie","Staryu","Tangela","Tauros","Tentacool","Tentacruel","Vaporeon","Venomoth","Venonat","Zubat","Zapdos","Wigglytuff","Weezing","Weepinbell","Wartortle","Vulpix","Voltorb","Vileplume","Victreebel","Venusaur","Sunkern","Sunflora"}, [18] = {"Budew","Roserade","Stunky","Skuntank","Skorupi","Drapion","Croagunk","Toxicroak","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Grovyle","Sceptile","Torchic","Combusken","Blaziken","Mudkip","Marshtomp","Swampert","Poochyena","Mightyena","Zigzagoon","Linoone","Wurmple","Silcoon","Beautifly","Cascoon","Dustox","Lotad","Lombre","Ludicolo","Seedot","Nuzleaf","Shiftry","Taillow","Swellow","Wingull","Pelipper","Ralts","Kirlia","Gardevoir","Surskit","Masquerain","Shroomish","Breloom","Slakoth","Vigoroth","Slaking","Nincada","Ninjask","Shedinja","Whismur","Loudred","Exploud","Makuhita","Hariyama","Azurill","Nosepass","Skitty","Delcatty","Sableye","Mawile","Aron","Lairon","Aggron","Meditite","Medicham","Electrike","Manectric","Plusle","Minun","Volbeat","Illumise","Roselia","Gulpin","Swalot","Carvanha","Sharpedo","Wailmer","Wailord","Numel","Camerupt","Torkoal","Spoink","Grumpig","Spinda","Trapinch","Vibrava","Flygon","Cacnea","Cacturne","Swablu","Altaria","Zangoose","Seviper","Lunatone","Solrock","Barboach","Whiscash","Corphish","Crawdaunt","Baltoy","Claydol","Lileep","Cradily","Anorith","Armaldo","Feebas","Milotic","Kecleon","Shuppet","Banette","Duskull","Dusclops","Tropius","Chimecho","Absol","Wynaut","Snorunt","Glalie","Spheal","Sealeo","Walrein","Clamperl","Huntail","Gorebyss","Relicanth","Luvdisc","Bagon","Shelgon","Salamence","Beldum","Metang","Metagross","Abra","Blissey","Ancient Aerodactyl","Aerodactyl","Alakazam","Arbok","Arcanine","Articuno","Beedrill","Bellsprout","Blastoise","Ancient Blastoise","Bulbasaur","Butterfree","Chansey","Charizard","Elder Charizard","Charmander","Charmeleon","Clefable ","Clefairy","Cloyster","Cubone","Dewgong","Diglett","Dodrio","Doduo","Dragonair","Dragonite","Dratini","Drowzee","Dugtrio","Eevee","Ekans","Electabuzz","Electrode","Exeggcute","Exeggutor","Farfetchd","Fearow","Flareon","Gastly","Gengar","Geodude","Gloom","Golbat","Goldeen","Golduck","Golem","Graveler","Grimer","Growlithe","Gyarados","Haunter","Hitmonchan","Hitmonlee","Elite Hitmonlee","Elite Hitmonchan","Horsea","Hypno","Ivysaur","Jigglypuff","Jolteon","Jynx","Kabutops","Kabuto","Kadabra","Kangaskhan","Kingler","Koffing","Krabby","Lapras","Lickitung","Machamp","Machoke","Machop","Magmar","Magnemite","Magneton","Mankey","Marowak","Meowth","Mewtwo","Mew","Moltres","Mr Mime","Muk","Nidoking","Nidoqueen","Nidoran","Nidoranfe","Nidorina","Nidorino","Ninetales","Oddish","Omanyte","Omastar","Onix","Parasect","Paras","Persian","Pidgeotto","Pidgeot","Pidgey","Pikachu","Pinsir","Poliwag","Poliwhirl","Poliwrath","Ponyta","Porygon","Primeape","Psyduck","Raichu","Rapidash","Raticate","Rattata","Rhydon","Rhyhorn","Sandshrew","Sandslash","Scyther","Seadra","Seaking","Seel","Shellder","Slowbro","Slowpoke","Snorlax","Spearow","Squirtle","Starmie","Staryu","Tangela","Tauros","Tentacool","Tentacruel","Vaporeon","Venomoth","Venonat","Venusaur","Sunkern","Sunflora","Victreebel","Vileplume","Voltorb","Vulpix","Wartortle","Weepinbell","Weezing","Wigglytuff","Zapdos","Zubat"}, [19] = {"Buizel","Floatzel","Shellos","Gastrodon","Finneon","Lumineon","Mantyke","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Marshtomp","Swampert","Lotad","Lombre","Ludicolo","Wingull","Pelipper","Surskit","Carvanha","Sharpedo","Wailmer","Wailord","Barboach","Whiscash","Corphish","Crawdaunt","Feebas","Milotic","Spheal","Sealeo","Walrein","Clamperl","Huntail","Gorebyss","Relicanth","Luvdisc","Blastoise","Slowbro","Croconaw","Totodile","Feraligatr","Ancient Blastoise","Magikarp","Tentacruel","Tentacool","Wartortle","Cloyster","Seel","Dewgong","Shellder","Poliwag","Poliwhirl","Poliwrath","Squirtle","Starmie","Kingler","Kabutops","Kabuto"}, [20] = {"Torterra","Wormadam","Gastrodon","Gible","Gabite","Garchomp","Hippopotas","Hippowdon","Rhyperior","Gliscor","Mamoswine","Cranidos","Rampardos","Shieldon","Bastiodon","Bonsly","Probopass","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Swampert","Nincada","Numel","Camerupt","Trapinch","Vibrava","Flygon","Barboach","Whiscash","Baltoy","Claydol","Lapras","Dragonite","Charizard","Elder Charizard","Tauros","Marowak","Cubone","Golem","Sandslash","Zapdos","Mewtwo","Mew","Venusaur","Sunkern","Sunflora","Venomoth","Weezing","Dragonite","Gyarados","Dugtrio","Vileplume","Electrode","Arcanine","Kingler"}, [21] = {"Chingling","Bronzor","Bronzong","Mime Jr","Gallade","Uxie","Mesprit","Azelf","Cresselia","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Ralts","Kirlia","Gardevoir","Meditite","Medicham","Spoink","Grumpig","Lunatone","Solrock","Baltoy","Claydol","Chimecho","Metang","Metagross","Abra","Teddiursa","Ursaring","Dark Abra","Ancient Aerodactyl","Aerodactyl","Alakazam","Arcanine","Articuno","Beedrill","Bellsprout","Blastoise","Ancient Blastoise","Bulbasaur","Butterfree","Blissey","Chansey","Charizard","Elder Charizard","Charmander","Charmeleon","Clefable","Clefairy","Cloyster","Dodrio","Doduo","Dragonair","Dragonite","Dratini","Drowzee","Eevee","Electabuzz","Electrode","Exeggcute","Exeggutor","Farfetchd","Flareon","Gloom","Growlithe","Gyarados","Hypno","Ivysaur","Jigglypuff","Jolteon","Jynx","Kabutops","Kabuto","Kadabra","Lapras","Magnemite","Magneton","Mr Mime","Nidoking","Nidoqueen","Nidoran","Nidoranfe","Nidorina","Nidorino","Ninetales","Oddish","Omanyte","Omastar","Parasect","Paras","Pidgeotto","Pidgeot","Pidgey","Pikachu","Ponyta","Porygon","Raichu","Rapidash","Shellder","Slowbro","Slowpoke","Snorlax","Squirtle","Starmie","Staryu","Tentacool","Tentacruel","Vaporeon","Venomoth","Venonat","Venusaur","Sunkern","Sunflora","Victreebel","Vileplume","Voltorb","Vulpix","Wartortle","Weepinbell","Wigglytuff","Zapdos"}, [22] = {"Monferno","Infernape","Riolu","Lucario","Croagunk","Toxicroak","Gallade","Starly","Staravia","Staraptor","Bidoof","Bibarel","Ambipom","Buneary","Lopunny","Glameow","Purugly","Happiny","Chatot","Munchlax","Lickilicky","Togekiss","Porygonz","Grovyle","Sceptile","Torchic","Combusken","Blaziken","Marshtomp","Swampert","Ludicolo","Breloom","Slakoth","Vigoroth","Slaking","Whismur","Loudred","Exploud","Makuhita","Hariyama","Sableye","Mawile","Aggron","Meditite","Medicham","Plusle","Minun","Volbeat","Illumise","Grumpig","Spinda","Cacnea","Cacturne","Zangoose","Kecleon","Dusclops","Abra","Blissey","Dark Abra","Alakazam","Blastoise","Ancient Blastoise","Chansey","Charizard","Elder Charizard","Charmander","Charmeleon","Clefable","Clefairy","Cubone","Drowzee","Electabuzz","Gengar","Geodude","Golduck","Golem","Graveler","Hitmonchan","Hitmonlee","Elite Hitmonlee","Elite Hitmonchan","Hypno","Jigglypuff","Jynx","Kadabra","Kangaskhan","Lickitung","Machamp","Machoke","Machop","Magmar","Mankey","Marowak","Mewtwo","Mew","Mr Mime","Nidoking","Nidoqueen","Pikachu","Poliwhirl","Poliwrath","Primeape","Psyduck","Raichu","Rhydon","Slowbro","Snorlax","Squirtle","Wartortle","Wigglytuff"}, } TM = { [1] = { spell = "Dark Condition",level = 1, cd = 50, dist = 2, target = 0, f = 0, t = "normal", [2] = { spell = "Psychic",level = 1, cd = 35, dist = 2, target = 0, f = 90, t = "normal", [3] = { spell = "Magma Meteor",level = 1, cd = 100, dist = 2, target = 0, f = 0, t = "normal", [4] = { spell = "Electric Storm", level = 1, cd = 80, dist = 2, target = 0, f = 150, t = "normal", [5] = { spell = "Solar Beam", level = 1, cd = 60, dist = 2, target = 0, f = 190, t = "normal", [6] = {spell = "Thunder", level = 1, cd = 60, dist = 2, target = 0, f = 125, t = "normal", [7] = {spell = "Furious Legs",level = 1, cd = 45, dist = 2, target = 0, f = 0, t = "normal", [8] = {spell = "Flame Blast",level = 1, cd = 95, dist = 2, target = 0, f = 0, t = "normal", [9] = {spell = "Windstorm", level = 1, cd = 60, dist = 2, target = 0, f = 0, t = "normal", [10] = {spell = "Blizzard", level = 1, cd = 100, dist = 2, target = 0, f = 150, t = "normal", [11] = {spell = "Hyper Beam",level = 1, cd = 60, dist = 2, target = 0, f = 190, t = "normal", [12] = {spell = "Earth Quake",level = 1, cd = 70, dist = 2, target = 0, f = 0, t = "normal", [13] = {spell = "Selfdestruct",level = 1, cd = 200, dist = 2, target = 0, f = 0, t = "normal", [14] = {spell = "Fire Blast",level = 1, cd = 50, dist = 2, target = 0, f = 0, t = "normal", [15] = {spell = "Psy Condition",level = 1, cd = 70, dist = 2, target = 1, f = 0, t = "normal", [16] = { spell = "Thunder Bolt",level = 1, cd = 20, dist = 2, target = 1, f = 0, t = "normal", [17] = {spell = "Rest", level = 1, cd = 100, dist = 2, target = 0, f = 0, t = "normal", [18] = {spell = "Toxic", level = 1, cd = 50, dist = 2, target = 0, f = 0, t = "normal", [19] = {spell = "Hydro Rain", level = 1, cd = 50, dist = 2, target = 0, f = 0, t = "normal", [20] = {spell = "Giga Impact",level = 1, cd = 80, dist = 2, target = 0, f = 0, t = "normal", [21] = {spell = "Reflect",level = 1, cd = 60, dist = 2, target = 0, f = 0, t = "normal", [22] = { spell = "Mega Punch",level = 1, cd = 9, dist = 2, target = 1, f = 0, t = "normal", } e por ultimo a 50-functions.lua ---- as funçoes foram colocadas nesse arquivo mas acredito que seria melhor se estivesse junto com o tm acima Spoiler function doPlayerGiveItem(cid, itemid, amount, subType) local item = 0 if(isItemStackable(itemid)) then item = doCreateItemEx(itemid, amount) if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then return false end else for i = 1, amount do item = doCreateItemEx(itemid, subType) if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then return false end end end return true end function doPlayerGiveItemContainer(cid, containerid, itemid, amount, subType) for i = 1, amount do local container = doCreateItemEx(containerid, 1) for x = 1, getContainerCapById(containerid) do doAddContainerItem(container, itemid, subType) end if(doPlayerAddItemEx(cid, container, true) ~= RETURNVALUE_NOERROR) then return false end end return true end function doPlayerTakeItem(cid, itemid, amount) return getPlayerItemCount(cid, itemid) >= amount and doPlayerRemoveItem(cid, itemid, amount) end function doPlayerBuyItem(cid, itemid, count, cost, charges) return doPlayerRemoveMoney(cid, cost) and doPlayerGiveItem(cid, itemid, count, charges) end function doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges) return doPlayerRemoveMoney(cid, cost) and doPlayerGiveItemContainer(cid, containerid, itemid, count, charges) end function doPlayerSellItem(cid, itemid, count, cost) if(not doPlayerTakeItem(cid, itemid, count)) then return false end if(not doPlayerAddMoney(cid, cost)) then error('[doPlayerSellItem] Could not add money to: ' .. getPlayerName(cid) .. ' (' .. cost .. 'gp).') end return true end function doPlayerWithdrawMoney(cid, amount) if(not getBooleanFromString(getConfigInfo('bankSystem'))) then return false end local balance = getPlayerBalance(cid) if(amount > balance or not doPlayerAddMoney(cid, amount)) then return false end doPlayerSetBalance(cid, balance - amount) return true end function doPlayerDepositMoney(cid, amount) if(not getBooleanFromString(getConfigInfo('bankSystem'))) then return false end if(not doPlayerRemoveMoney(cid, amount)) then return false end doPlayerSetBalance(cid, getPlayerBalance(cid) + amount) return true end function isPremium(cid) return (isPlayer(cid) and (getPlayerPremiumDays(cid) > 0 or getBooleanFromString(getConfigInfo('freePremium')))) or isTutor(cid) end function getMonthDayEnding(day) if(day == "01" or day == "21" or day == "31") then return "st" elseif(day == "02" or day == "22") then return "nd" elseif(day == "03" or day == "23") then return "rd" end return "th" end function getMonthString(m) return os.date("%B", os.time{year = 1970, month = m, day = 1}) end function getArticle(str) return str:find("[AaEeIiOoUuYy]") == 1 and "an" or "a" end function isNumber(str) return tonumber(str) ~= nil end function doPlayerAddAddons(cid, addon) for i = 0, table.maxn(maleOutfits) do doPlayerAddOutfit(cid, maleOutfits, addon) end for i = 0, table.maxn(femaleOutfits) do doPlayerAddOutfit(cid, femaleOutfits, addon) end end function doPlayerWithdrawAllMoney(cid) return doPlayerWithdrawMoney(cid, getPlayerBalance(cid)) end function doPlayerDepositAllMoney(cid) return doPlayerDepositMoney(cid, getPlayerMoney(cid)) end function doPlayerTransferAllMoneyTo(cid, target) return doPlayerTransferMoneyTo(cid, target, getPlayerBalance(cid)) end function playerExists(name) return getPlayerGUIDByName(name) ~= 0 end function getTibiaTime() local minutes = getWorldTime() local hours = 0 while (minutes > 60) do hours = hours + 1 minutes = minutes - 60 end return {hours = hours, minutes = minutes} end function doWriteLogFile(file, text) local f = io.open(file, "a+") if(not f) then return false end f:write("[" .. os.date("%d/%m/%Y %H:%M:%S") .. "] " .. text .. "\n") f:close() return true end function getExperienceForLevel(lv) lv = lv - 1 return ((50 * lv * lv * lv) - (150 * lv * lv) + (400 * lv)) / 3 end function doMutePlayer(cid, time) local condition = createConditionObject(CONDITION_MUTED) setConditionParam(condition, CONDITION_PARAM_TICKS, time * 1000) return doAddCondition(cid, condition) end function getPlayerGroupName(cid) return getGroupInfo(getPlayerGroupId(cid)).name end function getPlayerVocationName(cid) return getVocationInfo(getPlayerVocation(cid)).name end function getPromotedVocation(vid) return getVocationInfo(vid).promotedVocation end function doPlayerRemovePremiumDays(cid, days) return doPlayerAddPremiumDays(cid, -days) end function getPlayerMasterPos(cid) return getTownTemplePosition(getPlayerTown(cid)) end function getHouseOwner(houseId) return getHouseInfo(houseId).owner end function getHouseName(houseId) return getHouseInfo(houseId).name end function getHouseEntry(houseId) return getHouseInfo(houseId).entry end function getHouseRent(houseId) return getHouseInfo(houseId).rent end function getHousePrice(houseId) return getHouseInfo(houseId).price end function getHouseTown(houseId) return getHouseInfo(houseId).town end function getHouseTilesCount(houseId) return getHouseInfo(houseId).tiles end function getItemNameById(itemid) return getItemDescriptionsById(itemid).name end function getItemPluralNameById(itemid) return getItemDescriptionsById(itemid).plural end function getItemArticleById(itemid) return getItemDescriptionsById(itemid).article end function getItemName(uid) return getItemDescriptions(uid).name end function getItemPluralName(uid) return getItemDescriptions(uid).plural end function getpoke(uid) return getItemDescriptions(uid).nome end function getItemArticle(uid) return getItemDescriptions(uid).article end function getItemText(uid) return getItemDescriptions(uid).text end function getItemSpecialDescription(uid) return getItemDescriptions(uid).special end function getItemWriter(uid) return getItemDescriptions(uid).writer end function getItemDate(uid) return getItemDescriptions(uid).date end function getTilePzInfo(pos) return getTileInfo(pos).protection end function getTileZoneInfo(pos) local tmp = getTileInfo(pos) if(tmp.pvp) then return 2 end if(tmp.nopvp) then return 1 end return 0 end function doShutdown() return doSetGameState(GAMESTATE_SHUTDOWN) end function doSummonCreature(name, pos, displayError) local displayError, cid = displayError or true, doCreateMonster(name, pos, displayError) if(not cid) then cid = doCreateNpc(name, pos, displayError) end return cid end function getOnlinePlayers() local tmp = getPlayersOnline() local players = {} for i, cid in ipairs(tmp) do table.insert(players, getCreatureName(cid)) end return players end function getPlayerByName(name) local cid = getCreatureByName(name) return isPlayer(cid) and cid or nil end function isPlayer(cid) return isCreature(cid) and cid >= AUTOID_PLAYERS and cid < AUTOID_MONSTERS end function isPlayerGhost(cid) if(not isPlayer(cid)) then return false end return getCreatureCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) or getPlayerFlagValue(cid, PLAYERFLAG_CANNOTBESEEN) end function isMonster(cid) return isCreature(cid) and cid >= AUTOID_MONSTERS and cid < AUTOID_NPCS end function isNpc(cid) return isCreature(cid) and cid >= AUTOID_NPCS end function doPlayerSetExperienceRate(cid, value) return doPlayerSetRate(cid, SKILL__LEVEL, value) end function doPlayerSetMagicRate(cid, value) return doPlayerSetRate(cid, SKILL__MAGLEVEL, value) end function doPlayerAddLevel(cid, amount, round) local experience, level = 0, getPlayerLevel(cid) if(amount > 0) then experience = getExperienceForLevel(level + amount) - (round and getPlayerExperience(cid) or getExperienceForLevel(level)) else experience = -((round and getPlayerExperience(cid) or getExperienceForLevel(level)) - getExperienceForLevel(level + amount)) end return doPlayerAddExperience(cid, experience) end function doPlayerAddMagLevel(cid, amount) for i = 1, amount do doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid, getPlayerMagLevel(cid, true) + 1) - getPlayerSpentMana(cid)) / getConfigInfo('rateMagic')) end return true end function doPlayerAddSkill(cid, skill, amount, round) if(skill == SKILL__LEVEL) then return doPlayerAddLevel(cid, amount, round) elseif(skill == SKILL__MAGLEVEL) then return doPlayerAddMagLevel(cid, amount) end return doPlayerAddSkillTry(cid, skill, (getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)) / getConfigInfo('rateSkill')) end function getPartyLeader(cid) local party = getPartyMembers(cid) if(type(party) ~= 'table') then return 0 end return party[1] end function isInParty(cid) return type(getPartyMembers(cid)) == 'table' end function isPrivateChannel(channelId) return channelId >= CHANNEL_PRIVATE end function doPlayerResetIdleTime(cid) return doPlayerSetIdleTime(cid, 0) end function doBroadcastMessage(text, class) local class = class or MESSAGE_STATUS_WARNING if(type(class) == 'string') then local className = MESSAGE_TYPES[class] if(className == nil) then return false end class = className elseif(class < MESSAGE_FIRST or class > MESSAGE_LAST) then return false end local players = getPlayersOnline() for _, pid in ipairs(players) do doPlayerSendTextMessage(pid, class, text) end print("> Broadcasted message: \"" .. text .. "\".") return true end function doGlobalMessage(autor, text,channeltype) local CHANNEL_GLOBAL = 7 --local CHANNEL_GLOBALM = 7 local players = getPlayersOnline() --if string.find(autor,"[kpdo]") then -- CHANNEL_GLOBALM = 13 --else --CHANNEL_GLOBALM = 7 --end for _, pid in ipairs(players) do doPlayerSendChannelMessage(pid, autor, text, channeltype, CHANNEL_GLOBAL) end return true end function doReportGlobalMessage(autor, text,channeltype) local CHANNEL_GLOBAL = 3 --local CHANNEL_GLOBALM = 7 local players = getPlayersOnline() --if string.find(autor,"[kpdo]") then -- CHANNEL_GLOBALM = 13 --else --CHANNEL_GLOBALM = 7 --end for _, pid in ipairs(players) do doPlayerSendChannelMessage(pid, autor, text, channeltype, CHANNEL_GLOBAL) end return true end function doPlayerBroadcastMessage(cid, text, class, checkFlag, ghost) local checkFlag, ghost, class = checkFlag or true, ghost or false, class or TALKTYPE_BROADCAST if(checkFlag and not getPlayerFlagValue(cid, PLAYERFLAG_CANBROADCAST)) then return false end if(type(class) == 'string') then local className = TALKTYPE_TYPES[class] if(className == nil) then return false end class = className elseif(class < TALKTYPE_FIRST or class > TALKTYPE_LAST) then return false end local players = getPlayersOnline() for _, pid in ipairs(players) do doCreatureSay(cid, text, class, ghost, pid) end print("> " .. getCreatureName(cid) .. " broadcasted message: \"" .. text .. "\".") return true end function getBooleanFromString(input) local tmp = type(input) if(tmp == 'boolean') then return input end if(tmp == 'number') then return input > 0 end local str = string.lower(tostring(input)) return (str == "yes" or str == "true" or (tonumber(str) ~= nil and tonumber(str) > 0)) end function doCopyItem(item, attributes) local attributes = attributes or false local ret = doCreateItemEx(item.itemid, item.type) if(attributes) then if(item.actionid > 0) then doItemSetAttribute(ret, "aid", item.actionid) end end if(isContainer(item.uid)) then for i = (getContainerSize(item.uid) - 1), 0, -1 do local tmp = getContainerItem(item.uid, i) if(tmp.itemid > 0) then doAddContainerItemEx(ret, doCopyItem(tmp, true).uid) end end end return getThing(ret) end function doRemoveThing(uid) if(isCreature(uid)) then return doRemoveCreature(uid) end return doRemoveItem(uid) end function setAttackFormula(combat, type, minl, maxl, minm, maxm, min, max) local min, max = min or 0, max or 0 return setCombatFormula(combat, type, -1, 0, -1, 0, minl, maxl, minm, maxm, min, max) end function setHealingFormula(combat, type, minl, maxl, minm, maxm, min, max) local min, max = min or 0, max or 0 return setCombatFormula(combat, type, 1, 0, 1, 0, minl, maxl, minm, maxm, min, max) end function doChangeTypeItem(uid, subtype) local thing = getThing(uid) if(thing.itemid < 100) then return false end local subtype = subtype or 1 return doTransformItem(thing.uid, thing.itemid, subtype) end function doSetItemText(uid, text, writer, date) local thing = getThing(uid) if(thing.itemid < 100) then return false end doItemSetAttribute(uid, "text", text) if(writer ~= nil) then doItemSetAttribute(uid, "writer", tostring(writer)) if(date ~= nil) then doItemSetAttribute(uid, "date", tonumber(date)) end end return true end function getFluidSourceType(itemid) local item = getItemInfo(itemid) return item and item.fluidSource or false end function getDepotId(uid) return getItemAttribute(uid, "depotid") or false end function getItemDescriptions(uid) local thing = getThing(uid) if(thing.itemid < 100) then return false end local item = getItemInfo(thing.itemid) return { name = getItemAttribute(uid, "name") or item.name, plural = getItemAttribute(uid, "pluralname") or item.plural, article = getItemAttribute(uid, "article") or item.article, special = getItemAttribute(uid, "description") or "", text = getItemAttribute(uid, "text") or "", writer = getItemAttribute(uid, "writer") or "", nome = getItemAttribute(uid, "nome"), date = getItemAttribute(uid, "date") or 0 } end function getItemWeightById(itemid, count, precision) local item, count, precision = getItemInfo(itemid), count or 1, precision or false if(not item) then return false end if(count > 100) then -- print a warning, as its impossible to have more than 100 stackable items without "cheating" the count print('[Warning] getItemWeightById', 'Calculating weight for more than 100 items!') end local weight = item.weight * count --[[if(precision) then return weight end local t = string.explode(tostring(weight), ".") if(table.maxn(t) == 2) then return tonumber(t[1] .. "." .. string.sub(t[2], 1, 2)) end]]-- return weight end function getItemWeaponType(uid) local thing = getThing(uid) if(thing.itemid < 100) then return false end return getItemInfo(thing.itemid).weaponType end function getItemRWInfo(uid) local thing = getThing(uid) if(thing.itemid < 100) then return false end local item, flags = getItemInfo(thing.itemid), 0 if(item.readable) then flags = 1 end if(item.writable) then flags = flags + 2 end return flags end function getItemLevelDoor(itemid) local item = getItemInfo(itemid) return item and item.levelDoor or false end function isItemStackable(itemid) local item = getItemInfo(itemid) return item and item.stackable or false end function isItemRune(itemid) local item = getItemInfo(itemid) return item and item.clientCharges or false end function isItemDoor(itemid) local item = getItemInfo(itemid) return item and item.type == 5 or false end function isItemContainer(itemid) local item = getItemInfo(itemid) return item and item.group == 2 or false end function isItemFluidContainer(itemid) local item = getItemInfo(itemid) return item and item.group == 12 or false end function isItemMovable(itemid) local item = getItemInfo(itemid) return item and item.movable or false end function isCorpse(uid) local thing = getThing(uid) if(thing.itemid < 100) then return false end local item = getItemInfo(thing.itemid) return item and item.corpseType ~= 0 or false end function getContainerCapById(itemid) local item = getItemInfo(itemid) if(not item or item.group ~= 2) then return false end return item.maxItems end function getMonsterAttackSpells(name) local monster = getMonsterInfo(name) return monster and monster.attacks or false end function getMonsterHealingSpells(name) local monster = getMonsterInfo(name) return monster and monster.defenses or false end function getMonsterLootList(name) local monster = getMonsterInfo(name) return monster and monster.loot or false end function getMonsterSummonList(name) local monster = getMonsterInfo(name) return monster and monster.summons or false end function isTM(uid) for rocks = 1, 12 do if getItemAttribute(uid, "T"..rocks.."") and getItemAttribute(uid, "T"..rocks.."") >= 1 then return true end end return false end function isMoveTm(pokenick,idtm) checkistm = cp[pokenick] nicktm = TM[idtm].spell nicktm2 = string.lower(nicktm) nmovestm = checkistm["!cd"].nmoves for xtm = 1, nmovestm do stringmoment = checkistm["m"..xtm..""].spell --if string.find(string.lower(stringmoment),nicktm2) then if string.lower(stringmoment) == nicktm2 then return true end end return false end function getTM(uid,move) if getItemAttribute(uid, move) then tmnop = getItemAttribute(uid, move) if tmnop >= 1 then return getItemAttribute(uid, move) else return false end else return false end return false end function addTM(cid,item,tm,itemid) if isTM(item.uid) then doPlayerSendCancel(cid, "You can only add 1 TM each pokemon") return false end local Checktm = TMCHECK[tm] local nicktm5 = getItemAttribute(item.uid, "nome") if isShiny(nicktm5) then nicktm5 = nicktm5:gsub("Shiny ", "") end if isMoveTm(nicktm5,tm) then doPlayerSendCancel(cid, "You cant add this move, this pokemon have") return false end if isInArray(Checktm,nicktm5) then doItemSetAttribute(item.uid, "T1", tm) else local tmhave = "Pokemon's have This TM\n" for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, itemid,tmhave) return false end return true end function isShiny(nick) if string.find(string.lower(nick), "shiny") then return true else return false end return false end function isStrong(nick) if string.find(string.lower(nick), "strong") then return true else return false end return false end function TMFind(uid) for rocks = 1, 12 do if getItemAttribute(uid, "T"..rocks.."") and getItemAttribute(uid, "T"..rocks.."") >= 1 then return getItemAttribute(uid, "T"..rocks.."") end end return false end function TMClean(uid) for rocks = 1, 12 do if getItemAttribute(uid, "T"..rocks.."") and getItemAttribute(uid, "T"..rocks.."") >= 1 then doItemSetAttribute(uid, "T"..rocks.."",0) return true end end return false end function setPokemon(cid,nivel,need,exp) local calc = (need/100) local refor = (exp/calc) if refor >= 99 then setPokemonExp(cid,nivel,99) return true end if refor <= 0 then setPokemonExp(cid,nivel,0) return true end if setPokemonExp(cid,nivel,math.floor(refor)) then return true else return false end end function sendstorm(cid,deffect,meffect,element,min1,min2) local function addeffect(params) if isCreature(params.cid) then if params.count == 73 then doAreaCombatHealth(params.cid, params.element, getThingPos(params.cid), AREA_CIRCLE3X3, params.min1, params.min2, 255) return true end local pos = getThingPos(params.cid) pos.x = pos.x + math.random(-4,4) pos.y = pos.y + math.random(-4,4) local frompos = getThingPos(params.cid) frompos.x = pos.x - 7 frompos.y = pos.y - 6 doSendDistanceShoot(frompos, pos, params.deffect) doSendMagicEffect(pos, params.meffect) addEvent(addeffect, 50, {cid = params.cid,deffect = params.deffect,meffect = params.meffect,count = params.count+1,min1 = params.min1,min2 = params.min2,element = params.element}) end end addEvent(addeffect, 50, {cid = cid,deffect = deffect,meffect = meffect,count = 1,min1 = min1,min2 = min2,element = element}) end function setNickPoke(cid,nick) setPlayerStorageValue(cid,9000,nick) end function getNickPoke(cid) local itemset = getPlayerSlotItem(cid, if itemset.itemid >= 1 then local nome = getItemAttribute(itemset.uid, "apelido") if nome then return nome else return getItemAttribute(itemset.uid, "nome") end elseif #getCreatureSummons(cid) >= 1 then return getCreatureName(getCreatureSummons(cid)[1]) end return getCreatureName(cid) end function getPokeName(cid) local itemset = getPlayerSlotItem(cid, if itemset.itemid >= 1 then local nome = getItemAttribute(itemset.uid, "nome") if nome then return nome end if #getCreatureSummons(cid) >= 1 then return getCreatureName(getCreatureSummons(cid)[1]) end end end function getCombatByType(nick,combatee) bonuselement = false if combatee == ELECTRICDAMAGE then if isInArray(electric2, nick) then bonuselement = 2 elseif isInArray(electric1, nick) then bonuselement = 0.5 elseif isInArray(electric0, nick) then return false else bonuselement = 1 end elseif combatee == WATERDAMAGE then if isInArray(water2, nick) then bonuselement = 2 elseif isInArray(water1, nick) then bonuselement = 0.5 elseif isInArray(water0, nick) then return false else bonuselement = 1 end elseif combatee == GRASSDAMAGE then if isInArray(grass2, nick) then bonuselement = 2 elseif isInArray(grass1, nick) then bonuselement = 0.5 elseif isInArray(grass0, nick) then return false else bonuselement = 1 end elseif combatee == FLYDAMAGE then if isInArray(flying2, nick) then bonuselement = 2 elseif isInArray(flying1, nick) then bonuselement = 0.5 elseif isInArray(flying0, nick) then return false else bonuselement = 1 end elseif combatee == FIREDAMAGE then if isInArray(fire2, nick) then bonuselement = 2 elseif isInArray(fire1, nick) then bonuselement = 0.5 elseif isInArray(fire0, nick) then return false else bonuselement = 1 end elseif combatee == ROCKDAMAGE then if isInArray(rock2, nick) then bonuselement = 2 elseif isInArray(rock1, nick) then bonuselement = 0.5 elseif isInArray(rock0, nick) then return false else bonuselement = 1 end elseif combatee == GROUNDDAMAGE then if isInArray(ground2, nick) then bonuselement = 2 elseif isInArray(ground1, nick) then bonuselement = 0.5 elseif isInArray(ground0, nick) then return false else bonuselement = 1 end elseif combatee == GHOSTDAMAGE then if isInArray(ghost2, nick) then bonuselement = 2 elseif isInArray(ghost1, nick) then bonuselement = 0.5 elseif isInArray(ghost0, nick) then return false else bonuselement = 1 end elseif combatee == BUGDAMAGE then if isInArray(bug2, nick) then bonuselement = 2 elseif isInArray(bug1, nick) then bonuselement = 0.5 elseif isInArray(bug0, nick) then return false else bonuselement = 1 end elseif combatee == NORMALDAMAGE then if isInArray(normal2, nick) then bonuselement = 2 elseif isInArray(normal1, nick) then bonuselement = 0.5 elseif isInArray(normal0, nick) then return false else bonuselement = 1 end elseif combatee == FIGHTDAMAGE then if isInArray(fighting2, nick) then bonuselement = 2 elseif isInArray(fighting1, nick) then bonuselement = 0.5 elseif isInArray(fighting0, nick) then return false else bonuselement = 1 end elseif combatee == POISONDAMAGE then if isInArray(poison2, nick) then bonuselement = 2 elseif isInArray(poison1, nick) then bonuselement = 0.5 elseif isInArray(poison0, nick) then return false else bonuselement = 1 end elseif combatee == PSYCHICDAMAGE then if isInArray(psychic2, nick) then bonuselement = 1.2 elseif isInArray(psychic1, nick) then bonuselement = 0.5 elseif isInArray(psychic0, nick) then return false else bonuselement = 1 end elseif combatee == ICEDAMAGE then if isInArray(ice2, nick) then bonuselement = 2 elseif isInArray(ice1, nick) then bonuselement = 0.5 elseif isInArray(ice0, nick) then return false else bonuselement = 1 end elseif combatee == DRAGONDAMAGE then if isInArray(dragon2, nick) then bonuselement = 1.2 elseif isInArray(dragon1, nick) then bonuselement = 0.5 elseif isInArray(dragon0, nick) then return false else bonuselement = 1 end elseif combatee == DARKDAMAGE then if isInArray(dark2, nick) then bonuselement = 2 elseif isInArray(dark1, nick) then bonuselement = 0.5 elseif isInArray(dark0, nick) then return false else bonuselement = 1 end elseif combatee == STEELDAMAGE then if isInArray(steel2, nick) then bonuselement = 2 elseif isInArray(steel1, nick) then bonuselement = 0.5 elseif isInArray(steel0, nick) then return false else bonuselement = 1 end else bonuselement = 1 end return bonuselement end function isTV(cid) for x = 0, 100 do local player = getGlobalStorageValue(500+x) if isPlayer(player) and player == cid then return true end end return false end function ilusiontv(cid) local postv = {x = 1550,y = 591,z = 7} local tvclone = doCreateMonster("Tall Grass", postv) doSetCreatureOutfit(tvclone, getCreatureOutfit(cid), -1) doTeleportThing(tvclone, getCreaturePosition(cid)) setPlayerStorageValue(tvclone,1,cid) registerCreatureEvent(tvclone, "Ilusion") doCreatureSetHideHealth(tvclone,true) end function doCopyFile(file, newfile) local fil = io.open(file, "r") local text = fil:read("*a") local fil2 = io.open(newfile, "a+") fil2:write(text) fil2:close() fil:close() return TRUE end function doEditName(file, newname, oldname) local fil = io.open(file, "a+") local text = fil:read("*all") fil:close() local k,x = text:find(oldname) local wrt = text:sub(1, k-1) .. newname .. text:sub(x+1) local fip = io.open(file, "w") fip:write(wrt) fip:close() return TRUE end function ilusiontvnpc(cid,stringtv) local postv = {x = 1550,y = 591,z = 7} doCopyFile("data/npc/tv.xml","data/npc/tv"..getCreatureName(cid)..".xml") doEditName("data/npc/tv"..getCreatureName(cid)..".xml", "[TV]"..getCreatureName(cid), "sxs") local tvclone = doCreateNpc("tv"..getCreatureName(cid).."", postv, false) os.remove("data/npc/tv"..getCreatureName(cid)..".xml") doSetCreatureOutfit(tvclone, getCreatureOutfit(cid), -1) doTeleportThing(tvclone, getCreaturePosition(cid)) setPlayerStorageValue(tvclone,1,cid) registerCreatureEvent(tvclone, "Ilusion") end function isSound(cid) if getPlayerStorageValue(cid,111111) >= 1 then return true else return false end return false end function setSound(cid,mode) setPlayerStorageValue(cid,111111,mode) return true end function getPokeExpStage(st) local nivel = st local stage = 1 if nivel <= 5 then stage = 5 elseif nivel <= 10 then stage = 4 elseif nivel <= 25 then stage = 3 elseif nivel <= 55 then stage = 2 end return stage end function getPokemonStage(st) local nivel = st local stage = 1 if nivel <= 5 then stage = 1 elseif nivel <= 10 then stage = 2 elseif nivel <= 45 then stage = 3 elseif nivel <= 55 then stage = 4 elseif nivel <= 100 then stage = 5 elseif nivel <= 200 then stage = nivel*0.02 elseif nivel <= 300 then stage = nivel*0.03 elseif nivel <= 400 then stage = nivel*0.04 elseif nivel <= 500 then stage = nivel*0.05 elseif nivel <= 600 then stage = nivel*0.06 elseif nivel <= 700 then stage = nivel*0.07 elseif nivel <= 800 then stage = nivel*0.08 elseif nivel <= 900 then stage = nivel*0.09 elseif nivel <= 1000 then stage = nivel*0.10 elseif nivel <= 1100 then stage = nivel*0.11 elseif nivel <= 1200 then stage = nivel*0.12 elseif nivel <= 1300 then stage = nivel*0.13 elseif nivel <= 1400 then stage = nivel*0.14 elseif nivel <= 1500 then stage = nivel*0.15 elseif nivel <= 1600 then stage = nivel*0.16 elseif nivel <= 1700 then stage = nivel*0.17 elseif nivel <= 1800 then stage = nivel*0.18 elseif nivel <= 1900 then stage = nivel*0.19 elseif nivel <= 2000 then stage = nivel*0.20 elseif nivel <= 2100 then stage = nivel*0.21 elseif nivel <= 2200 then stage = nivel*0.22 elseif nivel <= 2300 then stage = nivel*0.23 elseif nivel <= 2400 then stage = nivel*0.24 elseif nivel <= 2500 then stage = nivel*0.25 elseif nivel <= 2600 then stage = nivel*0.26 elseif nivel <= 2700 then stage = nivel*0.27 elseif nivel <= 2800 then stage = nivel*0.28 elseif nivel <= 2900 then stage = nivel*0.29 elseif nivel <= 3000 then stage = nivel*0.30 else stage = nivel/50 end return stage end function setPlayerTutor(cid,value) if value == 0 then setPlayerStorageValue(cid,44444,nil) return true end setPlayerStorageValue(cid,44444,value) return true end function isTutor(cid) if getPlayerStorageValue(cid,44444) >= 1 then return getPlayerStorageValue(cid,44444) end return false end function isSeniorTutor(cid) if getPlayerStorageValue(cid,44444) >= 2 then return getPlayerStorageValue(cid,44444) end return false end function doCleanStorage(cid,value) setPlayerStorageValue(cid,value,nil) return true end function isTorunament(value) if getGlobalStorageValue(169753) >= 1 then return true end return false end function isTorneio(value) if getGlobalStorageValue(77782) >= 1 then return true end return false end function doTransformUid(item,item2) local uid1 = getItemAttribute(item.uid, "uid") local uid2 = getItemAttribute(item2.uid, "uid") doItemSetAttribute(item.uid, "uid", uid2) doItemSetAttribute(item2.uid, "uid", uid1) return true end function doCloneBall(cid,item,item2) local nome = getItemAttribute(item, "nome") local nome2 = getItemAttribute(item2, "nome") local fine = getItemAttribute(item, "fine") local fine2 = getItemAttribute(item2, "fine") local apelido = getItemAttribute(item, "apelido") local apelido2 = getItemAttribute(item2, "apelido") local description = getItemAttribute(item, "description") local description2 = getItemAttribute(item2, "description") local boost = getItemAttribute(item, "boost") local boost2 = getItemAttribute(item2, "boost") local exp = getItemAttribute(item, "exp") local exp2 = getItemAttribute(item2, "exp") local expb = getItemAttribute(item, "exp2") local expb2 = getItemAttribute(item2, "exp2") local catchby = getItemAttribute(item, "catchby") local catchby2 = getItemAttribute(item2, "catchby") local ma1 = getItemAttribute(item, "m1") local mb1 = getItemAttribute(item2, "m1") local ma2 = getItemAttribute(item ,"m2") local mb2 = getItemAttribute(item2, "m2") local ma3 = getItemAttribute(item, "m3") local mb3 = getItemAttribute(item2, "m3") local ma4 = getItemAttribute(item, "m4") local mb4 = getItemAttribute(item2, "m4") local ma5 = getItemAttribute(item, "m5") local mb5 = getItemAttribute(item2, "m5") local ma6 = getItemAttribute(item, "m6") local mb6 = getItemAttribute(item2, "m6") local ma7 = getItemAttribute(item, "m7") local mb7 = getItemAttribute(item2, "m7") local ma8 = getItemAttribute(item, "m8") local mb8 = getItemAttribute(item2, "m8") local ma9 = getItemAttribute(item, "m9") local mb9 = getItemAttribute(item2, "m9") local ma10 = getItemAttribute(item, "m10") local mb10 = getItemAttribute(item2, "m10") local ma11 = getItemAttribute(item ,"m11") local mb11 = getItemAttribute(item2, "m11") local ma12 = getItemAttribute(item, "m12") local mb12 = getItemAttribute(item2, "m12") local candy = getItemAttribute(item, "candy") local candy2 = getItemAttribute(item2, "candy") local ditto = getItemAttribute(item, "cold") local ditto2 = getItemAttribute(item2, "cold") local outifit = getItemAttribute(item, "outifit") local outifit2 = getItemAttribute(item2, "outifit") local nomepoke = getItemAttribute(item, "nomepoke") local nomepoke2 = getItemAttribute(item2, "nomepoke") local fb = getItemAttribute(item, "fb") local fb2 = getItemAttribute(item2, "fb") local fg = getItemAttribute(item, "fg") local fg2 = getItemAttribute(item2, "fg") local tmkpdo = 0 local tmkpdo2 = 0 local ptm = false local ptm2 = false local sexy = getItemAttribute(item, "sexy") local sexy2 = getItemAttribute(item2, "sexy") local aura = getItemAttribute(item, "aura") local aura2 = getItemAttribute(item2, "aura") if isTM(item) then for rocks = 1, 12 do if getTM(item,"T"..rocks.."") then tmkpdo = getTM(item,"T"..rocks.."") ptm = rocks end end TMClean(item) end if isTM(item2) then for rocks = 1, 12 do if getTM(item2,"T"..rocks.."") then tmkpdo2 = getTM(item2,"T"..rocks.."") ptm2 = rocks end end TMClean(item2) end doItemSetAttribute(item, "nome", nome2) doItemSetAttribute(item2, "nome", nome) if fine then doItemSetAttribute(item, "fine", fine2) end if fine2 then doItemSetAttribute(item2, "fine", fine) end if apelido or apelido2 then doItemSetAttribute(item2, "apelido", nome) doItemSetAttribute(item, "apelido", nome2) end if exp or exp2 then doItemSetAttribute(item, "exp", "0") doItemSetAttribute(item2, "exp", "0") doItemSetAttribute(item, "exp2", "0") doItemSetAttribute(item2, "exp2", "0") end if boost or boost2 then doItemSetAttribute(item, "boost", "0") doItemSetAttribute(item2, "boost", "0") end if candy or candy2 then doItemSetAttribute(item, "candy", "0") doItemSetAttribute(item2, "candy", "0") end if aura or aura2 then doItemSetAttribute(item, "aura", "0") doItemSetAttribute(item2, "aura", "0") end if apelido2 then doItemSetAttribute(item, "apelido", apelido2) end if apelido then doItemSetAttribute(item2, "apelido", apelido) end if description2 then doItemSetAttribute(item, "description", description2) end if description then doItemSetAttribute(item2, "description", description) end if boost2 then doItemSetAttribute(item, "boost", boost2) end if boost then doItemSetAttribute(item2, "boost", boost) end if candy2 then doItemSetAttribute(item, "candy", candy2) end if candy then doItemSetAttribute(item2, "candy", candy) end if exp2 then doItemSetAttribute(item, "exp", exp2) end if exp then doItemSetAttribute(item2, "exp", exp) end if expb2 then doItemSetAttribute(item, "exp2", expb2) end if expb then doItemSetAttribute(item2, "exp2", expb) end if catchby2 then doItemSetAttribute(item, "catchby", catchby2) end if catchby then doItemSetAttribute(item2, "catchby", catchby) end if tmkpdo2 >= 1 then doItemSetAttribute(item, "T"..ptm2.."", tmkpdo2) end if tmkpdo >= 1 then doItemSetAttribute(item2, "T"..ptm.."", tmkpdo) end if nomepoke2 then doItemSetAttribute(item, "nomepoke", nomepoke2) end if nomepoke then doItemSetAttribute(item2, "nomepoke", nomepoke) end if ditto2 then doItemSetAttribute(item, "cold", ditto2) end if ditto then doItemSetAttribute(item2, "cold", ditto) end if outifit2 then doItemSetAttribute(item, "outifit", outifit2) end if outifit then doItemSetAttribute(item2, "outifit", outifit) end doItemSetAttribute(item, "fg", "null") doItemSetAttribute(item2, "fg", "null") doItemSetAttribute(item, "fb", "null") doItemSetAttribute(item2, "fb", "null") doItemSetAttribute(item, "m1", "0") doItemSetAttribute(item2, "m1", "0") doItemSetAttribute(item, "m2", "0") doItemSetAttribute(item2, "m2", "0") doItemSetAttribute(item, "m3", "0") doItemSetAttribute(item2, "m3", "0") doItemSetAttribute(item, "m4", "0") doItemSetAttribute(item2, "m4", "0") doItemSetAttribute(item, "m5", "0") doItemSetAttribute(item2, "m5", "0") doItemSetAttribute(item, "m6", "0") doItemSetAttribute(item2, "m6", "0") doItemSetAttribute(item, "m7", "0") doItemSetAttribute(item2, "m7", "0") doItemSetAttribute(item, "m8", "0") doItemSetAttribute(item2, "m8", "0") doItemSetAttribute(item, "m9", "0") doItemSetAttribute(item2, "m9", "0") doItemSetAttribute(item, "m10", "0") doItemSetAttribute(item2, "m10", "0") doItemSetAttribute(item, "m11", "0") doItemSetAttribute(item2, "m11", "0") doItemSetAttribute(item, "m12", "0") doItemSetAttribute(item2, "m12", "0") if ma1 then doItemSetAttribute(item2, "m1", ma1) end if mb1 then doItemSetAttribute(item, "m1", mb1) end if ma2 then doItemSetAttribute(item2, "m2", ma2) end if mb2 then doItemSetAttribute(item, "m2", mb2) end if ma3 then doItemSetAttribute(item2, "m3", ma3) end if mb3 then doItemSetAttribute(item, "m3", mb3) end if ma4 then doItemSetAttribute(item2, "m4", ma4) end if mb4 then doItemSetAttribute(item, "m4", mb4) end if ma5 then doItemSetAttribute(item2, "m5", ma5) end if mb5 then doItemSetAttribute(item, "m5", mb5) end if ma6 then doItemSetAttribute(item2, "m6", ma6) end if mb6 then doItemSetAttribute(item, "m6", mb6) end if ma7 then doItemSetAttribute(item2, "m7", ma7) end if mb7 then doItemSetAttribute(item, "m7", mb7) end if ma8 then doItemSetAttribute(item2, "m8", ma8) end if mb8 then doItemSetAttribute(item, "m8", mb8) end if ma9 then doItemSetAttribute(item2, "m9", ma9) end if mb9 then doItemSetAttribute(item, "m9", mb9) end if ma10 then doItemSetAttribute(item2, "m10", ma10) end if mb10 then doItemSetAttribute(item, "m10", mb10) end if ma11 then doItemSetAttribute(item2, "m11", ma11) end if mb11 then doItemSetAttribute(item, "m11", mb11) end if ma12 then doItemSetAttribute(item2, "m12", ma12) end if mb12 then doItemSetAttribute(item, "m12", mb12) end if fb2 then doItemSetAttribute(item, "fb", fb2) end if fb then doItemSetAttribute(item2, "fb", fb) end if fg2 then doItemSetAttribute(item, "fg", fg2) end if fg then doItemSetAttribute(item2, "fg", fg) end if aura2 then doItemSetAttribute(item, "aura", aura2) end if aura then doItemSetAttribute(item2, "aura", aura) end if sexy2 then doItemSetAttribute(item, "sexy", sexy2) else doItemSetAttribute(item, "sexy", math.random(4,5)) end if sexy then doItemSetAttribute(item2, "sexy", sexy) else doItemSetAttribute(item2, "sexy", math.random(4,5)) end return true end function Torneio(value,cid,other) local numerodoevento = getGlobalStorageValue(16980) if numerodoevento >= 1 then numerodoevento = numerodoevento else numerodoevento = 1 end setPlayerStorageValue(cid,169780,nil) if value == 1 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a Winner, take this") doPlayerAddItem(cid, 7886, 1) local trofeu = doPlayerAddItem(cid, 7749, 1) local descri = "Reward #"..numerodoevento.." Event ,Tournament("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) elseif value == 2 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a Second Position take this") doPlayerAddItem(cid, 7885, 1) local trofeu = doPlayerAddItem(cid, 7748, 1) local descri = "Reward #"..numerodoevento.." Event ,Tournament("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) if isPlayer(other) then doPlayerSendTextMessage(other, 27, "Congratulations You are a three Position, take this") doPlayerAddItem(other, 7886, 1) local trofeu = doPlayerAddItem(other, 7749, 1) local descri = "Reward #"..numerodoevento.." Event ,Tournament("..getCreatureName(other)..")." doItemSetAttribute(trofeu, "description", descri) doTeleportThing(other,getTownTemplePosition(getPlayerTown(other))) setPlayerStorageValue(other,169753,nil) end return true elseif value == 3 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a THIRD SURVIVOR, take this") doPlayerAddItem(cid, 7885, 1) local trofeu = doPlayerAddItem(cid, 7747, 1) local descri = "Reward #"..numerodoevento.." Event ,THIRD SURVIVOR("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) return true end return false end function getTorunament(value,cid,other) local numerodoevento = getGlobalStorageValue(169754) if numerodoevento >= 1 then numerodoevento = numerodoevento else numerodoevento = 1 end setPlayerStorageValue(cid,169753,nil) if value == 1 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a LAST SURVIVOR, take this") doPlayerAddItem(cid, 7886, 1) local trofeu = doPlayerAddItem(cid, 7749, 1) local descri = "Reward #"..numerodoevento.." Event ,LAST SURVIVOR("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) elseif value == 2 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a SECOND SURVIVOR, take this") doPlayerAddItem(cid, 7885, 1) local trofeu = doPlayerAddItem(cid, 7748, 1) local descri = "Reward #"..numerodoevento.." Event ,SECOND SURVIVOR("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) if isPlayer(other) then doPlayerSendTextMessage(other, 27, "Congratulations You are a LAST SURVIVOR, take this") doPlayerAddItem(other, 7886, 1) local trofeu = doPlayerAddItem(other, 7749, 1) local descri = "Reward #"..numerodoevento.." Event ,LAST SURVIVOR("..getCreatureName(other)..")." doItemSetAttribute(trofeu, "description", descri) doTeleportThing(other,getTownTemplePosition(getPlayerTown(other))) setPlayerStorageValue(other,169753,nil) end return true elseif value == 3 then doPlayerSendTextMessage(cid, 27, "Congratulations You are a THIRD SURVIVOR, take this") doPlayerAddItem(cid, 7885, 1) local trofeu = doPlayerAddItem(cid, 7747, 1) local descri = "Reward #"..numerodoevento.." Event ,THIRD SURVIVOR("..getCreatureName(cid)..")." doItemSetAttribute(trofeu, "description", descri) return true end return false end function setTorunament(value) if value == false then local valor = getGlobalStorageValue(169753) setGlobalStorageValue(169753,valor-1) elseif value == true then --setGlobalStorageValue(169753,0) local numerodoevento = getGlobalStorageValue(169754) if numerodoevento >= 1 then numerodoevento = numerodoevento+1 else numerodoevento = 1 end setGlobalStorageValue(169754,numerodoevento) end return true end function addStatics(storage) local valor = getGlobalStorageValue(storage) if valor >= 1 then setGlobalStorageValue(storage,valor+1) else setGlobalStorageValue(storage,1) end return true end olha como é e ate onde cheguei tentando fazer por mim me este link mostra o sistema funcionando e este mostra ate que ponto consegui colocar no meu serve Editado Junho 18, 2017 por Weverton Siri Link para o comentário Compartilhar em outros sites More sharing options...
Poccnn 385 Postado Junho 18, 2017 Share Postado Junho 18, 2017 Sinceramente. É muita coisa pra fazer e não adianta nada eu pegar esses códigos e tentar ajusta-los sem saber como o sistema funciona. Vocês que curtem pokelixo deveriam se juntar e arrumar um scripter (UM SCRIPTER E NAO UM CURIOSO) para refazer todos os códigos. Boa sorte. Link para o comentário Compartilhar em outros sites More sharing options...
Weverton Siri 0 Postado Junho 19, 2017 Autor Share Postado Junho 19, 2017 3 horas atrás, Poccnn disse: Sinceramente. É muita coisa pra fazer e não adianta nada eu pegar esses códigos e tentar ajusta-los sem saber como o sistema funciona. Vocês que curtem pokelixo deveriam se juntar e arrumar um scripter (UM SCRIPTER E NAO UM CURIOSO) para refazer todos os códigos. Boa sorte. man se eu te pagar pelo serviço vc n faz pra mim n? Link para o comentário Compartilhar em outros sites More sharing options...
Poccnn 385 Postado Junho 19, 2017 Share Postado Junho 19, 2017 6 horas atrás, Weverton Siri disse: man se eu te pagar pelo serviço vc n faz pra mim n? Não. Mas eu vejo que tu é um cara esforçado e por isso vou te ajudar. Irei primeiro refazer esses scripts para que se tornem menos ruim de entende-los e depois verei como o sistema funciona, além de eu precisar saber como é o seu sistema para poder adapta-lo. Isso será por sua conta em me informar tudo o que for preciso. Assisti os vídeos e não entendi qual é a diferença entre eles. Única coisa foi a questão fo erro que dá na distro, fora isso, qual a diferença? Link para o comentário Compartilhar em outros sites More sharing options...
Weverton Siri 0 Postado Junho 19, 2017 Autor Share Postado Junho 19, 2017 12 horas atrás, Poccnn disse: Não. Mas eu vejo que tu é um cara esforçado e por isso vou te ajudar. Irei primeiro refazer esses scripts para que se tornem menos ruim de entende-los e depois verei como o sistema funciona, além de eu precisar saber como é o seu sistema para poder adapta-lo. Isso será por sua conta em me informar tudo o que for preciso. Assisti os vídeos e não entendi qual é a diferença entre eles. Única coisa foi a questão fo erro que dá na distro, fora isso, qual a diferença? o erro é na checagem no primeiro video checa se o pokemon pode ter a TM caso o nome do pokemon esteja na lista que foi mostrada com os nomes ele adiciona o TM substituindo o movimento (spell) ou adicionando ele em um novo lugar. no segundo falha na checagem mesmo que o nome do pokemon esteja na lista e não adiciona o TM o erro acontece ao usar a TM que é o item em forma de CD na pokebola (que esta no lugar da bota no tibia"feet") o tm deveria adicionar um atributo ao item fazendo o resto do script funcionar porem não sei se o move1.lua esta correto pois n passei da parte de fazer o TM adicionar os atributos em outras palavras o erro citado acontece no tm.lua do actions e pode ter outro no move1.lua eu procurei as funções relacionadas ao TM system em 50-functions.lua e copiei para meu 50-functions.lua talvez eu tenha deixado alguma coisa passar acredito que o resto ja esteja ok Link para o comentário Compartilhar em outros sites More sharing options...
Poccnn 385 Postado Junho 19, 2017 Share Postado Junho 19, 2017 verifica se esses scripts estão funcionando corretamente e depois tratarei do erro em si. tmclean Spoiler function onUse(cid, item, frompos, item2, topos) if isCreature(item2.uid) then return doPlayerSendCancel(cid, "You can only use tm clean in pokeballs in Feet Slot!") elseif item2.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then return doPlayerSendCancel(cid, "You can only use tm clean in pokeballs in Feet Slot!") elseif #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "need back you poke for use TM Clean") elseif item2.uid == getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then if isTM(item2.uid) then TMClean(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) else return doPlayerSendCancel(cid, "this pokemon dont have tm to clean") end end return true end tm.lua Spoiler local C = { [7756] = 11, [7757] = 17, [7758] = 6, [7759] = 20, [7760] = 21, [7761] = 22, [7762] = 16, [7763] = 1, [7764] = 3, [7765] = 4, [7766] = 7, [7767] = 8, [7768] = 9, [7769] = 5, [7770] = 10, [7771] = 18, [7772] = 15, [7773] = 12, [7774] = 19, [7775] = 13, [7776] = 2, [7777] = 14, } function onUse(cid, item, frompos, item2, topos) local tmhave = "Pokemon's have This TM\n" local tmd = C[item2.itemid] or 1 local Checktm = TMCHECK[tmd] if item2.uid == cid then for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, item.itemid,tmhave) return true elseif isCreature(item2.uid) then for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, item.itemid,tmhave) return doPlayerSendCancel(cid, "You can only use tm in pokeballs in Feet Slot!") elseif item2.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then return doPlayerSendCancel(cid, "You can only use tm in pokeballs in Feet Slot!") elseif #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "need back you poke for use TM") elseif item2.uid == getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then if C[item2.itemid] then if addTM(cid,item2,tmd,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true end end return true end move1 Spoiler local msgs = {"use ", ""} function doAlertReady(cid, id, movename, n, cd) if not isCreature(cid) then return true end local myball = getPlayerSlotItem(cid, local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid) 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 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 local mypoke = getCreatureSummons(cid)[1] if getCreatureCondition(cid, CONDITION_EXHAUST) then return true end if getCreatureName(mypoke) == "Evolution" then return true end local newid = 0 local name = getPlayerStorageValue(mypoke, (getCreatureName(mypoke) == "Ditto" or getCreatureName(mypoke) == "Shiny Ditto") and 1010 or false) --edited local it = string.sub(words, 2, 3) local cdzin = (getPlayerStorageValue(mypoke, 212123) >= 1) and "cm_move"..it.."" or "move"..it.."" local idd = getPlayerSlotItem(cid, 8).uid local move = (getCreatureName(mypoke) == "Smeargle" and getItemAttribute(idd, "skt1") and movestable[getItemAttribute(idd, "skt1")].move1 or movestable[name].move1) or (getCreatureName(mypoke) == "Shiny Smeargle" and getItemAttribute(idd, "skt1") and movestable[getItemAttribute(idd, "skt1")].move1 or movestable[name].move1) local C ={ {skt = movestable[getItemAttribute(idd, "skt"..it)].move2, move = movestable[name].move2}, {skt = movestable[getItemAttribute(idd, "skt"..it)].move3, move = movestable[name].move3}, {skt = movestable[getItemAttribute(idd, "skt"..it)].move4, move = movestable[name].move4}, {skt = movestable[getItemAttribute(idd, "skt"..it)].move5, move = movestable[name].move5}, {skt = movestable[getItemAttribute(idd, "skt"..it)].move6, move = movestable[name].move6}, {skt = movestable[getItemAttribute(idd, "skt"..it)].move7, move = movestable[name].move7}, {skt = movestable[getItemAttribute(idd, "skt"..it)].move8, move = movestable[name].move8}, {move = movestable[name].move9 }, {move = movestable[name].move10}, {move = movestable[name].move11}, {move = movestable[name].move12}, {move = movestable[name].move13}, } if tonumber(it) > 1 and tonumber(it) < 14 then if tonumber(it) < 9 and getItemAttribute(idd, "skt"..it) and C[tonumber(it)].skt then move = C[tonumber(it)].skt else move = C[tonumber(it)].move end end if not move then local isMega = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "megaStone") local moveTable, index = getNewMoveTable(movestable[name]), 0 -- Eu quero entender que bizarrice de loop é esse? for i = 1, 12 do if not moveTable then index = i break end end if not isMega or name:find("Mega") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true elseif tonumber(it) ~= index then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end local needCds = false --Coloque false se o pokémon puder mega evoluir mesmo com spells em cooldown. if needCds then for i = 1, 12 do if getCD(getPlayerSlotItem(cid, 8).uid, "move"..i) > 0 then return doPlayerSendCancel(cid, "para mega evoluir, os cds do pokemon devem estar carregados.") end end end move = {name = "Mega Evolution", level = 0, cd = 0, dist = 1, target = 0, f = 0, t = "?"} 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 elseif 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 elseif getTileInfo(getThingPos(mypoke)).protection then doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.") return true elseif getPlayerStorageValue(mypoke, 3894) >= 1 then return doPlayerSendCancel(cid, "You can't attack because you is with fear") --alterado v1.3 elseif (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 if isCreature(getCreatureTarget(cid)) and isInArray(specialabilities["evasion"], getCreatureName(getCreatureTarget(cid))) then local target = getCreatureTarget(cid) if math.random(1, 100) <= passivesChances["Evasion"][getCreatureName(target)] then 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 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 elseif getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then return 0 elseif getCreatureHealth(getCreatureTarget(cid)) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your have already defeated your target.") return 0 elseif not isCreature(getCreatureSummons(cid)[1]) then return true elseif 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 elseif not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then return 0 end end 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 local spellMessage = msgs[math.random(#msgs)]..""..move.name.."!" if move.name == "Mega Evolution" then spellMessage = "Mega Evolve!" end doCreatureSay(cid, getPokeName(mypoke)..", "..spellMessage, 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 Link para o comentário Compartilhar em outros sites More sharing options...
Weverton Siri 0 Postado Junho 19, 2017 Autor Share Postado Junho 19, 2017 (editado) 1 hora atrás, Poccnn disse: verifica se esses scripts estão funcionando corretamente e depois tratarei do erro em si. o tmclean aparentemente funcionou pois ele retira a tm do pokemon caso ele tenha e caso n tenha retorna a mensagem "this pokemon dont have tm to clean" e foi isso que aconteceu, ele retornou a mensagem o tm.lua funcionou certa parte pois caso usado no sumon ou no jogador funcionou pois abriu a janela com os nomes dos pokes que podem receber os tm http://prntscr.com/flsad8 porem mostrou a listra 1 do tm.lua da pasta lib sendo que eu testei com o TM 17 e devia ter mostrodo a listra TM 17 ou seja mostrou a listra errada esta parte também funcionou pois a mensagem esta retornando caso eu esteja com algum pokemon (sumon) Spoiler elseif #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "need back you poke for use TM") uma dessas partes tambem funcionou pois a mensagem é retornada se eu tentar usar o TM na pokeball e a pokeball não esteja no sloot correto (feet) Spoiler elseif isCreature(item2.uid) then for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, item.itemid,tmhave) return doPlayerSendCancel(cid, "You can only use tm in pokeballs in Feet Slot!") elseif item2.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then return doPlayerSendCancel(cid, "You can only use tm in pokeballs in Feet Slot!") mas caso a pokeball esteja no slot correto não acontece nada, não adiciona o TM, não aparece mensagem alguma, e também não gera erro na distro agora o move1.lua parou de funcionar e gerou o seguinte erro http://prntscr.com/flsg1s Spoiler [19/06/2017 20:41:21] [Error - TalkAction Interface] [19/06/2017 20:41:21] data/talkactions/scripts/move1.lua:onSay [19/06/2017 20:41:21] Description: [19/06/2017 20:41:21] data/talkactions/scripts/move1.lua:35: attempt to index field '?' (a nil value) [19/06/2017 20:41:21] stack traceback: [19/06/2017 20:41:21] data/talkactions/scripts/move1.lua:35: in function <data/talkactions/scripts/move1.lua:20> Editado Junho 20, 2017 por Weverton Siri Link para o comentário Compartilhar em outros sites More sharing options...
Poccnn 385 Postado Junho 20, 2017 Share Postado Junho 20, 2017 @Weverton Siri Tm Spoiler local C = { [7756] = 11, [7757] = 17, [7758] = 6, [7759] = 20, [7760] = 21, [7761] = 22, [7762] = 16, [7763] = 1, [7764] = 3, [7765] = 4, [7766] = 7, [7767] = 8, [7768] = 9, [7769] = 5, [7770] = 10, [7771] = 18, [7772] = 15, [7773] = 12, [7774] = 19, [7775] = 13, [7776] = 2, [7777] = 14, } function onUse(cid, item, frompos, item2, topos) local tmhave = "Pokemon's have This TM\n" local tmd = C[item.itemid] or 1 local Checktm = TMCHECK[tmd] if item2.uid == cid then for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, item.itemid,tmhave) return true elseif isCreature(item2.uid) then for i,x in pairs(Checktm) do tmhave = tmhave.."["..i.."]"..x.."\n" end doShowTextDialog(cid, item.itemid,tmhave) return doPlayerSendCancel(cid, "You can only use tm in pokeballs in Feet Slot!") elseif item2.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then return doPlayerSendCancel(cid, "You can only use tm in pokeballs in Feet Slot!") elseif #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "need back you poke for use TM") elseif item2.uid == getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then if C[item.itemid] then if addTM(cid,item,tmd,item.itemid) then doOpenTM(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 237) end return true end end return true end Link para o comentário Compartilhar em outros sites More sharing options...
Weverton Siri 0 Postado Junho 20, 2017 Autor Share Postado Junho 20, 2017 (editado) Agora, Poccnn disse: agora esta mostrando a listra correta e as mensagens também estão corretas como eu disse acima porem na hora de usar o TM na pokeball com ela no slot correto (feet) voltou a aparecer aquele erro Spoiler [19/06/2017 21:03:09] [Error - Action Interface] [19/06/2017 21:03:09] data/actions/scripts/tm.lua:onUse [19/06/2017 21:03:09] Description: [19/06/2017 21:03:09] data/lib/050-function.lua:697: attempt to index global 'cp' (a nil value) [19/06/2017 21:03:09] stack traceback: [19/06/2017 21:03:09] data/lib/050-function.lua:697: in function 'isMoveTm' [19/06/2017 21:03:09] data/lib/050-function.lua:736: in function 'addTM' [19/06/2017 21:03:09] data/actions/scripts/tm.lua:47: in function <data/actions/scripts/tm.lua:25> obs: a lib que te passei esta diferente da minha em questão de linhas voce tera q procurar pela função Editado Junho 20, 2017 por Weverton Siri Link para o comentário Compartilhar em outros sites More sharing options...
Poccnn 385 Postado Junho 20, 2017 Share Postado Junho 20, 2017 Agora, Weverton Siri disse: agora esta mostrando a listra correta e as mensagens também estão corretas como eu disse acima porem na hora de usar o TM na pokeball com ela no slot correto (feet) voltou a aparecer aquele erro Mostrar conteúdo oculto [19/06/2017 21:03:09] [Error - Action Interface] [19/06/2017 21:03:09] data/actions/scripts/tm.lua:onUse [19/06/2017 21:03:09] Description: [19/06/2017 21:03:09] data/lib/050-function.lua:697: attempt to index global 'cp' (a nil value) [19/06/2017 21:03:09] stack traceback: [19/06/2017 21:03:09] data/lib/050-function.lua:697: in function 'isMoveTm' [19/06/2017 21:03:09] data/lib/050-function.lua:736: in function 'addTM' [19/06/2017 21:03:09] data/actions/scripts/tm.lua:47: in function <data/actions/scripts/tm.lua:25> Esse erro já existia? Link para o comentário Compartilhar em outros sites More sharing options...
Weverton Siri 0 Postado Junho 20, 2017 Autor Share Postado Junho 20, 2017 Agora, Poccnn disse: Esse erro já existia? sim eu o avia reportado no meu primeiro post quanto criei o topco, só muda as linhas Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados