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 ➜ Auto-Roller

Auto-Roller

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


Posted by Ranie   (1 post)  Bio
Date Tue 23 Dec 2003 09:56 PM (UTC)
Message
Ok, i searched forums so i wouldnt be wasteing every1's time. I need an auto-stat roller for a mud called Aarchon http://www.aarchonmud.com/ lemme give you an example of the rolling way it is

You are given 15 dice, which you may assign to your 10 STATS (see help STATS)
and 5 ATTRIBUTES. Attributes account for a specific portion of each stat:
body | 15% str | 20% con | 20% vit | 15% agi | 10% dex |
mind | 25% int | 20% wis | 15% dis | 10% cha | 10% luc |
toughness | 25% str | 20% con | 10% vit | 25% dis |
speed | 10% vit | 25% agi | 30% dex | 15% int |
wit | 20% wis | 30% cha | 30% luc |
Type REROLL until the dice given are favorable.
Or: ASSIGN <stat or attribute name> <die_value>
UNASSIGN <stat or attribute name>
DEFAULT to quit and take the default stats for your class
or DONE.
The display shows the following stat values:
Current - stat you will begin the game with if all your dice are assigned
Train - the highest you can train this stat to
Die - of the dice you rolled, you assigned this die (if any) to this stat
Min/Max - the lowest and highest possible values of these stats for a
member of your race, class, gender, and alignment.

Stat Curr Train Die Min-Max Attribute
Str 65 92 -- 65-120 body --
Con 35 75 -- 35-115 mind --
Vit 40 75 -- 40-110 toughness --
Agi 5 47 -- 5- 90 speed --
Dex 30 60 -- 30- 90 wit --
Int 7 41 -- 7- 75
Wis 48 74 -- 48-100
Dis 25 60 -- 25- 95
Cha 2 46 -- 2- 90
Luc 28 64 -- 28-100

Dice left to distribute: 100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 40, 30, 20, 10
Show, reroll, assign, unassign, default, help, or done?

I want the roller to give my dice hi rolls, if its possible, thanks

-Ranie
BTW: can this be done for zMud
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 24 Dec 2003 03:08 AM (UTC)
Message

See Stat Roller and Automated rolls.

If you want help with writing a zMUD stat roller, I suggest posting on the zMUD forum. This forum is really for MUSHclient and related programs.


- Nick Gammon

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

Posted by Tiredchris   (17 posts)  Bio
Date Reply #2 on Sat 17 Nov 2012 11:23 PM (UTC)
Message
Didn't want to add another topic to the forums, but I'm playing this game as well. I was hoping someone could do this for mushclient.

Since this post was done in 2003 I'm happy to say they made one for Zmud, but not for mushclient. I would be grateful if someone could translate the zmud one to mushclient and I have their zmud script to help you :)

----- Copy & Paste Below this line -----
#TRIGGER {Dice left to distribute: (%n), (%n), (%n), (%n), (%n), (%n), (%n), (%n), (%n), (%n), (%n), (%n), (%n), (%n), (%n)} {#VAR dtotal 0;#MATH dtotal (%1+%2+%3+%4+%5+%6+%7+%8+%9+%10+%11+%12+%13+%14+%15);#IF (@dtotal < 1000) {reroll} {#WAIT 10000;#ECHO @dtotal;show}}
----- DO NOT COPY THIS LINE -----
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 18 Nov 2012 04:34 AM (UTC)
Message
Nine year thread necro! Don't think I've seen that before. :P

- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 18 Nov 2012 04:35 AM (UTC)
Message
There are quite a few threads on stat rollers in this forum. Try searching first.

- Nick Gammon

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

Posted by Tiredchris   (17 posts)  Bio
Date Reply #5 on Sun 25 Nov 2012 03:12 AM (UTC)

Amended on Sun 25 Nov 2012 03:14 AM (UTC) by Tiredchris

Message
I looked around, poked at the codes, looked some more, and I'm stumped. Here's what I got so far.

The dice roll I'm triggering off of is this:

Dice left to distribute: 99, 95, 91, 90, 90, 61, 60, 47, 42, 38, 27, 25, 18, 17, 3

Here is my trigger:

^Dice left to distribute\: (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)$


Here is the script:

dice=%1+%2+%3+%4+%5+%6+%7+%8+%9+%<10>+%<11>+%<12>+%<13>+%<14>+%<15>
ColourNote ("white", "green", "Current Roll: ",
            "white", "green", dice)  
if dice < 1000 then
  Execute("reroll")
end -- if


1. The script starts.
2. The total of the dice roll is calculated.
3. Shows the user what the current dice roll is.
4. If dice is less than 1000 it will execute a reroll.

It auto-rolls. Shows the right total.

But it keeps rolling even when dice>1000. I thought the conditional if statement would keep "Execute("reroll")" in check. Any ideas?
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #6 on Sun 25 Nov 2012 05:53 AM (UTC)
Message
Hmm. Can you post the whole trigger please?

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.

- Nick Gammon

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

Posted by Tiredchris   (17 posts)  Bio
Date Reply #7 on Sun 25 Nov 2012 04:03 PM (UTC)

Amended on Sun 25 Nov 2012 04:05 PM (UTC) by Tiredchris

Message
I have this in a new world, so there is nothing that can interfere with it.


<triggers>
  <trigger
   enabled="y"
   lines_to_match="2"
   match="^Dice left to distribute\: (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)\, (.*?)$"
   multi_line="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>dice=%1+%2+%3+%4+%5+%6+%7+%8+%9+%&lt;10&gt;+%&lt;11&gt;+%&lt;12&gt;+%&lt;13&gt;+%&lt;14&gt;+%&lt;15&gt;
ColourNote ("white", "green", "Current Roll: ",
            "white", "green", dice)  
if dice&lt;1000 then
  Send ("reroll")
end -- if
 </send>
  </trigger>
</triggers>
Top

Posted by Tiredchris   (17 posts)  Bio
Date Reply #8 on Sun 25 Nov 2012 04:50 PM (UTC)
Message
I got it. I didn't take into consideration that mushclient could be the one wrapping the roll on the new line and not server side. I unticked multi-line. I thought I had needed it where sometimes the roll was on one line and sometimes two, but it rolls great either way.

What would make the []multi-line option keep this script rerolling over and over again?
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #9 on Sun 25 Nov 2012 07:20 PM (UTC)
Message
The way you have that set up, the ^ matches the start of a line, not the start of the two lines. The \A sequence matches "start of subject" and \z matches "end of subject" which might be better. However then you need to know where the newline is (if it really was a server-side wrap).

The short answer is, it would have matched twice, since it would find the matching line in line 1 of 2 and then again in line 2 of 2.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


29,905 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.