veja em minha sing
- Forums
- OTServ
- Suporte
- Tópicos Sem Resposta
- [Encerrado] Pedido Boost Stone
[Encerrado] Pedido Boost Stone
By xRunning, 29 de jan. de 2013 in Tópicos Sem Resposta
info
Group: Conde
Joined: 27/07/12
Posts: 757
Reputation: +57
Tibia Character: [ADM] Bhoris

info
Group: Artesão
Joined: 23/12/12
Posts: 101
Reputation: +9
Gender: Masculino

Ja vi porem essa tbm não funfou tbm.
info
Group: Campones
Joined: 11/02/10
Posts: 80
Reputation: +7
Tibia Character: Lord Slashin

Tenta esse:
function onUse(cid, item, topos, item2, frompos)
local myball = getPlayerSlotItem(cid, 8)
local boost = getItemAttribute(myball.uid, "boost") or 0
local boosts = 0
if boost == 300 then
doPlayerSendCancel(cid, "Your pokemon is already at maximum boost.")
return true
end
if #getCreatureSummons(cid) >= 1 then
if getPlayerAccess(cid) == 6 then
boosts = 49
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)
doItemSetAttribute(myball.uid, "offense", getItemAttribute(myball.uid, "offense") + off)
doItemSetAttribute(myball.uid, "defense", getItemAttribute(myball.uid, "defense") + def)
doItemSetAttribute(myball.uid, "speed", getItemAttribute(myball.uid, "speed") + agi)
doItemSetAttribute(myball.uid, "specialattack", getItemAttribute(myball.uid, "specialattack") + spatk)
doItemSetAttribute(myball.uid, "vitality", getItemAttribute(myball.uid, "vitality") + vit)
doRemoveItem(item.uid, 1)
doSendMagicEffect(getThingPos(item2.uid), 103)
doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +1.")
doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..boosts + boost..".")
doSendAnimatedText(getThingPos(item2.uid), "+1 Boost", 215)
else
return doPlayerSendCancel(cid, "Only use in yours pokemons.")
end
return true
end
info
Group: Artesão
Joined: 23/12/12
Posts: 101
Reputation: +9
Gender: Masculino

Então não foi tbm, Tipo nn deu nenhum erro porem quando eu vou usar aparece que nn pode usar esse objeto e só, Meu servidor é por Boost Machine mas eu queria que tbm fosse por Boost Stone, será qe isso altera?
info
Group: Campones
Joined: 11/02/10
Posts: 80
Reputation: +7
Tibia Character: Lord Slashin

esse que voce esta tentanto é useable ne? ou seja tem q aperta com o direito na stone dps no poke, se nao for esse é o erro
info
Group: Artesão
Joined: 23/12/12
Posts: 101
Reputation: +9
Gender: Masculino

Sim. é o "usable"
info
Group: Campones
Joined: 11/02/10
Posts: 80
Reputation: +7
Tibia Character: Lord Slashin

tente checar as actions, veja se nao tem outra action utilizando este id
Edited Janeiro 30 by Fodim
info
Group: Herói
Joined: 12/06/12
Posts: 2.2k
Reputation: +739
Gender: Masculino
Tibia Character: Supreme Player

Amigo tente esse!
1° Crie um arquivo .lua em data/actions/Scripts chamado booststone.lua
e coloque isso dentro!
function onUse(cid, item, topos, item2, frompos)
local myball = getPlayerSlotItem(cid, 8)
local boost = getItemAttribute(myball.uid, "boost") or 0
local boosts = 0
if boost == 50 then
doPlayerSendCancel(cid, "Your pokemon is already at maximum boost.")
return true
end
if #getCreatureSummons(cid) >= 1 then
if getPlayerAccess(cid) == 6 then
boosts = 49
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)
doItemSetAttribute(myball.uid, "offense", getItemAttribute(myball.uid, "offense") + off)
doItemSetAttribute(myball.uid, "defense", getItemAttribute(myball.uid, "defense") + def)
doItemSetAttribute(myball.uid, "speed", getItemAttribute(myball.uid, "speed") + agi)
doItemSetAttribute(myball.uid, "specialattack", getItemAttribute(myball.uid, "specialattack") + spatk)
doItemSetAttribute(myball.uid, "vitality", getItemAttribute(myball.uid, "vitality") + vit)
doRemoveItem(item.uid)
doSendMagicEffect(getThingPos(item2.uid), 103)
doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +1.")
doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..boosts + boost..".")
doSendAnimatedText(getThingPos(item2.uid), "+1 Boost", 215)
doPlayerSetVocation(cid,4)
else
return doPlayerSendCancel(cid, "Only use in yours pokemons.")
end
return true
end
e depois abre o actions.xml e coloca essa tag
-- Boost Stone
<action itemid="12415" event="script" value="booststone.lua" allowfaruse="1" />
Em vermelho é o ID do item que vc vai usar como boost Stone e.e!! Se ajudei REP+
OBS: o item tem que estar configuravel no dat editor como usavel! cao Ao contrario Não ira funcionar!
Edited Janeiro 30 by Gabrieltxu
info
Group: Artesão
Joined: 23/12/12
Posts: 101
Reputation: +9
Gender: Masculino

Gabrieltxu po man vlw mesmo era isso o item nn tava usable, Vlw mesmo e vlw a todos pelo script's VOu dar rep+ a todos vlw mesmo.
info
Group: Príncipe
Joined: 19/08/10
Posts: 4k
Reputation: +1.1k
Gender: Masculino

sanado, movido
info
Group: Herói
Joined: 28/11/10
Posts: 3.4k
Reputation: +585
Gender: Masculino

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





info
Group: Artesão
Joined: 23/12/12
Posts: 101
Reputation: +9
Gender: Masculino
Olá tenho um servidor de poketibia ultilizei o POkemon Centurion V3 PDA como base. Procurei varias vezes na barra de "pesquisar" achei varios script's de boost stone porem nenhum funfo todos davam erro queria saber se alguem pudesse me passar um script que funfasse em meu servidor. REPP++