• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Exhaust when going up or down stairs.

vichoko

Member
Joined
Oct 9, 2008
Messages
128
Reaction score
6
Location
Santiago, Chile
I'n my server is very common that sorcerers and druids clean entire rooms just going up and down stairs and throwing avalanches.
I don't know whats the best solution for this problem but i thought adding an exhaust it could kinda solve the problem.

If you think thats the solution, where can i add that?
And if you don't, what else you think i can do to prevent this?
 
Athought it is configured to 2000 [ms]. The system isn't working. It's like there is no exhaustion.

Now i configured it to 4000 just for testing and the exhaustion isn't working for this value neither.

I'm using the last version of TFS for 10.41.

EDIT: Now i configured it to 40000 and is like there is no exhaustion at all.

UP :C This error is very critic and i need heelp to solve it, please help
 
Last edited by a moderator:
Just create a script in movements attach the item id's of all the staircases that you are using on your map and check if they are exhausted if they are not then set a condition of exhaust for whatever duration... problem solved
 
@Limos asked do you want Exhaustion for spells or stairs.
If you add exhaustion for spells then, players cant do any spells for x amount of time when using y object
y object = stairs, ladders, holes, portals(i assume)

If you add exhaustion for y object then, players cant go back up/down/trough for x amount of time. thus meanwhile they can still use spells to fight monsters
 
I don't know if this will work but atleast you have all the stair id's :)
Code:
local exhaust = 5
local stairs = {
    410, 411, 423, 432, 433, 459, 1385, 1396, 3219, 3220, 3687, 3688, 4834, 4835, 4836, 4837, 5081, 5258, 5259,
    5260, 7924, 7925, 8170, 8282, 8283, 8709, 8716, 9573, 9574, 9606, 9846, 11123, 12694, 12696, 15536, 15537, 15538,
    17766, 17767, 17768, 18234, 18534, 19674, 19675
}
 
local condition = Condition(CONDITION_EXHAUST)
condition:setParameter(CONDITION_PARAM_TICKS, exhaust * 1000)
 
function onStepIn(cid, item, pos, fromPos)
    local player = Player(cid)
    if isInArray(stairs, getThingfromPos(pos).itemid) then
        if not player:getCondition(CONDITION_EXHAUST) then
            player:addCondition(condition)
            return true
        end
    end
    return true
end

Code:
<!-- stair exhaust -->
<movevent event="StepIn" itemid="410" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="411" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="423" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="432" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="433" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="459" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="1385" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="1396" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="3219" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="3220" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="3687" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="3688" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="4834" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="4835" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="4836" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="4837" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="5081" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="5258" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="5259" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="5260" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="7924" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="7925" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="8170" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="8282" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="8283" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="8709" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="8716" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="9573" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="9574" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="9606" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="9846" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="11123" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="12694" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="12696" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="15536" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="15537" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="15538" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="17766" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="17767" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="17768" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="18234" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="18534" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="19674" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="19675" script="stairExhuast.lua"/>
 
I don't know if this will work but atleast you have all the stair id's :)
Code:
local exhaust = 5
local stairs = {
    410, 411, 423, 432, 433, 459, 1385, 1396, 3219, 3220, 3687, 3688, 4834, 4835, 4836, 4837, 5081, 5258, 5259,
    5260, 7924, 7925, 8170, 8282, 8283, 8709, 8716, 9573, 9574, 9606, 9846, 11123, 12694, 12696, 15536, 15537, 15538,
    17766, 17767, 17768, 18234, 18534, 19674, 19675
}

local condition = Condition(CONDITION_EXHAUST)
condition:setParameter(CONDITION_PARAM_TICKS, exhaust * 1000)

function onStepIn(cid, item, pos, fromPos)
    local player = Player(cid)
    if isInArray(stairs, getThingfromPos(pos).itemid) then
        if not player:getCondition(CONDITION_EXHAUST) then
            player:addCondition(condition)
            return true
        end
    end
    return true
end

Code:
<!-- stair exhaust -->
<movevent event="StepIn" itemid="410" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="411" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="423" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="432" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="433" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="459" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="1385" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="1396" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="3219" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="3220" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="3687" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="3688" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="4834" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="4835" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="4836" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="4837" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="5081" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="5258" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="5259" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="5260" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="7924" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="7925" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="8170" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="8282" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="8283" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="8709" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="8716" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="9573" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="9574" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="9606" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="9846" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="11123" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="12694" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="12696" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="15536" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="15537" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="15538" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="17766" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="17767" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="17768" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="18234" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="18534" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="19674" script="stairExhuast.lua"/>
<movevent event="StepIn" itemid="19675" script="stairExhuast.lua"/>

OMG, i'll try with this.
Thank you si much!

@whitevo:
Oh thanks for explaining the missunderstanding. I want exhaust for spells and runes. To avoid mages from abusing of avalanches and other offensive spells, when they go up or fown from a stair.
I hope this explained what i want hehe

Sorry for the missundestanding; i'm really trying to do my best with the language barrier (I speak spanish and i'm learning english in college).
 
Back
Top