MA
poketibia

Spell Com Exaust Unico

Por manovegyta, 01 de dez. de 2010 em Archived

tibia
otserv
6
1.4k
manovegytaM
01 de dezembro de 2010 às 23:01

Alguem me fala como colocar exaust em uma unica spell, tipo as do poketibia.

 

Ex: o player usa um exura, ai ele so vai poder usar exura denovo daqui 10 segundos, mas durante esses 10 segundos, ele pode usar outras magias.

 

Fico grato desde Já.

MatheusGladM
02 de dezembro de 2010 às 11:06

No script do exura voce bota isso:

 

data/spells/scripts/healing/light healing.lua:

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

local delay = 10

function onCastSpell(cid, var)

   local minformule = getPlayerMagLevel(cid)*6+getPlayerLevel(cid)
   local maxformule = getPlayerMagLevel(cid)*7+(getPlayerLevel(cid)*1.5)

   if os.time()-getPlayerStorageValue(cid, 66697) < delay then
       doPlayerSendCancel(cid, "Voce precisa esperar " .. delay-(os.time()-getPlayerStorageValue(cid, 66697)) .. " segundos para usar a magia novamente.")
   else 
       setPlayerStorageValue(cid, 66697, os.time())
       doCreatureAddHealth(cid, math.random(minformule, maxformule))
       return doCombat(cid, combat, var)
   end
end

 

E agora voce vai na tag e tira o exausted deixando-o 0:

<instant name="Light Healing" words="exura" lvl="9" mana="20" aggressive="0" selftarget="1" exhaustion="0" needlearn="0" event="script" value="healing/light healing.lua">

<vocation id="1"/>

<vocation id="2"/>

<vocation id="3"/>

<vocation id="4"/>

<vocation id="5"/>

<vocation id="6"/>

<vocation id="7"/>

<vocation id="8"/>

</instant>

Editado Dezembro 2 por MatheusMkalo

Saymon14S
02 de dezembro de 2010 às 11:22

Essas magias de pokemon sao varias magias em um script só ?

manovegytaM
02 de dezembro de 2010 às 20:49

Obrigado !

 

Rep + pra você .-.

 

--Edit--

 

Mas toda vez que eu uso alguma magia, o ot trava por meio segundo +/-, sabe como tira isso ?

Editado Dezembro 2 por YourHeLL

MatheusGladM
02 de dezembro de 2010 às 22:22

Aqui nao aconteceu isso nao oO, deve ser algo no seu ot.

manovegytaM
03 de dezembro de 2010 às 18:18

O meu problema nao ta no exura, ele até que vai normal, mas so trava na magia do meu serv que eu testei ai o script dela:

 

-----------------This Spell was made with Mindrage's Spell Maker v0.56b ---------

--Do not post the spells in any forum without this line or you will be caught!---

--This Software is free to use and can't be for for real-life values!------------

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)

setCombatParam(combat1, COMBAT_PARAM_BLOCKSHIELD, 1)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 9)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 255)

setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 2, -40, 2, -45)

--=======================================================================

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, 1)

setCombatParam(combat2, COMBAT_PARAM_BLOCKSHIELD, 1)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 0)

setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 255)

setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 2, -44, 2, -52)

--=======================================================================

 

local delay = 10

 

function onCastSpell(cid, var)

 

setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 2, -40, 2, -45)

setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 2, -44, 2, -52)

 

 

if os.time()-getPlayerStorageValue(cid, 66697) < delay then

doPlayerSendCancel(cid, "Voce precisa esperar " .. delay-(os.time()-getPlayerStorageValue(cid, 66697)) .. " segundos para usar a magia novamente.")

else

setPlayerStorageValue(cid, 66697, os.time())

addEvent(doCombat, 0, cid, combat1, var)

addEvent(doCombat, 250,cid, combat2, var)

return doCombat(cid, combat1, var)

end

end

 

Poderia me dizer meu erro?

Fico Grato Desde Já