- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- [Movement] Tile of Soul/mana/health
KR
action
[Movement] Tile of Soul/mana/health
Por Krono, 11 de abr. de 2015 em Actions e Talkactions
remover soul
ao pisar
no tile
script
1
934
Por Krono, 11 de abr. de 2015 em Actions e Talkactions
info
Grupo: Barão
Registrado: 07/04/15
Posts: 247
Reputação: +128
Tile of Soul é um sistema queadiciona pontos de soul do player ao passar em um determinado tile.
Segue o Script
Em data/movements/scripts crie um arquivo e renomei para tileofsoul.lua com o seguinte script:
local storage = 11131 local _soul = 3 -- Pontos que irá receber local seg = 2 -- intervalo de tempo local efecto = 0 -- efeito local evento = {} function Soul(cid) if isPlayer(cid) then if getPlayerStorageValue(cid, storage) == 1 then doSendMagicEffect(getThingPos(cid), efecto) doPlayerAddSoul(cid,_soul) evento = addEvent(Soul, 1000*seg, cid) if getPlayerStorageValue(cid, storage) < 0 or getPlayerStorageValue(cid, storage) == nil then stopEvent(evento) end end end end function onStepIn(cid, item, pos) if isPlayer(cid) then setPlayerStorageValue(cid, storage, 1) Soul(cid) end return true end function onStepOut(cid, item, pos) if getPlayerStorageValue(cid, storage) == 1 then setPlayerStorageValue(cid, storage) stopEvent(evento) end return true endEm movements.xml adicione as tags
<movevent type="StepIn" actionid="5842" event="script" value="tileofsoul.lua"/> <movevent type="StepOut" actionid="5842" event="script" value="tileofsoul.lua"/>Também é possivel utilizar o script para Mana ou Health. Para isso basta alterar:
Por
Para Mana
Para Health
Depois basta adicionar o action id no mapa em qualquer tile e aproveitar.



Espero que gostem.
Credito
~~Diegogo
Editado Abril 11 por Krono