mohamedabdoyod
New Member
- Joined
- Jun 27, 2015
- Messages
- 24
- Reaction score
- 1
How To Make floor add health or Mana
local pos = getCreaturePosition(cid)
local health = xxx
local tileid = xxx
function onStepIn(cid, item, frompos, itemEx, topos)
if item.itemid == tileid then
doCreatureAddHealth(cid, health)
doSendMagicEffect(pos, x)
end
return true
end
<movement type="StepIn" actionid="xxxx" event="script" value="healing tile.lua"/>
pos = position aka map locationman
(pos, x)
what write in It ???
no... In this script he used an action id, which means to make it effective in the game you will have to double click that floor & set the same action id as lucian put in the script (you can change it of course.)pos = position aka map location
Example: {x=111, y=222, x=333}
x = ENUM
magic effects enums start with CONST_ME_
From your const.h file (in sourcecode) you can find the list of ENUMS
Or look at this: https://otland.net/threads/tfs-1-x-enums.225588/
The actionId has nothing to do with what's in the script. It's quite unnecessary to check for, when that's the one thing that's checked for in game, unless you have multiple different actions executed in the same script, then you would need to assign different actionids and check for them. Just like checking for the tiles itemId is completely pointless.no... In this script he used an action id, which means to make it effective in the game you will have to double click that floor & set the same action id as lucian put in the script (you can change it of course.)
Your onStepIn function is wrong. Your calling actionscript functions.In movements create lua file rename it "healing tile" and copy these lines
Code:local pos = getCreaturePosition(cid) local health = xxx local tileid = xxx function onStepIn(cid, item, frompos, itemEx, topos) if item.itemid == tileid then doCreatureAddHealth(cid, health) doSendMagicEffect(pos, x) end return true end
In movements.xml add this line
Code:<movement type="StepIn" actionid="xxxx" event="script" value="healing tile.lua"/>
function onStepIn(cid, item, position, fromPosition)
doCreatureAddHealth(cid, 100)
doSendMagicEffect(position, 35) -- 35 = hearts, 14 = green sparkle
return true
end
<movement type="StepIn" actionid="45001" event="script" value="healing_tile.lua"/>
why i am help Some peopleLOLOL.
Pls, stop helping this kind o guys. They just want to get a server and run.
There are tons of people trying to help you, but u now nothing (jhon snow) about OTs (and english). So those people arent really helping, they are just coding your needs, and you are not learning a shit.why i am help Some people
I agree, I saw that post for items.xml.why i am help Some people
Don't worry about it.i am Sorry but I am new and do not know much about this site
I guess he is using 0.3.6 or 0.4, unfortunately i'm not home. I had this kind of movement script and i have no idea how it was. :cYou could start, with telling us Tfs version?