If statements without scripting?

Posted by Cooldown on Thu 19 Nov 2009 03:07 PM — 2 posts, 17,743 views.

#0
When I try to use an if statement in a trigger, it doesn't work. It either sends it to the mud or just does nothing. Do if statements have to be used in scripts? And if so, how would I later send commands back to the mud? Sorry, I just started using Mushclient.
USA #1
Yes, any if's or logic would need to be done in a script, or in the trigger's Send field when the Send To field is set to Script.

Syntax depends on what scripting language you prefer to use (which should generally be done in one you know :)). If you're learning how to write scripts in general, I'd recommend Lua for Mushclient. It's the default, it's easy enough to learn, and it's very powerful and flexible once you build upon your understanding of it.


if AtticIsBetter == true then
  Send ("burp")
else
  Send ("fart")
end



There's a tutorial, with outdated screenshots but still relevant steps, located at http://www.mushclient.com/scripting