problems on firing a trigger

Posted by Zazabi_00 on Sat 18 Jun 2005 07:27 AM — 2 posts, 14,146 views.

#0
i am new to the vbscript and this client, so i am still learning on using this type computer landuage,,...

My pupose of the trigger is to caputre the information from the prompt line(e.g. 1820h, 1620m, 8000e, 8000w ex-)

so my trigger is shown below.

*h, *m, *e, *w *-.*

<,command send to script>>
world.SetVariable "health", "%1"
world.SetVariable "mana", "%2"
world.SetVariable "endurance", "%3"
world.SetVariable "willpower", "%4"
world.SetVariable "status", "%5"

my problem is that the saved information in the varible heath, mana .... status are little bit outdated.

i have make a test...
see below..
here are the screen output.
___________________________________
1820h, 1620m, 7998e, 8000w e-
You have recovered balance on all limbs.
1820h, 1620m, 7998e, 8000w ex-
1820h, 1620m, 8000e, 8000w ex-

______________________________________
let us conside the variable status,
LINE3 : status is "e" , not "ex" after i prees enter,then it fo to LINE4and the status become "ex"

it shows me that the trigger only fires after i prees enter in the prompt line.

what can i do if i want to save the information in the variables without pressing the enter after the prompt line....
USA #1
This is a common problem, it is because the server never send a newline, and mushclient won't proccess triggers until after the new line (otherwise how would it know when the line has finished?).

You have two options, both of which work fine.
One is to basically force a newline on the end of the prompt, and the other checks lines for the prompt line before the newline arrives. They are both plugins, and have good documentation as well.

If you still have questions, I suggest searching the forums, as theres a wealth of information already here.

Partial line checking:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=3774

Appending a newline to a prompt line:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=5020