Trigger help pls

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 years 2 weeks ago #6219 by JTP
Trigger help pls was created by JTP
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
2 years 2 weeks ago #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
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
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 years 2 weeks ago #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.992 seconds