I'm working on a 8.54 Open Tibia Server using The Forgotten Server - Version 0.2.7 (Mystic Spirit).
I want to make a movements script which checks for a certain action id and if the sqm had the action id it will sent a message + adding the normal swimming conditions. But secondly I only want the msg to happen when you aren't already in the swimming condition.
And after that I want to create the 'WATERSPLASH' effect on the moment you jump into any water (at change outfit condition)
I've tried fixing this but wasn't really getting far.
This is what I got so far:
also tried adding:
But that just removed the msg.
At last I tried adding the splash effect at 'onStepIn':
But that kind of created the splash effect every time I swim a sqm.
Hope any of you can help me out.
Thanks in advance.
I want to make a movements script which checks for a certain action id and if the sqm had the action id it will sent a message + adding the normal swimming conditions. But secondly I only want the msg to happen when you aren't already in the swimming condition.
And after that I want to create the 'WATERSPLASH' effect on the moment you jump into any water (at change outfit condition)
I've tried fixing this but wasn't really getting far.
This is what I got so far:
Code:
local outfit =
{
lookType = 267,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0
}
function onStepIn(cid, item, position, fromPosition)
if item.actionid == 55557 then
doCreatureSay(cid, "Pff! This water is hot.", TALKTYPE_ORANGE_1)
doSetCreatureOutfit(cid, outfit, -1)
doSendMagicEffect(position, CONST_ME_POFF)
else
doSetCreatureOutfit(cid, outfit, -1)
end
end
function onStepOut(cid, item, position, fromPosition)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
also tried adding:
Code:
if item.actionid == 55557 and outfit == -1 then
At last I tried adding the splash effect at 'onStepIn':
Code:
doSendMagicEffect(position, CONST_ME_POFF)
Hope any of you can help me out.
Thanks in advance.