[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Score in Status Bar

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Score in Status Bar

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by GageEndal   (14 posts)  [Biography] bio
Date Tue 19 Apr 2005 04:10 AM (UTC)  quote  ]
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.
[Go to top] top

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

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

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

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #3 on Tue 19 Apr 2005 07:00 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by GageEndal   (14 posts)  [Biography] bio
Date Reply #4 on Wed 20 Apr 2005 03:25 AM (UTC)  quote  ]
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?
[Go to top] top

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


1,296 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]