Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ VBscript
➜ problems on firing a trigger
problems on firing a trigger
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Zazabi_00
(5 posts) Bio
|
Date
| Sat 18 Jun 2005 07:27 AM (UTC) |
Message
| 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.... | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #1 on Sat 18 Jun 2005 10:43 AM (UTC) |
Message
| 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 |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,326 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top