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:
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:
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.
https://github.com/otland/forgottenserver/blob/master/src/luascript.cpp#L2635You 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.