Trigger help pls

  • JTP
  • JTP's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 year 6 months ago #6219 by JTP
JTP created the topic: Trigger help pls
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
1 year 6 months ago #6220 by thomas
thomas replied the 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
if %actor.skill(herbalism)% > 0 
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.

  • JTP
  • JTP's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 year 6 months ago #6221 by JTP
JTP replied the 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.902 seconds