• 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!

TFS 1.X+ Receiving Condition Attribute List

mackerel

Well-Known Member
Joined
Apr 26, 2017
Messages
398
Solutions
18
Reaction score
72
I had a look in the sources and one of the things that I think could be useful is obtaining parameters. If you look here:

https://github.com/otland/forgottenserver/blob/master/src/luascript.cpp#L2635

You can see we have something called setParameter, but there is no getParameters.

Let's say you have an action script with the following condition that the player is being given:

Lua:
local healthGain = 2500

local condition = Condition(CONDITION_REGENERATION)
condition:setParameter(CONDITION_PARAM_SUBID, 1)
condition:setParameter(CONDITION_PARAM_TICKS, 10000)
condition:setParameter(CONDITION_PARAM_HEALTHGAIN, healthGain)
condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 2000)
condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true)

i.e. heal someone for 2500 health every 2 seconds

Let's say healthGain is not a fixed value and will change in this scenario. Right now you can call a function to check whether the player has a condition, but you can not specifically call to check what parameters are assigned to this condition; and their corresponding values such as 'CONDITION_PARAM_HEALTHGAIN: value'. I would like to do it, but not sure where to start.
 
Back
Top