Ir para conteúdo

[Encerrado] Esse E Facil Como Por Rare Candy Pra Upa Bost?


falcon02

Posts Recomendados

Posta o script ai... ou só coloca isso la no meio ( onde ele da o level )

 

 

 

doSetItemAttribute(myball.uid, "boost", 1) ( NÃO TENHO CERTEZA QUE FUNCIONE... g.g )

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

Posta o script ai mano, vai ajuda ;s

 

 

Tenta isso

 

local pokeball = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)

doSetItemAttribute(pokeball.uid, "boost", 1)

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

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

if not isCreature(item2.uid) or not isSummon(item2.uid) then

doPlayerSendCancel(cid, "You can only give this candy to trainers' pokemons.")

return true

end

if getCreatureHealth(item2.uid) == 0 then return true end

local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)

if getLevel(item2.uid) >= 100 then

doPlayerSendCancel(cid, "Your pokemon is already at maximum level.")

return true

end

doPlayerSendTextMessage(cid, 27, "You gave a rare candy to "..getPokeName(item2.uid)..".")

doCreatureSay(cid, getPokeName(item2.uid)..", take this candy!", TALKTYPE_SAY)

doRemoveItem(item.uid, 1)

 

local level = getItemAttribute(pb.uid, "level")

local exp = getItemAttribute(pb.uid, "exp")

local neededexp = getItemAttribute(pb.uid, "nextlevelexp")

if getHappiness(item2.uid) < 50 then

doSendMagicEffect(getThingPos(item2.uid), 168)

return true

end

doCreatureSay(item2.uid, "Yum.", TALKTYPE_ORANGE_1)

doItemSetAttribute(pb.uid, "rarecandy", level + 1)

doItemSetAttribute(pb.uid, "exp", exp + neededexp)

doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Your "..getPokeName(item2.uid).." has eaten a rare candy!")

doSendFlareEffect(getThingPos(item2.uid))

doSendAnimatedText(getThingPos(item2.uid), "Level up!", 215)

adjustPokemonLevel(pb.uid, getCreatureMaster(item2.uid), pb.itemid, true)

return true

end

 

esse eo scripiting

Link para o comentário
Compartilhar em outros sites

Proxima vez usa

 [..spoiler]  SCRIPT [/spoiler.] SEM OS PONTOS 

 

Aqui está

 

 

 

 

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

if not isCreature(item2.uid) or not isSummon(item2.uid) then

doPlayerSendCancel(cid, "You can only give this candy to trainers' pokemons.")

return true

end

if getCreatureHealth(item2.uid) == 0 then return true end

local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)

if getLevel(item2.uid) >= 100 then

doPlayerSendCancel(cid, "Your pokemon is already at maximum level.")

return true

end

doPlayerSendTextMessage(cid, 27, "You gave a rare candy to "..getPokeName(item2.uid)..".")

doCreatureSay(cid, getPokeName(item2.uid)..", take this candy!", TALKTYPE_SAY)

doRemoveItem(item.uid, 1)

 

local level = getItemAttribute(pb.uid, "level")

local exp = getItemAttribute(pb.uid, "exp")

local neededexp = getItemAttribute(pb.uid, "nextlevelexp")

if getHappiness(item2.uid) < 50 then

doSendMagicEffect(getThingPos(item2.uid), 168)

return true

end

doCreatureSay(item2.uid, "Yum.", TALKTYPE_ORANGE_1)

doItemSetAttribute(pb.uid, "rarecandy", level + 1)

doSetItemAttribute(pb.uid, "boost", boost + 1)

doItemSetAttribute(pb.uid, "exp", exp + neededexp)

doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Your "..getPokeName(item2.uid).." has eaten a rare candy!")

doSendFlareEffect(getThingPos(item2.uid))

doSendAnimatedText(getThingPos(item2.uid), "Level up!", 215)

adjustPokemonLevel(pb.uid, getCreatureMaster(item2.uid), pb.itemid, true)

return true

end

 

 

 

Se o de cima nao da certo usa esse de baixo

 

 

 

 

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

if not isCreature(item2.uid) or not isSummon(item2.uid) then

doPlayerSendCancel(cid, "You can only give this candy to trainers' pokemons.")

return true

end

if getCreatureHealth(item2.uid) == 0 then return true end

local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)

if getLevel(item2.uid) >= 100 then

doPlayerSendCancel(cid, "Your pokemon is already at maximum level.")

return true

end

doPlayerSendTextMessage(cid, 27, "You gave a rare candy to "..getPokeName(item2.uid)..".")

doCreatureSay(cid, getPokeName(item2.uid)..", take this candy!", TALKTYPE_SAY)

