Hello Otlanders, I tried to find a health/mana tiles tutorial for my highexp server and I did not find anything, so I thought it would be useful to make one
- Create a file in data/movements/scripts/hptile.lua and put this :
Code:-- Script Made by Jypy function onStepIn(cid, item, position) if getCreatureHealth(cid) < getCreatureMaxHealth(cid) then doCreatureAddHealth(cid, 1000000000, FALSE) doSendAnimatedText(getThingPos(cid), "Refilled!", TEXTCOLOR_RED) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Refilled!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You are already refilled!") end return true end
- Create a file in data/movements/scripts/manatile.lua and put this :
Code:-- Script Made by Jypy function onStepIn(cid, item, position) if getCreatureMana(cid) < getCreatureMaxMana(cid) then doCreatureAddMana(cid, 1000000000, FALSE) doSendAnimatedText(getThingPos(cid), "Refilled!", TEXTCOLOR_BLUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Refilled!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are already refilled!") end return true end
- In data/movements/movements.xml put this :
Code:<movevent type="StepIn" actionid="9562" event="script" value="hptile.lua"/> <movevent type="StepIn" actionid="9563" event="script" value="manatile.lua"/>
- In your map editor, set your mana tile action id to 9563 and for health tile action id to 9562
Hope it helped
Last edited: