Ir para conteúdo

[Encerrado] Bug Arena Pokemon


RodriigoRobson

Posts Recomendados

Eae galera boa tarde . Esta dando erro no meu script de Pokelevel .Eu quero que o pokemon mata o player na area pvp so que esta dando um erro . alguem pode me ajuda

Quando eu Mato o player Inimigo dentro da arena pvp ele fica com 0 de life e vai perdendo level mais nao morrre ai da esse erro logo abaixo \/ . Se alguem me ajudar Rep++

 

obs: Nao é script de PDA

 

ERRO:

 

[14/10/2013 16:48:11] [Error - CreatureScript Interface]
[14/10/2013 16:48:11] data/creaturescripts/scripts/lvl.lua:onKill
[14/10/2013 16:48:11] Description:
[14/10/2013 16:48:11] data/creaturescripts/scripts/lvl.lua:431: attempt to index local 'tab' (a nil value)
[14/10/2013 16:48:11] stack traceback:
[14/10/2013 16:48:11] data/creaturescripts/scripts/lvl.lua:431: in function

 

 

Script:

 

local rate = 20
local baserate = 10

local tabi = {
[1] = {exp = 0},
[2] = {exp = 100},
[3] = {exp = 200},
[4] = {exp = 400},
[5] = {exp = 800},
[6] = {exp = 1500},
[7] = {exp = 2600},
[8] = {exp = 4200},
[9] = {exp = 6400},
[10] = {exp = 9300},
[11] = {exp = 13000},
[12] = {exp = 17600},
[13] = {exp = 23200},
[14] = {exp = 29900},
[15] = {exp = 37800},
[16] = {exp = 47000},
[17] = {exp = 57600},
[18] = {exp = 69700},
[19] = {exp = 83400},
[20] = {exp = 98800},
[21] = {exp = 116000},
[22] = {exp = 135100},
[23] = {exp = 156200},
[24] = {exp = 179400},
[25] = {exp = 204800},
[26] = {exp = 232500},
[27] = {exp = 262600},
[28] = {exp = 295200},
[29] = {exp = 330400},
[30] = {exp = 368300},
[31] = {exp = 409000},
[32] = {exp = 452600},
[33] = {exp = 499200},
[34] = {exp = 548900},
[35] = {exp = 601800},
[36] = {exp = 658000},
[37] = {exp = 717600},
[38] = {exp = 780700},
[39] = {exp = 847400},
[40] = {exp = 917800},
[41] = {exp = 992000},
[42] = {exp = 1070100},
[43] = {exp = 1152200},
[44] = {exp = 1238400},
[45] = {exp = 1328800},
[46] = {exp = 1423500},
[47] = {exp = 1522600},
[48] = {exp = 1626200},
[49] = {exp = 1734400},
[50] = {exp = 1847300},
[51] = {exp = 1965000},
[52] = {exp = 2087600},
[53] = {exp = 2215200},
[54] = {exp = 2347900},
[55] = {exp = 2485800},
[56] = {exp = 2629000},
[57] = {exp = 2777600},
[58] = {exp = 2931700},
[59] = {exp = 3091400},
[60] = {exp = 3256800},
[61] = {exp = 3428000},
[62] = {exp = 3605100},
[63] = {exp = 3788200},
[64] = {exp = 3977400},
[65] = {exp = 4172800},
[66] = {exp = 4374500},
[67] = {exp = 4582600},
[68] = {exp = 4797200},
[69] = {exp = 5018400},
[70] = {exp = 5246300},
[71] = {exp = 5481000},
[72] = {exp = 5722600},
[73] = {exp = 5971200},
[74] = {exp = 6226900},
[75] = {exp = 6489800},
[76] = {exp = 6760000},
[77] = {exp = 7037600},
[78] = {exp = 7322700},
[79] = {exp = 7615400},
[80] = {exp = 7915800},
[81] = {exp = 8224000},
[82] = {exp = 8540100},
[83] = {exp = 8864200},
[84] = {exp = 9196400},
[85] = {exp = 9536800},
[86] = {exp = 9885500},
[87] = {exp = 10242600},
[88] = {exp = 10608200},
[89] = {exp = 10982400},
[90] = {exp = 11365300},
[91] = {exp = 11757000},
[92] = {exp = 12157600},
[93] = {exp = 12567200},
[94] = {exp = 12985900},
[95] = {exp = 13413800},
[96] = {exp = 13851000},
[97] = {exp = 14297600},
[98] = {exp = 14753700},
[99] = {exp = 15219400},
[100] = {exp = 15694800},
}

