Autoroller with settable minimum stats.

Scripts and support for your favorite MUD client.
Lilithelle
Sojourner
Posts: 230
Joined: Wed Oct 10, 2001 5:01 am
Location: Vancouver, BC, Canada
Contact:

Autoroller with settable minimum stats.

Postby Lilithelle » Sat Dec 11, 2004 8:59 pm

It attempts to get close to the minimum stats that you set, such that 3 stat improvements that actually notch the stat would meet those minimums, of course it doesn't always but I will leave it as is so as not to cause it to reject rolls that might make it to the minimums with bonuses.

Code: Select all

#ALIAS Roll {
  #T+ Roller
  #Reset Roller
  #var StatsMin ""
  #loop 8 {
    #var Temp %ismember( %pick( %concat( "p:Select minimum ", %item( @StatOrder, %i)), "o:1", @StatToNum), @StatToNum)
    #if (@Temp = 0) {
      #T- Roller
      #abort 1
      }
    #var StatsMin %additem( @Temp, @StatsMin)
    }
  #status @NoRolls@BestRolls
  }
#CLASS {Roller} {disable}
#VAR Rolls {} {}
#VAR StatToNum {bad|mundane|average|fair|good|mighty|heroic|perfect} {bad|mundane|average|fair|good|mighty|heroic|perfect}
#VAR StatOrder {str|pow|dex|int|agi|wis|con|cha} {str|pow|dex|int|agi|wis|con|cha}
#VAR StatsMin {1|1|1|1|1|1|1|1}
#VAR NoRolls {0} {0}
#VAR BestDiff {56} {56}
#VAR BestRolls {} {}
#VAR Num {0} {0}
#VAR Temp {}
#TRIGGER {^Agility:} {
  #var Rolls %additem( %ismember( %word( %trigger, 2), @StatToNum), @Rolls)
  #var Rolls %additem( %ismember( %word( %trigger, 4), @StatToNum), @Rolls)
  }
#TRIGGER {^Constitution:} {
  #var Rolls %additem( %ismember( %word( %trigger, 2), @StatToNum), @Rolls)
  #var Rolls %additem( %ismember( %word( %trigger, 4), @StatToNum), @Rolls)
  }
#TRIGGER {^Dexterity:} {
  #var Rolls %additem( %ismember( %word( %trigger, 2), @StatToNum), @Rolls)
  #var Rolls %additem( %ismember( %word( %trigger, 4), @StatToNum), @Rolls)
  }
#TRIGGER {^Strength:} {
  #var Rolls ""
  #var Rolls %additem( %ismember( %word( %trigger, 2), @StatToNum), @Rolls)
  #var Rolls %additem( %ismember( %word( %trigger, 4), @StatToNum), @Rolls)
  }
#TRIGGER {^You may choose to reroll your character at this time.} {
  #var Num 0
  #loop 8 {
    #var Temp %eval( %item( %sort( @StatsMin, 1), %i) - %item( %sort( @Rolls, 1), %i))
    #if (@Temp > 0) {#add Num @Temp}
    }
  #add NoRolls 1
  #if (@BestDiff > @Num) {
    #var BestDiff @Num
    #var BestRolls ""
    #loop 8 {#var BestRolls %concat( @BestRolls, " ", %left( %item( @StatToNum, %item( %sort( @Rolls, 1), %i)), 3))}
    }
  #if (@Num > 3) {
    #echo %cr@Num "notchs difference between actually rolls and minimum requirements.  Rerolling."
    y
    } {
    #var Temp ""
    #loop 8 {#additem Temp %item( @StatsMin, %i)%item( @StatOrder, %i)}
    #var Temp %sort( @Temp, 1)
    #var Temp %subregex( @Temp, "\d", "")
    #loop 7,1 {
      #var Num 8
      #while (@Num > %i) {
        #if (%item( @Rolls, %ismember( %item( @Temp, %i), @StatOrder)) < %item( @Rolls, %ismember( %item( @Temp, @Num), @StatOrder))) {
          %item( @Temp, %i) %item( @Temp, @Num)
          #abort 1
          }
        #add Num -1
        }
      }
    n
    #loop 8,1 {
      #var Num %eval( %item( @StatsMin, %ismember( %item( @Temp, %i), @StatOrder)) - %item( @Rolls, %ismember( %item( @Temp, %i), @StatOrder)))
      #if (@Num > 0) {#loop @Num {%item( @Temp, %i)}}
      }
    #beep 16
    #T- Roller
    }
  }
#TRIGGER {^That swap would fail the minimum class requirements. Please try again.} {y}
#CLASS 0


