Ir para conteúdo

[Encerrado] [Suporte] Pokemon Morre Ao Sair Da Ball


LordErus

Posts Recomendados

Alguns pokemon, assim que eu cliko pra ee sair da poke ball ele ja morre =x

alguem sabe me explika porque, e com posso arrumar?

muito obrigado.

ahh uso pokemon dash

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...

AA RESOLVI TOMA AKI O SCRIPT CERTO DO ACTIONS/SCRIPT/GOBACK.LUA

local pokes = {

["Bulbasaur"] = {level = 21, cons = 1, vida = 1211},

["Ivysaur"] = {level = 41, cons = 1, vida = 2611},

["Venusaur"] = {level = 85, cons = 1, vida = 5211},

["Charmander"] = {level = 21, cons = 1, vida = 971},

["Charmeleon"] = {level = 41, cons = 1, vida = 2911},

["Charizard"] = {level = 85, cons = 1, vida = 5211},

["Squirtle"] = {level = 21, cons = 1, vida = 1351},

["Wartortle"] = {level = 41, cons = 1, vida = 2811},

["Blastoise"] = {level = 85, cons = 1, vida = 5911},

["Caterpie"] = {level = 1, cons = 1, vida = 311},

["Metapod"] = {level = 11, cons = 1, vida = 1111},

["Butterfree"] = {level = 31, cons = 1, vida = 2111},

["Weedle"] = {level = 1, cons = 1, vida = 325},

["Kakuna"] = {level = 11, cons = 1, vida = 911},

["Beedrill"] = {level = 31, cons = 1, vida = 1911},

["Pidgey"] = {level = 1, cons = 1, vida = 381},

["Pidgeotto"] = {level = 21, cons = 1, vida = 1411},

["Pidgeot"] = {level = 65, cons = 1, vida = 3811},

["Rattata"] = {level = 1, cons = 1, vida = 351},

["Raticate"] = {level = 21, cons = 1, vida = 911},

["Spearow"] = {level = 5, cons = 1, vida = 451},

["Fearow"] = {level = 51, cons = 1, vida = 3311},

["Ekans"] = {level = 12, cons = 1, vida = 611},

["Arbok"] = {level = 31, cons = 1, vida = 2911},

["Pikachu"] = {level = 21, cons = 1, vida = 911},

["Raichu"] = {level = 51, cons = 1, vida = 3211},

["Sandshrew"] = {level = 18, cons = 1, vida = 711},

["Sandslash"] = {level = 55, cons = 1, vida = 3411},

["Nidoran Female"] = {level = 11, cons = 1, vida = 611},

["Nidorina"] = {level = 25, cons = 1, vida = 2111},

["Nidoqueen"] = {level = 65, cons = 1, vida = 4211},

["Nidoran Male"] = {level = 11, cons = 1, vida = 651},

["Nidorino"] = {level = 25, cons = 1, vida = 2511},

["Nidoking"] = {level = 65, cons = 1, vida = 4811},

["Clefairy"] = {level = 11, cons = 1, vida = 611},

["Clefable"] = {level = 35, cons = 1, vida = 2411},

["Vulpix"] = {level = 21, cons = 1, vida = 681},

["Ninetales"] = {level = 65, cons = 1, vida = 3411},

["Jigglypuff"] = {level = 11, cons = 1, vida = 551},

["Wigglytuff"] = {level = 42, cons = 1, vida = 2911},

["Zubat"] = {level = 5, cons = 1, vida = 451},

["Golbat"] = {level = 31, cons = 1, vida = 1911},

["Oddish"] = {level = 5, cons = 1, vida = 341},

["Gloom"] = {level = 18, cons = 1, vida = 1411},

["Vileplume"] = {level = 51, cons = 1, vida = 3311},

["Paras"] = {level = 1, cons = 1, vida = 851},

["Parasect"] = {level = 51, cons = 1, vida = 3811},

["Venonat"] = {level = 18, cons = 1, vida = 1351},

["Venomoth"] = {level = 51, cons = 1, vida = 3851},

["Diglett"] = {level = 5, cons = 1, vida = 911},

["Dugtrio"] = {level = 35, cons = 1, vida = 3451},

["Meowth"] = {level = 12, cons = 1, vida = 951},

["Persian"] = {level = 25, cons = 1, vida = 2251},

["Psyduck"] = {level = 12, cons = 1, vida = 951},

["Golduck"] = {level = 55, cons = 1, vida = 4111},

["Mankey"] = {level = 11, cons = 1, vida = 1151},

["Primeape"] = {level = 45, cons = 1, vida = 4511},

["Growlithe"] = {level = 21, cons = 1, vida = 1111},

["Arcanine"] = {level = 81, cons = 1, vida = 6811},

["Poliwag"] = {level = 5, cons = 1, vida = 411},

["Poliwhirl"] = {level = 21, cons = 1, vida = 1211},

["Poliwrath"] = {level = 65, cons = 1, vida = 4411},

["Abra"] = {level = 11, cons = 1, vida = 621},

["Kadabra"] = {level = 51, cons = 1, vida = 2511},

["Alakazam"] = {level = 81, cons = 1, vida = 4111},

["Machop"] = {level = 18, cons = 1, vida = 1111},

["Machoke"] = {level = 41, cons = 1, vida = 3511},

["Machamp"] = {level = 65, cons = 1, vida = 7511},

["Bellsprout"] = {level = 5, cons = 1, vida = 421},

["Weepinbell"] = {level = 18, cons = 1, vida = 1111},

["Victreebel"] = {level = 51, cons = 1, vida = 4111},

["Tentacool"] = {level = 12, cons = 1, vida = 1151},

["Tentacruel"] = {level = 71, cons = 1, vida = 7151},

["Geodude"] = {level = 15, cons = 1, vida = 711},

["Graveler"] = {level = 41, cons = 1, vida = 3111},

["Golem"] = {level = 71, cons = 1, vida = 6511},

["Ponyta"] = {level = 21, cons = 1, vida = 1411},

["Rapidash"] = {level = 61, cons = 1, vida = 5511},

["Slowpoke"] = {level = 12, cons = 1, vida = 1211},

["Slowbro"] = {level = 45, cons = 1, vida = 4611},

["Magnemite"] = {level = 15, cons = 1, vida = 451},

["Magneton"] = {level = 41, cons = 1, vida = 1751},

["Farfetchd"] = {level = 41, cons = 1, vida = 3111},

["Doduo"] = {level = 12, cons = 1, vida = 611},

["Dodrio"] = {level = 45, cons = 1, vida = 2651},

["Seel"] = {level = 21, cons = 1, vida = 1111},

["Dewgong"] = {level = 65, cons = 1, vida = 5211},

["Grimer"] = {level = 12, cons = 1, vida = 611},

["Muk"] = {level = 31, cons = 1, vida = 2411},

["Shellder"] = {level = 5, cons = 1, vida = 811},

["Cloyster"] = {level = 65, cons = 1, vida = 5111},

["Gastly"] = {level = 18, cons = 1, vida = 1111},

["Haunter"] = {level = 45, cons = 1, vida = 3111},

["Gengar"] = {level = 81, cons = 1, vida = 7111},

["Onix"] = {level = 51, cons = 1, vida = 5311},

["Drowzee"] = {level = 22, cons = 1, vida = 1151},

["Hypno"] = {level = 51, cons = 1, vida = 4611},

["Krabby"] = {level = 5, cons = 1, vida = 851},

["Kingler"] = {level = 35, cons = 1, vida = 3251},

["Voltorb"] = {level = 14, cons = 1, vida = 621},

["Electrode"] = {level = 38, cons = 1, vida = 2111},

["Exeggcute"] = {level = 8, cons = 1, vida = 811},

["Exeggutor"] = {level = 48, cons = 1, vida = 4111},

["Cubone"] = {level = 18, cons = 1, vida = 1211},

["Marowak"] = {level = 45, cons = 1, vida = 3911},

["Hitmonlee"] = {level = 61, cons = 1, vida = 5511},

["Hitmonchan"] = {level = 61, cons = 1, vida = 5511},

["Lickitung"] = {level = 45, cons = 1, vida = 4811},

["Koffing"] = {level = 15, cons = 1, vida = 911},

["Weezing"] = {level = 31, cons = 1, vida = 2811},

["Rhyhorn"] = {level = 35, cons = 1, vida = 3811},

["Rhydon"] = {level = 65, cons = 1, vida = 7111},

["Chansey"] = {level = 61, cons = 1, vida = 7511},

["Tangela"] = {level = 41, cons = 1, vida = 3511},

["Kangaskhan"] = {level = 61, cons = 1, vida = 7111},

["Horsea"] = {level = 5, cons = 1, vida = 311},

["Seadra"] = {level = 45, cons = 1, vida = 2511},

["Goldeen"] = {level = 11, cons = 1, vida = 951},

["Seaking"] = {level = 25, cons = 1, vida = 2111},

["Staryu"] = {level = 15, cons = 1, vida = 1151},

["Starmie"] = {level = 45, cons = 1, vida = 3811},

["Mr.mime"] = {level = 61, cons = 1, vida = 5511},

["Scyther"] = {level = 71, cons = 1, vida = 6511},

["Jynx"] = {level = 65, cons = 1, vida = 6111},

["Electabuzz"] = {level = 71, cons = 1, vida = 6811},

["Magmar"] = {level = 71, cons = 1, vida = 7211},

["Pinsir"] = {level = 42, cons = 1, vida = 4111},

["Tauros"] = {level = 41, cons = 1, vida = 4211},

["Magikarp"] = {level = 1, cons = 1, vida = 121},

["Gyarados"] = {level = 75, cons = 1, vida = 7811},

["Lapras"] = {level = 71, cons = 1, vida = 7111},

["Ditto"] = {level = 41, cons = 1, vida = 4111},

["Eevee"] = {level = 21, cons = 1, vida = 1511},

["Vaporeon"] = {level = 55, cons = 1, vida = 4511},

["Jolteon"] = {level = 55, cons = 1, vida = 4511},

["Flareon"] = {level = 55, cons = 1, vida = 4511},

["Porygon"] = {level = 45, cons = 1, vida = 111},

["Omanyte"] = {level = 21, cons = 1, vida = 1311},

["Omastar"] = {level = 71, cons = 1, vida = 6111},

["Kabuto"] = {level = 21, cons = 1, vida = 1311},

["Kabutops"] = {level = 71, cons = 1, vida = 6511},

["Aerodactyl"] = {level = 111, cons = 1, vida = 8111},

["Snorlax"] = {level = 85, cons = 1, vida = 9511},

["Articuno"] = {level = 121, cons = 1, vida = 11111},

["Zapdos"] = {level = 121, cons = 1, vida = 11111},

["Moltres"] = {level = 121, cons = 1, vida = 11111},

["Dratini"] = {level = 11, cons = 1, vida = 1211},

["Dragonair"] = {level = 71, cons = 1, vida = 5611},

["Dragonite"] = {level = 111, cons = 1, vida = 11811},

["Mewtwo"] = {level = 111, cons = 1, vida = 8511},

["Mew"] = {level = 111, cons = 1, vida = 7211},

["Crystal Onix"] = {level = 111, cons = 1, vida = 7211},

["Elder Charizard"] = {level = 111, cons = 1, vida = 7211},

}

 

