• 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+ Conditions on login? How to? TFS 1.3

Mjmackan

Mapper ~ Writer
Premium User
Joined
Jul 18, 2009
Messages
1,234
Solutions
8
Reaction score
111
Location
Sweden
Hello!

Using: TFS 1.3
I recently found out that when adding conditions to people on login, say that i want someone with storage id xxx to recieve 3+ skill onLogin permanent.
Then utito tempo, utito tempo san etc wont work, neither will anything that adds conditions, how come?

My creaturescript/onlogin looks like this pretty much.
Lua:
function onLogin(player)

local conditionLeech = Condition(CONDITION_ATTRIBUTES)
conditionLeech:setParameter(CONDITION_PARAM_SPECIALSKILL_LIFELEECHAMOUNT, 5)
conditionLeech:setParameter(CONDITION_PARAM_SPECIALSKILL_LIFELEECHCHANCE, 5)
conditionLeech:setParameter(CONDITION_PARAM_SPECIALSKILL_MANALEECHAMOUNT, 5)
conditionLeech:setParameter(CONDITION_PARAM_SPECIALSKILL_MANALEECHCHANCE, 5)
conditionLeech:setParameter(CONDITION_PARAM_TICKS, -1)

    if getPlayerStorageValue(player, 105) == 2 then player:addCondition(conditionLeech)
    end
return true
end

I can't run several of these aswell, such as if i add another condition like this:
Lua:
local conditionHealthFour = Condition(CONDITION_ATTRIBUTES)
conditionHealthFour:setParameter(CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 108)
conditionHealthFour:setParameter(CONDITION_PARAM_TICKS, -1)

elseif getPlayerStorageValue(player, 105) == 3 then player:addCondition(conditionHealthFour)
Code:
Only one of them will work, I don't have a clue why or how it works. Could any TFS pro explain this?

Regards,
Mjmackan
 
Top