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
disobayish1@gmail.com
Newbie


Joined: 19 Jul 2016
Posts: 8

PostPosted: Sun Aug 07, 2016 8:05 pm   

Help with stat roller for "The Final Challenge" mud
 
Ive been doing alot of research and found 20+ stat rollers on the forums but haven't had any luck modifying them to work with my mud, here's a sample of what a stat roll looks like. What I am trying to achieve is at least all scores AVG or better, plus a minimum of 2 MAX scores before accepting the roll.. Any help would be greatly appreciated. Thank you

I'll be continuing to try and fiddle with modifying another roller but i have a feeling it might be easier to make one from scratch, which i'm not capable of doing =(

**Also anything but a "Y" will reroll the stats** I'd like it to auto yes once the min requirements have been met, also maybe highlight with color and beep.

*****Stat order LOW, BAVG. AVG, AAVG, HIGH, MAX******

Your stats are:

Str: AVG. Int: AVG. Wis: LOW. Dex: AVG.
Con: AVG. Chr: BAVG. Luc: AVG. - Accept? (Y/N): n


Str: BAVG. Int: LOW. Wis: BAVG. Dex: HIGH.
Con: AAVG. Chr: LOW. Luc: MAX. - Accept? (Y/N): n


Str: AVG. Int: MAX. Wis: LOW. Dex: AAVG.
Con: LOW. Chr: LOW. Luc: BAVG. - Accept? (Y/N): n


Str: AAVG. Int: BAVG. Wis: AVG. Dex: AVG.
Con: AVG. Chr: AVG. Luc: LOW. - Accept? (Y/N): n


Str: AVG. Int: LOW. Wis: AVG. Dex: AVG.
Con: AAVG. Chr: LOW. Luc: LOW. - Accept? (Y/N): n
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 3542
Location: Pensacola, FL, USA

PostPosted: Mon Aug 08, 2016 5:39 am   
 
Something like this should do the trick:

Code:
<class name="Roller" id="938">
  <var name="low" usedef="true" id="939">
    <value>0</value>
    <default>0</default>
  </var>
  <var name="bavg" usedef="true" id="940">
    <value>0</value>
    <default>0</default>
  </var>
  <var name="max" usedef="true" id="941">
    <value>0</value>
    <default>0</default>
  </var>
  <trigger priority="9420" repeat="true" id="942">
    <pattern>LOW</pattern>
    <value>low=(@low+1)</value>
  </trigger>
  <trigger priority="9430" repeat="true" id="943">
    <pattern>BAVG</pattern>
    <value>bavg=(@bavg+1)</value>
  </trigger>
  <trigger priority="9440" repeat="true" id="944">
    <pattern>MAX</pattern>
    <value>max=(@max+1)</value>
  </trigger>
  <trigger priority="9450" id="945">
    <pattern>- Accept~? ~(Y/N~)</pattern>
    <value>#IF ((@low=0) AND (@bavg=0) AND (@max>=2)) {yes} {no;#RESET Roller}</value>
  </trigger>
</class>


Make a new class via the settings editor, go to the XML tab, and paste this over the current value.
_________________
Windows 10 Home Premium 64-bit
AMD Phenom II x6 1055T 2.8GHz 16GB
CMUD Pro v3.34
Reply with quote
disobayish1@gmail.com
Newbie


Joined: 19 Jul 2016
Posts: 8

PostPosted: Mon Aug 08, 2016 5:44 pm   
 
This came back as "Error parsin command" : Illegal token {yes} {no

^^Okay i was able to make a class in the settings folder and pasted that into the XML, went to roll a character and nothing happened.

Is there an alias i have to use to turn it on and off? is it something i need to define mylsef?


Last edited by disobayish1@gmail.com on Mon Aug 08, 2016 7:17 pm; edited 2 times in total
Reply with quote
disobayish1@gmail.com
Newbie


Joined: 19 Jul 2016
Posts: 8

PostPosted: Mon Aug 08, 2016 5:48 pm   
 
I also found this that someone had made for our mud I guess but im not sure how to modify it to search for 2 max's on top of no low or bavg scores. this is what i have and its working correctly as it is, Also this was writen for Zmud but seems to work in my Cmud: **** Ive noticed this isnt stopping once it reaches the desired roll. I tried to modify it to only search for one score not low and it still keeps resetting. I must be missing something simple

#CLASS {AUTOROLL} {disable}
#VAR oklevels {AVG|AAVG|HIGH|MAX} {AVG|AAVG|HIGH|MAX}
#VAR numchecked {5} {0}
#VAR numok {5} {0}
#VAR con {AVG} {}
#VAR chr {LOW} {}
#VAR luc {AVG} {}
#VAR str {AVG} {}
#VAR int {AAVG} {}
#VAR wis {AVG} {}
#VAR dex {LOW} {}
#TRIGGER {^Con:%s&%w{con}.%sChr:%s&%w{chr}.%sLuc:%s&%w{luc}.%s- Accept~? ~(Y/N~):} {numok = 0;numchecked = 0;#forall {str|int|wis|dex|con|luc} {#ad numchecked 1;#if (%ismember( @%i, @oklevels)) {#ad numok 1}};#if (@numok == @numchecked) {Y;#T- AUTOROLL} {N}} "" {nocr|prompt}
#TRIGGER {^Str:%s&%w{str}.%sInt:%s&%w{int}.%sWis:%s&%w{wis}.%sDex:%s&%w{dex}.%s$} {}
#CLASS 0
#TRIGGER {^Your stats are:$} {#T+ AUTOROLL}
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 3542
Location: Pensacola, FL, USA

PostPosted: Tue Aug 09, 2016 12:55 am   
 
It worked fine on my local tests, unless the mud is just rejecting the extended form of the command.
Try editing the yes to y and the no to n.

Are you sure you pasted it to the XML tab on not the script text tab?
_________________
Windows 10 Home Premium 64-bit
AMD Phenom II x6 1055T 2.8GHz 16GB
CMUD Pro v3.34
Reply with quote
disobayish1@gmail.com
Newbie


Joined: 19 Jul 2016
Posts: 8

PostPosted: Tue Aug 09, 2016 2:18 am   
 
yeah posted to xml tab, Ill try above changes and see what happens. Ive plugged the changes in and nothing seems to happen at character creation. Is there an alias i use to beging the trigger? I dont see one anywhere in the script provided. Once i hit n a few times manually it started the roller. If it helps the mud im playing address is Tfc.tfcmud.com port 4000, maybe you can try it there and see if its working correctly for you? Also i'd like to exclude CHR from the search criteria as it can be low or bavg for all I care. It will greatly decrease time needed to make the criteria for a "good roll" And i believe that I need to modify it to accept 1 BAVG score or seems to roll for 30 mins until my mud times out and resets connection =( Unfortunetly i cant let the "autoroller" run for more then 30 mins at a time. So i need to lessen the criteria in order to actually get a roll to stick. I'd prefer the LOW be in CHR and the BAVG be in STR if anything. But beggers cant be choosers so any help is greatly appreciated! Thanks much! - Dedicated to Cmud for Life!
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 3542
Location: Pensacola, FL, USA

PostPosted: Tue Aug 09, 2016 2:46 am   
 
Current the one I provided is not checking for any specific stat, but only the count of specific results.

The #IF statement is doing all the heavy work:

#IF ((@low=0) AND (@bavg=0) AND (@max>=2))

Change it to this to allow for 1 bavg:

#IF ((@low=0) AND (@bavg<=1) AND (@max>=2))

To weight it for specific stats would require a more complex roller design
_________________
Windows 10 Home Premium 64-bit
AMD Phenom II x6 1055T 2.8GHz 16GB
CMUD Pro v3.34
Reply with quote
disobayish1@gmail.com
Newbie


Joined: 19 Jul 2016
Posts: 8

PostPosted: Tue Aug 09, 2016 4:01 am   
 
^^ Okay will try that for now and see if I can get it to land a roll. Thanks much
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