Ir para conteúdo

[Encerrado] [Pokemon] Dúvidas? - Pda


lucashgas

Posts Recomendados

@dz2

@kurobisu

acha isso no config

["Bulbasaur"] = {level = 16, evolution = "Ivysaur", count = 1, stoneid = 11441, stoneid2 = 0},

ali no lv vc coloca o lv q quizer

ai faz o mesmo nos outros pokes

Mano explica onde fica isso, ai sim eu acharia.

 

 

EDIT: Alguém pode também me explicar como faço para deixar mais facil para o Pokémon passar de level?

 

REP+ pra quem ajudar nos 2!

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

@Maguito

@dz2 Um jogo não vai rpa frente se um lvl 300 ter a msm força que um lvl 100. Se o slicer conseguir por pra multiplicar o status pelo lvl do player pode ter ctz que vai fica perfeito o sistema e criar uma jogabilidade, ja que o jogo é um rpg e quem joga mais tem que ter mais beneficios de quem não joga.

 

E não sei porque o povo reclama de copiar o pxg, um servidor alternativo ja existe e tá pronto, pokemon upando por lvl e tals, agora nos resta criar um servidor parecido com o pxg. E não venha com comentarios vai jgoar pxg, larguei uma conta lvl 180 lah e outra 140( sempre fui sharer, ok), mas depois desses lvls o jogo realmente enjoa. E com o updae a unica coisa que mudou para mim foi que tenho que caçar em party ;s

logico q quem joga mais vai ter mais beneficio ele vai ta com o lv do poke mias alto, se vcs querem faze formula de dano baseada na lv do poke e do char , beleza server é teu , mas na minha opniao , tira lv do poke dexa de ser poke, e aquela pergunta ja apareceu pra caraio nesse forum.

 

@dz2

@kurobisu

acha isso no config

["Bulbasaur"] = {level = 16, evolution = "Ivysaur", count = 1, stoneid = 11441, stoneid2 = 0},

ali no lv vc coloca o lv q quizer

ai faz o mesmo nos outros pokes

Mano explica onde fica isso, ai sim eu acharia.

 

 

EDIT: Alguém pode também me explicar como faço para deixar mais facil para passar de level?

 

REP+ pra quem ajudar nos 2!

vai em data\lib\configuration para as evoluçoes, ja para upa mais rapido tem varias coisas possiveis, pode aumentar a exp no poke.xml, pode aumentar aki baseExpRate tb no configuration pode mudar em data\lib\leveltables e diminuir a exp necessaria por lv

vo posta o meu leveltables ta igual a exp necessaria pro bulbasaur upa no GBA

function getPokemonExperienceTable(pokemonname)

if isInArray(fastexppokes, pokemonname) then

return fastexptable

elseif isInArray(mediumfastexppokes, pokemonname) then

return mediumfastexptable

elseif isInArray(mediumslowexppokes, pokemonname) then

return mediumslowexptable

elseif isInArray(slowexppokes, pokemonname) then

return slowexptable

end

print(""..pokemonname.." doesn't have an experience table speed gain. Check it at data/lib/level tables.lua.")

return mediumfastexptable

end

 

fastexppokes = {"Clefairy", "Clefable", "Iglybuff", "Jigglypuff", "Wigglytuff", "Chansey", "Shiny Clefairy", "Shiny Clefable", "Shiny Iglybuff", "Shiny Jigglypuff", "Shiny Wigglytuff", "Shiny Chansey", "Ledyba", "Ledian", "Spinarak", "Ariados", "Cleffa", "Togepi", "Togetic", "Marill", "Azumarill", "Aipom", "Misdreavus", "Snubbull", "Granbull", "Corsola", "Delibird", "Smeargle", "Blissey"}

 

fastexptable = {

[1] = 0,

[2] = 8,

[3] = 27,

[4] = 64,

[5] = 135,

[6] = 179,

[7] = 236,

[8] = 314,

[9] = 419,

[10] = 560,

[11] = 744,

[12] = 973,

[13] = 1261,

[14] = 1612,

[15] = 2035,

[16] = 2535,

[17] = 3120,

[18] = 3798,

[19] = 4575,

[20] = 5460,

[21] = 6458,

[22] = 7577,

[23] = 8825,

[24] = 10208,

[25] = 11735,

[26] = 13411,

[27] = 15244,

[28] = 17242,

[29] = 19411,

[30] = 21760,

[31] = 24294,

[32] = 27021,

[33] = 29949,

[34] = 33084,

[35] = 36435,

[36] = 40007,

[37] = 43808,

[38] = 47846,

[39] = 52127,

[40] = 56660,

[41] = 61450,

[42] = 66505,

[43] = 71833,

[44] = 77440,

[45] = 83335,

[46] = 89523,

[47] = 96012,

[48] = 102810,

[49] = 109923,

[50] = 117360,

[51] = 125126,

[52] = 133229,

[53] = 141677,

[54] = 150476,

[55] = 159635,

[56] = 169159,

[57] = 179056,

[58] = 189334,

[59] = 199999,

[60] = 211060,

[61] = 222522,

[62] = 234393,

[63] = 246681,

[64] = 259392,

[65] = 272535,

[66] = 286115,

[67] = 300140,

[68] = 314618,

[69] = 329555,

[70] = 344960,

[71] = 360838,

[72] = 377197,

[73] = 394045,

[74] = 411388,

[75] = 429235,

[76] = 447591,

[77] = 466464,

[78] = 485862,

[79] = 505791,

[80] = 526260,

[81] = 547274,

[82] = 568841,

[83] = 590969,

[84] = 613664,

[85] = 636935,

[86] = 660787,

[87] = 685228,

[88] = 710266,

[89] = 735907,

[90] = 762160,

[91] = 789030,

[92] = 816525,

[93] = 844653,

[94] = 873420,

[95] = 902835,

[96] = 932903,

[97] = 963632,

[98] = 995030,

[99] = 1027103,

[100] = 1059860,

[101] = 999999999}

 

mediumfastexppokes = {"Caterpie", "Metapod", "Butterfree", "Weedle", "Kakuna", "Beedrill", "Rattata", "Raticate", "Spearow", "Fearow", "Ekans", "Arbok", "Pikachu", "Raichu", "Sandshrew", "Sandslash", "Vulpix", "Ninetales", "Zubat", "Golbat", "Paras", "Parasect", "Diglett", "Dugtrio", "Meowth", "Persian", "Psyduck", "Golduck", "Mankey", "Primeape", "Ponyta", "Rapidash", "Magnemite", "Magneton", "Doduo", "Dodrio", "Seel", "Dewgong", "Grimer", "Muk", "Onix", "Steelix", "Drowzee", "Hypno", "Krabby", "Kingler", "Voltorb", "Electrode", "Cubone", "Marowak", "Hitmonlee", "Tyrogue", "Hitmonchan", "Lickitung", "Koffing", "Weezing", "Kangaskhan", "Horsea", "Seadra", "Goldeen", "Seaking", "Mr. Mime", "Scyther", "Jynx", "Smoochum", "Electabuzz", "Magmar", "Ditto", "Eevee", "Jolteon", "Flareon", "Porygon", "Omanyte", "Omastar", "Kabuto", "Kabutops", "Shiny Caterpie", "Shiny Metapod", "Shiny Butterfree", "Shiny Weedle", "Shiny Kakuna", "Shiny Beedrill", "Shiny Rattata", "Shiny Raticate", "Shiny Spearow", "Shiny Fearow", "Shiny Ekans", "Shiny Arbok", "Shiny Pikachu", "Shiny Raichu", "Shiny Sandshrew", "Shiny Sandslash", "Shiny Vulpix", "Shiny Ninetales", "Shiny Zubat", "Shiny Golbat", "Shiny Paras", "Shiny Parasect", "Shiny Diglett", "Shiny Dugtrio", "Shiny Meowth", "Shiny Persian", "Shiny Psyduck", "Shiny Golduck", "Shiny Mankey", "Shiny Primeape", "Shiny Ponyta", "Shiny Rapidash", "Shiny Magnemite", "Shiny Magneton", "Shiny Doduo", "Shiny Dodrio", "Shiny Seel", "Shiny Dewgong", "Shiny Grimer", "Shiny Muk", "Shiny Onix", "Shiny Steelix", "Shiny Drowzee", "Shiny Hypno", "Shiny Krabby", "Shiny Kingler", "Shiny Voltorb", "Shiny Electrode", "Shiny Cubone", "Shiny Marowak", "Shiny Hitmonlee", "Tyrogue", "Shiny Hitmonchan", "Shiny Lickitung", "Shiny Koffing", "Shiny Weezing", "Shiny Kangaskhan", "Shiny Horsea", "Shiny Seadra", "Shiny Goldeen", "Shiny Seaking", "Shiny Mr. Mime", "Shiny Scyther", "Shiny Jynx", "Smoochum", "Shiny Electabuzz", "Shiny Magmar", "Shiny Ditto", "Shiny Eevee", "Shiny Jolteon", "Shiny Flareon", "Shiny Porygon", "Shiny Omanyte", "Shiny Omastar", "Shiny Kabuto", "Shiny Kabutops", "Sentret", "Furret", "Hoothoot", "Noctowl", "Crobat", "Pichu", "Natu", "Xatu", "Wooper", "Quagsire", "Espeon", "Umbreon", "Girafarig", "Pineco", "Forretress", "Dunsparce", "Qwilfish", "Scizor", "Magcargo", "Slugma", "Remoraid", "Octillery", "Kingdra", "Phanpy", "Donphan", "Porygon2", "Hitmontop", "Elekid", "Magby", "Vaporeon", "Shiny Vaporeon", "Venonat", "Venomoth", "Slowpoke", "Shiny Slowpoke", "Slowbro", "Slowking", "Farfetch'd", "Tangela", "Shiny Tangela", "Sudowoodo", "Yanma", "Unown", "Wobbuffet", "Teddiursa", "Ursaring"}

 

