Welcome to the Builder Academy

Question Checking character has high enough skill level: %actor.skill(backstab)% ?

More
17 Feb 2019 12:37 #8318 by Kay
www.tbamud.com/forum/3-building/3772-tri...day-actor-variables#



Using that as a reference, I am making a trigger that checks/works only if you have an equal to or higher level in a certain skill.

example (this doesn't work):

if %actor.skill(backstab > 60)%
* Fires if char's skill level is 61 or higher
%echo% Trigger works
elseif %actor.skill(backstab < 60)%
* Fires if char's skill level is 59 or lower
%echo% Trigger works

Please Log in or Create an account to join the conversation.

More
18 Feb 2019 14:54 - 18 Feb 2019 14:55 #8319 by lacrc
Have you tried taking the comparison out of the variable?

Example:
Code:
if %actor.skill(backstab)% > 60

I haven't tested this but I think the skill() function should be used as %actor.skill(skillname)% and then it will return the amount of practice a player has in the skill passed along in parenthesis.

In your case I think the mud is looking for the "backstab > 60" skill, returning "unknown skill", and not working as expected.

For testing sake you can try:
Code:
%echo% Backstab: %actor.skill(backstab > 60)%
And see what it'll print out.

Hope it helps!
Last edit: 18 Feb 2019 14:55 by lacrc.

Please Log in or Create an account to join the conversation.

Time to create page: 0.172 seconds