Jump to content
  • 0

[AJUDA] pokeadvance.lua:onKill


rafersiq

Question

bom dia a todos eu to tendo um problema com um script que aconteceu quando eu posco e fico matando ele

e deu esse erro 

Citar

[08/03/2022 10:03:40] [Error - CreatureScript Interface] 
[08/03/2022 10:03:40] datapack/creaturescripts/scripts/pokeadvance.lua:onKill
[08/03/2022 10:03:40] Description: 
[08/03/2022 10:03:40] datapack/creaturescripts/scripts/pokeadvance.lua:698: attempt to index local 'Buceta' (a nil value)
[08/03/2022 10:03:40] stack traceback:
[08/03/2022 10:03:40]     datapack/creaturescripts/scripts/pokeadvance.lua:698: in function <datapack/creaturescripts/scripts/pokeadvance.lua:651>

 

se alguem poder ajudar eu agradeço

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
Em 08/03/2022 em 11:28, rafersiq disse:

To sem nenhuma base pokemon aqui, mas...

 

A linha do erro retorna isso:
 if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") < levelMax and getItemAttribute(feet.uid, "exp") >= 0 and (Buceta.exp + exp) < (level * expStart) + (expStart *(level - 1)) then

 

Tem uns values chamados de "buceta", te recomendo testar alguns pokeadvance.lua de outras bases, ou só mudar da linha 651 pra baixo!
 

Link to comment
Share on other sites

  • 0
Citar

--[[
Feito por : Brendo Hiesttfer e Lucas Silva
tag xml :    <event type="kill" name="PokeLevel" script="pokelevel.lua"/> 
Registrar isso no login.lua
registerCreatureEvent(cid, "PokeLevel")
]] 