local msgunica = true

local msgunicago1, msgunicaback1 = "Go, doka!", "Come back, doka!"

local msgunicago2, msgunicaback2 = "Let's do it, doka!", "Thanks for helping, doka!"

local msgunicago3, msgunicaback3 = "I choose you, doka!", "That's enough, come back!"

local msgunicago4, msgunicaback4 = "I need your help, doka!", "You were great, doka!"

local msgunicago5, msgunicaback5 = "Let's fight, doka!", "Excellent work, doka!"

local msgunicago6, msgunicaback6 = "It's battle time, doka!", "Well done, doka!"

 

function onUse(cid, item, frompos, item2, topos)

if #getCreatureSummons(cid) >= 1 and getPlayerStorageValue(getCreatureSummons(cid)[1], 33) >= 1 then

return true

end

local random2 = math.random(1,6)

if random2 == 1 then

msgunicaback = msgunicaback1

elseif random2 == 2 then

msgunicaback = msgunicaback2

elseif random2 == 3 then

msgunicaback = msgunicaback3

elseif random2 == 4 then

msgunicaback = msgunicaback4

elseif random2 == 5 then

msgunicaback = msgunicaback5

elseif random2 == 6 then

msgunicaback = msgunicaback6

end

local random = math.random(1,6)

if random == 1 then