local kkkkk = {
["Abra"] = {exp = 700},
["Aerodactyl"] = {exp = 4200},
["Alakazam"] = {exp = 3080},
["Arbok"] = {exp = 1070},
["Arcanine"] = {exp = 1400},
["Articuno"] = {exp = 800},
["Beedrill"] = {exp = 1400},
["Bellsprout"] = {exp = 490},
["Blastoise"] = {exp = 4100},
["Shiny Bulbasaur"] = {exp = 1080},
["Bulbasaur"] = {exp = 1080},
["Butterfree"] = {exp = 1340},
["Caterpie"] = {exp = 350},
["Chansey"] = {exp = 1480},
["Charmander"] = {exp = 1070},
["Charmeleon"] = {exp = 2140},
["Charizard"] = {exp = 4270},
["Clefable"] = {exp = 1480},
["Clefairy"] = {exp = 770},
["Cloyster"] = {exp = 1370},
["Crystal Onix"] = {exp = 700},
["Cubone"] = {exp = 490},
["Dewgong"] = {exp = 1370},
["Diglett"] = {exp = 490},
["Ditto"] = {exp = 480},
["Dodrio"] = {exp = 1470},
["Doduo"] = {exp = 770},
["Dragonair"] = {exp = 1470},
["Dragonite"] = {exp = 3570},
["Dratini"] = {exp = 770},
["Drowzee"] = {exp = 770},
["Dugtrio"] = {exp = 1470},
["Eevee"] = {exp = 2870},
["Ekans"] = {exp = 400},
["Elder Charizard"] = {exp = 870},
["Electabuzz"] = {exp = 4270},
["Electrode"] = {exp = 4270},
["Exeggcute"] = {exp = 370},
["Exeggutor"] = {exp = 2170},
["Farfetchd"] = {exp = 1270},
["Fearow"] = {exp = 1470},
["Flareon"] = {exp = 1170},
["Gastly"] = {exp = 770},
["Gengar"] = {exp = 4072},
["Geodude"] = {exp = 490},
["Gloom"] = {exp = 1200},
["Golbat"] = {exp = 1470},
["Goldeen"] = {exp = 390},
["Golduck"] = {exp = 1270},
["Golem"] = {exp = 2870},
["Graveler"] = {exp = 970},
["Grimer"] = {exp = 480},
["Growlithe"] = {exp = 870},
["Gyarados"] = {exp = 4070},
["Haunter"] = {exp = 2170},
["Hitmonchan"] = {exp = 3570},
["Hitmonlee"] = {exp = 670},
["Horsea"] = {exp = 490},
["Hypno"] = {exp = 2870},
["Ivysaur"] = {exp = 1870},
["Jigglypuff"] = {exp = 1470},
["Jolteon"] = {exp = 370},
["Jynx"] = {exp = 2870},
["Kabuto"] = {exp = 370},
["Kabutops"] = {exp = 570},
["Kadabra"] = {exp = 2870},
["Kakuna"] = {exp = 520},
["Kangaskhan"] = {exp = 3870},
["Kingler"] = {exp = 970},
["Koffing"] = {exp = 570},
["Krabby"] = {exp = 470},
["Lapras"] = {exp = 2870},
["Lickitung"] = {exp = 270},
["Machamp"] = {exp = 2870},
["Machoke"] = {exp = 1470},
["Machop"] = {exp = 670},
["Magikarp"] = {exp = 97},
["Magmar"] = {exp = 3570},
["Magnemite"] = {exp = 480},
["Magneton"] = {exp = 1470},
["Mankey"] = {exp = 500},
["Marowak"] = {exp = 1070},
["Meowth"] = {exp = 480},
["Metapod"] = {exp = 600},
["Mew"] = {exp = 870},
["Mewtwo"] = {exp = 970},
["Moltres"] = {exp = 870},
["Mr Mime"] = {exp = 3570},
["Muk"] = {exp = 1470},
["Nidoking"] = {exp = 3070},
["Nidoqueen"] = {exp = 2870},
["Nidoran Female"] = {exp = 500},
["Nidorin Male"] = {exp = 900},
["Nidorino"] = {exp = 900},
["Ninetales"] = {exp = 2070},
["Oddish"] = {exp = 480},
["Omanyte"] = {exp = 1470},
["Omastar"] = {exp = 170},
["Onix"] = {exp = 2870},
["Paras"] = {exp = 500},
["Parasect"] = {exp = 1470},
["Persian"] = {exp = 970},
["Pidgeot"] = {exp = 2170},
["Pidgeotto"] = {exp = 770},
["Pidgey"] = {exp = 490},
["Pikachu"] = {exp = 1470},
["Pinsir"] = {exp = 2170},
["Poliwag"] = {exp = 400},
["Poliwhirl"] = {exp = 1470},
["Poliwrath"] = {exp = 2870},
["Ponyta"] = {exp = 770},
["Porygon"] = {exp = 4670},
["Primeape"] = {exp = 2170},
["Psyduck"] = {exp = 770},
["Raichu"] = {exp = 2170},
["Rapidash"] = {exp = 2870},
["Raticate"] = {exp = 2870},
["Rattata"] = {exp = 280},
["Rhydon"] = {exp = 3070},
["Rhyhorn"] = {exp = 1070},
["Sandshrew"] = {exp = 480},
["Sandslash"] = {exp = 2870},
["Scyther"] = {exp = 5670},
["Seadra"] = {exp = 2170},
["Seaking"] = {exp = 900},
["Seel"] = {exp = 750},
["Shellder"] = {exp = 490},
["Slowbro"] = {exp = 970},
["Slowpoke"] = {exp = 470},
["Snorlax"] = {exp = 5670},
["Spearow"] = {exp = 470},
["Squirtle"] = {exp = 1080},
["Starmie"] = {exp = 2170},
["Staryu"] = {exp = 470},
["Tangela"] = {exp = 1470},
["Tauros"] = {exp = 870},
["Tentacool"] = {exp = 470},
["Tentacruel"] = {exp = 2170},
["Vaporeon"] = {exp = 270},
["Venomoth"] = {exp = 1370},
["Venonat"] = {exp = 520},
["Venusaur"] = {exp = 4070},
["Victreebel"] = {exp = 3570},
["Vileplume"] = {exp = 2870},
["Voltorb"] = {exp = 470},
["Vulpix"] = {exp = 670},
["Wartortle"] = {exp = 2800},
["Weedle"] = {exp = 470},
["Weepinbell"] = {exp = 1470},
["Weezing"] = {exp = 670},
["Wigglytuff"] = {exp = 2170},
["Zapdos"] = {exp = 870},
["Zubat"] = {exp = 470},
["Shiny Abra"] = {exp = 700},
["Shiny Aerodactyl"] = {exp = 4200},
["Shiny Alakazam"] = {exp = 3080},
["Shiny Arbok"] = {exp = 1070},
["Shiny Arcanine"] = {exp = 1400},
["Shiny Articuno"] = {exp = 800},
["Shiny Beedrill"] = {exp = 1400},
["Shiny Bellsprout"] = {exp = 490},
["Shiny Blastoise"] = {exp = 4100},
["Shiny Bulbasaur"] = {exp = 1080},
["Shiny Butterfree"] = {exp = 1340},
["Shiny Caterpie"] = {exp = 350},
["Shiny Chansey"] = {exp = 1480},
["Shiny Charmander"] = {exp = 1070},
["Shiny Charmeleon"] = {exp = 2140},
["Shiny Charizard"] = {exp = 4270},
["Shiny Clefable"] = {exp = 1480},
["Shiny Clefairy"] = {exp = 770},
["Shiny Cloyster"] = {exp = 1370},
["Shiny Crystal Onix"] = {exp = 700},
["Shiny Cubone"] = {exp = 490},
["Shiny Dewgong"] = {exp = 1370},
["Shiny Diglett"] = {exp = 490},
["Shiny Ditto"] = {exp = 480},
["Shiny Dodrio"] = {exp = 1470},
["Shiny Doduo"] = {exp = 770},
["Shiny Dragonair"] = {exp = 1470},
["Shiny Dragonite"] = {exp = 3570},
["Shiny Dratini"] = {exp = 770},
["Shiny Drowzee"] = {exp = 770},
["Shiny Dugtrio"] = {exp = 1470},
["Shiny Eevee"] = {exp = 2870},
["Shiny Ekans"] = {exp = 400},
["Shiny Electabuzz"] = {exp = 4270},
["Shiny Electrode"] = {exp = 4270},
["Shiny Exeggcute"] = {exp = 370},
["Shiny Exeggutor"] = {exp = 2170},
["Shiny Farfetchd"] = {exp = 1270},
["Shiny Fearow"] = {exp = 1470},
["Shiny Flareon"] = {exp = 1170},
["Shiny Gastly"] = {exp = 770},
["Shiny Gengar"] = {exp = 4072},
["Shiny Geodude"] = {exp = 490},
["Shiny Gloom"] = {exp = 1200},
["Shiny Golbat"] = {exp = 1470},
["Shiny Goldeen"] = {exp = 390},
["Shiny Golduck"] = {exp = 1270},
["Shiny Golem"] = {exp = 2870},
["Shiny Graveler"] = {exp = 970},
["Shiny Grimer"] = {exp = 480},
["Shiny Growlithe"] = {exp = 870},
["Shiny Gyarados"] = {exp = 4070},
["Shiny Haunter"] = {exp = 2170},
["Shiny Hitmonchan"] = {exp = 3570},
["Shiny Hitmonlee"] = {exp = 670},
["Shiny Horsea"] = {exp = 490},
["Shiny Hypno"] = {exp = 2870},
["Shiny Ivysaur"] = {exp = 1870},
["Shiny Jigglypuff"] = {exp = 1470},
["Shiny Jolteon"] = {exp = 370},
["Shiny Jynx"] = {exp = 2870},
["Shiny Kabuto"] = {exp = 370},
["Shiny Kabutops"] = {exp = 570},
["Shiny Kadabra"] = {exp = 2870},
["Shiny Kakuna"] = {exp = 520},
["Shiny Kangaskhan"] = {exp = 3870},
["Shiny Kingler"] = {exp = 970},
["Shiny Koffing"] = {exp = 570},
["Shiny Krabby"] = {exp = 470},
["Shiny Lapras"] = {exp = 2870},
["Shiny Lickitung"] = {exp = 270},
["Shiny Machamp"] = {exp = 2870},
["Shiny Machoke"] = {exp = 1470},
["Shiny Machop"] = {exp = 670},
["Shiny Magikarp"] = {exp = 97},
["Shiny Magmar"] = {exp = 3570},
["Shiny Magnemite"] = {exp = 480},
["Shiny Magneton"] = {exp = 1470},
["Shiny Mankey"] = {exp = 500},
["Shiny Marowak"] = {exp = 1070},
["Shiny Meowth"] = {exp = 480},
["Shiny Metapod"] = {exp = 600},
["Shiny Mew"] = {exp = 870},
["Shiny Mewtwo"] = {exp = 970},
["Shiny Moltres"] = {exp = 870},
["Shiny Mr Mime"] = {exp = 3570},
["Shiny Muk"] = {exp = 1470},
["Shiny Nidoking"] = {exp = 3070},
["Shiny Nidoqueen"] = {exp = 2870},
["Shiny Nidoran Female"] = {exp = 500},
["Shiny Nidorin Male"] = {exp = 900},
["Shiny Nidorino"] = {exp = 900},
["Shiny Ninetales"] = {exp = 2070},
["Shiny Oddish"] = {exp = 480},
["Shiny Omanyte"] = {exp = 1470},
["Shiny Omastar"] = {exp = 170},
["Shiny Onix"] = {exp = 2870},
["Shiny Paras"] = {exp = 500},
["Shiny Parasect"] = {exp = 1470},
["Shiny Persian"] = {exp = 970},
["Shiny Pidgeot"] = {exp = 2170},
["Shiny Pidgeotto"] = {exp = 770},
["Shiny Pidgey"] = {exp = 490},
["Shiny Pikachu"] = {exp = 1470},
["Shiny Pinsir"] = {exp = 2170},
["Shiny Poliwag"] = {exp = 400},
["Shiny Poliwhirl"] = {exp = 1470},
["Shiny Poliwrath"] = {exp = 2870},
["Shiny Ponyta"] = {exp = 770},
["Shiny Porygon"] = {exp = 4670},
["Shiny Primeape"] = {exp = 2170},
["Shiny Psyduck"] = {exp = 770},
["Shiny Raichu"] = {exp = 2170},
["Shiny Rapidash"] = {exp = 2870},
["Shiny Raticate"] = {exp = 2870},
["Shiny Rattata"] = {exp = 280},
["Shiny Rhydon"] = {exp = 3070},
["Shiny Rhyhorn"] = {exp = 1070},
["Shiny Sandshrew"] = {exp = 480},
["Shiny Sandslash"] = {exp = 2870},
["Shiny Scyther"] = {exp = 5670},
["Shiny Seadra"] = {exp = 2170},
["Shiny Seaking"] = {exp = 900},
["Shiny Seel"] = {exp = 750},
["Shiny Shellder"] = {exp = 490},
["Shiny Slowbro"] = {exp = 970},
["Shiny Slowpoke"] = {exp = 470},
["Shiny Snorlax"] = {exp = 5670},
["Shiny Spearow"] = {exp = 470},
["Shiny Squirtle"] = {exp = 1080},
["Shiny Starmie"] = {exp = 2170},
["Shiny Staryu"] = {exp = 470},
["Shiny Tangela"] = {exp = 1470},
["Shiny Tauros"] = {exp = 870},
["Shiny Tentacool"] = {exp = 470},
["Shiny Tentacruel"] = {exp = 2170},
["Shiny Vaporeon"] = {exp = 270},
["Shiny Venomoth"] = {exp = 1370},
["Shiny Venonat"] = {exp = 520},
["Shiny Venusaur"] = {exp = 4070},
["Shiny Victreebel"] = {exp = 3570},
["Shiny Vileplume"] = {exp = 2870},
["Shiny Voltorb"] = {exp = 470},
["Shiny Vulpix"] = {exp = 670},
["Shiny Wartortle"] = {exp = 2800},
["Shiny Weedle"] = {exp = 470},
["Shiny Weepinbell"] = {exp = 1470},
["Shiny Weezing"] = {exp = 670},
["Shiny Wigglytuff"] = {exp = 2170},
["Shiny Zapdos"] = {exp = 870},
["Shiny Zubat"] = {exp = 470},
}