mediumfastexptable = {

[1] = 0,

[2] = 8,

[3] = 27,

[4] = 64,

[5] = 135,

[6] = 179,

[7] = 236,

[8] = 314,

[9] = 419,

[10] = 560,

[11] = 744,

[12] = 973,

[13] = 1261,

[14] = 1612,

[15] = 2035,

[16] = 2535,

[17] = 3120,

[18] = 3798,

[19] = 4575,

[20] = 5460,

[21] = 6458,

[22] = 7577,

[23] = 8825,

[24] = 10208,

[25] = 11735,

[26] = 13411,

[27] = 15244,

[28] = 17242,

[29] = 19411,

[30] = 21760,

[31] = 24294,

[32] = 27021,

[33] = 29949,

[34] = 33084,

[35] = 36435,

[36] = 40007,

[37] = 43808,

[38] = 47846,

[39] = 52127,

[40] = 56660,

[41] = 61450,

[42] = 66505,

[43] = 71833,

[44] = 77440,

[45] = 83335,

[46] = 89523,

[47] = 96012,

[48] = 102810,

[49] = 109923,

[50] = 117360,

[51] = 125126,

[52] = 133229,

[53] = 141677,

[54] = 150476,

[55] = 159635,

[56] = 169159,

[57] = 179056,

[58] = 189334,

[59] = 199999,

[60] = 211060,

[61] = 222522,

[62] = 234393,

[63] = 246681,

[64] = 259392,

[65] = 272535,

[66] = 286115,

[67] = 300140,

[68] = 314618,

[69] = 329555,

[70] = 344960,

[71] = 360838,

[72] = 377197,

[73] = 394045,

[74] = 411388,

[75] = 429235,

[76] = 447591,

[77] = 466464,

[78] = 485862,

[79] = 505791,

[80] = 526260,

[81] = 547274,

[82] = 568841,

[83] = 590969,

[84] = 613664,

[85] = 636935,

[86] = 660787,

[87] = 685228,

[88] = 710266,

[89] = 735907,

[90] = 762160,

[91] = 789030,

[92] = 816525,

[93] = 844653,

[94] = 873420,

[95] = 902835,

[96] = 932903,

[97] = 963632,

[98] = 995030,

[99] = 1027103,

[100] = 1059860,

[101] = 999999999}

 

mediumslowexppokes = {"Bulbasaur", "Ivysaur", "Venusaur", "Charmander", "Charmeleon", "Charizard", "Squirtle", "Wartortle", "Blastoise", "Pidgey", "Pidgeotto", "Pidgeot", "Nidoran Female", "Nidorina", "Nidoqueen", "Nidoran Male", "Nidorino", "Nidoking", "Oddish", "Gloom", "Vileplume", "Poliwag", "Poliwhirl", "Poliwrath", "Abra", "Kadabra", "Alakazam", "Machop", "Machoke", "Machamp", "Bellsprout", "Weepinbell", "Victreebel", "Geodude", "Graveler", "Golem", "Gastly", "Haunter", "Gengar", "Mew", "Shiny Bulbasaur", "Shiny Ivysaur", "Shiny Venusaur", "Shiny Charmander", "Shiny Charmeleon", "Shiny Charizard", "Shiny Squirtle", "Shiny Wartortle", "Shiny Blastoise", "Shiny Pidgey", "Shiny Pidgeotto", "Shiny Pidgeot", "Shiny Nidoran Female", "Shiny Nidorina", "Shiny Nidoqueen", "Shiny Nidoran Male", "Shiny Nidorino", "Shiny Nidoking", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume", "Shiny Poliwag", "Shiny Poliwhirl", "Shiny Poliwrath", "Shiny Abra", "Shiny Kadabra", "Shiny Alakazam", "Shiny Machop", "Shiny Machoke", "Shiny Machamp", "Shiny Bellsprout", "Shiny Weepinbell", "Shiny Victreebel", "Shiny Geodude", "Shiny Graveler", "Shiny Golem", "Shiny Gastly", "Shiny Haunter", "Shiny Gengar", "Shiny Mew", "Chikorita", "Bayleef", "Meganium", "Cyndaquil", "Quilava", "Typhlosion", "Totodile", "Croconaw", "Feraligatr", "Mareep", "Flaaffy", "Ampharos", "Bellossom", "Politoed", "Hoppip", "Skiploom", "Jumpluff", "Sunkern", "Sunflora", "Murkrow", "Gligar", "Shuckle", "Sneasel", "Celebi"}

 

mediumslowexptable = {

[1] = 0,

[2] = 8,

[3] = 27,

[4] = 64,

[5] = 135,

[6] = 179,

[7] = 236,

[8] = 314,

[9] = 419,

[10] = 560,

[11] = 744,

[12] = 973,

[13] = 1261,

[14] = 1612,

[15] = 2035,

[16] = 2535,

[17] = 3120,

[18] = 3798,

[19] = 4575,

[20] = 5460,

[21] = 6458,

[22] = 7577,

[23] = 8825,

[24] = 10208,

[25] = 11735,

[26] = 13411,

[27] = 15244,

[28] = 17242,

[29] = 19411,

[30] = 21760,

[31] = 24294,

[32] = 27021,

[33] = 29949,

[34] = 33084,

[35] = 36435,

[36] = 40007,

[37] = 43808,

[38] = 47846,

[39] = 52127,

[40] = 56660,

[41] = 61450,

[42] = 66505,

[43] = 71833,

[44] = 77440,

[45] = 83335,

[46] = 89523,

[47] = 96012,

[48] = 102810,

[49] = 109923,

[50] = 117360,

[51] = 125126,

[52] = 133229,

[53] = 141677,

[54] = 150476,

[55] = 159635,

[56] = 169159,

[57] = 179056,

[58] = 189334,

[59] = 199999,

[60] = 211060,

[61] = 222522,

[62] = 234393,

[63] = 246681,

[64] = 259392,

[65] = 272535,

[66] = 286115,

[67] = 300140,

[68] = 314618,

[69] = 329555,

[70] = 344960,

[71] = 360838,

[72] = 377197,

[73] = 394045,

[74] = 411388,

[75] = 429235,

[76] = 447591,

[77] = 466464,

[78] = 485862,

[79] = 505791,

[80] = 526260,

[81] = 547274,

[82] = 568841,

[83] = 590969,

[84] = 613664,

[85] = 636935,

[86] = 660787,

[87] = 685228,

[88] = 710266,

[89] = 735907,

[90] = 762160,

[91] = 789030,

[92] = 816525,

[93] = 844653,

[94] = 873420,

[95] = 902835,

[96] = 932903,

[97] = 963632,

[98] = 995030,

[99] = 1027103,

[100] = 1059860,

[101] = 999999999}

 

slowexppokes = {"Ho-oh", "Growlithe", "Arcanine", "Tentacool", "Tentacruel", "Shellder", "Cloyster", "Exeggcute", "Exeggutor", "Rhyhorn", "Rhydon", "Staryu", "Starmie", "Pinsir", "Tauros", "Magikarp", "Gyarados", "Lapras", "Aerodactyl", "Snorlax", "Articuno", "Zapdos", "Moltres", "Dratini", "Dragonair", "Dragonite", "Mewtwo", "Mew", "Chinchou", "Lanturn", "Heracross", "Swinub", "Piloswine", "Mantine", "Skarmory", "Houndour", "Houndoom", "Stantler", "Miltank", "Raikou", "Entei", "Suicune", "Larvitar", "Pupitar", "Tyranitar", "Lugia", "Shiny Growlithe", "Shiny Arcanine", "Shiny Tentacool", "Shiny Tentacruel", "Shiny Shellder", "Shiny Cloyster", "Shiny Exeggcute", "Shiny Exeggutor", "Shiny Rhyhorn", "Shiny Rhydon", "Shiny Staryu", "Shiny Starmie", "Shiny Pinsir", "Shiny Tauros", "Shiny Magikarp", "Shiny Gyarados", "Shiny Lapras", "Shiny Aerodactyl", "Shiny Snorlax", "Shiny Articuno", "Shiny Zapdos", "Shiny Moltres", "Shiny Dratini", "Shiny Dragonair", "Shiny Dragonite", "Shiny Mewtwo", "Shiny Mew",}

 

slowexptable = {

[1] = 0,

[2] = 8,

[3] = 27,

[4] = 64,

[5] = 135,

[6] = 179,

[7] = 236,

[8] = 314,

[9] = 419,

[10] = 560,

[11] = 744,

[12] = 973,

[13] = 1261,

[14] = 1612,

[15] = 2035,

[16] = 2535,

[17] = 3120,

[18] = 3798,

[19] = 4575,

[20] = 5460,

[21] = 6458,

[22] = 7577,

[23] = 8825,

[24] = 10208,

[25] = 11735,

[26] = 13411,

[27] = 15244,

[28] = 17242,

[29] = 19411,

[30] = 21760,

[31] = 24294,

[32] = 27021,

[33] = 29949,

[34] = 33084,

[35] = 36435,

[36] = 40007,

[37] = 43808,

[38] = 47846,

[39] = 52127,

[40] = 56660,

[41] = 61450,

[42] = 66505,

[43] = 71833,

[44] = 77440,

[45] = 83335,

[46] = 89523,

[47] = 96012,

[48] = 102810,

[49] = 109923,

[50] = 117360,

[51] = 125126,

[52] = 133229,

[53] = 141677,

[54] = 150476,

[55] = 159635,

[56] = 169159,

[57] = 179056,

[58] = 189334,

[59] = 199999,

[60] = 211060,

[61] = 222522,

[62] = 234393,

[63] = 246681,

[64] = 259392,

[65] = 272535,

[66] = 286115,

[67] = 300140,

[68] = 314618,

[69] = 329555,

[70] = 344960,

[71] = 360838,

[72] = 377197,

[73] = 394045,

[74] = 411388,

[75] = 429235,

[76] = 447591,

[77] = 466464,

[78] = 485862,

[79] = 505791,

[80] = 526260,

[81] = 547274,

[82] = 568841,

[83] = 590969,

[84] = 613664,

[85] = 636935,

[86] = 660787,

[87] = 685228,

[88] = 710266,

[89] = 735907,

[90] = 762160,

[91] = 789030,

[92] = 816525,

[93] = 844653,

[94] = 873420,

[95] = 902835,

[96] = 932903,

[97] = 963632,

[98] = 995030,

[99] = 1027103,

[100] = 1059860,

 

[101] = 999999999}

ve ai se te ajuda

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

Vlws manin obrigado meu REP+

 

So que mais uma pergunta tem como me disponibilizar o tal Bike System que muda de outfir sendo female ou male seu personagem.

 

Se me disponibilizar essa vou postar aqui uma coisa boa pra quem não quer passar 5 dias fazendo o que eu fiz.

mdr.gifhappy.pngmdr.gif

 

EDIT: Esqueci de perguntar uma coisa, onde fica a parada que diz até que level vão os seus pokemons?

Tipo eu tenho um Alakazam[300][M]

Onde fica a parada que diz o limite de level?

Se me ajudar no Bike e nessa eu posto o meu. wink.png

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

@Dz2

 

Eu sei que o sistema e bom...mas você ja reparou que a maioria dos erros severos que da no server e por causa do sistema de stats...o de level eu não me importo de deixar...mas acredito eu que o de stats pesa de mais o servidor...eles são erros raros...mas quando acontem ferram toda a acc do cara...Eu prefiro que tenha ao menos o level system...mas prefiro um simples estilo pxg sem bug...do que um cativante mas que quando buga faz o cara para de joga xD

 

 

@slicer

Você pode me ajudar a remover do meu servidor? Posso tentar ajdudar a calcular a nova formula de dano e hp

Link para o comentário
Compartilhar em outros sites

@kurobisu esse peguei no pokemon xd nao sei d quem é

coloca isso no data\actions\action.xml

<action itemid="2547" event="script" value="bike.lua"/> ali no 2547 coloca o id da tua bike

depois faz uma copia de alguma action e renomeia para bike e coloca isso la

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

 

local sBike = 5701

 

local t = {

[2547] = {article='a', name='bike', text='Mount, bike!', dtext='Demount, bike!', s=5700, condition=bikeCondition},

}

 

function BikeSpeedOn(cid,nSpeed)

setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid))