local BrendoXp = {
---------1º Geração---------
 ["Abra"] = {exp = 6},
 ["Aerodactyl"] = {exp = 26},
 ["Alakazam"] = {exp = 24},
 ["Arbok"] = {exp = 6},
 ["Arcanine"] = {exp = 15},
 ["Articuno"] = {exp = 450},
 ["Beedrill"] = {exp = 11},
 ["Bellsprout"] = {exp = 5},
 ["Blastoise"] = {exp = 26},
 ["Bulbasaur"] = {exp = 5},
 ["Butterfree"] = {exp = 9},
 ["Caterpie"] = {exp = 3},
 ["Chansey"] = {exp = 10},
 ["Charizard Halloween"] = {exp = 1},
 ["Charizard"] = {exp = 19},
 ["Charmander"] = {exp = 9},
 ["Charmeleon"] = {exp = 14},
 ["Clefable"] = {exp = 21},
 ["Clefairy"] = {exp = 5},
 ["Cloyster"] = {exp = 6},
 ["Cubone"] = {exp = 5},
 ["Dewgong"] = {exp = 5},
 ["Diglett"] = {exp = 9},
 ["Ditto"] = {exp = 9},
 ["Dodrio"] = {exp = 9},
 ["Doduo"] = {exp = 7},
 ["Dragonair"] = {exp = 18},
 ["Dragonite"] = {exp = 30},
 ["Dratini"] = {exp = 22},
 ["Drowzee"] = {exp = 21},
 ["Dugtrio"] = {exp = 12},
 ["Eevee"] = {exp = 12},
 ["Ekans"] = {exp = 9},
 ["Ekans"] = {exp = 9},
 ["Electabuzz"] = {exp = 16},
 ["Electrode"] = {exp = 16},
 ["Exeggcute"] = {exp = 19},
 ["Exeggutor"] = {exp = 20},
 ["Farfetch'd"] = {exp = 19},
 ["Fearow"] = {exp = 17},
 ["Furious Charizard"] = {exp = 1},
 ["Gastly"] = {exp = 10},
 ["Gengar"] = {exp = 25},
 ["Geodude"] = {exp = 9},
 ["Giant Gengar"] = {exp = 22},
 ["Gloom"] = {exp = 12},
 ["Golbat"] = {exp = 5},
 ["Goldeen"] = {exp = 4},
 ["Golduck"] = {exp = 16},
 ["Golem"] = {exp = 24},
 ["Graveler"] = {exp = 15},
 ["Growlithe"] = {exp = 16},
 ["Gyarados"] = {exp = 20},
 ["Haunter"] = {exp = 12},
 ["Hitmonchan"] = {exp = 9},
 ["Hitmonlee"] = {exp = 8},
 ["Horsea"] = {exp = 4},
 ["Hypno"] = {exp = 8},
 ["Ivysaur"] = {exp = 4},
 ["jeuhgw"] = {exp = 3},
 ["Jolteon"] = {exp = 13},
 ["Jynx"] = {exp = 19},
 ["Jigglypuff"] = {exp = 14},
 ["Kabuto"] = {exp = 19},
 ["Kabutops"] = {exp = 16},
 ["Kadabra"] = {exp = 14},
 ["Kakuna"] = {exp = 4},
 ["Kangaskhan"] = {exp = 16},
 ["Kingler"] = {exp = 12},
 ["Koffing"] = {exp = 11},
 ["Krabby"] = {exp = 7},
 ["Lapras"] = {exp = 20},
 ["Lickitung"] = {exp = 20},
 ["Machamp"] = {exp = 16},
 ["Machoke"] = {exp = 15},
 ["Machop"] = {exp = 21},
 ["Magikarp"] = {exp = 10},
 ["Magmar"] = {exp = 22},
 ["Magnemite"] = {exp = 21},
 ["Magneton"] = {exp = 17},
 ["Mankey"] = {exp = 12},
 ["Marowak Halloween"] = {exp = 1},
 ["Marowak"] = {exp = 16},
 ["Meowth"] = {exp = 14},
 ["Metapod"] = {exp = 13},
 ["Mew"] = {exp = 210},
 ["Mewtwo"] = {exp = 290},
 ["Moltres"] = {exp = 300},
 ["Mr. Mime"] = {exp = 13},
 ["Muk"] = {exp = 12},
 ["Nidoking"] = {exp = 20},
 ["Nidoqueen"] = {exp = 21},
 ["Nidoran Female"] = {exp = 18},
 ["Nidoran Male"] = {exp = 18},
 ["Nidorina"] = {exp = 19},
 ["Nidorino"] = {exp = 14},
 ["Ninetales"] = {exp = 16},
 ["Oddish"] = {exp = 12},
 ["Omanyte"] = {exp = 10},
 ["Omastar"] = {exp = 11},
 ["Onix"] = {exp = 16},
 ["Paras"] = {exp = 16},
 ["Parasect"] = {exp = 19},
 ["Persian"] = {exp = 6},
 ["Pidgeot"] = {exp = 19},
 ["Pidgeotto"] = {exp = 18},
 ["Pidgey"] = {exp = 16},
 ["Pikachu"] = {exp = 17},
 ["Pinsir"] = {exp = 13},
 ["Poliwag"] = {exp = 10},
 ["Poliwhirl"] = {exp = 20},
 ["Poliwrath"] = {exp = 16},
 ["Ponyta"] = {exp = 22},
 ["Porygon"] = {exp = 22},
 ["Primeape"] = {exp = 16},
 ["Psyduck"] = {exp = 14},
 ["Raichu"] = {exp = 21},
 ["Rapidash"] = {exp = 21},
 ["Raticate"] = {exp = 11},
 ["Rattata"] = {exp = 9},
 ["Rhydon"] = {exp = 21},
 ["Rhyhorn"] = {exp = 29},
 ["Sandshrew"] = {exp = 12},
 ["Sandslash"] = {exp = 16},
 ["Scyther"] = {exp = 14},
 ["Seadra"] = {exp = 15},
 ["Seaking"] = {exp = 12},
 ["Seel"] = {exp = 10},
 ["Shellder"] = {exp = 11},
 ["Shiny Aerodactyl"] = {exp = 78},
 ["Shiny Caterpie"] = {exp = 44},
 ["Shiny Chansey"] = {exp = 61},
 ["Shiny Charmeleon"] = {exp = 55},
 ["Shiny Exeggutor"] = {exp = 61},
 ["Shiny Gloom"] = {exp = 51},
 ["Shiny Ivysaur"] = {exp = 48},
 ["Shiny Lapras"] = {exp = 72},
 ["Shiny Magmar"] = {exp = 72},
 ["Shiny Porygon"] = {exp = 82},
 ["Shiny Staryu"] = {exp = 61},
 ["Shiny Wartortle"] = {exp = 51},
 ["Shiny Weezing"] = {exp = 65},
 ["Slowbro"] = {exp = 15},
 ["Slowpoke"] = {exp = 19},
 ["Snorlax"] = {exp = 25},
 ["Spearow"] = {exp = 6},
 ["Squirtle"] = {exp = 6},
 ["Starmie"] = {exp = 10},
 ["Staryu"] = {exp = 11},
 ["Tangela"] = {exp = 21},
 ["Tauros"] = {exp = 20},
 ["Tentacool"] = {exp = 12},
 ["Tentacruel"] = {exp = 29},
 ["Vaporeon"] = {exp = 26},
 ["Venomoth"] = {exp = 23},
 ["Venonat"] = {exp = 14},
 ["Venusaur"] = {exp = 44},
 ["Victreebel"] = {exp = 31},
 ["Vileplume"] = {exp = 27},
 ["Voltorb"] = {exp = 19},
 ["Vulpix"] = {exp = 14},
 ["Wartortle"] = {exp = 20},
 ["Weedle"] = {exp = 9},
 ["Weepinbell"] = {exp = 22},
 ["Weezing"] = {exp = 19},
 ["Wigglytuff"] = {exp = 11},
 ["Zapdos"] = {exp = 302},
 ["Zubat"] = {exp = 12},
----------2ºGeração--------
 ["Aipom"] = {exp = 12},
 ["Ampharos"] = {exp = 16},
 ["Ariados"] = {exp = 10},
 ["Azumarill"] = {exp = 16},
 ["Bayleef"] = {exp = 9},
 ["Bellossom"] = {exp = 8},
 ["Blissey"] = {exp = 19},
 ["Celebi"] = {exp = 350},
 ["Chikorita"] = {exp = 6},
 ["Chinchou"] = {exp = 7},
 ["Cleffa"] = {exp = 10},
 ["Corsola"] = {exp = 5},
 ["Crobat"] = {exp = 17},
 ["Croconaw"] = {exp = 5},
 ["Cyndaquil"] = {exp = 4},
 ["Delibird"] = {exp = 15},
 ["Donphan"] = {exp = 11},
 ["Dunsparce"] = {exp = 6},
 ["Elekid"] = {exp = 4},
 ["Entei"] = {exp = 290},
 ["Espeon"] = {exp = 29},
 ["Feraligatr"] = {exp = 21},
 ["Flaaffy"] = {exp = 16},
 ["Forretress"] = {exp = 13},
 ["Furret"] = {exp = 11},
 ["Girafarig"] = {exp = 19},
 ["Gligar"] = {exp = 6},
 ["Granbull"] = {exp = 4},
 ["Heracross"] = {exp = 12},
 ["Hitmontop"] = {exp = 15},
 ["Ho-oh"] = {exp = 490},
 ["Hoothoot"] = {exp = 11},
 ["Hoppip"] = {exp = 7},
 ["Houndoom"] = {exp = 12},
 ["Houndour"] = {exp = 10},
 ["Igglybuff"] = {exp = 4},
 ["Jumpluff"] = {exp = 3},
 ["Kingdra"] = {exp = 16},
 ["Lanturn"] = {exp = 13},
 ["Larvitar"] = {exp = 5},
 ["Ledian"] = {exp = 13},
 ["Ledyba"] = {exp = 10},
 ["Lugia"] = {exp = 410},
 ["Magby"] = {exp = 12},
 ["Mantine"] = {exp = 13},
 ["Mareep"] = {exp = 12},
 ["Marill"] = {exp = 8},
 ["Meganium"] = {exp = 20},
 ["Miltank"] = {exp = 19},
 ["Misdreavus"] = {exp = 19},
 ["Murkrow"] = {exp = 12},
 ["Natu"] = {exp = 10},
 ["Noctowl"] = {exp = 27},
 ["Octillery"] = {exp = 16},
 ["Phanpy"] = {exp = 6},
 ["Pichu"] = {exp = 5},
 ["Piloswine"] = {exp = 8},
 ["Pineco"] = {exp = 4},
 ["Politoed"] = {exp = 11},
 ["Porygon2"] = {exp = 16},
 ["Pupitar"] = {exp = 15},
 ["Quagsire"] = {exp = 12},
 ["Quilava"] = {exp = 15},
 ["Qwilfish"] = {exp = 12},
 ["Raikou"] = {exp = 390},
 ["Remoraid"] = {exp = 5},
 ["Scizor"] = {exp = 12},
 ["Sentret"] = {exp = 12},
 ["Shiny Blissey"] = {exp = 66},
 ["Shiny Kingdra"] = {exp = 55},
 ["Shiny Miltank"] = {exp = 51},
 ["Shiny Steelix"] = {exp = 61},
 ["Shiny Typhlosion"] = {exp = 57},
 ["Shiny Tyranitar"] = {exp = 64},
 ["Shuckle"] = {exp = 4},
 ["Skarmory"] = {exp = 15},
 ["Skiploom"] = {exp = 13},
 ["Slowking"] = {exp = 16},
 ["Slugma"] = {exp = 6},
 ["Smoochum"] = {exp = 12},
 ["Sneasel"] = {exp = 13},
 ["Spinarak"] = {exp = 4},
 ["Stantler"] = {exp = 6},
 ["Steelix"] = {exp = 20},
 ["Sudowoodo"] = {exp = 15},
 ["Suicune"] = {exp = 410},
 ["Sunflora"] = {exp = 12},
 ["Sunkern"] = {exp = 9},
 ["Swinub"] = {exp = 9},
 ["Teddiursa"] = {exp = 10},
 ["Togepi"] = {exp = 19},
 ["Togetic"] = {exp = 25},
 ["Totodile"] = {exp = 16},
 ["Typhlosion"] = {exp = 31},
 ["Tyranitar"] = {exp = 26},
 ["Tyrogue"] = {exp = 19},
 ["Umbreon"] = {exp = 17},
 ["Unown"] = {exp = 6},
 ["Ursaring"] = {exp = 15},
 ["Wobbuffet"] = {exp = 16},
 ["Wooper"] = {exp = 12},
 ["Xatu"] = {exp = 9},
 ["Yanma"] = {exp = 10},
 -------- 3º Geração---------
 ["Absol"] = {exp = 22},
 ["Aggron"] = {exp = 9},
 ["Altaria"] = {exp = 12},
 ["Anorith"] = {exp = 7},
 ["Armaldo"] = {exp = 10},
 ["Aron"] = {exp = 6},
 ["Bagon"] = {exp = 4},
 ["Baltoy"] = {exp = 5},
 ["Banette"] = {exp = 4},
 ["Barboach"] = {exp = 8},
 ["Beautifly"] = {exp = 7},
 ["Beldum"] = {exp = 2},
 ["Blaziken"] = {exp = 34},
 ["Breloom"] = {exp = 19},
 ["Budew"] = {exp = 6},
 ["Cacnea"] = {exp = 7},
 ["Cacturne"] = {exp = 9},
 ["Camerupt"] = {exp = 12},
 ["Carvanha"] = {exp = 9},
 ["Cascoon"] = {exp = 5},
 ["Castform"] = {exp = 4},
 ["Chimecho"] = {exp = 21},
 ["Chingling"] = {exp = 4},
 ["Clamperl"] = {exp = 13},
 ["Claydol"] = {exp = 25},
 ["Combusken"] = {exp = 15},
 ["Corphish"] = {exp = 11},
 ["Cradily"] = {exp = 12},
 ["Crawdaunt"] = {exp = 9},
 ["Delcatty"] = {exp = 15},
 ["Dusclops"] = {exp = 19},
 ["Dusknoir"] = {exp = 32},
 ["Duskull"] = {exp = 9},
 ["Dustox"] = {exp = 10},
 ["Electrike"] = {exp = 12},
 ["Exploud"] = {exp = 16},
 ["Feebas"] = {exp = 3},
 ["Feebas"] = {exp = 3},
 ["Flygon"] = {exp = 44},
 ["Froslass"] = {exp = 22},
 ["Gallade"] = {exp = 26},
 ["Gardevoir"] = {exp = 22},
 ["Glalie"] = {exp = 18},
 ["Glalie"] = {exp = 16},
 ["Groudon"] = {exp = 500},
 ["Grovyle"] = {exp = 20},
 ["Grumpig"] = {exp = 12},
 ["Gulpin"] = {exp = 12},
 ["Hariyama"] = {exp = 11},
 ["Huntail"] = {exp = 9},
 ["Illumise"] = {exp = 12},
 ["Jirachi"] = {exp = 350},
 ["Kecleon"] = {exp = 6},
 ["Kirlia"] = {exp = 10},
 ["Kyogre"] = {exp = 700},
 ["Lairon"] = {exp = 10},
 ["Lileep"] = {exp = 6},
 ["Linoone"] = {exp = 8},
 ["Lombre"] = {exp = 9},
 ["Lotad"] = {exp = 7},
 ["Loudred"] = {exp = 9},
 ["Loudred"] = {exp = 9},
 ["Ludicolo"] = {exp = 12},
 ["Lunatone"] = {exp = 15},
 ["Luvdisc"] = {exp = 21},
 ["Magnezone"] = {exp = 27},
 ["Makuhita"] = {exp = 11},
 ["Manectric"] = {exp = 13},
 ["Marshtomp"] = {exp = 16},
 ["Masquerain"] = {exp = 11},
 ["Mawile"] = {exp = 10},
 ["Medicham"] = {exp = 20},
 ["Meditite"] = {exp = 16},
 ["Metagross"] = {exp = 25},
 ["Metang"] = {exp = 14},
 ["Mightyena"] = {exp = 22},
 ["Milotic"] = {exp = 23},
 ["Minun"] = {exp = 14},
 ["Mudkip"] = {exp = 9},
 ["Nincada"] = {exp = 11},
 ["Ninjask"] = {exp = 14},
 ["Nosepass"] = {exp = 13},
 ["Numel"] = {exp = 16},
 ["Nuzleaf"] = {exp = 21},
 ["Palkia"] = {exp = 250},
 ["Pelipper"] = {exp = 15},
 ["Phione"] = {exp = 14},
 ["Plusle"] = {exp = 11},
 ["Poochyena"] = {exp = 10},
 ["Primal Kyogre"] = {exp = 410},
 ["Probopass"] = {exp = 24},
 ["Ralts"] = {exp = 14},
 ["Rayquaza"] = {exp = 410},
 ["Regice"] = {exp = 354},
 ["Regirock"] = {exp = 354},
 ["Registeel"] = {exp = 354},
 ["Relicanth"] = {exp = 20},
 ["Roselia"] = {exp = 14},
 ["Roserade"] = {exp = 25},
 ["Sableye"] = {exp = 25},
 ["Salamence"] = {exp = 26},
 ["Sceptile"] = {exp = 24},
 ["Sealeo"] = {exp = 22},
 ["Seedot"] = {exp = 19},
 ["Seviper"] = {exp = 17},
 ["Sharpedo"] = {exp = 13},
 ["Shedinja"] = {exp = 16},
 ["Shelgon"] = {exp = 13},
 ["Shiftry"] = {exp = 19},
 ["Shiny Absol"] = {exp = 55},
 ["Shiny Aggron"] = {exp = 48},
 ["Shiny Aron"] = {exp = 42},
 ["Shiny Beldum"] = {exp = 44},
 ["Shiny Cradily"] = {exp = 38},
 ["Shiny Flygon"] = {exp = 51},
 ["Shiny Gallade"] = {exp = 55},
 ["Shiny Gardevoir"] = {exp = 57},
 ["Shiny Lairon"] = {exp = 39},
 ["Shiny Lileep"] = {exp = 38},
 ["Shiny Metagross"] = {exp = 69},
 ["Shiny Metang"] = {exp = 44},
 ["Shiny Milotic"] = {exp = 65},
 ["Shiny Probopass"] = {exp = 66},
 ["Shiny Salamence"] = {exp = 64},
 ["Shiny Sceptile"] = {exp = 64},
 ["Shiny Shelgon"] = {exp = 55},
 ["Shiny Treecko"] = {exp = 33},
 ["Shiny Tropius"] = {exp = 77},
 ["Shroomish"] = {exp = 20},
 ["Shuppet"] = {exp = 21},
 ["Silcoon"] = {exp = 16},
 ["Skitty"] = {exp = 14},
 ["Slaking"] = {exp = 25},
 ["Slakoth"] = {exp = 22},
 ["Snorunt"] = {exp = 23},
 ["Solrock"] = {exp = 21},
 ["Spheal"] = {exp = 14},
 ["Spinda"] = {exp = 10},
 ["Spoink"] = {exp = 10},
 ["Surskit"] = {exp = 15},
 ["Swablu"] = {exp = 15},
 ["Swalot"] = {exp = 16},
 ["Swampert"] = {exp = 13},
 ["Swellow"] = {exp = 13},
 ["Taillow"] = {exp = 15},
 ["Torchic"] = {exp = 10},
 ["Torkoal"] = {exp = 12},
 ["Trapinch"] = {exp = 11},
 ["Treecko"] = {exp = 8},
 ["Tropius"] = {exp = 29},
 ["Vibrava"] = {exp = 20},
 ["Vigoroth"] = {exp = 11},
 ["Volbeat"] = {exp = 12},
 ["Wailmer"] = {exp = 13},
 ["Wailord"] = {exp = 20},
 ["Walrein"] = {exp = 14},
 ["Whiscash"] = {exp = 14},
 ["Whismur"] = {exp = 11},
 ["Wingull"] = {exp = 10},
 ["Wurmple"] = {exp = 13},
 ["Zangoose"] = {exp = 16},
 ["Zigzagoon"] = {exp = 16},
 -------- 4º Geração---------
 ["Abomasnow"] = {exp = 21},
 ["Ambipom"] = {exp = 22},
 ["Bastiodon"] = {exp = 26},
 ["Bibarel"] = {exp = 19},
 ["Bonsly"] = {exp = 12},
 ["Bronzong"] = {exp = 16},
 ["Bronzor"] = {exp = 14},
 ["Buizel"] = {exp = 11},
 ["Buneary"] = {exp = 14},
 ["Burmy"] = {exp = 16},
 ["Carnivine"] = {exp = 20},
 ["Chatot"] = {exp = 12},
 ["Cherrim"] = {exp = 11},
 ["Cherubi"] = {exp = 9},
 ["Chimchar"] = {exp = 11},
 ["Combee"] = {exp = 11},
 ["Cranidos"] = {exp = 21},
 ["Croagunk"] = {exp = 21},
 ["Darkrai Nightmare"] = {exp = 189},
 ["Darkrai"] = {exp = 310},
 ["Drapion"] = {exp = 26},
 ["Drifblim"] = {exp = 24},
 ["Drifloon"] = {exp = 16},
 ["Electivire"] = {exp = 14},
 ["Empoleon"] = {exp = 33},
 ["Finneon"] = {exp = 19},
 ["Floatzel"] = {exp = 14},
 ["Gabite"] = {exp = 9},
 ["Garchomp"] = {exp = 24},
 ["Gastrodon"] = {exp = 19},
 ["Gible"] = {exp = 13},
 ["Giratina"] = {exp = 480},
 ["Glaceon"] = {exp = 21},
 ["Glameow"] = {exp = 19},
 ["Gliscor"] = {exp = 24},
 ["Grotle"] = {exp = 19},
 ["Happiny"] = {exp = 14},
 ["Heatran"] = {exp = 16},
 ["Hippopotas"] = {exp = 17},
 ["Hippowdon"] = {exp = 13},
 ["Honchkrow"] = {exp = 27},
 ["Infernape"] = {exp = 26},
 ["Kricketot"] = {exp = 21},
 ["Kricketune"] = {exp = 19},
 ["Leafeon"] = {exp = 19},
 ["Lickilicky"] = {exp = 25},
 ["Lopunny"] = {exp = 25},
 ["Lucario"] = {exp = 25},
 ["Lumineon"] = {exp = 16},
 ["Luxio"] = {exp = 13},
 ["Luxray"] = {exp = 9},
 ["Magmortar"] = {exp = 26},
 ["Mamoswine"] = {exp = 24},
 ["Mantyke"] = {exp = 21},
 ["Mime Jr."] = {exp = 22},
 ["Mismagius"] = {exp = 19},
 ["Monferno"] = {exp = 10},
 ["Mothim"] = {exp = 7},
 ["Pachirisu"] = {exp = 9},
 ["Piplup"] = {exp = 4},
 ["Prinplup"] = {exp = 10},
 ["Purugly"] = {exp = 6},
 ["Rampardos"] = {exp = 22},
 ["Regigigas"] = {exp = 244},
 ["Riolo"] = {exp = 22},
 ["Shaymin"] = {exp = 22},
 ["Shellos"] = {exp = 16},
 ["Shieldon"] = {exp = 13},
 ["Shinx"] = {exp = 13},
 ["Shiny Drapion"] = {exp = 53},
 ["Shiny Gliscor"] = {exp = 44},
 ["Shiny Lucario"] = {exp = 66},
 ["Shiny Spiritomb"] = {exp = 74},
 ["Shiny Togekiss"] = {exp = 74},
 ["Skorupi"] = {exp = 16},
 ["Skuntank"] = {exp = 11},
 ["Snover"] = {exp = 9},
 ["Spiritomb"] = {exp = 55},
 ["Staraptor"] = {exp = 19},
 ["Staravia"] = {exp = 19},
 ["Starly"] = {exp = 8},
 ["Stunky"] = {exp = 9},
 ["Tangrowth"] = {exp = 34},
 ["Togekiss"] = {exp = 55},
 ["Torterra"] = {exp = 26},
 ["Toxicroak"] = {exp = 22},
 ["Turtwig"] = {exp = 16},
 ["Uxie"] = {exp = 9},
 ["Vespiquen"] = {exp = 9},
 ["Weavile"] = {exp = 6},
 ["Wormadam Grass"] = {exp = 6},
 ["Wormadam steel"] = {exp = 6},
 ["Wormadam Ground"] = {exp = 6},
 ["Yanmega"] = {exp = 7},
 ----------Especiais----------
  ["Cresselia"] = {exp = 200},
  ["Dragonite Milenar"] = {exp = 100},
  ["Horder Leader Alakazam"] = {exp = 100},
  ["Giant Gallade"] = {exp = 90},
  ["Natal Machine"] = {exp = 90},
  ["Rocket Machine"] = {exp = 90},
 ---------Shinys--------------
 ["Shiny Abra"] = {exp = 60},
 ["Shiny Alakazam"] = {exp = 60},
 ["Shiny Arcanine"] = {exp = 60},
 ["Shiny Ariados"] = {exp = 60},
 ["Shiny Beedrill"] = {exp = 60},
 ["Shiny Blastoise"] = {exp = 60},
 ["Shiny Butterfree"] = {exp = 60},
 ["Shiny Charizard"] = {exp = 60},
 ["Shiny Clefable"] = {exp = 60},
 ["Shiny Cubone"] = {exp = 60},
 ["Shiny Dodrio"] = {exp = 60},
 ["Shiny Dragonair"] = {exp = 60},
 ["Shiny Dragonite"] = {exp = 60},
 ["Shiny Dratini"] = {exp = 60},
 ["Shiny Electabuzz"] = {exp = 60},
 ["Shiny Electrode"] = {exp = 60},
 ["Shiny Farfetch'd"] = {exp = 60},
 ["Shiny Fearow"] = {exp = 60},
 ["Shiny Flareon"] = {exp = 60},
 ["Shiny Gengar"] = {exp = 60},
 ["Shiny Golbat"] = {exp = 44},
 ["Shiny Golem"] = {exp = 44},
 ["Grimer"] = {exp = 11},
 ["Shiny Grimer"] = {exp = 44},
 ["Shiny Growlithe"] = {exp = 44},
 ["Shiny Hitmonchan"] = {exp = 44},
 ["Shiny Hitmonlee"] = {exp = 44},
 ["Shiny Hitmontop"] = {exp = 44},
 ["Shiny Hypno"] = {exp = 44},
 ["Shiny Jynx"] = {exp = 44},
 ["Shiny Kingler"] = {exp = 44},
 ["Shiny Krabby"] = {exp = 44},
 ["Shiny Magby"] = {exp = 44},
 ["Shiny Magikarp"] = {exp = 26},
 ["Shiny Marowak"] = {exp = 26},
 ["Shiny Magneton"] = {exp = 26},
 ["Shiny Mr. Mime"] = {exp = 26},
 ["Shiny Muk"] = {exp = 26},
 ["Shiny Nidoking"] = {exp = 26},
 ["Shiny Ninetales"] = {exp = 26},
 ["Shiny Oddish"] = {exp = 26},
 ["Shiny Onix"] = {exp = 26},
 ["Shiny Paras"] = {exp = 26},
 ["Shiny Parasect"] = {exp = 26},
 ["Shiny Pidgeot"] = {exp = 26},
 ["Shiny Pinsir"] = {exp = 26},
 ["Shiny Politoed"] = {exp = 26},
 ["Shiny Raichu"] = {exp = 26},
 ["Shiny Raticate"] = {exp = 26},
 ["Shiny Rattata"] = {exp = 26},
 ["Shiny Rhydon"] = {exp = 26},
 ["Shiny Rhyperior"] = {exp = 26},
 ["Shiny Roserade"] = {exp = 26},
 ["Shiny Scyther"] = {exp = 26},
 ["Shiny Seadra"] = {exp = 26},
 ["Shiny Snorlax"] = {exp = 26},
 ["Shiny Stantler"] = {exp = 26},
 ["Shiny Tangela"] = {exp = 26},
 ["Shiny Tangrowth"] = {exp = 26},
 ["Shiny Tentacool"] = {exp = 26},
 ["Shiny Tentacruel"] = {exp = 26},
 ["Shiny Umbreon"] = {exp = 26},
 ["Shiny Vaporeon"] = {exp = 26},
 ["Shiny Venomoth"] = {exp = 26},
 ["Shiny Venonat"] = {exp = 26},
 ["Shiny Venusaur"] = {exp = 26},
 ["Shiny Vileplume"] = {exp = 26},
 ["Shiny Voltorb"] = {exp = 26},
 ["Shiny Wigglytuff"] = {exp = 26},
 ["Shiny Zubat"] = {exp = 26},
 ["Shiny Arbok"] = {exp = 46},
 ---------Boss---------------
  ["Guardian Magmar"] = {exp = 1},
  ["Boss Togekiss"] = {exp = 1},
  ["Boss Metagross"] = {exp = 1},
  ["Maquina Magmar"] = {exp = 900},
-----------6º Geração-------------
  ["Chandelure"] = {exp = 10},
  ["Hydreigon"] = {exp = 12},
  ["Emboar"] = {exp = 12},
  ["Serperior"] = {exp = 13},
  ["Shiny Serperior"] = {exp = 19},
  ["Shiny Hydreigon"] = {exp = 19},
  ["Shiny Emboar"] = {exp = 19},
  ["Shiny Chandelure"] = {exp = 19},
  ["Zorua"] = {exp = 19},
  ["Latios"] = {exp = 350},
  ["Latias"] = {exp = 360},
  ["Gient Gallede"] = {exp = 120},
  ["Joker Gengar"] = {exp = 120},
  
  --------CASTLE----------
  ["Castle Mewtwo"] = {exp = 120},
  ["Castle Charizard"] = {exp = 50},
  ["Castle Blastoise"] = {exp = 50},
  ["Castle Venusaur"] = {exp = 50},
  ["Castle Snorlax"] = {exp = 50},

 
 

 }
 