function onKill(cid, target)
if isPlayer(cid) and isSummon(target) == true then
doSendMagicEffect(getThingPos(cid), 233)
doPlayerAddItem(cid,2160,5)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ORANGE,"Voce Ganhou [5] HD Por Kill Pokemon")
doSendAnimatedText(getCreaturePosition(cid), "WINNNN!", math.random(1,300))
setPlayerStorageValue(cid,19999,getPlayerStorageValue(cid,19999)+1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ORANGE,"Voce Tem ["..(getPlayerStorageValue(cid,19999) + 1).."] PVP/SCORES.")
return TRUE
end
end
local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
local chck = getItemAttribute(feet.uid, "levell")
local pokems = getItemAttribute(feet.uid, "poke"):sub(9, findLetter(getItemAttribute(feet.uid, "poke"), "'")-1)
local chckc = getItemAttribute(feet.uid, "level")
local tab = kkkkk[getCreatureName(target)]
local exprate = rate *tab.exp

--------------------------------------- levels ---------------------------------------------------------
local lvl = getItemAttribute(feet.uid, "level")
local gender = getCreatureSkull(getCreatureSummons(cid)[1])

local box = {
[1] ={msg = "Y",nm= 'female'},
[2] ={msg = "Y",nm= 'male'},
[3] ={msg = "Y",nm= 'male'},
[5] ={msg = "Y",nm= 'sexless'},
}

