Ir para conteúdo

[Encerrado] Player não solta o poke


MaxxSilva

Posts Recomendados

quando eu tento jogar o poke nao da somente com o god e no god eu uso um atack e vou na nurse e jogo o poke o attack volta do 0 e quando eu vou com o player falar hi na nurse aparece o seguinte:

03:08 Nurse Joy: Please wait a few moment before asking me to heal your pokemons again!

goback

 

 

local EFFECTS = {
--[OutfitID] = {Effect}
["Magmar"] = 35,
["Jynx"] = 17, --alterado v1.5
["Shiny Jynx"] = 17,
}

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

if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

local owner = getItemAttribute(item.uid, "firstpoke")

if owner and owner ~= getCreatureName(cid) then
doPlayerSendCancel(cid, "This pokemon belongs to "..owner..", it is his first pokemon. Please, give it back to him.")
return true
end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
return true
end
-------------------------------------------------------
ballName = getItemAttribute(item.uid, "poke")

btype = getPokeballType(item.itemid)
usando = pokeballs[btype].use

local effect = pokeballs[btype].effect
if not effect then
effect = 21
end
----------------------------------------------------------
if item.itemid == usando then

if getPlayerStorageValue(cid, 990) == 1 then -- GYM
doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")
return true
end

---------------------------------------------------------------------------------------
if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 637501) >= 1 then
BackTeam(cid, getCreatureSummons(cid)) --<<-- Edited Team Slice system
end
---------------------------------------------------------------------------------------
if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then
doPlayerSendCancel(cid, "You can't do that while is controling a mind")
return true --alterado v1.5
end

if #getCreatureSummons(cid) <= 0 then
if isInArray(pokeballs[btype].all, item.itemid) then
doTransformItem(item.uid, pokeballs[btype].off)
doItemSetAttribute(item.uid, "hp", 0)
doPlayerSendCancel(cid, "This pokemon is fainted.")
return true
end
end

local cd = getCD(item.uid, "blink", 30)
if cd > 0 then
setCD(item.uid, "blink", 0)
end

local z = getCreatureSummons(cid)[1]

if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then
return true
end

doReturnPokemon(cid, z, item, effect)

elseif item.itemid == pokeballs[btype].on 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

local thishp = getItemAttribute(item.uid, "hp")

if thishp <= 0 then
if isInArray(pokeballs[btype].all, item.itemid) then
doTransformItem(item.uid, pokeballs[btype].off)
doItemSetAttribute(item.uid, "hp", 0)
doPlayerSendCancel(cid, "This pokemon is fainted.")
return true
end
end

local pokemon = getItemAttribute(item.uid, "poke")

if not pokes[pokemon] then
return true
end

local x = pokes[pokemon]
local boost = getItemAttribute(item.uid, "boost") or 0

if getPlayerLevel(cid) < (x.level) then
doPlayerSendCancel(cid, "You need level "..(x.level).." to use this pokemon.")
return true
end

--------------------------------------------------------------------------------------
shinysClan = {
[""] = {4, "Wingeon"},
[""] = {1, "Volcanic"},
[""] = {2, "Seavel"},
[""] = {9, "Raibolt"},
[""] = {7, "Psycraft"},
[""] = {3, "Orebound"},
[""] = {8, "Naturia"},
[""] = {5, "Malefic"},
[""] = {6, "Gardestrike"}, --alterado v1.4
}

if shinysClan[pokemon] and (getPlayerGroupId(cid) < 3 or getPlayerGroupId(cid) > 6) then
if getPlayerStorageValue(cid, 86228) ~= shinysClan[pokemon][1] then
doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!")
return true
elseif getPlayerStorageValue(cid, 862281) ~= 5 then
doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!")
return true
end
end
--------------------------------------------------------------------------------------

doSummonMonster(cid, pokemon)

local pk = getCreatureSummons(cid)[1]
if not isCreature(pk) then return true end
------------------------passiva hitmonchan------------------------------
if isSummon(pk) then
local nameHIT = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke")
local hands = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "hands")
if nameHIT == "Shiny Hitmonchan" or nameHIT == "Hitmonchan" then
if getItemAttribute(getPlayerSlotItem(cid, 8).uid, "hands") then
doSetCreatureOutfit(pk, {lookType = hitmonchans[nameHIT][hands].out}, -1)
else
doPlayerSendTextMessage(cid, 27, "Contact a GameMaster! Error in passive system! Attribute \"hands\" missing")
end
end
end
-------------------------------------------------------------------------
---------movement magmar, jynx-------------
if EFFECTS[getCreatureName(pk)] then --edited efeito magmar/jynx
markPosEff(pk, getThingPos(pk))
sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk)) --alterado v1.5
end
--------------------------------------------------------------------------

if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited

local left = getItemAttribute(item.uid, "transLeft")
local name = getItemAttribute(item.uid, "transName")

if left and left > 0 then
setPlayerStorageValue(pk, 1010, name)
doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)
addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))
doItemSetAttribute(item.uid, "transBegin", os.clock())
else
setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto") --edited
end
end

if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end

doCreatureSetLookDir(pk, 2)