doChangeSpeed(cid,-getCreatureSpeed(cid))

doChangeSpeed(cid,nSpeed)

end

function BikeSpeedOff(cid)

doChangeSpeed(cid,-getCreatureSpeed(cid))

doChangeSpeed(cid,getPlayerStorageValue(cid,sBike))

end

 

 

local v, r = getCreaturePosition(cid), t[item.itemid]

local s = r.s

local pos = {x = v.x, y = v.y, z = v.z}

if r then

if getPlayerStorageValue(cid, 25000) == 5 then

return

end

if getPlayerStorageValue(cid, 23000) == 5 then

return

end

 

 

if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then

doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.")

return true

end

if getPlayerStorageValue(cid, s) <= 0 then

doCreatureSay(cid, r.text, 19)

setPlayerStorageValue(cid, s, 1)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')

BikeSpeedOn(cid,500)

if getPlayerSex(cid) == 1 then

doSetCreatureOutfit(cid, {lookType = 1415, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)

else

doSetCreatureOutfit(cid, {lookType = 1414, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)

end

 

 

elseif getPlayerStorageValue(cid, s) == 1 then

doCreatureSay(cid, r.dtext, 19)

setPlayerStorageValue(cid, s, 0)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted ' .. r.article .. ' '.. r.name .. '.')

BikeSpeedOff(cid)

return doRemoveCondition(cid, CONDITION_OUTFIT)

else

return doPlayerSendCancel(cid, 'You can\'t do this.')

end

else

return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.')

end

 

end

nao uso ele mas provavelmente tem q mexer em login e logout lua tb quanto ao lv max da uma olhadinha umas paginas atras q vi alguem postando

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

Obrigado e aqui vai o que eu prometi:

NPC's

 

Bem não e lá essas coisas mais ta ja e um começo vou começar a postar algumas coisas minhas aqui também e ajudar a galera.

 

OBS: Preciso de ajuda com isso aqui dnv \/

 

 

 

Alguém ai pode me disponibilizar o mapa que o:

 

@GMHareaOT

 

Disponibilizou antigamente, so que ta no Multiupload e não funciona mais.

 

no Multiupload: KPDO Map + Respawn + Gym's - Dash Advanced .v3

Ele postou aqui: http://www.xtibia.co...21#entry1165021

 

 

EDIT: O bike system não esta funcionando. fica lá o ITEM da Bike so que quando vou utilizar da error simplesmente não acontece nada.

 

MEU CONSOLE:

 

 

 

[08/06/2012 13:26:38] [Error - LuaScriptInterface::loadFile] cannot open data/actions/scripts/other/bike.lua: No such file or directory

[08/06/2012 13:26:38] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/bike.lua)

[08/06/2012 13:26:38] cannot open data/actions/scripts/other/bike.lua: No such file or directory

[08/06/2012 13:26:38] [Error - LuaScriptInterface::loadFile] data/actions/scripts/startbox.lua:6: unexpected symbol near 'local'

[08/06/2012 13:26:38] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/startbox.lua)

[08/06/2012 13:26:38] data/actions/scripts/startbox.lua:6: unexpected symbol near 'local'

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11441

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11442

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11443

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11444

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11445

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11446

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11447

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11448

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11449

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11450

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11451

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11452

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11453

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 11454

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 12232

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 12242

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 12244

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 12417

[08/06/2012 13:26:38] [Warning - Actions::registerEvent] Duplicate registered item id: 12419

[08/06/2012 13:26:39] [Error - LuaScriptInterface::loadFile] cannot open data/talkactions/scripts/aloot.lua: No such file or directory

[08/06/2012 13:26:39] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/aloot.lua)

[08/06/2012 13:26:39] cannot open data/talkactions/scripts/aloot.lua: No such file or directory

[08/06/2012 13:26:39] [Warning - Event::loadScript] Event onSay not found (data/talkactions/scripts/pokedex.lua)

[08/06/2012 13:26:39] [Warning - Event::loadScript] Event onSay not found (data/talkactions/scripts/pokedex.lua)

[08/06/2012 13:26:39] [Error - LuaScriptInterface::loadFile] cannot open data/creaturescripts/scripts/vipexp.lua: No such file or directory

[08/06/2012 13:26:39] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/vipexp.lua)

[08/06/2012 13:26:39] cannot open data/creaturescripts/scripts/vipexp.lua: No such file or directory