msgunicago = msgunicago1

elseif random == 2 then

msgunicago = msgunicago2

elseif random == 3 then

msgunicago = msgunicago3

elseif random == 4 then

msgunicago = msgunicago4

elseif random == 5 then

msgunicago = msgunicago5

elseif random == 6 then

msgunicago = msgunicago6

end

 

if item.itemid == 2222 or item.itemid == 2223 then

gobackeff = 10

elseif item.itemid == 2220 or item.itemid == 2221 then

gobackeff = 191

end

local effect = gobackeff

 

if item.itemid == 2223 or item.itemid == 2221 then

 

if #getCreatureSummons(cid) >= 1 then

local z = getCreatureSummons(cid)[1]

local pokename = getCreatureName(z)

local mbk = msgunicaback:gsub("doka", pokename)

if getItemAttribute(item.uid, "poke"):find(getCreatureName(z)) then

doTransformItem(item.uid, item.itemid-1)

doCreatureSay(cid, mbk, TALKTYPE_SAY)

local summom = getCreatureSummons(cid)

local maxh = pokes[getCreatureName(summom[1])].vida

local pct2 = ((getCreatureHealth(summom[1])) / (getCreatureMaxHealth(summom[1])))

local vids = ((getCreatureHealth(summom[1])) - 2)

