odinfan Newbie
Joined: 19 Mar 2001 Posts: 2 Location: USA
|
Posted: Mon Mar 19, 2001 10:51 pm
AutoRoller (Diku Based) |
I'm going to show you how to make an autoroller for your mud. Below is a sample output from a mud. Note: the numbers in parenthesis are just for reference and are not actual mud output.
A sample roll screen:
Generating Stats... (Section 1: Header)
Strength: Good Power: Good
Agility: Good Intelligence: Fair
Dexterity: Fair Wisdom: Good
Constitution: Fair Charisma: Good
Bad: 25-49 Fair: 50-74 Good: 75-100
Do you wish to reroll y/n[y]?
That is a sample output. Based on this sample output..here is a set of triggers you can use to make it autoroll for you, based on what stats you would like. Let's say I want Str, Con, Int and Wis to be good.
IMPORTANT: AT any time before you start rolling, type "#var total 0" to set the value of that variable to zero, without quotes by the way.
#al {stop} {n;#t- rollin}
#al {addone} {#ad total 1}
#ac {Strength:%sgood%s} {addone} {rollin}
#ac {Intelligence: %sgood} {addone} {rollin}
#ac {Wisdom:%sgood} {addone} {rollin}
#ac {Constitution:%sgood%s} {addone} {rollin}
#ac {Bad: 25-49} {%if(@total=4,stop,y)} {rollin}
#ac {wish to reroll} {#say value of total=@total;#var total 0}
that's it!
How it works: if a stat you want is hit, it adds 1 to the variable "total". If the variable total = (whatever you set it to) then it does the alias "stop", which presses "n", then turns off the class of triggers called {rollin}. If the value of the variable total is less than 4 in this case, it hits yes. The very last trigger shows you a prompt telling you how many of the stats you requested were hit by showing you: value of total=(whatever), and it resets the value of VAR total to zero in the case that you are continuing.
Notes: The stats on the left use the %sgood%s pattern. %s is used for white spaces. Note the stats on the right are the end of the line. So any stats on the right that you want to set, you have to use %sgood
(no %s at the end)
How to add other stats. For each stat you want good, just add another trigger like above, but make sure you set the value of %if(@total=
to how ever many goods you need.
Finally: To customize for your own mud, there are 4 basic sections to the roller, the header, the stats, the little explanation of stats line, and a prompt to hit y/n. Change the triggers and output as it is on your mud.
Feel free to contact me with questions..i've tested it and it works on a couple different muds.
Odinfan
Odinfan@yahoo.com |
|