XR

[Encerrado] Pedido Boost Stone

Por xRunning, 29 de jan. de 2013 em Tópicos Sem Resposta

tibia
script
otserv
12
1.1k
xRunningX
29 de janeiro de 2013 às 03:11

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

DinoAdminD
29 de janeiro de 2013 às 07:57

veja em minha sing

xRunningX
29 de janeiro de 2013 às 20:41

Ja vi porem essa tbm não funfou tbm.

fodimF
29 de janeiro de 2013 às 20:44

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

xRunningX
30 de janeiro de 2013 às 01:28

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?

fodimF
30 de janeiro de 2013 às 13:57

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

xRunningX
30 de janeiro de 2013 às 14:00

Sim. é o "usable"

fodimF
30 de janeiro de 2013 às 14:03

tente checar as actions, veja se nao tem outra action utilizando este id

Editado Janeiro 30 por Fodim

GabrieltxuG
30 de janeiro de 2013 às 15:21

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!

Editado Janeiro 30 por Gabrieltxu

xRunningX
31 de janeiro de 2013 às 18:22

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.

SlicerS
31 de janeiro de 2013 às 18:26

sanado, movido

5 anos depois...
StigalS
20 de abril de 2018 às 00:52
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

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