Just connect to the mud, type Roll, then start the character generation process. You will be asked to select your minimum stat requirements.
Ionari
Sojourner
Posts: 101
Joined: Sat Mar 17, 2001 6:01 am
Location: Portland OR

Postby Ionari » Sun Dec 26, 2004 7:13 am

This is a sweet roller! It works! Thanks Lili! (:

Io

Dexil tells you 'Hey can you throw a well at me?'
A moonwell is too heavy.
Olit tells you '2000hrs on each of your 5 corpses'
Dugmaren responds to your petition with 'It'd be less spammy if you just deleted again.'
Lilithelle says 'to divine most peoples fates you need to read palms or tea leaves, but in ionari's you just read the corpses'
Hakman
Sojourner
Posts: 1
Joined: Mon Mar 21, 2005 10:31 pm

Here's an additional set to monitor roller progress

Postby Hakman » Mon Mar 21, 2005 10:38 pm

Two triggers will setthe variable that tracks and reports the difference between the current scores and the desired scores.


#trigger {Entering new character generation mode.} {#wa val 100}

#trigger {(%d) notchs} {#if ( %1<@val) {#va val %1};#echo LOWEST: @val}
Hakman
Burmadapig
Sojourner
Posts: 164
Joined: Fri Apr 11, 2003 6:56 pm
Location: New Orleans
Contact:

Postby Burmadapig » Tue Mar 22, 2005 3:17 am

It already does that as it is. (Reports how many notches from specified each roll is.)
Teklar
Sojourner
Posts: 100
Joined: Mon Jun 14, 2004 4:13 pm
Location: Renton, WA
Contact:

Postby Teklar » Sat Apr 09, 2005 4:33 am

Ok, as a total Newbie question on this. In order to use it do I just cut n paste it all to the Zmud prompt or save as a text file and load it somehow?
Popowidle (Gnome, Invoker), Edek (HalfElf Ranger), Calarum (Grey-elf, Druid)
amolol
Sojourner
Posts: 688
Joined: Mon Sep 30, 2002 5:01 am

Postby amolol » Sat Apr 09, 2005 3:17 pm

copy it as a text file, then exit zmud open up your triggers folder go to file then import text
i dont know what your problem is, but i bet its hard to pronounce

myspace.com/tgchef
Teklar
Sojourner
Posts: 100
Joined: Mon Jun 14, 2004 4:13 pm
Location: Renton, WA
Contact:

Postby Teklar » Sun Apr 10, 2005 3:20 am

Thank you Amolol .. off to Necromancer ville
Popowidle (Gnome, Invoker), Edek (HalfElf Ranger), Calarum (Grey-elf, Druid)
Lilithelle
Sojourner
Posts: 230
Joined: Wed Oct 10, 2001 5:01 am
Location: Vancouver, BC, Canada
Contact:

Postby Lilithelle » Fri Jul 15, 2005 4:41 am

Seems this doesn't work right in the newest zmud, you have to change the first three lines a bit. Instead of

#ALIAS Roll {
#T+ Roller
#Reset Roller

It should be

#ALIAS Roll {
#Reset Roller
#T+ Roller

Subtle difference I know, but enough to make it not work.
Lil
lorekeeper
Sojourner
Posts: 4
Joined: Mon Sep 12, 2005 1:42 pm

question

Postby lorekeeper » Wed Sep 14, 2005 6:01 pm

will this swap stats around or will it only look for a set of stats with everything in the exact spot specified?
Hsoj
Sojourner
Posts: 296
Joined: Fri Aug 19, 2005 4:59 pm
Location: Not close enough to stalk... Latitude 45°30'30" Longitude -121°50'30"
Contact:

Postby Hsoj » Fri Oct 21, 2005 5:15 pm

k i s s

that is all
-==~ Tafah Auvry'ar'lyl | Fatah Fire Bath ~==-
Grochh
Sojourner
Posts: 4
Joined: Fri May 04, 2001 5:01 am
Location: Philadelphia, PA, USA

Postby Grochh » Sun Sep 30, 2007 5:34 pm

Hi, this doesn't seem to work for me at all. I saved the text into a file, and imported it into Zmud 7.21.

When I call the "Roll" alias I am prompted to select a minimum value for my stats, but the lists are empty.

Any ideas?
moritheil
Sojourner
Posts: 4845
Joined: Wed Jan 31, 2001 6:01 am

Postby moritheil » Sun Oct 07, 2007 6:06 am

Well, it's certainly not back-compatible to v 3.x. It crashed.
Yotus group-says 'special quest if you type hi dragon'
Shevarash OOC: 'I feature only the finest mammary glands.'
Silena group-says 'he was so fat and juicy..couldnt resist'
Kegor
Sojourner
Posts: 665
Joined: Wed Feb 28, 2001 6:01 am
Location: St. Cloud, MN
Contact:

Postby Kegor » Tue Oct 09, 2007 7:56 am

Grochh wrote:Hi, this doesn't seem to work for me at all. I saved the text into a file, and imported it into Zmud 7.21.

When I call the "Roll" alias I am prompted to select a minimum value for my stats, but the lists are empty.

Any ideas?


Before Importing: Make sure that your parsing (pc icon next to the gun in lower right hand corner) is clicked off.

Before Using: Make sure your 'Expand Vars' preference is checked and enabled. You are probably going to want everything checked except for 'Show Triggers' and 'Allow < > for expand' in your General Parsing preferences.

If this doesn't fix your problem, then I'm not sure what else it would be.
gantel
Sojourner
Posts: 3
Joined: Wed Mar 28, 2001 6:01 am
Location: Huntsville, Texas

Postby gantel » Fri Dec 28, 2007 4:09 pm

I have installed the roller and it seems to be working. While it is rolling, at the end of the roll it will say invalid option one to 4 or five times, is that correct or do i have a setting wrong. I am not that familar with rollers and programs.

Thanks
Gormal
Sojourner
Posts: 3917
Joined: Tue Feb 13, 2001 6:01 am
Location: A Whale's Vagina
Contact:

Postby Gormal » Wed Mar 19, 2008 3:33 pm

I got this working (finally) and its a dream Lili, thanks!

Edit: Does it alert when the roller hits your desired stats? Also I'm assuming that the status bar at the bottom shows the best stats you've seen in howevermany rolls.
flib
Sojourner
Posts: 322
Joined: Thu Mar 11, 2004 11:14 pm
Location: Annapolis, MD

Re:

Postby flib » Thu May 22, 2008 10:08 am

amolol wrote:copy it as a text file, then exit zmud open up your triggers folder go to file then import text


what triggers folder? I assume you mean go into the zmud folder, but there's no triggers folder to be found. Care to enlighten me, as i got the text document ready to go but that last bit confused me.
Vooku
Sojourner
Posts: 29
Joined: Tue Jul 24, 2007 5:02 pm

Re: Autoroller with settable minimum stats.

Postby Vooku » Sat May 31, 2008 1:30 pm

I got it working.. but for some reason it shows the "8 notchs difference between actually rolls and minimum requirements. Rerolling." on my other open window. How do I fix that?
Vooku (50 Barb Shammy)
Thrand
Sojourner
Posts: 274
Joined: Sun Feb 04, 2001 6:01 am

Re: Autoroller with settable minimum stats.

Postby Thrand » Sat May 31, 2008 5:26 pm

Vooku change the relevant #echo to #say
echo sends to top window, say to the 'triggering' window
Vooku
Sojourner
Posts: 29
Joined: Tue Jul 24, 2007 5:02 pm

Re: Autoroller with settable minimum stats.

Postby Vooku » Sat Jun 14, 2008 6:05 pm

If I rename my toril folder in zmud and start a fresh one this roller works great. It just won't work right in my normal toril folder for some reason. I delete everything I can concerning this script but it still won't work right.
Vooku (50 Barb Shammy)
Akev
Sojourner
Posts: 5
Joined: Fri Mar 11, 2005 6:58 am

Re: Autoroller with settable minimum stats.

Postby Akev » Wed Oct 15, 2008 5:25 am

Doesn't seem to work for me either. I copy and paste it all into a file.. make the correction. When I type 'roll' it prompts me with the box to choose which stats I'd like, however its blank. Not really sure how'd I fix that either.
Botef
Sojourner
Posts: 1056
Joined: Fri May 10, 2002 5:01 am
Location: Eastern Washington
Contact:

Re: Autoroller with settable minimum stats.

Postby Botef » Fri Oct 17, 2008 6:31 pm

Try making the correction before you copy/paste it. I had the same problem with empty stat boxes and just pasting the fix didnt seem to correct it. Copying the whole thing to word pad, making the correction, and then pasting it to Zmud worked fine.
Sunamit group-says 'imrex west, tibek backstab touk i think his name is on entry'
// Post Count +1
ssar
Sojourner
Posts: 1446
Joined: Tue Jan 30, 2001 6:01 am
Location: Newcastle, NSW, Australia
Contact:

Re: Autoroller with settable minimum stats.

Postby ssar » Thu Mar 26, 2009 11:46 am

This seems to work great for me, thanks Lili!

I did the changes mentioned, and also fixed a bit of grammar, it appears to be humming along nicely, even if it doesnt appear to result in rolls quite as good as expected for certain settings.

Increasing some values and continuing now.

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 2 guests