Register forum user name Search FAQ

Gammon Forum

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 ➜ hitpoint rep to chat

hitpoint rep to chat

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Anssett   USA  (9 posts)  Bio
Date Mon 18 Aug 2003 08:18 AM (UTC)
Message
ok, so one of the things i do with my chat script is report my current hps, so people that i'm playing in zones and stuff can see what my hps are without having to glance, etc...
the only problem i'm running into is, using setvariable, the hp variable isn't being set until the next line of input goes through. i'm wondering if there's some method of forcing the update.

on another note, is there any really quality material on regexps? it's been ages since i've written one, and i'd like to refamiliarize myself :P

::my code::


'this sub is used to set hp and mana variables for reporting purposes
sub statSet(inHP,inMN)
dim strHP,strMN
strHP=inHP
strMN=inMN
world.SetVariable "currHP",strHP
world.SetVariable "currMN",strMN
end sub


::sample line of input and the associated trigger::


[DH]<955hp 170m 610mv 100br>


<trigger
   enabled="y"
   match="*&lt;*hp *m *mv *br&gt; "
   send_to="10"
   sequence="100"
   other_text_colour="black"
   other_back_colour="black"
  >
  <send>/statSet &quot;%2&quot;,&quot;%3&quot;</send>
  </trigger>

---
a world without cheese would be a sad world indeed
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #1 on Mon 18 Aug 2003 08:54 AM (UTC)
Message
You can either read that thread about matching triggers before waiting for a newline to come in, which is a bit sloppy if i remember correctly, or you could add a newline at the end of your prompt. Most servers can do that.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #2 on Mon 18 Aug 2003 08:54 AM (UTC)
Message
Also, if you want to read on regexp, look at the MUClient \docs folder, there's a great document there :)

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
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.


13,526 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.