local forca = {
[1] ={msg = "Y",nm= '[1]'},
[2] ={msg = "Y",nm= '[2]'},
[3] ={msg = "Y",nm= '[3]'},
[4] ={msg = "Y",nm= '[4]'},
[5] ={msg = "Y",nm= '[5]'},
[6] ={msg = "Y",nm= '[6]'},
[7] ={msg = "Y",nm= '[7]'},
[8] ={msg = "Y",nm= '[8]'},
[9] ={msg = "Y",nm= '[9]'},
[10] ={msg = "Y",nm= '[10]'},
[11] ={msg = "Y",nm= '[11]'},
[12] ={msg = "Y",nm= '[12]'},
[13] ={msg = "Y",nm= '[13]'},
[14] ={msg = "Y",nm= '[14]'},
[15] ={msg = "Y",nm= '[15]'},
[16] ={msg = "Y",nm= '[16]'},
[17] ={msg = "Y",nm= '[17]'},
[18] ={msg = "Y",nm= '[18]'},
[19] ={msg = "Y",nm= '[19]'},
[20] ={msg = "Y",nm= '[20]'},
[21] ={msg = "Y",nm= '[21]'},
[22] ={msg = "Y",nm= '[22]'},
[23] ={msg = "Y",nm= '[23]'},
[24] ={msg = "Y",nm= '[24]'},
[25] ={msg = "Y",nm= '[25]'},
[26] ={msg = "Y",nm= '[26]'},
[27] ={msg = "Y",nm= '[27]'},
[28] ={msg = "Y",nm= '[28]'},
[29] ={msg = "Y",nm= '[29]'},
[30] ={msg = "Y",nm= '[30]'},
[31] ={msg = "Y",nm= '[31]'},
[32] ={msg = "Y",nm= '[32]'},
[33] ={msg = "Y",nm= '[33]'},
[34] ={msg = "Y",nm= '[34]'},
[35] ={msg = "Y",nm= '[35]'},
[36] ={msg = "Y",nm= '[36]'},
[37] ={msg = "Y",nm= '[37]'},
[38] ={msg = "Y",nm= '[38]'},
[39] ={msg = "Y",nm= '[39]'},
[40] ={msg = "Y",nm= '[40]'},
[41] ={msg = "Y",nm= '[41]'},
[42] ={msg = "Y",nm= '[42]'},
[43] ={msg = "Y",nm= '[43]'},
[44] ={msg = "Y",nm= '[44]'},
[45] ={msg = "Y",nm= '[45]'},
[46] ={msg = "Y",nm= '[46]'},
[47] ={msg = "Y",nm= '[47]'},
[48] ={msg = "Y",nm= '[48]'},
[49] ={msg = "Y",nm= '[49]'},
[50] ={msg = "Y",nm= '[50]'},
[51] ={msg = "Y",nm= '[51]'},
[52] ={msg = "Y",nm= '[52]'},
[53] ={msg = "Y",nm= '[53]'},
[54] ={msg = "Y",nm= '[54]'},
[55] ={msg = "Y",nm= '[55]'},
[56] ={msg = "Y",nm= '[56]'},
[57] ={msg = "Y",nm= '[57]'},
[58] ={msg = "Y",nm= '[58]'},
[59] ={msg = "Y",nm= '[59]'},
[60] ={msg = "Y",nm= '[60]'},
[61] ={msg = "Y",nm= '[61]'},
[62] ={msg = "Y",nm= '[62]'},
[63] ={msg = "Y",nm= '[63]'},
[64] ={msg = "Y",nm= '[64]'},
[65] ={msg = "Y",nm= '[65]'},
[66] ={msg = "Y",nm= '[66]'},
[67] ={msg = "Y",nm= '[67]'},
[68] ={msg = "Y",nm= '[68]'},
[69] ={msg = "Y",nm= '[69]'},
[70] ={msg = "Y",nm= '[70]'},
[71] ={msg = "Y",nm= '[71]'},
[72] ={msg = "Y",nm= '[72]'},
[73] ={msg = "Y",nm= '[73]'},
[74] ={msg = "Y",nm= '[74]'},
[75] ={msg = "Y",nm= '[75]'},
[76] ={msg = "Y",nm= '[76]'},
[77] ={msg = "Y",nm= '[77]'},
[78] ={msg = "Y",nm= '[78]'},
[79] ={msg = "Y",nm= '[79]'},
[80] ={msg = "Y",nm= '[80]'},
[81] ={msg = "Y",nm= '[81]'},
[82] ={msg = "Y",nm= '[82]'},
[83] ={msg = "Y",nm= '[83]'},
[84] ={msg = "Y",nm= '[84]'},
[85] ={msg = "Y",nm= '[85]'},
[86] ={msg = "Y",nm= '[86]'},
[87] ={msg = "Y",nm= '[87]'},
[88] ={msg = "Y",nm= '[88]'},
[89] ={msg = "Y",nm= '[89]'},
[90] ={msg = "Y",nm= '[90]'},
[91] ={msg = "Y",nm= '[91]'},
[92] ={msg = "Y",nm= '[92]'},
[93] ={msg = "Y",nm= '[93]'},
[94] ={msg = "Y",nm= '[94]'},
[95] ={msg = "Y",nm= '[95]'},
[96] ={msg = "Y",nm= '[96]'},
[97] ={msg = "Y",nm= '[97]'},
[98] ={msg = "Y",nm= '[98]'},
[99] ={msg = "Y",nm= '[99]'},
[100] ={msg = "Y",nm= '[100]'},
}

