Hi, I'm using TFS 0.3 Beta 1 and it seams when ever I make a custom movement script it doesn't work. However I get no errors in the console and when I post the code here on forums people will give me better code or even say the code is fine and it should work. Is there some kind of bug that could be preventing my codes from working without showing any errors?
Here's an example of something I have;
poi_druid_fire.lua
Movements.xml;
Here's an example of something I have;
poi_druid_fire.lua
PHP:
local config = {
local vocs = {2, 6, 10},
local words = "Sweet I aint dead!",
local health = 10000,
local mana = 10000,
local uid = 3505
}
function onStepIn(cid, item, position, fromPosition)
if item.uid == config.uid then
if isInArray(config.vocs, getPlayerVocation(cid)) == TRUE then
doCreatureSay(cid, config.words, TALKTYPE_YELL)
else
doPlayerAddHealth(cid, -config.health)
doPlayerAddMana(cid, -config.mana)
end
end
end
Movements.xml;
Code:
<movement event="StepIn" itemid="1506" uniqueid="3506" script="poi_druid_fire.lua"/>