[08/06/2012 13:26:39] [Error - LuaScriptInterface::loadFile] cannot open data/creaturescripts/scripts/aloot.lua: No such file or directory

[08/06/2012 13:26:39] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/aloot.lua)

[08/06/2012 13:26:39] cannot open data/creaturescripts/scripts/aloot.lua: No such file or directory

[08/06/2012 13:26:39] [Error - LuaScriptInterface::loadFile] cannot open data/creaturescripts/scripts/aloot.lua: No such file or directory

[08/06/2012 13:26:39] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/aloot.lua)

[08/06/2012 13:26:39] cannot open data/creaturescripts/scripts/aloot.lua: No such file or directory

 

 

 

Muito erro em? Alguém me ajuda please!

Se me ajudarem REP+ Sempre que eu entrar happy.png

 

EDIT DENOVO: Concertei o Bike System e melhorei. Falta so o resto...

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

@jeffe000

eu ja tirei o lvl system aki em casa tb, n so do pokeexp.lua mas de tudo balls, catch e afins, aki no caso eu deixei os pokes com o lvl da PXG e deixei os status tb... no caso os status do zard sao multiplicados pelo lvl dele na PXG, 85, mas o problema agora ta na formula de dano '-' e de hp ;p

 

LoL deve ser a segunda vez que eu apoio you, porisso eu fiz oque fiz com status la de ter mais hp/def do que atk/spAtk

 

E outra coisa, eu fiz uma função que coloquei na nurse, porque achei que é UM DOS MAIORES PROBLEMAS DO PDA

 

Oque é?

 

Ex: Vamos dizer que deixei o serve on para todo mundo ai fica umas 50 pessoas e talz ai eu trabalho mais para equilibrar

 

Ai o cara tem um golem com todos status juntos fica 5000

 

Ai eu ta muito forte vou mudar, ai eu mudei e ficou 3500

 

Quem ja tinha o golem antes vai continuar com 5000 e quem pegar depois de eu mudar vai ter 3500

 

Ai eu coloquei a função de atualizar os status (bem simples é só pegar o status do config * lvl) e coloquei na NURSE

 

porque na NURSE? porque é um lugar que "TODO MUNDO PASSA" ai podem pensar "mas se o cara viver de revive", eu coloco no revive tem problema nao hasuashuasa

Link para o comentário
Compartilhar em outros sites

ZerefShirou

 

Zeref o que eu faço se ele não funcionar me a barra de cooldown? Fiz o que você pediu e continuar a mesma coisa ... Se você não sabe que eu não sei o que eu faria

Estou sentado num impasse ...

Por favor, ajudem

Link para o comentário
Compartilhar em outros sites

É sobre estas imagens em Pokemon CoolDownBar.

 

15yeq8x.jpg

 

 

E ainda um problema e chega a Aura Boost

Quando eu clico em esconder os pokemon pokeball, cria-se mais uma vez, e assim o tempo todo.

 

 

20hlczp.jpg

 

 

Log Server:

 

[27/05/2012 15:06:21] [Error - Action Interface]

[27/05/2012 15:06:21] data/actions/scripts/goback.lua:onUse

[27/05/2012 15:06:21] Description:

[27/05/2012 15:06:21] data/lib/level system.lua:550: attempt to index global 'auraSyst' (a nil value)

[27/05/2012 15:06:21] stack traceback:

[27/05/2012 15:06:21] data/lib/level system.lua:550: in function 'adjustStatus'

[27/05/2012 15:06:21] data/actions/scripts/goback.lua:161: in function <data/actions/scripts/goback.lua:26>

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

Oque eu disse para mudar e como está atualmente, poste em spoiler

 

@Other Assunto

 

Ideia do Yukimura

so troca a funcao q multiplica level do poke e multiplica pelo level do trainer

 

Vai servir perfeitamente para minha função *.*

Link para o comentário
Compartilhar em outros sites

@Slicer

 

eu vi seu potion la no seu perfil nee potion 100%

 

no data action/script/potion.lua

 

eu add certo ja no outro eu add tbem certo mais deu bug começou os pokemons nao ganha xp e nem upa vou posta aqui em baixo meu creaturescript do exp la normal sem sua script add dai vc add pra min que de certo e mi mande tido rep+++ script \/

 

local combats = {

[PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC},

[GRASSDAMAGE] = {cor = COLOR_GRASS},

[POISONEDDAMAGE] = {cor = COLOR_GRASS},

[MORTALGASDAMAGE] = {cor = COLOR_POISON},

[FIREDAMAGE] = {cor = COLOR_FIRE2},

[bURNEDDAMAGE] = {cor = COLOR_BURN},

[WATERDAMAGE] = {cor = COLOR_WATER},

[iCEDAMAGE] = {cor = COLOR_ICE},

[NORMALDAMAGE] = {cor = COLOR_NORMAL},

[GUILLOTINEDAMAGE] = {cor = COLOR_NORMAL},

[FLYDAMAGE] = {cor = COLOR_FLYING},

[GHOSTDAMAGE] = {cor = COLOR_GHOST},

[NIGHTMAREDAMAGE] = {cor = COLOR_GHOST},

[GROUNDDAMAGE] = {cor = COLOR_GROUND},

[ELECTRICDAMAGE] = {cor = COLOR_ELECTRIC},

[THUNDERWAVEDAMAGE] = {cor = COLOR_ELECTRIC},

[ROCKDAMAGE] = {cor = COLOR_ROCK},

[bUGDAMAGE] = {cor = COLOR_BUG},

[FIGHTDAMAGE] = {cor = COLOR_FIGHTING},

[sEISMICTOSSDAMAGE] = {cor = COLOR_FIGHTING},

[DRAGONDAMAGE] = {cor = COLOR_DRAGON},

[POISONDAMAGE] = {cor = COLOR_POISON},

[DARKDAMAGE] = {cor = COLOR_DARK},

[sTEELDAMAGE] = {cor = COLOR_STEEL},

}

local function doHeal(cid, amount)

doCreatureAddHealth(cid, amount)

doSendMagicEffect(getThingPos(cid), 12)

doSendAnimatedText(getThingPos(cid), "+"..amount.."", 65)

end

local function sendPlayerDmgMsg(cid, text)

if not isCreature(cid) then return true end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, text)

end

local spcevo = {

["Poliwhirl"] = {"Poliwrath", "Politoed"},

["Gloom"] = {"Bellossom", "Vileplume"},

["Tyrogue"] = {"Hitmonchan", "Hitmontop", "Hitmonlee"}}

local function doEvolveWild(cid)

if not isCreature(cid) or getCreatureHealth(cid) <= 0 then return true end

local name = getCreatureName(cid)

local evolution = "none"

if spcevo[name] then