CONFIG = {
[1] = {message = "Seu Pokemon ["..pokems.."] Upou de Level Parabens!", color = 21},
[2] = {message = "Seu Pokemon ["..pokems.."] Upou de Level Parabens!", color = 21},
}




getRandom = math.random(1, #CONFIG)
local roca = forca[getItemAttribute(feet.uid, "level")]

local lvl = getItemAttribute(feet.uid, "level")
local nlvl = getItemAttribute(feet.uid, "natlvl") -1

local e = box[gender]

local pokelevel = getItemAttribute(feet.uid, "level")
local extrabase = pokelevel*100
local ini2 = pokelevel*baserate
local needexp = ini2+extrabase
local pokean = getItemAttribute(feet.uid, "level")+1


local expadd = math.random(1,359)

local expneeded = tabi[getItemAttribute(feet.uid, "level")]
local expneed = expneeded.exp/2
local tuis = chck+expadd
local restante = chck +exprate +expadd
local restate = expneed-restante

if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "levell") +exprate +expadd >= expneed and getItemAttribute(feet.uid, "level") then
local tab = kkkkk[getCreatureName(target)]
if tab then
doItemSetAttribute(feet.uid, "level", chckc +1)
doItemSetAttribute(feet.uid, "levell", 1)
doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), "Level Up", 215)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 170)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, CONFIG[getRandom].message)
doItemSetAttribute(feet.uid, "description", "This ball carries a "..e.nm.." "..getItemAttribute(feet.uid, "poke"):sub(9, findLetter(getItemAttribute(feet.uid, "poke"), "'")-1)..". Level: "..roca.nm..".")
doPlayerSave(cid, true)
local jui = getCreatureSummons(cid)[1]
doCreatureAddHealth(jui, getCreatureMaxHealth(jui)-getCreatureHealth(jui))

return true
end
end

if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") <= 99 and getItemAttribute(feet.uid, "levell") >= 0 and getItemAttribute(feet.uid, "levell") <= expneed then
local tab = kkkkk[getCreatureName(target)]
if tab then
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Seu pokemon "..pokems.." ["..getItemAttribute(feet.uid, "level").."] Ganhou "..exprate +expadd.." de experiencia Exp: ["..chck +exprate +expadd .."/"..expneed.."]")
doItemSetAttribute(feet.uid, "levell", chck +exprate +expadd)

return true
end
end

-------------------------------------- level 99 ---------------------------------------------------
if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == 100 then
return true
end
end

 

 

obs: se nao conseguirem arrumar pra ele morre faz para puxar o jogador para o templo

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

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

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

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