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

  • Kay
  • Kay's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
3 months 1 week ago #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
3 months 5 days ago - 3 months 5 days ago #8319 by lacrc
Have you tried taking the comparison out of the variable?

Example:
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:
%echo% Backstab: %actor.skill(backstab > 60)%
And see what it'll print out.

Hope it helps!
Last edit: 3 months 5 days ago by lacrc.

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

Time to create page: 1.235 seconds