I'm working on a 8.54 Open Tibia Server using The Forgotten Server - Version 0.2.7 (Mystic Spirit).
My idea: When walking over ice you have a chance of 1/748 to fall on your face.
What will happen: your outfit will change into a deadbody for 6 seconds, you will be unable to move/attack/heal for 6 seconds, you will recieve 35 ice damage and gain an extra stack in a player value (to reach an achievement).
I think I'll need to make a movement script for this on the following ids.
Server\data\movements\movements.xml
Server\data\movements\scripts\ice.lua
This is how far I got, not sure if everything is correct though.
Any help is welcome.
Thanks in advance.
My idea: When walking over ice you have a chance of 1/748 to fall on your face.
What will happen: your outfit will change into a deadbody for 6 seconds, you will be unable to move/attack/heal for 6 seconds, you will recieve 35 ice damage and gain an extra stack in a player value (to reach an achievement).
I think I'll need to make a movement script for this on the following ids.
Server\data\movements\movements.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<movements>
<movevent event="StepIn" itemid="671" script="ice.lua"/>
<movevent event="StepIn" fromid="6683" toid="6686" script="ice.lua"/>
</movements>
Server\data\movements\scripts\ice.lua
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST_HEAL)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 6000)
local outfit =
{
lookType = 2317,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
lookFeet = 0,
lookAddons = 0
}
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE then
local rand = math.random(1, 748)
if rand < 2 then
doTargetCombatHealth(0, cid, COMBAT_ICEDAMAGE, -35, -35, CONST_ME_NONE)
doSendMagicEffect(position, CONST_ME_DRAWBLOOD)
doAddCondition(cid, condition)
setPlayerStorageValue(cid,getPlayerStorageValue(cid,11000),+1)
end
return true
end
This is how far I got, not sure if everything is correct though.
Any help is welcome.
Thanks in advance.