FA

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

Por falcon02, 28 de out. de 2012 em Tópicos Sem Resposta

resolvido
19
2.3k
falcon02F
28 de outubro de 2012 às 01:27

Esse e facil Como por rare candy pra upa bost??

Session StartS
28 de outubro de 2012 às 01:31

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 Outubro 28 por Cleberadm

falcon02F
28 de outubro de 2012 às 01:37

lol nao funciono

Session StartS
28 de outubro de 2012 às 01:38

Posta o script ai mano, vai ajuda ;s

 

 

Tenta isso

 

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

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

Editado Outubro 28 por Cleberadm

falcon02F
28 de outubro de 2012 às 01:50

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

Session StartS
28 de outubro de 2012 às 01:53

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 Outubro 28 por Cleberadm

falcon02F
28 de outubro de 2012 às 02:05

nao funcionou ainda man =(

 

nem um dos doise

Session StartS
28 de outubro de 2012 às 02:05

Qual erro aparece mano?

falcon02F
28 de outubro de 2012 às 02:08

nao aparece erro simplesmente dessa vez nao acontece nada so aparece o pokemon fazendo yum ai quando vai ver se ele ganho bost ele nao ganhou nada

Session StartS
28 de outubro de 2012 às 02:19

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 Outubro 28 por Cleberadm

falcon02F
28 de outubro de 2012 às 02:20

vlw funcionou rep+ amanha dou outro

Ou mais ta upando lvl tbm quero qui so up bost como faço?

Session StartS
28 de outubro de 2012 às 02:23

 

 

 

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

 

 

falcon02F
28 de outubro de 2012 às 02:28

agora o erro e esse your pokemon al ready maximun bost mais eu ja fui no bost machine ta pra lvl 150

 

mais parou no 97

 

ops parou no 50

Session StartS
28 de outubro de 2012 às 02:28

Seu pokemon ta +50? é só mudar aquela parte ali no script

if boost >= 50 then

muda o 50 pra 150 se é o maximo do seu server...

Editado Outubro 28 por Cleberadm

falcon02F
28 de outubro de 2012 às 02:29

Opa Valew Ai Lek Ajudou pra carai amanha colo aqui e ti dou + um rep =)