How to self test trigger?

Posted by Tkl1129 on Wed 06 Jul 2011 02:07 AM — 5 posts, 22,433 views.

Hong Kong #0
Hi, I'm newbie in mush, acutally I'm using zmud before and now trying to switch to mush.

There was many many difficulties as I'm know nothing about programming just knoe zscript only. I'm trying to learn LUA and setting up basic functions for my mud games in Chinese.
There were few questions I meet, please kindly help :)


1. After a trigger made, how to test it offline/myself without the real pattern from mud?
- in zmud, if the pattern is "Hello *", I can use a function call #sh Hello xxx, or #say Hello xx to fire the trigger, but here I use /print or /Note also cannot fire it, what can I do when I want to do some self test on trigger?

2. I have a ">" symbol at the start of every line, before no this ">" in zmud, how can I disable it?

Thanks a lot~
USA Global Moderator #1
Quote:
After a trigger made, how to test it offline/myself without the real pattern from mud?

You can test your trigger patterns with Game->Test Trigger... (or press Shift+Ctrl+F12)

Don't forget to force a line break at the end of your test pattern with Ctrl+Enter.

Quote:
I have a ">" symbol at the start of every line
I don't know about this one.
Hong Kong #2
One more question, can I edit and testing offline?
when I type something on command line, he keep on asking me to connect to thw world...-_-!

Since my place have firewall blocked, I only can edit and use it at home, so all trigger edit, function test wanna be done offline :), please advice, thanks.
USA Global Moderator #3
Tkl1129 said:
One more question, can I edit and testing offline?


Yes.
Australia Forum Administrator #4
If you set the IP address to 0.0.0.0 it won't try to connect.

Then you can test triggers using the method Fiendish mentioned or you can use the Simulate function.

Template:function=Simulate
Simulate

The documentation for the Simulate script function is available online. It is also in the MUSHclient help file.