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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Talmark
Novice


Joined: 22 Nov 2003
Posts: 34

PostPosted: Mon Dec 15, 2003 8:00 pm   

Genesis Auto-Loot
 
This is a little script that allows you to get whatever you want
from a pile of corpses, simply by counting them. The problem with
doing something like this in Genesis is that you need a way to
convert number words to the actual numbers to make it work.
I've come up with a pretty simple solution to this for both ordinal
and cardinal numbers--since you'll have to fire off the commands
get all from first corpse, get all from second corpse, etc. Here's
the script.

Code:

#CLASS {Auto Loot}
#VAR items all
#VAR cardnums {one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|twenty-one|twenty-two|twenty-three|twenty-four|twenty-five|twenty-six|twenty-seven|twenty-eight|twenty-nine|thirty|thirty-one|thirty-two|thirty-three|thirty-four|thirty-five|thirty-six|thirty-seven|thirty-eight|thirty-nine|forty|forty-one|forty-two|forty-three|forty-four|forty-five|forty-six|forty-seven|forty-eight|forty-nine|fifty|fifty-one|fifty-two|fifty-three|fifty-four|fifty-five|fifty-six|fifty-seven|fifty-eight|fifty-nine|sixty|sixty-one|sixty-two|sixty-three|sixty-four|sixty-five|sixty-six|sixty-seven|sixty-eight|sixty-nine|seventy|seventy-one|seventy-two|seventy-three|seventy-four|seventy-five|seventy-six|seventy-seven|seventy-eight|seventy-nine|eighty|eighty-one|eighty-two|eighty-three|eighty-four|eighty-five|eighty-six|eighty-seven|eighty-eight|eighty-nine|ninety|ninety-one|ninety-two|ninety-three|ninety-four|ninety-five|ninety-six|ninety-seven|ninety-eight|ninety-nine|one hundred}
#VAR ordnums {first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|eleventh|twelfth|thirteenth|fourteenth|fifteenth|sixteenth|seventeenth|eighteenth|nineteenth|twentieth|twentyfirst|twentysecond|twentythird|twentyfourth|twentyfifth|twentysixth|twentyseventh|twentyeighth|twentyninth|thirtieth|thirtyfirst|thirtysecond|thirtythird|thirtyfourth|thirtyfifth|thirtysixth|thirtyseventh|thirtyeighth|thirtyninth|fortieth|fortyfirst|fortysecond|fortythird|fortyfourth|fortyfifth|fortysixth|fortyseventh|fortyeighth|fortyninth|fiftieth|fiftyfirst|fiftysecond|fiftythird|fiftyfourth|fiftyfifth|fiftysixth|fiftyseventh|fiftyeighth|fiftyninth|sixtieth|sixtyfirst|sixtysecond|sixtythird|sixtyfourth|sixtyfifth|sixtysixth|sixtyseventh|sixtyeighth|sixtyninth|seventieth|seventyfirst|seventysecond|seventythird|seventyfourth|seventyfifth|seventysixth|seventyseventh|seventyeighth|seventyninth|eightieth|eightyfirst|eightysecond|eightythird|eightyfourth|eightyfifth|eightysixth|eightyseventh|eightyeighth|eightyninth|ninetieth|ninetyfirst|ninetysecond|ninetythird|ninetyfourth|ninetyfifth|ninetysixth|ninetyseventh|ninetheighth|ninetyninth|one hundredth}
#AL cc {count corpses}
#AL tall {#VAR items all}
#AL tcc {#VAR items coins}
#AL twc {#VAR items weapons}
#AL tarm {#VAR items armours}
#AL tgc {#VAR items gems}
#TRIGGER {^{> |}You count (*) corpses.$} {#IF {%isnumber( %1)} {#LOO 1,%1 {get @items from %item( @ordnums, %{i}) corpse}} {
 #LOO 1,%ismember( %1, @cardnums) {get @items from %item( @ordnums, %{i}) corpse}
  }}
#TRIGGER {^{> |}You find only a single corpse} {get @items from corpse}
#CLASS 0


The aliases are for counting the corpses and changing what you want
to take from them on the fly. You should be able to change this
to work on other muds if it's not quite what you need.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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