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
Beginner


Joined: 19 Jul 2016
Posts: 12

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: 4662
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.
_________________
Discord: Shalimarwildcat
Reply with quote
disobayish1@gmail.com
Beginner


Joined: 19 Jul 2016
Posts: 12

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
Beginner


Joined: 19 Jul 2016
Posts: 12

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: 4662
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?
_________________
Discord: Shalimarwildcat
Reply with quote
disobayish1@gmail.com
Beginner


Joined: 19 Jul 2016
Posts: 12

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: 4662
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
_________________
Discord: Shalimarwildcat
Reply with quote
disobayish1@gmail.com
Beginner


Joined: 19 Jul 2016
Posts: 12

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


Joined: 19 Jul 2016
Posts: 12

PostPosted: Wed Mar 25, 2020 3:49 am   
 
Okay so its been a few years since I reached out to you about an auto roller script for my mud... I got your script working but it has a problem where when it finally gets desired stats it tries to accept, but it rolls one last time just before character creation finishes and logs into the mud causing the stats to be random and not the desired roll we just achieved. Heres a look at what happens

And any help is GREATLY appreciated.

Str: AVG. Int: LOW. Wis: BAVG. Dex: AVG.
Con: LOW. Chr: BAVG. Luc: LOW. - Accept? (Y/N):
n
Roller reset to its startup value

Str: AAVG. Int: BAVG. Wis: LOW. Dex: AVG.
Con: LOW. Chr: AVG. Luc: BAVG. - Accept? (Y/N):
n
Roller reset to its startup value

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

Str: AAVG. Int: LOW. Wis: AAVG. Dex: LOW.
Con: BAVG. Chr: HIGH. Luc: HIGH. - Accept? (Y/N):
n
Roller reset to its startup value

* This is a PK Mud, but beware the consequences of being zealous.

* Multi-playing is not allowed. Only one character online at one time per
person is allowed. This includes link-dead characters.

* TELLs and other channels are not secure. Thieves of sufficiently high
level can eavesdrop on them...

* All players should type HELP POLICY and familiarize themselves with all
the MUD rules.

* You are a guest on "The Final Challenge." Please act accordingly.


Press the <ENTER> key to continue:
Reply with quote
shalimar
GURU


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

PostPosted: Wed Mar 25, 2020 6:22 am   
 
Seems like it wants just a y and the full yes is being treated like an n?
_________________
Discord: Shalimarwildcat
Reply with quote
disobayish1@gmail.com
Beginner


Joined: 19 Jul 2016
Posts: 12

PostPosted: Wed Mar 25, 2020 5:50 pm   
 
I actually changed it both ways to test that and it doesn't seem to matter, still performs the same way =( Wish it would have been that simple

It will get a decent set of stats generated, Accept it with either a yes or a y, but then it will roll one last time generating random undesired stats and even enter the game answering n to that last roll.


Is there a way to add a line to the code stating something like #if y then noreset ? I know that wont work but i was just giving an example of what i was thinking. that way if it accepted a roll it wouldnt try to reset that last time
Reply with quote
shalimar
GURU


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

PostPosted: Wed Mar 25, 2020 10:32 pm   
 
you could do a:

#T- AUTOROLL

somewhere and turn off the whole class
_________________
Discord: Shalimarwildcat
Reply with quote
disobayish1@gmail.com
Beginner


Joined: 19 Jul 2016
Posts: 12

PostPosted: Fri Mar 27, 2020 7:46 am   
 
okay, does this seem right to you?

<trigger priority="9450" id="55">
<pattern>- Accept~? ~(Y/N~)</pattern>
<value>#IF ((@low=0) AND (@bavg&lt;=1) AND (@max&gt;=1)) {y;#T- AUTOROLL } {n;#RESET Roller}</value>
</trigger>

Sorry im really green when it comes to scripting so i appologize for my millon questions, especially if thet seem dumb


***Edit : So the script worked as usual when adding that #t- AUTOROLL inserted , but it still didn't stop rolling immediately upon reaching desired stats, it fired one last time
giving random bullshit stats before entering the game. Something has to catch it and stop the roller from auto resetting upon reaching the desired stats.
Reply with quote
disobayish1@gmail.com
Beginner


Joined: 19 Jul 2016
Posts: 12

PostPosted: Sat Mar 28, 2020 2:52 am   
 
Or better yet, how can I make it so the roller doesn't auto accept desired stats, and instead once it generates good stats it pauses and I have to manually accept them? That would solve the problem entirely if it didn't auto accept and would simply pause for examination and manual acceptance.
Reply with quote
shalimar
GURU


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

PostPosted: Sat Mar 28, 2020 4:32 am   
 
just remove the y or yes
_________________
Discord: Shalimarwildcat
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