function onKill(cid, target)

 local posss = getCreaturePosition(cid)
 local Buceta = BrendoXp[getCreatureName(target)]
 local Buceta2 = math.random(1,5)

if not buceta then
 buceta = {exp = math.random(30,50)
 end
 local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
 local chck = getItemAttribute(feet.uid, "exp")
 local chckc = getItemAttribute(feet.uid, "level")
 
 local summons = getPlayerPokemons(cid)
 if #summons == 0 then
 return true
 end
 
 if getItemAttribute(feet.uid, "level") == levelMax then 
 return true
 end
 
 if getTileInfo(getThingPos(cid)).pvp then 
 return true
 end
 
 if getPlayerStorageValue(cid, 990) > 0 then
 return true
 end
 
 if isSummon(cid) and getCreatureStorage(cid,10) == "guardian" then
 return true
 end
 
 local pk = getPlayerPokemons(cid)[1]
 
 if isPlayer(cid) == TRUE and isSummon(target) == true then
 doPlayerSendCancel(cid, "Your Pokemon dont gain experience in Duel")
 return TRUE
 end
 ---------------------------------------------------------------- level 1 ----------------------------------------------------------------
 if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == False then
 return true
 end
 
 local level = getItemAttribute(feet.uid, "level")
 local exp = getItemAttribute(feet.uid, "exp")
 local pk = getPlayerPokemons(cid)[1]
 
 if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") < levelMax and getItemAttribute(feet.uid, "exp") >= 0 and (Buceta.exp + exp) < (level * expStart) + (expStart *(level - 1)) then
 doItemSetAttribute(feet.uid, "exp", chck +Buceta.exp) 
 doPlayerSendTextMessage(cid, 25, "Seu "..getPokeName(getPlayerPokemons(cid)[1]).." ganhou ".. Buceta.exp.." de experiência por derrotar "..getCreatureName(target)..".")
 return true
 end

 if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") < levelMax and (Buceta.exp + exp) >= (level * expStart) + (expStart *(level - 1)) then

 doPlayerSendTextMessage(cid, 25, "Seu "..getCreatureName(getPlayerPokemons(cid)[1]).." avançou do nível "..level.." para o nível "..level + 1 ..".")
 doItemSetAttribute(feet.uid, "level", level +1) 
 doItemSetAttribute(feet.uid, "exp", 0)
 doSendAnimatedText(getCreaturePosition(getPlayerPokemons(cid)[1]), "LEVEL UP!", 215) 
 doSendMagicEffect(getCreaturePosition(getPlayerPokemons(cid)[1]), 211) 
 adjustStatus(pk, feet.uid, true, true, true)
 doUpdatePokemonsBar(cid)
 return true
 end
 ------------------------------------------------------------------------------------------------------------------------------------------
 ------------------------------------------------------------------------------------------------------------------------------------------
 
 end

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...