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
This inside the onLogin
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!
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: