Ir para conteúdo

Featured Replies

Postado

O tópico foi movido para a área correta, preste mais atenção da próxima vez!

Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

Este tópico foi movido:

De: "OTServ → Scripting → Actions e TalkActions"

Para: "OTServ → Suporte OTServ → Suporte de Servidores Derivados"

 

 

Postado
Vermelho= Maximo de boost possivel  Azul= Quanto boost ira dar ao pokemon a cada 1 boost
 

function onUse(cid, item, topos, item2, frompos)
 
local myball = getPlayerSlotItem(cid, 8)
 
local boost = getItemAttribute(myball.uid, "boost") or 0 or 50
 
local boosts = 1
 
if boost == 100 then
 
return doPlayerSendCancel(cid, "Sorry, Your pokemon is the maximum boost level")
 
end
 
 
 
if #getCreatureSummons(cid) >= 1 then
 
if getPlayerAccess(cid) == 1 then
 
boosts = 0
 
end
 
boosts = boosts + 0
 
local pokemon = getItemAttribute(myball.uid, "poke")
 
local off = pokes[pokemon].offense * boost_rate * boosts
 
local def = pokes[pokemon].defense * boost_rate * boosts
 
local agi = pokes[pokemon].agility * boosts
 
local spatk = pokes[pokemon].specialattack * boost_rate * boosts
 
local vit = pokes[pokemon].vitality * boost_rate * boosts
 
doSetItemAttribute(myball.uid, "boost", boost + boosts)
 
doRemoveItem(item.uid,1)
 
doSendMagicEffect(getThingPos(item2.uid), 40)
 
doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +100.")
 
doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..boosts + boost..".")
 
doSendAnimatedText(getThingPos(item2.uid), "BOOST!", 71)
 
else
 
return doPlayerSendCancel(cid, "Only use in yours pokemons.")
 
end
 
return true
 
end

Postado

Rod substitua o seu por esse :

 

 

function onUse(cid, item, topos, item2, frompos)
 
local myball = getPlayerSlotItem(cid, 8)
 
local boost = getItemAttribute(myball.uid, "boost") or 0 or 50
 
local boosts = 1
 
if boost == 100 then
 
return doPlayerSendCancel(cid, "Sorry, Your pokemon is the maximum boost level")
 
end
 
 
 
if #getCreatureSummons(cid) >= 1 then
 
if getPlayerAccess(cid) == 1 then
 
boosts = 1
 
end
 
boosts = boosts + 1
 
local pokemon = getItemAttribute(myball.uid, "poke")
 
local off = pokes[pokemon].offense * boost_rate * boosts
 
local def = pokes[pokemon].defense * boost_rate * boosts
 
local agi = pokes[pokemon].agility * boosts
 
local spatk = pokes[pokemon].specialattack * boost_rate * boosts
 
local vit = pokes[pokemon].vitality * boost_rate * boosts
 
doSetItemAttribute(myball.uid, "boost", boost + boosts)
 
doRemoveItem(item.uid,1)
 
doSendMagicEffect(getThingPos(item2.uid), 40)
 
doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +100.")
 
doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..boosts + boost..".")
 
doSendAnimatedText(getThingPos(item2.uid), "BOOST!", 71)
 
else
 
return doPlayerSendCancel(cid, "Only use in yours pokemons.")
 
end
 
return true
 
end

 

Postado
  • Autor

Rod substitua o seu por esse :

 

 

function onUse(cid, item, topos, item2, frompos)
 
local myball = getPlayerSlotItem(cid, 8)
 
local boost = getItemAttribute(myball.uid, "boost") or 0 or 50
 
local boosts = 1
 
if boost == 100 then
 
return doPlayerSendCancel(cid, "Sorry, Your pokemon is the maximum boost level")
 
end
 
 
 
if #getCreatureSummons(cid) >= 1 then
 
if getPlayerAccess(cid) == 1 then
 
boosts = 1
 
end
 
boosts = boosts + 1
 
local pokemon = getItemAttribute(myball.uid, "poke")
 
local off = pokes[pokemon].offense * boost_rate * boosts
 
local def = pokes[pokemon].defense * boost_rate * boosts
 
local agi = pokes[pokemon].agility * boosts
 
local spatk = pokes[pokemon].specialattack * boost_rate * boosts
 
local vit = pokes[pokemon].vitality * boost_rate * boosts
 
doSetItemAttribute(myball.uid, "boost", boost + boosts)
 
doRemoveItem(item.uid,1)
 
doSendMagicEffect(getThingPos(item2.uid), 40)
 
doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +100.")
 
doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..boosts + boost..".")
 
doSendAnimatedText(getThingPos(item2.uid), "BOOST!", 71)
 
else
 
return doPlayerSendCancel(cid, "Only use in yours pokemons.")
 
end
 
return true
 
end

 

Resolvido, Rep+ pela Ajuda.

Editado por RodAlbu (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96k
  • Posts 512.6k

Informação Importante

Confirmação de Termo