Crypter 136 Postado Fevereiro 28, 2017 Share Postado Fevereiro 28, 2017 È uma spell que ao usar voce heala "X" por "Y" segundos assim não podendo se mecher.! Uma script simples que pode ser usada por muitos. data/spells/script Tank.lua tempo = 10 -- Tempo de duração da spell em segundoshp = 10000 -- Quanto HP vai healar a cada x segundosfunction heal(cid)if not isCreature(cid) then return true endif getPlayerStorageValue(cid, 13978) == 1 thendoCreatureAddHealth(cid, hp)addEvent(heal, 3000, cid) return trueendreturn trueendfunction onCastSpell(cid, var)setPlayerStorageValue(cid, 13978, 1)doPlayerSetNoMove(cid, true)heal(cid)doSendMagicEffect(getCreaturePosition(cid), 26) addEvent(setPlayerStorageValue, tempo*1000, cid, 13978, -1)addEvent(doPlayerSetNoMove, tempo*1000, cid, false)return trueend Spells.xml: <instant name="Tank Mode" words="Tank Mode" lvl="25" mana="100" prem="0" aggressive="0" exhaustion="1000" needlearn="0" blockwalls="1" enabled="1" event="script" value="tank.lua"> </instant> Link para o comentário https://xtibia.com/forum/topic/243812-spell-tank-mode/ Compartilhar em outros sites More sharing options...
diarmaint 19 Postado Fevereiro 13, 2019 Share Postado Fevereiro 13, 2019 Preciso dessa spell mas assim não dá pra usar, só formata ela direitinho pois ficou tudo emendado e ta dando erro. Link para o comentário https://xtibia.com/forum/topic/243812-spell-tank-mode/#findComment-1747893 Compartilhar em outros sites More sharing options...
Benny 736 Postado Fevereiro 13, 2019 Share Postado Fevereiro 13, 2019 12 minutos atrás, diarmaint disse: Preciso dessa spell mas assim não dá pra usar, só formata ela direitinho pois ficou tudo emendado e ta dando erro. É só dar enter no fim de cada linha. Link para o comentário https://xtibia.com/forum/topic/243812-spell-tank-mode/#findComment-1747895 Compartilhar em outros sites More sharing options...
diarmaint 19 Postado Fevereiro 13, 2019 Share Postado Fevereiro 13, 2019 Agora, bXnny disse: É só dar enter no fim de cada linha. Eu até tentei só que toda tentativa dava crash no serv, não sei mto separar as linhas das funções. Link para o comentário https://xtibia.com/forum/topic/243812-spell-tank-mode/#findComment-1747896 Compartilhar em outros sites More sharing options...
Kuro o Shiniga 87 Postado Fevereiro 13, 2019 Share Postado Fevereiro 13, 2019 tempo = 10 -- Tempo de duração da spell em segundos hp = 10000 -- Quanto HP vai healar a cada x segundos function heal(cid) if not isCreature(cid) then return true end if getPlayerStorageValue(cid, 13978) == 1 then doCreatureAddHealth(cid, hp) addEvent(heal, 3000, cid) return true end return true end function onCastSpell(cid, var) setPlayerStorageValue(cid, 13978, 1) doPlayerSetNoMove(cid, true)heal(cid) doSendMagicEffect(getCreaturePosition(cid), 26) addEvent(setPlayerStorageValue, tempo*1000, cid, 13978, -1) addEvent(doPlayerSetNoMove, tempo*1000, cid, false) return true end Link para o comentário https://xtibia.com/forum/topic/243812-spell-tank-mode/#findComment-1747897 Compartilhar em outros sites More sharing options...
diarmaint 19 Postado Fevereiro 13, 2019 Share Postado Fevereiro 13, 2019 21 minutos atrás, Kuro o Shiniga disse: tempo = 10 -- Tempo de duração da spell em segundos hp = 10000 -- Quanto HP vai healar a cada x segundos function heal(cid) if not isCreature(cid) then return true end if getPlayerStorageValue(cid, 13978) == 1 then doCreatureAddHealth(cid, hp) addEvent(heal, 3000, cid) return true end return true end function onCastSpell(cid, var) setPlayerStorageValue(cid, 13978, 1) doPlayerSetNoMove(cid, true)heal(cid) doSendMagicEffect(getCreaturePosition(cid), 26) addEvent(setPlayerStorageValue, tempo*1000, cid, 13978, -1) addEvent(doPlayerSetNoMove, tempo*1000, cid, false) return true end Lua Script Error: [Spell Interface] data/spells/scripts/diarmaint/tank.lua:onCastSpell data/spells/scripts/diarmaint/tank.lua:16: attempt to call global 'doPlayerSetNoMove' (a nil value) stack traceback: [C]: in function 'doPlayerSetNoMove' data/spells/scripts/diarmaint/tank.lua:16: in function <data/spells/scripts/diarmaint/tank.lua:14> Link para o comentário https://xtibia.com/forum/topic/243812-spell-tank-mode/#findComment-1747899 Compartilhar em outros sites More sharing options...
Posts Recomendados