• 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+ Decrease player skill

QuickLearner

New Member
Joined
Mar 20, 2018
Messages
15
Reaction score
1
Hi, I'm playing with onEquip and onDeEquip methods and I want to add player a skills when he is wearing full set ( let's say leather set ) and decrease on unequiping one of the item from set.

Is it possible? I was playing with :

Lua:
player:addSkillTries(SKILL_CLUB, player:getVocation():getRequiredSkillTries(SKILL_CLUB, player:getSkillLevel(SKILL_CLUB) + value));

where value was :
15 - onEquip
-15 - onDeEquip


but that didn`t worked at all. I was reading the forum here and found out that I can trigger a SQL query to change player skill but I don`t want to do that.
 
If it's only temporary, create a buff and give that to the character, similar to blood rage, for example.

You can see an example of me doing something similar here, as well.
 
Solution
That looks super and it looks even better of what I wanted to do but I don't know where I should put it and how to handle that file?

I've just copied this file into events directory but then what?

Edit: I just saw your comments on the next pages. I need to convert it into separate scripts.

Edit 2 : It's working. I love you :*


@Xikini But can you tell me what for is this code :

1632208303518.png

I've commented it out because I couldn't do the line

local dodgeOnEquip = MoveEvent() - becuse there was nil value on MoveEvent()
and becasue of that I didn`t have the dodgeOnEquip variable so I had to comment out the for loop.
 
Last edited:
That looks super and it looks even better of what I wanted to do but I don't know where I should put it and how to handle that file?

I've just copied this file into events directory but then what?

Edit: I just saw your comments on the next pages. I need to convert it into separate scripts.

Edit 2 : It's working. I love you :*


@Xikini But can you tell me what for is this code :

View attachment 62235

I've commented it out because I couldn't do the line

local dodgeOnEquip = MoveEvent() - becuse there was nil value on MoveEvent()
and becasue of that I didn`t have the dodgeOnEquip variable so I had to comment out the for loop.
It's for revscripts.
You register it in Lua instead of xml.

If you're registering directly into movements, you'll be registering in the movements.xml file instead
 
Back
Top