evolution = spcevo[name][math.random(1, #spcevo[name])]

elseif poevo[name] then

evolution = poevo[name].evolution

end

local a = getPokemonStatus(name)

if not a or evolution == "none" then return true end

local pk = {}

local players = getSpectators(getThingPos(cid), 7, 7)

if players then

for pp = 1, #players do

local this = players[pp]

if isCreature(this) and isPlayer(this) and (getCreatureTarget(this) == cid or getDamageMapPercent(this, cid) > 0) then

doSendMagicEffect(getThingPos(this), 173)

local expstring = cid.."expEx"

pk[this] = getItemAttribute(getPlayerSlotItem(this, 8).uid, expstring)

doItemSetAttribute(getPlayerSlotItem(this, 8).uid, expstring, 0)

end

end

end

local level = getPokemonLevel(cid)

local pos = getThingPos(cid)

local gender = getCreatureSkull(cid)

local lifepercentage = 1 - ((getCreatureHealth(cid) * 1.3) / getCreatureMaxHealth(cid))

local lookdir = getCreatureLookDir(cid)

local status = {}

status.offense = getOffense(cid) + a.off * 8

status.defense = getDefense(cid) + a.def * 8

status.agi = getSpeed(cid) + a.agi * 8

status.spatk = getSpecialAttack(cid) + a.spatk * 8

status.vit = getVitality(cid) + a.vit * 4

doRemoveCreature(cid)

local evo = doCreateMonster(evolution, pos)

setWildPokemonLevel(evo, level, status)

doCreatureSetLookDir(evo, lookdir)

doCreatureSetSkullType(evo, gender)

doCreatureAddHealth(evo, -getCreatureMaxHealth(evo) * lifepercentage)

doSendMagicEffect(getThingPos(evo), 18)

for attacker, experience in pairs (pk) do

doWildAttackPlayer(evo, attacker)

local expstring = evo.."expEx"

local exp = experience or 0

doItemSetAttribute(getPlayerSlotItem(attacker, 8).uid, expstring, exp)

end

sendFinishEvolutionEffect(evo, true)

addEvent(sendFinishEvolutionEffect, 550, evo, true)

addEvent(sendFinishEvolutionEffect, 1050, evo)

end

local races = {

[4] = {cor = COLOR_FIRE2},

[6] = {cor = COLOR_WATER},

[7] = {cor = COLOR_NORMAL},

[8] = {cor = COLOR_FIRE2},

[9] = {cor = COLOR_FIGHTING},

[10] = {cor = COLOR_FLYING},

[11] = {cor = COLOR_GRASS},

[12] = {cor = COLOR_POISON},

[13] = {cor = COLOR_ELECTRIC},

[14] = {cor = COLOR_GROUND},

[15] = {cor = COLOR_PSYCHIC},

[16] = {cor = COLOR_ROCK},

[17] = {cor = COLOR_ICE},

[18] = {cor = COLOR_BUG},

[19] = {cor = COLOR_DRAGON},

[20] = {cor = COLOR_GHOST},

[21] = {cor = COLOR_STEEL},

[22] = {cor = COLOR_DARK},

[1] = {cor = 180},

[2] = {cor = 180},

[3] = {cor = 180},

[5] = {cor = 180},

}

local damages = {MORTALGASDAMAGE, GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE, DARKDAMAGE, STEELDAMAGE, NIGHTMAREDAMAGE, GUILLOTINEDAMAGE, SEISMICTOSSDAMAGE}

local fixdmgs = {PSYCHICDAMAGE, COMBAT_PHYSICALDAMAGE, GRASSDAMAGE, FIREDAMAGE, WATERDAMAGE, ICEDAMAGE, NORMALDAMAGE, GHOSTDAMAGE}

local ignored = {NIGHTMAREDAMAGE, GUILLOTINEDAMAGE, MORTALGASDAMAGE, SEISMICTOSSDAMAGE, PSYCHOSHIFTDAMAGE, POISONEDDAMAGE, BURNEDDAMAGE}

local ignoremiss = {NIGHTMAREDAMAGE, MORTALGASDAMAGE, BURNEDDAMAGE, POISONEDDAMAGE}

local ignorecritical = {MORTALGASDAMAGE, BURNEDDAMAGE, POISONEDDAMAGE, NIGHTMAREDAMAGE}

local cannotkill = {MORTALGASDAMAGE, BURNEDDAMAGE, POISONEDDAMAGE, NIGHTMAREDAMAGE}

function onStatsChange(cid, attacker, type, combat, value)

if combat == FLYSYSTEMDAMAGE then return false end

if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV

local damageCombat = combat

if damageCombat == THUNDERWAVEDAMAGE then

damageCombat = ELECTRICDAMAGE

elseif damageCombat == PSYCHOSHIFTDAMAGE then

damageCombat = PSYCHICDAMAGE

end

if getPlayerStorageValue(cid, 33) >= 1 then -- funcionamento do self destruction

if isCreature(attacker) then

return false

end

return true

end

if not isCreature(attacker) or cid == attacker then

if not isInArray(fixdamages, combat) and combats[combat] then

doSendAnimatedText(getThingPos(cid), value, combats[combat].cor)

end

return true

end

--------------------------------------------------

if combat == SLEEP_POWDERDAMAGE then

if not isSummon(cid) and not isSummon(attacker) and not isPlayer(attacker) then

return false

end

if isPlayer(cid) then

return false

end

if isNpcSummon(cid) and getCreatureTarget(cid) ~= attacker then

return false

end

if isSummon(cid) and isSummon(attacker) then

if not isInParty(getCreatureMaster(cid)) or not isInParty(getCreatureMaster(attacker)) then

return false

end

if not getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then

return false

end

end

doSleep(cid, value, true)

return false

end

--------------------------------------------------

if combat == HEALINGDAMAGE then

local healing = math.abs(value)

if not isSummon(cid) and not isSummon(attacker) and not isPlayer(attacker) then

doHeal(cid, healing)

return false

end

if isSummon(cid) and isSummon(attacker) then

if getPlayerStorageValue(getCreatureMaster(cid), 990) >= 1 then

return false

end

if not isInParty(getCreatureMaster(cid)) or not isInParty(getCreatureMaster(attacker)) then

doHeal(cid, healing)

return false

end

if not getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then

doHeal(cid, healing)

return false

end

end

return false

end

--------------------------------------------------

if combat == POISON_POWDERDAMAGE then

if not isSummon(cid) and not isSummon(attacker) and not isPlayer(attacker) then

return false

end

if isNpcSummon(cid) and getCreatureTarget(cid) ~= attacker then

return false

end

if isSummon(cid) and isSummon(attacker) then

if not isInParty(getCreatureMaster(cid)) or not isInParty(getCreatureMaster(attacker)) then

return false

end

if not getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then

return false

end

end

local master = attacker

if isSummon(attacker) then master = getCreatureMaster(attacker) end

addEvent(doAdvancedPoison, 2500, attacker, master, cid, getPlayerStorageValue(attacker, 919231), value, getPlayerStorageValue(cid, 3893))

return false

end

--------------------------------------------------

if isPlayer(attacker) then

local valor = value

if valor > getCreatureHealth(cid) then

valor = getCreatureHealth(cid)

end

if combat == COMBAT_PHYSICALDAMAGE then

return false

end

if combat == PHYSICALDAMAGE then

doSendMagicEffect(getThingPos(cid), 3)

doSendAnimatedText(getThingPos(cid), valor, races[getMonsterInfo(getCreatureName(cid)).race].cor)

end

if combats[damageCombat] and not isInArray(fixdmgs, damageCombat) then

doSendAnimatedText(getThingPos(cid), valor, combats[damageCombat].cor)

end

if #getCreatureSummons(attacker) >= 1 and not isInArray({POISONEDDAMAGE, BURNEDDAMAGE}, combat) then

doPlayerSendTextMessage(attacker, MESSAGE_STATUS_DEFAULT, "Your "..getPokeName(getCreatureSummons(attacker)[1]).." dealt "..valor.." damage to "..getSomeoneDescription(cid)..".")

end

return true

end

--------------------------------------------------

if isPlayer(cid) and #getCreatureSummons(cid) >= 1 and type == STATSCHANGE_HEALTHLOSS then

return false --muda isso

end

--------------------------------------------------

if isPlayer(cid) and #getCreatureSummons(cid) <= 0 and type == STATSCHANGE_HEALTHLOSS then

local valor = 0

if combat == COMBAT_PHYSICALDAMAGE then

valor = getOffense(attacker)

else

valor = getSpecialAttack(attacker)

end

valor = valor * playerDamageReduction

valor = valor * math.random(83, 117) / 100

if valor >= getCreatureHealth(cid) then

valor = getCreatureHealth(cid)

end

valor = math.floor(valor)

if valor >= getCreatureHealth(cid) then

if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then

doRemoveCondition(cid, CONDITION_OUTFIT)

setPlayerStorageValue(cid, 17000, 0)

setPlayerStorageValue(cid, 17001, 0)

setPlayerStorageValue(cid, 63215, -1)

doChangeSpeed(cid, PlayerSpeed)

local item = getPlayerSlotItem(cid, 8)

local btype = getPokeballType(item.itemid)

if #getCreatureSummons(cid) <= 0 then

if isInArray(pokeballs[btype].all, item.itemid) then

doTransformItem(item.uid, pokeballs[btype].off)

doItemSetAttribute(item.uid, "hp", 0)

end

end

end

end

doCreatureAddHealth(cid, -valor, 3, 180)

if not isPlayer(cid) then

addEvent(sendPlayerDmgMsg, 5, cid, "You lost "..valor.." hitpoints due to an attack from "..getSomeoneDescription(attacker)..".")

end

return false

end

--------------------------------------------------

if type == STATSCHANGE_HEALTHGAIN then

if cid == attacker then

return true

end

if not isSummon(cid) and isSummon(attacker) then

return false

end

if isSummon(cid) and isSummon(attacker) and getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then

return false

end

return true

end

--------------------------------------------------

if isMonster(attacker) and getPlayerStorageValue(attacker, 201) ~= -1 then

if isPlayer(cid) then

return false

end

if getPlayerStorageValue(getCreatureMaster(cid), ginasios[getPlayerStorageValue(attacker, 201)].storage) ~= 1 then

return false

end

end

--------------------------------------------------

if isMonster(cid) and getPlayerStorageValue(cid, 201) ~= -1 then

if getPlayerStorageValue(getCreatureMaster(attacker), ginasios[getPlayerStorageValue(cid, 201)].storage) ~= 1 then

return false

end

end

--------------------------------------------------

--------------------------------------------------

local multiplier = 1

local miss = (getSpeed(cid) - getSpeed(attacker)) * 0.26

local poketype1 = pokes[getCreatureName(cid)].type

local poketype2 = pokes[getCreatureName(cid)].type2

if getCreatureCondition(cid, CONDITION_INVISIBLE) then

return false

end

if damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then

if isInArray(effectiveness[damageCombat].super, poketype1) then

multiplier = multiplier * 2

end

if isInArray(effectiveness[damageCombat].super, poketype2) then

multiplier = multiplier * 2

end

if isInArray(effectiveness[damageCombat].weak, poketype1) then

multiplier = multiplier * 0.5

end

if isInArray(effectiveness[damageCombat].weak, poketype2) then

multiplier = multiplier * 0.5

end

if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then

multiplier = multiplier * 0

end

elseif combat == COMBAT_PHYSICALDAMAGE then

if isGhostPokemon(cid) and not isGhostPokemon(attacker) then

doSendMagicEffect(getThingPos(cid), 3)

return false

end

if getCreatureCondition(attacker, CONDITION_INVISIBLE) and not isGhostPokemon(attacker) then

if not isInArray({"Clefable", "Wigglytuff"}, getCreatureName(attacker)) then

return false

end

end

if miss > 0 and math.random(1, 100) <= miss and not isSleeping(cid) and not getCreatureCondition(cid, CONDITION_PARALYZE) then

doSendMagicEffect(getThingPos(cid), 211)

doSendAnimatedText(getThingPos(cid), "MISS", 215)

return false

end

end

--------------------------------------------------

local valor = value

if multiplier > 2 then

multiplier = 2

elseif multiplier == 0.25 then

multiplier = 0.5

end

--------------------------------------------------

 

local function resetMiss(cid)

if not isCreature(cid) then return true end

setPlayerStorageValue(cid, 88726, -1)

end

if getPlayerStorageValue(cid, 88726) ~= 1 and miss > 0 and math.random(1, 100) <= miss and damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignoremiss, combat) and not isSleeping(cid) and not getCreatureCondition(cid, CONDITION_PARALYZE) then

doSendMagicEffect(getThingPos(cid), 211)

doSendAnimatedText(getThingPos(cid), "MISS", 215)

doTeleportThing(cid, getClosestFreeTile(cid, getThingPos(cid)), false)

doSendMagicEffect(getThingPos(cid), 211)

doFaceCreature(cid, getThingPos(attacker))

setPlayerStorageValue(cid, 88726, 1)

addEvent(resetMiss, 2200, cid)

return false

end

if not isSummon(attacker) and not isSummon(cid) then

return false

end

if isSummon(cid) and isSummon(attacker) then

if not isInParty(getCreatureMaster(cid)) or not isInParty(getCreatureMaster(attacker)) then

return false

end --party system

if not getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then

return false

end

end

if isSleeping(attacker) then

return false

end

local randomRange = math.random(83, 117) / 100

local block = 0

if combat == COMBAT_PHYSICALDAMAGE then

block = 1 - (getDefense(cid) / (getOffense(attacker) + getDefense(cid)))

if getPokemonGender(attacker) == SEX_MALE then

block = block + 0.2

end

if getPokemonGender(cid) == SEX_FEMALE then

block = block - 0.2

end

valor = getOffense(attacker) * block

else

block = 1 - (getSpecialDefense(cid) / (getSpecialAttack(attacker) + getSpecialDefense(cid)))

valor = valor * block * generalSpecialAttackReduction

if isSummon(cid) then

valor = valor * summonSpecialDamageReduction - getPokemonLevel(cid) / 2

end

end

valor = valor * multiplier

valor = valor * randomRange

if isSummon(attacker) then

valor = valor * getHappinessRate(attacker)

else

valor = valor * summonReduction

end

valor = math.floor(valor)

if combat == NIGHTMAREDAMAGE then

local div = 8

if isSummon(attacker) and not isSummon(cid) then

div = 4

end

valor = math.floor(getCreatureMaxHealth(cid)/div)

elseif combat == GUILLOTINEDAMAGE then

if isGhostPokemon(cid) then

doSendMagicEffect(getThingPos(cid), 3)

return false

end

local gDmg = 0.5

if isSummon(attacker) and not isSummon(cid) then

gDmg = 0.7

end

valor = getCreatureMaxHealth(cid) * gDmg

elseif combat == SEISMICTOSSDAMAGE then

valor = getPokemonLevel(attacker) * 10

elseif combat == BURNEDDAMAGE then

valor = value * getResistance(cid, FIREDAMAGE)

elseif combat == POISONEDDAMAGE then

valor = value * getResistance(cid, POISONDAMAGE)

end

if valor <= 0 then

doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)

return false

end

if math.random(1, 100) == 4 and not isInArray(ignorecritical, combat) then

doSendAnimatedText(getThingPos(attacker), "CRITICAL", 215)

valor = valor * 2

end

if combat == PSYCHOSHIFTDAMAGE and isCreature(cid) then

if not isPlayer(cid) then

local pos = getThingPos(cid)

pos.x = pos.x + math.random(-4,4)

pos.y = pos.y + math.random(-4,4)

for a = 1, 6 do

if not canWalkOnPos(pos, true, true, true, true, false) or not isSightClear(getThingPos(cid), pos, false) then

pos = getThingPos(cid)

pos.x = pos.x + math.random(-4,4)

pos.y = pos.y + math.random(-4,4)

end

end

if not canWalkOnPos(pos, true, true, true, true, false) then

pos = getClosestFreeTile(cid, getThingPos(cid))

end

if not canWalkOnPos(pos, true, true, true, true, false) then

pos = getThingPos(cid)

end

doTeleportThing(cid, pos, false)

end

doSendMagicEffect(getThingPos(cid), math.random(12, 14))

end

if combat == THUNDERWAVEDAMAGE then

doCreatureAddCondition(cid, thunderwavecondition)

end

if valor >= getCreatureHealth(cid) then

if isInArray(cannotKill, combat) and isPlayer(cid) then

valor = getCreatureHealth(cid) - 1

else

valor = getCreatureHealth(cid)

end

end

--- REFLECT --------------------------------

if not isPlayer(cid) and getPlayerStorageValue(cid, 34) >= 1 and combat ~= COMBAT_PHYSICALDAMAGE then

doSendMagicEffect(getThingPos(cid), 135)

doSendAnimatedText(getThingPos(cid), "REFLECT", COLOR_GRASS)

setPlayerStorageValue(cid, 34, -1)

return false

end

--------------------------------------------

if hasMimicWall(cid) then

doSendMagicEffect(getThingPos(cid), 135)

local dmgText = ""..valor..""

local a = getPlayerStorageValue(cid, 878)

setPlayerStorageValue(cid, 878, a - valor)

local k = getPlayerStorageValue(cid, 878)

if k <= 0 then

local b = getTileItemById(getThingPos(cid), 11440)

if b.uid > 1 then doRemoveItem(b.uid, 1) end

local c = getTileItemById(getThingPos(cid), 11439)

if c.uid > 1 then doRemoveItem(c.uid, 1) end

dmgText = ""..a..""

doSendMagicEffect(getThingPos(cid), 3)

end

doSendAnimatedText(getThingPos(cid), dmgText, 215)

return false

end

if isSummon(attacker) and not isSummon(cid) and not isPlayer(cid) then

local expstring = cid.."expEx"

if getItemAttribute(getPlayerSlotItem(getCreatureMaster(attacker), 8).uid, expstring) == null then

doItemSetAttribute(getPlayerSlotItem(getCreatureMaster(attacker), 8).uid, expstring, 0)

end

local exp = valor / getCreatureMaxHealth(cid)

local ball = getPlayerSlotItem(getCreatureMaster(attacker), 8).uid

doItemSetAttribute(ball, expstring, getItemAttribute(ball, expstring) + exp)

if getItemAttribute(ball, expstring) > 1 then

doItemSetAttribute(ball, expstring, 1)

end

end

if isSummon(cid) and getCreatureHealth(cid) <= (getCreatureMaxHealth(cid)*0.08) and not exhaustion.get(getCreatureMaster(cid), 88726) then

exhaustion.set(getCreatureMaster(cid), 88726, 11)

doSendMagicEffect(getThingPos(cid), 178)

end

if isSummon(attacker) then

if combat == COMBAT_PHYSICALDAMAGE then

doTargetCombatHealth(getCreatureMaster(attacker), cid, PHYSICALDAMAGE, -valor, -valor, 255)

else

doTargetCombatHealth(getCreatureMaster(attacker), cid, damageCombat, -valor, -valor, 255)

end

if not isSummon(cid) and not isPlayer(cid) and math.random(1, wildEvolveChance) == math.random(1, wildEvolveChance) then

addEvent(doEvolveWild, math.random(1, 2500), cid)

end

else

if combat ~= COMBAT_PHYSICALDAMAGE then

doCreatureAddHealth(cid, -math.abs(valor), 3, combats[damageCombat].cor)

else

doCreatureAddHealth(cid, -math.abs(valor), 3, races[getMonsterInfo(getCreatureName(cid)).race].cor)

end

if isSummon(cid) then

addEvent(sendPlayerDmgMsg, 5, getCreatureMaster(cid), "Your "..getCreatureName(cid).." lost "..valor.." hitpoints due to an attack from "..getSomeoneDescription(attacker)..".")