doCreatureAddHealth(summom[1], -vids)

setCreatureMaxHealth(summom[1], maxh)

doCreatureAddHealth(summom[1], ((maxh) * (pct2)))

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..getCreatureHealth(z).."/"..getCreatureMaxHealth(z).."]")

setPlayerStorageValue(cid, 61204, 0)

setPlayerStorageValue(cid, 2, 0)

doSendMagicEffect(getCreaturePosition(z), effect)

doRemoveCreature(z)

return true

end

end

 

elseif item.itemid == 2222 or item.itemid == 2220 then

 

if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then

doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")

return TRUE

end

 

 

if not canSummon(cid) then

return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHROOM)

end

 

if getPlayerStorageValue(cid, 63215) >= 1 then

return doPlayerSendCancel(cid, "You can't use pokeball while surfing.")

end

 

if getPlayerStorageValue(cid, 62314) >= 1 then

return doPlayerSendCancel(cid, "You can't use pokeball while flying.")

end

 

if #getCreatureSummons(cid) >= 1 then

return doPlayerSendCancel(cid, "You have already summoned a pokemon.")

end

 

for i,x in pairs(pokes) do

if i == getItemAttribute(item.uid, "poke"):sub(9, findLetter(getItemAttribute(item.uid, "poke"), "'")-1) then

 

if getPlayerLevel(cid) < x.level then

doPlayerSendCancel(cid, "You need level "..x.level.." or higher to use this pokemon.")

return true

end

local removed = doCreateItem(1285, 1, getThingPos(cid))

doSummonMonster(cid, i)

local pk = getCreatureSummons(cid)[1]

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

doRemoveItem(removed, 1)

doCreatureSetLookDir(pk, 2)

local maxh = pokes[getCreatureName(pk)].vida

local levellife = ((getPlayerLevel(cid)) * (pokes[getCreatureName(pk)].cons))

local health = tonumber(getItemAttribute(item.uid, "poke"):match("%[(.-)/"))

doConvinceCreature(cid, pk)

doCreatureAddHealth(pk, health-maxh)

local pct = ((getCreatureHealth(pk)) / (getCreatureMaxHealth(pk)))

local vidis = (getCreatureHealth(pk))

setCreatureMaxHealth(pk, ((maxh) + (levellife)))

doCreatureAddHealth(pk, 2)

doCreatureAddHealth(pk, -vidis)

doCreatureAddHealth(pk, ((getCreatureMaxHealth(pk)) * (pct)) - 2)

doTransformItem(item.uid, item.itemid+1)

local pokename = getCreatureName(getCreatureSummons(cid)[1])

local mgo = msgunicago:gsub("doka", pokename)

doCreatureSay(cid, mgo, TALKTYPE_SAY)

doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")))

doSendMagicEffect(getCreaturePosition(pk), effect)

setPlayerStorageValue(cid, 61204, 1)

registerCreatureEvent(pk, "DiePoke")

registerCreatureEvent(pk, "Exp")

break

end

end

end

return TRUE

end

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

  • 6 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.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...