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 )
By falcon02, 28 de out. de 2012 in Tópicos Sem Resposta
info
Group: Conde
Joined: 25/04/12
Posts: 752
Reputation: +125
Gender: Masculino

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 )
Edited Outubro 28 by Cleberadm
lol nao funciono
info
Group: Conde
Joined: 25/04/12
Posts: 752
Reputation: +125
Gender: Masculino

Posta o script ai mano, vai ajuda ;s
Tenta isso
local pokeball = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)
doSetItemAttribute(pokeball.uid, "boost", 1)
Edited Outubro 28 by Cleberadm
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
info
Group: Conde
Joined: 25/04/12
Posts: 752
Reputation: +125
Gender: Masculino

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
Edited Outubro 28 by Cleberadm
nao funcionou ainda man =(
nem um dos doise
info
Group: Conde
Joined: 25/04/12
Posts: 752
Reputation: +125
Gender: Masculino

Qual erro aparece mano?
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
info
Group: Conde
Joined: 25/04/12
Posts: 752
Reputation: +125
Gender: Masculino

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
Edited Outubro 28 by Cleberadm
vlw funcionou rep+ amanha dou outro
Ou mais ta upando lvl tbm quero qui so up bost como faço?
info
Group: Conde
Joined: 25/04/12
Posts: 752
Reputation: +125
Gender: Masculino

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
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
info
Group: Conde
Joined: 25/04/12
Posts: 752
Reputation: +125
Gender: Masculino

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...
Edited Outubro 28 by Cleberadm
info
Group: Campones
Joined: 27/10/12
Posts: 60
Reputation: 0
Tibia Character: Skypiea
Esse e facil Como por rare candy pra upa bost??