end

end

local percent = 8 + math.ceil(valor / getCreatureMaxHealth(cid) * 100)

if getCreatureHealth(cid) == 0 or percent <= 0 then return false end

local runCond = false

if math.random(100) <= percent then

runCond = true

end

if runCond then

local condPos = getThingPos(cid)

local color = 215

local text = ""

local effect = 2

if damageCombat == FIREDAMAGE and not isBurning(cid) then

doAdvancedBurn(attacker, isPlayer(getCreatureMaster(attacker)) and getCreatureMaster(attacker) or 0, cid, getPokemonLevel(attacker) * 2, math.random(5, 12))

color = COLOR_FIRE2

text = "BURNING"

effect = 15

elseif damageCombat == POISONDAMAGE and not isPoisoned(cid) and randomCond == checkCond then

doAdvancedPoison(attacker, isPlayer(getCreatureMaster(attacker)) and getCreatureMaster(attacker) or 0, cid, getPokemonLevel(attacker) * 2, math.random(4, 20))

color = COLOR_GRASS

text = "POISONED"

effect = 8

end

doSendMagicEffect(getThingPos(cid), effect)

addEvent(doSendAnimatedText, 5, condPos, text, color)

end

------------------------------------POTIONS-------------------------------------------

if isSummon(cid) and type == STATSCHANGE_HEALTHLOSS then

if getPlayerStorageValue(cid, 173) >= 1 then

if damageCombat ~= BURNEDDAMAGE and damageCombat ~= POISONEDDAMAGE then

setPlayerStorageValue(cid, 174, 1)

doSendAnimatedText(getThingPos(cid), "Lost Heal", 144)

end

end

end

----------------------------------------PASSIVAS-----------------------------------------

------------------------------"Counter Helix" - "Giro Ball"------------------------------

-- [outfit normal] = {out = outfit girando, efeitos}

