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
roncli
Wanderer


Joined: 07 Sep 2002
Posts: 63
Location: USA

PostPosted: Wed Aug 11, 2004 11:23 am   

Achaea - Vial Sorting
 
Class: Sorting

Purpose: Sort your vials, make ELIXLIST look nice, and get the most efficient usage out of your vials as possible. Works for up to 200 vials. Can work for up to 500 vials if you have two empty rooms with a north/south connection.

Usage:
SORTVIALS - Enter the command and sit back and watch the show. Takes a couple of minutes. You must have selfishness down for this to work properly. If you plan on sorting more than 200 vials, make sure you have a room available to the north to walk into. Also make sure you are in a safe place, where no one's going to walk by and pick up all your vials while they are on the ground.

Vials are sorted first by salve, then by elixlir (except for health and mana), then by venom, then by mana, then by health, then by empty vials. Second sort is alphabetical by type (frost before speed). Third sort is by number of months remaining on the vial. This way, you will use up older vials first. Also, the stupidity symptom of "sip vial" will fail.

Code:

#CLASS {Sorting}
#ALIAS SORTVIALS {#t+ Sorting|VialSort;#var VialList "";#var OrderingVials 1;#var SortStep 0;elixlist;#alarm +10 {BEGINORDER}}
#CLASS 0

#CLASS {Sorting|VialSort}
#ALIAS DOSORT {#if (@NumVials > 200) {#case @SortStep {drop 50 vial} {drop 50 vial} {drop 50 vial} {drop 50 vial} {drop 50 vial} {n;drop 50 vial} {drop 50 vial} {drop 50 vial} {s;take 50 caloric} {n;take 50 caloric} {s;take 50 epidermal} {n;take 50 epidermal} {s;take 50 mass} {n;take 50 mass} {s;take 50 mending} {n;take 50 mending} {s;take 50 restoration} {n;take 50 restoration} {s;take 50 frost} {n;take 50 frost} {s;take 50 immunity} {n;take 50 immunity} {s;take 50 levitation} {n;take 50 levitation} {s;take 50 speed} {n;take 50 speed} {s;take 50 venom} {n;take 50 venom} {s;take 50 aconite} {n;take 50 aconite} {s;take 50 colocasia} {n;take 50 colocasia} {s;take 50 curare} {n;take 50 curare} {s;take 50 darkshade} {n;take 50 darkshade} {s;take 50 delphinium} {n;take 50 delphinium} {s;take 50 digitalis} {n;take 50 digitalis} {s;take 50 epseth} {n;take 50 epseth} {s;take 50 epteth} {n;take 50 epteth} {s;take 50 euphorbia} {n;take 50 euphorbia} {s;take 50 eurypteria} {n;take 50 eurypteria} {s;take 50 gecko} {n;take 50 gecko} {s;take 50 kalmia} {n;take 50 kalmia} {s;take 50 larkspur} {n;take 50 larkspur} {s;take 50 monkshood} {n;take 50 monkshood} {s;take 50 oculus} {n;take 50 oculus} {s;take 50 oleander} {n;take 50 oleander} {s;take 50 prefarar} {n;take 50 prefarar} {s;take 50 selarnia} {n;take 50 selarnia} {s;take 50 slike} {n;take 50 slike} {s;take 50 vardrax} {n;take 50 vardrax} {s;take 50 vernalius} {n;take 50 vernalius} {s;take 50 voyria} {n;take 50 voyria} {s;take 50 xentio} {n;take 50 xentio} {s;take 50 mana} {n;take 50 mana} {s;take 50 mana} {take 50 mana} {take 50 mana} {n;take 50 mana} {take 50 mana} {take 50 mana} {s;take 50 health} {take 50 health} {take 50 health} {n;take 50 health} {take 50 health} {take 50 health} {s;take 50 vial} {take 50 vial} {take 50 vial} {take 50 vial} {take 50 vial} {n;take 50 vial} {take 50 vial} {take 50 vial} {take 50 vial} {take 50 vial} {s;#var SortStep -1;#echo Sorting complete.;#t- VialSort}} {#case @SortStep {drop 50 vial} {drop 50 vial} {drop 50 vial} {drop 50 vial} {drop 50 vial} {take 50 caloric} {take 50 epidermal} {take 50 mass} {take 50 mending} {take 50 restoration} {take 50 frost} {take 50 immunity} {take 50 levitation} {take 50 speed} {take 50 venom} {take 50 aconite} {take 50 colocasia} {take 50 curare} {take 50 darkshade} {take 50 delphinium} {take 50 digitalis} {take 50 epseth} {take 50 epteth} {take 50 euphorbia} {take 50 eurypteria} {take 50 gecko} {take 50 kalmia} {take 50 larkspur} {take 50 monkshood} {take 50 oculus} {take 50 oleander} {take 50 prefarar} {take 50 selarnia} {take 50 slike} {take 50 vardrax} {take 50 vernalius} {take 50 voyria} {take 50 xentio} {take 50 mana} {take 50 mana} {take 50 mana} {take 50 mana} {take 50 health} {take 50 health} {take 50 health} {take 50 vial} {take 50 vial} {take 50 vial} {take 50 vial} {take 50 vial} {#var SortStep -1;#echo Sorting complete.;#t- Sorting|VialSort}};#add SortStep 1}
#ALIAS TAKENEXTVIAL {drop %word( %item( @VialList, 1), 2, ".");take %word( %item( @VialList, 1), 2, ".");#var VialList %delnitem( @VialList, 1)}
#ALIAS BEGINORDER {#var VialList %sort( @VialList);#if (%len( @VialList) = 0) {#abort 1};#var NumVials %numitems( @VialList);TAKENEXTVIAL}
#ALIAS BEGINSORT {#var OrderingVials 0;#var SortStep 1;DOSORT}
#VAR SortStep {-1}
#VAR VialList {}
#VAR OrderingVials {0}
#VAR NumVials {1}
#TRIGGER {You have recovered balance on all limbs.} {#if (@SortStep > 0) {DOSORT}}
#TRIGGER {You hold no "vial".} {#if (@SortStep > 0) {DOSORT}}
#TRIGGER {I see no "*" to take.} {#if (@SortStep > 0) {DOSORT}}
#TRIGGER {*vial(%d) *%w%s(%d)    * (%d)} {#if (@OrderingVials = 1) {#case %len( %3) {#additem VialList 00%3.%1} {#additem VialList 0%3.%1} {#additem VialList %3.%1}}}
#TRIGGER {You pick up * vial} {#if (@OrderingVials = 1) {#if (%numitems( @VialList) = 0) {BEGINSORT} {TAKENEXTVIAL}}}
#TRIGGER {I see no "%d" to take.} {#if (@OrderingVials = 1) {#if (%numitems( @VialList) = 0) {BEGINSORT} {TAKENEXTVIAL}}}
#TRIGGER {You scoop up * vial} {#if (@OrderingVials = 1) {#if (%numitems( @VialList) = 0) {BEGINSORT} {TAKENEXTVIAL}}}
#CLASS 0

#t- {Sorting|VialSort}
_________________
-roncli
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