adjustStatus(pk, item.uid, true, true, true)
doAddPokemonInOwnList(cid, pokemon)

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

local pokename = getItemAttribute(item.uid, "nick") or getCreatureName(pk)

local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)
doCreatureSay(cid, mgo, TALKTYPE_SAY)

doSendMagicEffect(getCreaturePosition(pk), effect)

else

doPlayerSendCancel(cid, "This pokemon is fainted.")

end

if useKpdoDlls then
doUpdateMoves(cid)
end
return true
end

 

Npc/script Heal.lua

 

 

local pokeballs = {
[1] = {effect = 188, on = 11826, use = 11827, off = 11828, all = {11826, 11827, 11828}},
[2] = {effect = 191, on = 11829, use = 11830, off = 11831, all = {11829, 11830, 11831}},
[3] = {effect = 190, on = 11835, use = 11836, off = 11837, all = {11835, 11836, 11837}},
[4] = {effect = 189, on = 11832, use = 11833, off = 11834, all = {11832, 11833, 11834}},
[5] = {effect = 188, on = 11737, use = 11738, off = 11739, all = {11737, 11738, 11739}},
[6] = {effect = 189, on = 11740, use = 11741, off = 11742, all = {11740, 11741, 11742}},
[7] = {effect = 190, on = 11743, use = 11744, off = 11745, all = {11743, 11744, 11745}},
[8] = {effect = 191, on = 11746, use = 11747, off = 11748, all = {11746, 11747, 11748}},
}

function onThingMove(creature, thing, oldpos, oldstackpos)
end

function onCreatureAppear(creature)
end

function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye sir!')
focus = 0
talk_start = 0
end
end

function onCreatureTurn(creature)
end

function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end

function onCreatureSay(cid, type, msg)
local msg = string.lower(msg)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

for a, b in pairs(gobackmsgs) do
local gm = string.gsub(b.go, "doka!", "")
local bm = string.gsub(b.back, "doka!", "")
if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then
return true
end
end

if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then

if exhaustion.get(cid, 9211) then
selfSay('Please wait a few moment before asking me to heal your pokemons again!')
return true
end

if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then
selfSay("Please, get inside the pokémon center to heal your pokemons!")
return true
end

if getPlayerStorageValue(cid, 52480) >= 1 then
selfSay("You can't do that while in a Duel!") --alterado v1.6.1
return true
end

exhaustion.set(cid, 9211, 5)

doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
doCureStatus(cid, "all", true)
doSendMagicEffect(getThingPos(cid), 132)

local mypb = getPlayerSlotItem(cid, 8)

if #getCreatureSummons(cid) >= 1 then

if not nurseHealsPokemonOut then
selfSay("Please, return your pokemon to his ball!")
return true
end

local s = getCreatureSummons(cid)[1]
doCreatureAddHealth(s, getCreatureMaxHealth(s))
doSendMagicEffect(getThingPos(s), 13)
doCureStatus(s, "all", false)
if getPlayerStorageValue(s, 1008) < baseNurseryHappiness then
setPlayerStorageValue(s, 1008, baseNurseryHappiness)
end
if getPlayerStorageValue(s, 1009) > baseNurseryHunger then
setPlayerStorageValue(s, 1009, baseNurseryHunger)
end
else
if mypb.itemid ~= 0 and isPokeball(mypb.itemid) then --alterado v1.3
doItemSetAttribute(mypb.uid, "hp", 1)
if getItemAttribute(mypb.uid, "hunger") and getItemAttribute(mypb.uid, "hunger") > baseNurseryHunger then
doItemSetAttribute(mypb.uid, "hunger", baseNurseryHunger)
end
for c = 1, 15 do
local str = "move"..c
setCD(mypb.uid, str, 0)
end
if getItemAttribute(mypb.uid, "happy") and getItemAttribute(mypb.uid, "happy") < baseNurseryHappiness then
doItemSetAttribute(mypb.uid, "happy", baseNurseryHappiness)
end
if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then
for a, b in pairs (pokeballs) do
if isInArray(b.all, mypb.itemid) then
doTransformItem(mypb.uid, b.on)
end
end
end
end
end

local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)

for balls = 1, 8 do --editar a qntdade de balls da tabela ali decima...
for times = 1, 3 do
local items = getItemsInContainerById(bp.uid, pokeballs[balls].all[times])
if #items >= 1 then
for _, uid in pairs(items) do
doItemSetAttribute(uid, "hp", 1)
doTransformItem(uid, pokeballs[balls].on)
for c = 1, 15 do
local str = "move"..c
setCD(uid, str, 0) --alterado v1.3
end
if getItemAttribute(uid, "hunger") and getItemAttribute(uid, "hunger") > baseNurseryHunger then
doItemSetAttribute(uid, "hunger", baseNurseryHunger)
end
if getItemAttribute(uid, "happy") and getItemAttribute(uid, "happy") < baseNurseryHappiness then
doItemSetAttribute(uid, "happy", baseNurseryHappiness)
end
end
end
end
end


selfSay('There you go! You and your pokemons are healthy again.')

end
end

 

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...