local OutFit = {

[366] = {out = 496, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --scyther

[912] = {out = 918, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Scizor

[1317] = {out = 849, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Shiny Scyther

[952] = {out = 1193, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Hitmontop

[909] = {out = 1194, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --pineco

[910] = {out = 1192, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Forretress

}

--acima do efeito 255 n aparece -pelo menos aki- entao fica esse por enquanto... ;x

--efeito vermelho => {cima = 261, direita = 263, esquerda = 264, baixo = 262}

if isSummon(cid) then

if OutFit[getCreatureOutfit(cid).lookType] then

if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/-

 

if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a spell 2x seguidas...

return false

end

local outfitt = OutFit[getCreatureOutfit(cid).lookType]

local function doWingAttack(cid, a, damage, min, max)

local damagearea = {}

local effectpos = getThingPosWithDebug(cid)

local effect = 255

if a == 0 then

effect = outfitt.cima

effectpos.x = effectpos.x + 1

effectpos.y = effectpos.y - 1

damagearea = wingdn

elseif a == 1 then

effect = outfitt.direita

effectpos.x = effectpos.x + 2

effectpos.y = effectpos.y + 1

damagearea = wingde

elseif a == 2 then

effect = outfitt.baixo

effectpos.x = effectpos.x + 1

effectpos.y = effectpos.y + 2

damagearea = wingds

elseif a == 3 then

effect = outfitt.esquerda

effectpos.x = effectpos.x - 1

effectpos.y = effectpos.y + 1

damagearea = wingdw

end

doSendMagicEffect(effectpos, effect)

if damage then

local look = getCreatureOutfit(cid).lookType

if look == 366 or look == 1317 then --scyther e shiny scyther

doAreaCombatHealth(cid, BUGDAMAGE, getThingPosWithDebug(cid), damagearea, -min, -max, CONST_ME_NONE)

elseif look == 952 then --hitmontop

doAreaCombatHealth(cid, FIGHTINGDAMAGE, getThingPosWithDebug(cid), damagearea, -min, -max, CONST_ME_NONE)

else --resto

doAreaCombatHealth(cid, STEELDAMAGE, getThingPosWithDebug(cid), damagearea, -min, -max, CONST_ME_NONE)

end

end

end

local dire = getCreatureLookDir(cid)

local cpos = getThingPosWithDebug(cid)

local min = getPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano...

local max = getPokemonLevel(cid)*20 --nao sei como funciona o sistema de dano...

setPlayerStorageValue(cid, 32623, 1) --proteçao

doSetCreatureOutfit(cid, {lookType = OutFit[getCreatureOutfit(cid).lookType].out}, -1)

local function doDance(cid, dir, damage, min, max)

if not isCreature(cid) then return true end

doCreatureSetLookDir(cid, dir)

doWingAttack(cid, dir, damage, min, max)

end

for times = 0, 2 do

for directions = 0, 3 do

addEvent(doDance, times * 300, cid, directions, true, min, max)

end

end

local function doChangeO(cid, dir, pos)

if not isCreature(cid) then return true end

setPlayerStorageValue(cid, 32623, 0) --proteçao

doRemoveCondition(cid, CONDITION_OUTFIT)

if getThingPosWithDebug(cid).x == pos.x and getThingPosWithDebug(cid).y == pos.y then

doCreatureSetLookDir(cid, dir)

end

end

addEvent(doChangeO, 2 * 300 + 10, cid, dire, cpos)

end

end

end

-------------------------------------------Lava Counter / Electricity-------------------------------------

local Fire_Thunder = {"Magmar", "Shiny Magmar", "Electabuzz", "Shiny Electabuzz"}

--["Nome"] = {effeito, damage}

local eff = {

["Magmar"] = {15, FIREDAMAGE},

["Shiny Magmar"] = {15, FIREDAMAGE},

["Electabuzz"] = {207, ELECTRICDAMAGE},

["Shiny Electabuzz"] = {207, ELECTRICDAMAGE},

}

if isSummon(cid) then

local e = getCreatureMaster(cid)

if isInArray(Fire_Thunder, getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")) then

if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/-

 

if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a spell 2x seguidas...

return false

end

local min = getPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano...

local max = getPokemonLevel(cid)*20 --nao sei como funciona o sistema de dano...

 

local function sendFireEff(cid, dir, eff, damage)

if not isCreature(cid) then return true end

doAreaCombatHealth(cid, damage, getPosByDir(getThingPosWithDebug(cid), dir), 0, -min, -max, eff)

end

local function doSpinFire(cid)

if not isCreature(cid) then return true end

local t = {

[1] = SOUTHWEST,

[2] = SOUTH,

[3] = SOUTHEAST,

[4] = EAST,

[5] = NORTHEAST,

[6] = NORTH,

[7] = NORTHWEST,

[8] = WEST,

[9] = SOUTHWEST,

}

for a = 1, 17 do

if not t[a] then

addEvent(sendFireEff, a * 140, cid, t[a-8], eff[getCreatureName(cid)][1], eff[getCreatureName(cid)][2])

else

addEvent(sendFireEff, a * 140, cid, t[a], eff[getCreatureName(cid)][1], eff[getCreatureName(cid)][2])

end

end

setPlayerStorageValue(cid, 32623, 0) --proteçao

end

setPlayerStorageValue(cid, 32623, 1) --proteçao

doSpinFire(cid, false, cid)

end

end

end

---------------------------------------------Demon Kicker----------------------------------

--[outfit] = outfit chutando,

local hitmonlees = {

[371] = 652, --hitmonlee

[1300] = 652, --shiny hitmonlee

[877] = 878, --elite hitmonlee PxG

}

--DETALHE: shiny hitmonlee n tem a sprite dele chutando.. pelo menos eu n achei..

--entao deixei a sprite do hitmonlee normal atacando...

if isSummon(cid) then

local e = getCreatureMaster(cid)

local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")

if name == "Shiny Hitmonlee" or name == "Hitmonlee" then

if isCreature(getCreatureTarget(getCreatureMaster(cid))) then

if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/-

 

if isSleeping(cid) then return true end

 

if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then

return false

end

if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a spell 2x seguidas...

return false

end

 

local function doChangeHitmon(cid)

if not isCreature(cid) then return true end

setPlayerStorageValue(cid, 32623, 0) --proteçao

doRemoveCondition(cid, CONDITION_OUTFIT)

end

 

local min = getPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano...

local max = getPokemonLevel(cid)*20 --nao sei como funciona o sistema de dano...

 

 

setPlayerStorageValue(cid, 32623, 1) --proteçao

doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookType]}, -1)

doTargetCombatHealth(cid, getMasterTarget(cid), FIGHTINGDAMAGE, -min, -max, 255)

 

addEvent(doChangeHitmon, 700, cid)

end

end

end

end

-------------------------------------------Demon Puncher-------------------------------------

local hitmonchans = {

["Hitmonchan"] = {

[0] = {out = 559, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal

[1] = {out = 1075, eff = 35, type = FIREDAMAGE}, --outfit fogo

[2] = {out = 1077, eff = 48, type = ELECTRICDAMAGE}, --outfit raio

[3] = {out = 1078, eff = 43, type = ICEDAMAGE}, --outfit gelo

[4] = {out = 1076, eff = 140, type = GHOSTDAMAGE} --outfit ghost

},

 

["Shiny Hitmonchan"] = {

--aconcelho trocar a outfit do shiny hitmonchan pela do elite hitmonchan do PO...

[0] = {out = 837, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal

[1] = {out = 1080, eff = 35, type = FIREDAMAGE}, --outfit fogo

[2] = {out = 1081, eff = 48, type = ELECTRICDAMAGE}, --outfit raio

[3] = {out = 1082, eff = 43, type = ICEDAMAGE}, --outfit gelo

[4] = {out = 1079, eff = 140, type = GHOSTDAMAGE} --outfit ghost

}

}

local monchanOUT = {837, 1080, 1081, 1082, 1079}

 

if isSummon(cid) then

local e = getCreatureMaster(cid)

local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")

if name == "Shiny Hitmonchan" or name == "Hitmonchan" then

if isCreature(getCreatureTarget(getCreatureMaster(cid))) then

if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/-

if isSleeping(cid) then return true end

 

if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then

return false

end

if getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") == "Shiny Hitmonchan" and not isInArray(monchanOUT, getCreatureOutfit(cid).lookType) then

return false --proteçao pro script n funcionar com o shiny monchan com outfit diferente da do elite...

end --script soh funciona com outfit do elite hirmonchan do PO...

 

 

local min = getPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano...

local max = getPokemonLevel(cid)*20 --nao sei como funciona o sistema de dano...

 

local hands = getItemAttribute(getPlayerSlotItem(e, 8).uid, "hands")

 

 

doSendDistanceShoot(getThingPos(cid), getThingPos(getMasterTarget(cid)), 39)

doTargetCombatHealth(cid, getMasterTarget(cid), hitmonchans[name][hands].type, -min, -max, 255)

 

 

local target = getThingPos(getMasterTarget(cid))

target.x = target.x + 1

 

if hands == 4 then

doSendMagicEffect(target, hitmonchans[name][hands].eff)

else

doSendMagicEffect(getThingPos(getMasterTarget(cid)), hitmonchans[name][hands].eff)

end

 

end

end

end

end

---------------------------------------Stunning Confusion------------------------------------------

local ducks = {"Golduck", "Psyduck", "Shiny Golduck", "Shiny Psyduck"}

if isSummon(cid) then

local e = getCreatureMaster(cid)

local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")

if isInArray(ducks, name) then

if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/-

 

if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a spell 2x seguidas...

return false

end

 

local min = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano...

local max = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano...

 

local function damage(cid)

if isCreature(cid) then

setPlayerStorageValue(cid, 32623, 1) --proteçao

doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPosWithDebug(cid), confusion, -min, -max, 136)

end

end

 

for i = 1, 7 do

addEvent(damage, i*500, cid)

end

setPlayerStorageValue(cid, 32623, 0) --proteçao

end

end

end

-----------------------------------------Groundshock-----------------------------------

if isSummon(cid) then

local e = getCreatureMaster(cid)

local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")

if name == "Kangaskhan" or name == "Shiny Kangaskhan" then

if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/-

 

local min = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano...

local max = getPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano...

 

doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(cid), eshock, -min, -max, 255)

local sps = getThingPosWithDebug(cid)

sps.x = sps.x+1

sps.y = sps.y+1

doSendMagicEffect(sps, 127)

end

end

end

--------------------------------------Electric Charge---------------------------------------------------

arr = {

{1, 1, 1, 1, 1},

{1, 1, 1, 1, 1},

{1, 1, 2, 1, 1},

{1, 1, 1, 1, 1},

{1, 1, 1, 1, 1}

}

local charge = {"Pikachu", "Shiny Pikachu", "Raichu", "Shiny Raichu"}

if isSummon(cid) then

local e = getCreatureMaster(cid)

local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")

local target = 0

if isInArray(charge, name) then

if getPlayerStorageValue(cid, 253) >= 0 then

return true

end

local uid = checkAreaUid(getCreaturePosition(cid), arr, 1, 1)

for _,pid in pairs(uid) do

if isCreature(pid) then

if getCreatureTarget(pid) == cid then

target = target+1

end

end

end

if target == 0 then

return true

end

if target == (1 or 2) then

chance = 15 --15%

elseif target == (3 or 4) then

chance = 20 --20%

elseif target == (5 or 6) then

chance = 30 --30%

end

if math.random(1, 100) <= chance then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/-

setPlayerStorageValue(cid, 253, 1)

doSendAnimatedText(getThingPos(cid), "FOCUS", 144)

end

end

end

-------------------------------------Melody------------------------------------

if isSummon(cid) then

local e = getCreatureMaster(cid)

local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")

if name == "Wigglytuff" or name == "Shiny Wigglytuff" then

if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/-

doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -6, -10, 33)

end

end

end

------------------------------------- Dragon Fury / Fury ---------------------------------------

local DracoFury = {"Persian", "Shiny Persian", "Gyarados", "Shiny Gyarados", "Dratini", "Shiny Dratini", "Dragonair", "Shiny Dragonair", "Dragonite", "Shiny Dragonite"}

if isSummon(cid) then

local e = getCreatureMaster(cid)

local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")

if isInArray(DracoFury, name) then

if math.random(1, 100) <= 10 then --Chance 4 = 4% Acho, Mais Fica A Sua Escolha

if getPlayerStorageValue(cid, 32623) == 1 then

return false

end

 

local function effect(params)

if isCreature(params.cid) then

doSendMagicEffect(getThingPos(params.cid), 12)

end

end

setPlayerStorageValue(cid, 32623, 1)

local function doReduceOffenseDefense(cid, qnt)

if not isCreature(cid) then return true end

local a = getDefense(cid)

local A = getOffense(cid)

if getCreatureName(cid) ~= "Persian" then

setPlayerStorageValue(cid, 1002, a - qnt)

end

setPlayerStorageValue(cid, 1001, A - qnt)

end

local function doDoubleOffenseDefense(cid)

if not isCreature(cid) then return true end

local a = getDefense(cid)

local A = getOffense(cid)

if getCreatureName(cid) ~= "Persian" then

setPlayerStorageValue(cid, 1002, a * 2)

end

setPlayerStorageValue(cid, 1001, A * 1.5)

local b = getDefense(cid)

local c = b - a

local B = getOffense(cid)

local C = B - A

if getCreatureName(cid) ~= "Persian" then

addEvent(doReduceOffenseDefense, 15 * 1500 + 40, cid, c)

end

addEvent(doReduceOffenseDefense, 15 * 1500 + 40, cid, C)

end

setPlayerStorageValue(cid, 32623, 0)

doDoubleOffenseDefense(cid)

for times = 0, 15 do

addEvent(effect, 1500 * times + 40, {cid = cid})

end

setPlayerStorageValue(cid, 32623, 1)

end

end

end

------------------------------------- Mega Drain ---------------------------------------

arr = {

{0, 0, 0, 0, 0},

{0, 1, 1, 1, 0},

{0, 1, 2, 1, 0},

{0, 1, 1, 1, 0},

{0, 0, 0, 0, 0}

}

local mega = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Oddish",

"Shiny Gloom", "Shiny Vileplume", "Shiny Kabuto", "Shiny Kabutops", "Shiny Parasect", "Shiny Tangela"}

local min = getPokemonLevel(cid)*3 --nao sei como funciona o sistema de dano...

local max = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano...

 

if isSummon(cid) then

local e = getCreatureMaster(cid)

local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")

if isInArray(mega, name) then

if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20%

local uid = checkAreaUid(getThingPos(cid), arr, 1, 1)

for _,pid in pairs(uid) do

if isCreature(pid) then

if getCreatureTarget(pid) == cid then

local hp = getCreatureHealth(pid)

local drain = choose(min, max)

if hp-drain >= 1 then

doCreatureAddHealth(pid, -drain)

doCreatureAddHealth(cid, drain)

doSendAnimatedText(getThingPos(pid), "-"..drain.."", 144)

doSendAnimatedText(getThingPos(cid), "+"..drain.."", 32)

end

end

end

end

end

end

end

------------------------------------- Spores Reaction ---------------------------------------

arr = {

{0, 0, 0, 0, 0},

{0, 1, 1, 1, 0},

{0, 1, 2, 1, 0},

{0, 1, 1, 1, 0},

{0, 0, 0, 0, 0}

}

local spores = {"Oddish", "Gloom", "Vileplume", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume"}

if isSummon(cid) then

local e = getCreatureMaster(cid)

local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")

if isInArray(spores, name) then

if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% +/-

doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -2, -3, 27)

end

end

end

 

return false

end

 

 

 

Rep++ se ajuda claro ^^

Link para o comentário
Compartilhar em outros sites

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