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 ➜ General ➜ Stat Roller for Mushclient

Stat Roller for Mushclient

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


Posted by Bassball   (2 posts)  Bio
Date Thu 03 Jan 2008 04:20 AM (UTC)
Message
I play a MUD called Abandoned Realms, It uses a stat roller, that gives a list of stats and asks if you accept it or not, like this

Rolling attributes for a half-elf ranger.
Max Str: 19 Int: 22 Wis: 21 Dex: 22 Con: 18
[86] Str: 17 Int: 18 Wis: 16 Dex: 18 Con: 17 Keep? (Y/N)


then, you either type yes, or no.
and, if no, it responds with another set of attributes, like this..

[89] Str: 17 Int: 19 Wis: 18 Dex: 19 Con: 16 Keep? (Y/N)

Now, I need a stat roller that will do this for me automatically, because to get a maxed stat roll it takes awhile, and I don't have the patience to sit and type no for each one... so basically I need something that will recognize the first set of numbers, the "[86]" and realize that that is NOT an acceptable roll, so it will respond with a "no" then, recognize that the first number the "[89]" is unacceptable as well, and continue this process until it comes across the desired 'acceptable' number

I've been trying for quite some time to figure it out on my own, but I'm just not a very computer literate person, and I just can't manage to figure it out.

Thanks everyone for any and all responses
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 03 Jan 2008 05:11 AM (UTC)
Message
Try searching this forum for "stat roller".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Bassball   (2 posts)  Bio
Date Reply #2 on Thu 03 Jan 2008 04:21 PM (UTC)
Message
Alright, I went through alot of the posts that came up when I searched for a stat roller, almost all of them have exactly the same reply this post did, go search... and there were a few that actually had codes posted, but unfortunatly they were abit far off from the way my MUD works and not only that, but I didn't understand them at all, heh.

Now, I made my own trigger set that seemed to have been working just fine, the only problem is I need it to trigger on prompt, not newline, in zmud that is as simple as checking a box, how can I make this happen with mushclient?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Fri 04 Jan 2008 02:40 AM (UTC)
Message
I don't want to seem unhelpful, but we get so many requests for stat rollers, all slightly different. :)

I suggest for the newline issue you check out http://www.mushclient.com/faq point 11.

Since your stat roller prompt has a fairly static format, you could make a plugin that detects that (similar to the one described in the posts mentioned in the FAQ) that detects the stat line, and adds a newline to it, then the trigger will fire.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #4 on Fri 04 Jan 2008 04:36 AM (UTC)

Amended on Fri 04 Jan 2008 04:52 AM (UTC) by Nick Gammon

Message
This plugin should fix up the stat roller line to have a newline:


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>

<muclient>
<plugin
   name="Add_NewLine_To_Stats"
   author="Nick Gammon"
   id="dcc8965b129a0ed4c0dd157b"
   language="Lua"
   purpose="Forces a newline after a stats prompt"
   date_written="2008-01-04 16:00"
   requires="3.82"
   version="1.0"
   >

</plugin>


<!--  Script  -->


<script>
<![CDATA[
function OnPluginPacketReceived (s)
  return (string.gsub (s, "\n%[%d+%] Str: %d+ Int: %d+ Wis: %d+ Dex: %d+ Con: %d+ Keep%? %(Y/N%)", "%1\n"))
end -- function OnPluginPacketReceived
]]>
</script>

</muclient>



You need to save between the lines as Add_NewLine_To_Stats.xml and use the File -> Plugins menu item to install that file.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Chris Slocum   (1 post)  Bio
Date Reply #5 on Mon 09 Feb 2009 07:42 PM (UTC)
Message
Bassball would you post you trigger? I cannot figure out all of these codes and such. Thanks If he does not respond I need help with a layout like this...

[87] Str: 18 Int: 16 Wis: 17 Dex: 16 Con: 20 Keep? (Y/N)

desired:

[93] Str: 20 Int: 17 Wis: 18 Dex: 17 Con: 21 Keep? (Y/N)
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.


19,024 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.