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

Lua Login.lua Player Condition

Shawno0

Member
Joined
Dec 12, 2009
Messages
101
Reaction score
8
Hey tibians,

Can anyone shed some light on why this condition is not being applied to my player on login?

I have the following code on my Login.lua -

The following outside the Function onLogin
Lua:
local conditionSkill = Condition(CONDITION_ATTRIBUTES, 10)
conditionSkill:setParameter(CONDITION_PARAM_TICKS, -1)
conditionSkill:setParameter(CONDITION_PARAM_SKILL_LIFE_LEECH_CHANCEPERCENT, 100)
conditionSkill:setParameter(CONDITION_PARAM_SKILL_LIFE_LEECH_AMOUNTPERCENT, 20)

This inside the onLogin
Code:
    if player:getVocation():getId() == 10 then
        print(player:getVocation():getId())
        print("Adding Skill Condition")
        player:addCondition(conditionSkill)
    end

I added the print just for debugging to ensure the if statement was returning true, which is does.. :/

Edit: There are no errors appearing in the console, the tables do exist in the db under player, and all the conditions exist in the conditions.cpp. This exact script works flawlessly in the movements.lua for equipping imbued weapons.

Any help gratefully appreciated!
 
Last edited:
I dont know what is The Problem but maybe you should Show in a other section. Maybe a other People get The same Problem and you can find it there.
Regards
Morrow
 
Back
Top