Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Oggsk
Newbie


Joined: 20 May 2015
Posts: 9
Location: United States

PostPosted: Thu Jan 07, 2016 12:44 am   

building an autoroller
 
Not sure where to start to try to capture the stats. Since they are position swapable, i dont need to roll specific stats to be something, instead i can just look for say 2 perfects and 2 heroics. How would I setup something to scan all 8 slots and stop when I hit the desired number of values?


Here is the relevant text from the autorolling screen:


Code:
Your basic stats:
Strength:         Perfect         Power:             average
Dexterity:        Heroic          Intelligence:     average
Agility:            average        Wisdom:          average
Constitution:    mighty          Charisma:        fair   

 
You may choose to reroll your character at this time. If you elect
to reroll, these stats will be erased and new ones rolled.  To reroll,
select 'y' (or hit <return>).  To keep this character, and continue
character generation, select 'n'. Press the '?' to view details about
uses for each stat.

To swap stats: enter the first stat name folowed by the second stat
name (ex. type 'con str' will replace str with your current con roll).

Enter 'y' to reroll, 'n' to accept these stats, '?' to view help, or two attributes to swap:
Reply with quote
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Fri Jan 15, 2016 7:20 am   
 
I created something similar for Tele-Arena awhile back.

I'm going to assume you have a crude knowledge of triggers, because this is a crude method.

Each time you see "Your basic stats:" set all your variables to zero.. I'd use perfectCount and heroicCount, but you can use whatever.

pattern match Strength:(*)(%w), and for power, dex, etc, etc.

#if (%1 = "Perfect") {#add perfectCount 1} {#if (%1 = "Heroic") {#add heroicCount 1}}

Then when you match Enter 'y' to reroll, you check your counts.. so..

#if (@perfectCount >= 2 & @heroicCount >= 2) {#send n} {#send y}

You might need to adjust some brackets, and there are most definitely better ways to do it I'm sure, but this will get you what you want... You can even set it to 3 or 4 or whatever is possible.. Set it to run for a day or two and turn the sound way up, play some sound when it's finished so you can continue :)

Happy re-rolling
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net