RevScripts Regen tfs 1x

alcapone

Member
Joined
Jan 13, 2021
Messages
44
Reaction score
5
Lua:
local regenCondition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT)
regenCondition:setTicks(-1)
regenCondition:setParameter(CONDITION_PARAM_HEALTHGAIN, 15)
regenCondition:setParameter(CONDITION_PARAM_HEALTHTICKS, 2000)
regenCondition:setParameter(CONDITION_PARAM_MANAGAIN, 15)
regenCondition:setParameter(CONDITION_PARAM_MANATICKS, 2000)
 
 
local fastregem = CreatureEvent("fastregem")
function fastregem.onLogin(player)
 
    if player:getStorageValue(16312398) > os.time () then
    player:addCondition(regenCondition)
 
        return true
    end
 
     
   
    return true
end
fastregem:register()


Good night, I have a problem with the script I am trying to make the rule accumulate with the character's rule but what is happening is that it is overlapping the original character's rule
 
Last edited:

Codinablack

Dreamer
Content Editor
Premium User
Joined
Dec 26, 2013
Messages
1,319
Solutions
4
Reaction score
457
I don't understand what rule is?

Either way, the problem is probably in the fact that it seems you never save to that storage value, but that is what you are checking against the time, if you want it to increase over time you need to update the storage value for sure .. but for anyone to help you will need to be more clear on what you are trying to accomplish
 
OP
A

alcapone

Member
Joined
Jan 13, 2021
Messages
44
Reaction score
5
I don't understand what rule is?

Either way, the problem is probably in the fact that it seems you never save to that storage value, but that is what you are checking against the time, if you want it to increase over time you need to update the storage value for sure .. but for anyone to help you will need to be more clear on what you are trying to accomplish
I already found a solution..
 
Top