a spell ta bugada, a exaustão não funciona, da pra dar a magia quantas vezes quiser..
- Forums
- OTServ
- Recursos
- Scripting
- Globalevents e Spells
- Exori Bong - Sugar Vida do Target
Exori Bong - Sugar Vida do Target
By Fir3z, 01 de jun. de 2013 in Globalevents e Spells
info
Group: Artesão
Joined: 30/03/11
Posts: 138
Reputation: +4
Tibia Character: Druida de Asgard

<instant name="Exori Bong" words="exori bong" lvl="65" mana="580" prem="0" exhaustion="2000" needtarget="1" range = "4" needlearn="0" script="attack/exori bong.lua">
function onCastSpell(cid, var) local exaustion = getSpellEx(2000,Ex) local playerpos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local trapos = getCreaturePosition(target) local level = getPlayerLevel(cid) local numero1 = (level*1.5) -- Dano Mínimo local numero2 = (level*2.5) -- Dano Máximo for i = numero1, numero2 do levelz = (math.random(numero2)) end doExaustionSpell(Ex, 2000) doCreatureAddHealth(target, -levelz) doSendAnimatedText(trapos, levelz, 180) doCreatureAddHealth(cid, levelz) doCreatureAddMana(cid, -300) -- Quanto Vai Gastar de Mana doSendMagicEffect(trapos, 9) doSendMagicEffect(playerpos, 12) doSendDistanceShoot(trapos, playerpos, 40) end
Edited Junho 12 by HarpiaLOOK
@ skynet2 ~
É como você disse ta sem exausted...
@ HarpiaLOOK ~
Tá dando uns erro desse jeito que você mando ai...
[Error - Spell Interface] data/spells/script/attack/exori bong.lua:onCastSpell Description: data/spells/script/attack/exori bong.lua:2: attempt to call global 'getSpellEx' <a nil value> stack traceback: data/spells/script/attack/exori bong.lua:2: in function <data/spells/script/attack/exori bong.lua:1>
info
Group: Artesão
Joined: 16/09/11
Posts: 100
Reputation: +1

Alguem pode me ajudar aqui? http://www.xtibia.com/forum/topic/216273-duvida-promotion-vip/
info
Group: Campones
Joined: 27/03/13
Posts: 71
Reputation: +16
Tibia Character: Não existe

Para colocar exhast, so precisa colocar uma coisa no final:
function onCastSpell(cid, var)
local playerpos = getCreaturePosition(cid)
local target = getCreatureTarget(cid)
local trapos = getCreaturePosition(target)
local level = getPlayerLevel(cid)
local numero1 = (level*1.5) -- Dano Mínimo
local numero2 = (level*2.5) -- Dano Máximo
for i = numero1, numero2 do
levelz = (math.random(numero2))
end
doCreatureAddHealth(target, -levelz)
doSendAnimatedText(trapos, levelz, 180)
doCreatureAddHealth(cid, levelz)
doCreatureAddMana(cid, -300) -- Quanto Vai Gastar de Mana
doSendMagicEffect(trapos, 9)
doSendMagicEffect(playerpos, 12)
doSendDistanceShoot(trapos, playerpos, 40)
return true
end
Na hora de colocar a tag, só precisa mudar o exhastion que quizer:
<instant name="Exori Bong" words="exori bong" lvl="80" mana="300" prem="1" range="3" needtarget="1" blockwalls="1" needweapon="1" exhaustion="2000" needlearn="0" event="script" value="attack/exori bong.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
@ NextWorld ~
No post tem essa tag que você mencionou:
<instant name="Exori Bong" words="exori bong" lvl="80" mana="300" prem="1" range="3" needtarget="1" blockwalls="1" needweapon="1" exhaustion="2000" needlearn="0" event="script" value="attack/exori bong.lua"> <vocation id="4"/> <vocation id="8"/> </instant>
E você pode notar que ela está do mesmo jeito que você postou
exhaustion="2000"
E sim continua sem exausted mesmo configurando essa parte...
info
Group: Campones
Joined: 27/03/13
Posts: 71
Reputation: +16
Tibia Character: Não existe

Foi mal eu não sabia... Mas eu fiz isso aqui, e deu certo '-'.
Edited Julho 5 by NextWorld
info
Group: Campones
Joined: 02/08/11
Posts: 32
Reputation: +1
Tibia Character: Undead

Meu tambem ta bugando ...
Era só fazer oque o NextWorld disse, colocar um "return TRUE" antes do end e a magia iria funcionar 100%...
Já arrumei pra quem quiser testar =]
info
Group: Conde
Joined: 25/04/12
Posts: 752
Reputation: +125
Gender: Masculino

Exausted 5 segundos
function onCastSpell(cid, var) if getPlayerStorageValue(cid, 333311) < os.time () then setPlayerStorageValue(cid, 333311, os.time () + 5) -- 5 = 5 segundos local playerpos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local trapos = getCreaturePosition(target) local level = getPlayerLevel(cid) local numero1 = (level*1.5) -- Dano Mínimo local numero2 = (level*2.5) -- Dano Máximo for i = numero1, numero2 do levelz = (math.random(numero2)) end doCreatureAddHealth(target, -levelz) doSendAnimatedText(trapos, levelz, 180) doCreatureAddHealth(cid, levelz) doCreatureAddMana(cid, -300) -- Quanto Vai Gastar de Mana doSendMagicEffect(trapos, 9) doSendMagicEffect(playerpos, 12) doSendDistanceShoot(trapos, playerpos, 40) else doPlayerSendCancel(cid, "aguarde "..getPlayerStorageValue(cid, 333311) - os.time ().." segundos para usar ") return false end return true end




info
Group: Campones
Joined: 26/05/13
Posts: 9
Reputation: +1
Bom, eu tinha criado um sv, mas tive que parar por não ter retorno... criei vários scripts, magias, mapas, etc... pra não ficar tudo parado vou disponibilizar algumas coisas feitas por mim
Demorei pra fazer esse script, ele podia estar bem mais simples (mas não sei como fazer isso, assim funciona... então XD)
Oque faz: Essa magia simplesmente rouba a vida do target e te da a mesma vida, tinha feito isso para um knight, então os efeitos estão para knights... é só trocar caso queira (:
Imagemzinha básica da magia funcionando
Exori Bong.lua:
spells.xml: Espero que gostem da mágiaEdited Agosto 19 by Fir3z