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.
 Entire forum ➜ MUSHclient ➜ General ➜ Score in Status Bar

Score in Status Bar

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


Posted by GageEndal   (14 posts)  Bio
Date Tue 19 Apr 2005 04:10 AM (UTC)
Message
This one is probrobly pretty simple. I want to set up a trigger that will shove my current score into a variable and have that variable display in the Status Bar on the bottom of the screen. On top of that, whenever I get the message:

You receive 2100 experience points and 17 gil!

I want it to set 2100 to a wildcard and subtract that from the current score. I have no clue how to work scripts and I have gotten very good with triggers. Please reply if you think you can help with this one.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Tue 19 Apr 2005 04:17 AM (UTC)
Message
What does the score line look like?

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by GageEndal   (14 posts)  Bio
Date Reply #2 on Tue 19 Apr 2005 01:25 PM (UTC)
Message
| |---------------------------------------------------------------| |
| | You have 34582278 experience. | |
| | You need 299842 experience to gain a level. | |
| | You have been awarded 0 Roleplay points this level. | |
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #3 on Tue 19 Apr 2005 07:00 PM (UTC)
Message
In the future, you should put output in [code][/code] tags to preserve whitespace (it didn't matter in this case, since its a variable amount anyway). Of course then you have to escape a couple of things (which you can do in a mushclient notepad automatically).

I assumed you wanted the experience to level (since otherwise subtracting didn't make sense) and this will do it for you (assuming you're using VBScript):

<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="^\| \| You need (\d+) experience to gain a level\.[ ]+\| \|$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>setvariable "exptolevel", "%1"
setstatus "ExpToLevel: %1"</send>
  </trigger>

  <trigger
   enabled="y"
   keep_evaluating="y"
   match="^You receive (\d+) experience points? and (\d+) gil!$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>setvariable "exptolevel", getvariable("exptolevel") - %1
SetStatus "ExpToLevel: " &amp; getvariable("exptolevel")</send>
  </trigger>
</triggers>

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by GageEndal   (14 posts)  Bio
Date Reply #4 on Wed 20 Apr 2005 03:25 AM (UTC)
Message
I put it in and I think it's working. I got an error message though that says

Quote:

| | You need 290676 experience to gain a level. | |
Send-to-script cannot execute because scripting is not enabled.
| | You have been awarded 0 Roleplay points this level. | |

Any clue how to fix this?
Top

Posted by GageEndal   (14 posts)  Bio
Date Reply #5 on Wed 20 Apr 2005 03:26 AM (UTC)
Message
Nevermind, I fixed it. Works like a charm! Thanks!
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.


16,599 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.