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
➜ General
➜ Level Up Report
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| CoDukeTn
(3 posts) Bio
|
| Date
| Sun 23 Apr 2006 11:05 PM (UTC) |
| Message
| I don't know whether this has been brought here before or not but. I have no clue on scripting but I am wanting to write a script that when I level it will report my level up stats and another script that every hour reoprts kills/exp/gold. I know one is based off of a trigger where as the other is based on a timer. If I could get help with this that would be appreciated.
Aardwolf - Xzanderius | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Wed 26 Apr 2006 06:49 AM (UTC) |
| Message
| | There would be various examples of this around. If you want more detailed help you would need to show the actual messages you get from the MUD, and perhaps someone can give you some more guidance. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| CoDukeTn
(3 posts) Bio
|
| Date
| Reply #2 on Fri 28 Apr 2006 03:47 PM (UTC) |
| Message
| You raise a level!!
You gain 28 hit points, 21 mana, 19 moves, 7 practices and 4 trains.
The hitpoints, mana, moves, pracs, trains are all variables they never remain constant depending on current stats. The channel it would be outputted to is 'ftalk' | | Top |
|
| Posted by
| Flelm
(15 posts) Bio
|
| Date
| Reply #3 on Sat 29 Apr 2006 06:11 PM (UTC) |
| Message
| For the level up report, simply make a trigger off of the level up line. E.g.,
^You gain ([0-9]+) hit points, ([0-9]+) mana, ([0-9]+) moves, ([0-9]+) practices and ([0-9]+) trains\.$
Then, in the output, simply use something similar to this:
ftalk I leveled! I went up by %1 hp, %2 mp, %3 mv, and gained %4 pracs and %5 trains!
As for the timer, you need to add a timer that fires every hour, and does something similar to what I showed above, except I would use a script to both send to output (Note or print) and clear the various counting variables. (@gold, @kills, etc).
Then add triggers to increment those variables whenever the relevant events happens.
Hope that helps. | | Top |
|
| Posted by
| CoDukeTn
(3 posts) Bio
|
| Date
| Reply #4 on Mon 01 May 2006 09:40 PM (UTC) |
| Message
| | Thank you much for the help Flelm. I had a majority of the code done and that should finish it up. Thank You Kindly | | 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.
18,073 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top