Welcome to the Builder Academy

Question Trigger help pls

More
27 Oct 2016 22:28 #6219 by JTP
Trigger help pls was created by JTP
Code:
set study 'study set herbalism 'herbalism if %study.contains('%cmd%)% && %herbalism.contains('%arg%)% if %actor.skill("herbalism")% tell %actor.name% you have already learned how to use herbalism. elseif %echo% The study master begins to teach you how to use herbalism. %actor.skillset("herbalism" 5)% end else %send% %actor% study what? end

No matter if a char has or dont have herbalism, it tells them they already know it. What is missing ?



If i use: eval %actor.skill("herbalism")% > 1
Then:
The study master begins to teach you how to use herbalism.
Study what?

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

More
30 Oct 2016 21:10 #6220 by thomas
Replied by thomas on topic Trigger help pls
First off, "elseif" is used if there is another condition, here, just use "else".

And it turns out, %actor.skill% should not have "'s . So you need to check
Code:
if %actor.skill(herbalism)% > 0
Code:
set study 'study set herbalism 'herbalism if %study.contains('%cmd%)% && %herbalism.contains('%arg%)% if %actor.skill(herbalism)% > 0 tell %actor.name% you have already learned how to use herbalism. else %echo% The study master begins to teach you how to use herbalism. %actor.skillset("herbalism" 5)% end else %send% %actor% study what? end
skillset uses one_word to parse out the value in "'s.

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

More
30 Oct 2016 22:31 #6221 by JTP
Replied by JTP on topic Trigger help pls
Thanks alot Thomas, much apreciated

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

Time to create page: 0.258 seconds