doRemoveItem(item.uid, 1)

 

local level = getItemAttribute(pb.uid, "level")

local exp = getItemAttribute(pb.uid, "exp")

local neededexp = getItemAttribute(pb.uid, "nextlevelexp")

if getHappiness(item2.uid) < 50 then

doSendMagicEffect(getThingPos(item2.uid), 168)

return true

end

doCreatureSay(item2.uid, "Yum.", TALKTYPE_ORANGE_1)

doItemSetAttribute(pb.uid, "rarecandy", level + 1)

doItemSetAttribute(pb.uid, "boost", boost + 1)

doItemSetAttribute(pb.uid, "exp", exp + neededexp)

doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Your "..getPokeName(item2.uid).." has eaten a rare candy!")

doSendFlareEffect(getThingPos(item2.uid))

doSendAnimatedText(getThingPos(item2.uid), "Level up!", 215)

adjustPokemonLevel(pb.uid, getCreatureMaster(item2.uid), pb.itemid, true)

return true

end

 

 

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

Achei o erro..

 

Segue o script agora 100%

 

 

 

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

if not isCreature(item2.uid) or not isSummon(item2.uid) then

doPlayerSendCancel(cid, "You can only give this candy to trainers' pokemons.")

return true

end

if getCreatureHealth(item2.uid) == 0 then return true end

local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)

if getLevel(item2.uid) >= 100 then

doPlayerSendCancel(cid, "Your pokemon is already at maximum level.")

return true

end

doPlayerSendTextMessage(cid, 27, "You gave a rare candy to "..getPokeName(item2.uid)..".")

doCreatureSay(cid, getPokeName(item2.uid)..", take this candy!", TALKTYPE_SAY)

doRemoveItem(item.uid, 1)

 

local level = getItemAttribute(pb.uid, "level")

local exp = getItemAttribute(pb.uid, "exp")

local neededexp = getItemAttribute(pb.uid, "nextlevelexp")

local boost = getItemAttribute(pb.uid, "boost") or 0

if getHappiness(item2.uid) < 50 then

doSendMagicEffect(getThingPos(item2.uid), 168)

return true

end

doCreatureSay(item2.uid, "Yum.", TALKTYPE_ORANGE_1)

doItemSetAttribute(pb.uid, "rarecandy", level + 1)

doSetItemAttribute(pb.uid, "boost", boost + 1)

doItemSetAttribute(pb.uid, "exp", exp + neededexp)

doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Your "..getPokeName(item2.uid).." has eaten a rare candy!")

doSendFlareEffect(getThingPos(item2.uid))

doSendAnimatedText(getThingPos(item2.uid), "Level up!", 215)

adjustPokemonLevel(pb.uid, getCreatureMaster(item2.uid), pb.itemid, true)

return true

end

 

Obs: ai ele ta sem limite pra BOOST+

 

Se quiser por o limite pra usar só coloca isso

if boost >= 50 then
doPlayerSendCancel(cid, "Your pokemon is already at maximum boost.")
return true
end

antes do

if getHappiness(item2.uid) < 50 then

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

 

 

 

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

if not isCreature(item2.uid) or not isSummon(item2.uid) then

doPlayerSendCancel(cid, "You can only give this candy to trainers' pokemons.")

return true

end

if getCreatureHealth(item2.uid) == 0 then return true end

local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)

 

doPlayerSendTextMessage(cid, 27, "You gave a rare candy to "..getPokeName(item2.uid)..".")

doCreatureSay(cid, getPokeName(item2.uid)..", take this candy!", TALKTYPE_SAY)

doRemoveItem(item.uid, 1)

 

local level = getItemAttribute(pb.uid, "level")

local exp = getItemAttribute(pb.uid, "exp")

local neededexp = getItemAttribute(pb.uid, "nextlevelexp")

local boost = getItemAttribute(pb.uid, "boost") or 0

if boost >= 50 then

doPlayerSendCancel(cid, "Your pokemon is already at maximum boost.")

return true

end

if getHappiness(item2.uid) < 50 then

doSendMagicEffect(getThingPos(item2.uid), 168)

return true

end

doCreatureSay(item2.uid, "BOOST+.", TALKTYPE_ORANGE_1)

doSetItemAttribute(pb.uid, "boost", boost + 1)

doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Your "..getPokeName(item2.uid).." has eaten a rare candy!")

doSendFlareEffect(getThingPos(item2.uid))

doSendAnimatedText(getThingPos(item2.uid), "B O O S T!", 215)

 

return false

end

 

 

Link para o comentário
Compartilhar em outros sites

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