Scripts Rescued from the help section

Setup, mapping, script help, etc.
Post Reply
Galowyn
Posts: 3
Joined: Thu Dec 27, 2012 11:01 am

Scripts Rescued from the help section

Post by Galowyn »

Any scripts that have been put in the help section of wotmud.org im posting here before they get auto deleted in a few weeks.

Script to make Razors

Code: Select all

#CLASS {razor}
#ALIAS makeRazor {
   #T+ razorTrigger
   #SEND {fetch shovel}
   #TRIGGER {You fetch a shovel.} {get shovel} razor
   #TRIGGER {You get a shovel.} {muckout stable} razor
   #TRIGGER {You can continue to shovel straw.} {shovel straw} razor
   #TRIGGER {You gather another shovel of straw and deposit it in the wheelbarrow.} {shovel straw} razorTrigger
   #TRIGGER {You deposit the last shovelful in the wheelbarrow and cart it off.} {#T- razorTrigger} razor
   #TRIGGER {You can continue working and groom a horse.} {groom horse} razor
   #COND {You can continue working and clean the tack.} {clean tack} razor
   }
#CLASS 0
Auto Sailing Script

Code: Select all

#CLASS {AutoSailing}
#ALIAS helpSail {
   #SHOW " "
   #SHOW "AutoSailing Script Commands"
   #SHOW " "
   #SHOW "riversail <starting location> <destination>"
   #SHOW "Hint: Can abbreviate locations and destinations down to the first 3 letters."
   #SHOW "Example: riversail illian whitebridge -or- riversail ill whi"
   #SHOW " "
   #SHOW "oceansail <starting location> <destination>"
   #SHOW "Hint: Can abbreviate locations and destinations down to the first 3 letters."
   #SHOW "Example: oceansail mayene bandareban -or- oceansail may ban"
   #SHOW " "
   #SHOW "oceanmap -or- rivermap"
   #SHOW "Note: shows map of water routes"
   #SHOW " "
   #SHOW "stopsailing"
   #SHOW "Note: deactivates the autosailing script."
   #SHOW " "
   }
#VAR banfal %array(3,2,1)
#VAR banjaf %array(3,2,3,2)
#VAR bantan %array(3,2,2,1)
#VAR bantre %array(3,2,2,2,3,2)
#VAR banama %array(3,2,2,2,2)
#VAR banalt %array(3,2,2,2,1,0)
#VAR banill %array(3,2,2,2,1,1,0)
#VAR bantea %array(3,2,2,2,1,1,1,1,0)
#VAR banmay %array(3,2,2,2,1,1,1,1,1,0)
#VAR falban %array(3,0,1)
#VAR faljaf %array(3,3,2)
#VAR faltan %array(3,2,1)
#VAR faltre %array(3,2,2,3,2)
#VAR falama %array(3,2,2,2)
#VAR falalt %array(3,2,2,1,0)
#VAR falill %array(3,2,2,1,1,0)
#VAR faltea %array(3,2,2,1,1,1,1,0)
#VAR falmay %array(3,2,2,1,1,1,1,1,0)
#VAR tanban %array(3,0,0,1)
#VAR tanjaf %array(3,0,3,2)
#VAR tanfal %array(3,0,1)
#VAR tantre %array(3,2,3,2)
#VAR tanama %array(3,2,2)
#VAR tanalt %array(3,2,1,0)
#VAR tanill %array(3,2,1,1,0)
#VAR tantea %array(3,2,1,1,1,1,0)
#VAR tanmay %array(3,2,1,1,1,1,1,0)
#VAR treban %array(0,1,0,0,0,1)
#VAR trejaf %array(0,1,0,0,3,2)
#VAR trefal %array(0,1,0,0,1)
#VAR tretan %array(0,1,0,1)
#VAR treama %array(0,1,2)
#VAR trealt %array(0,1,1,0)
#VAR treill %array(0,1,1,1,0)
#VAR tretea %array(0,1,1,1,1,1,0)
#VAR tremay %array(0,1,1,1,1,1,1,0)
#VAR amaban %array(0,0,0,0,1)
#VAR amajaf %array(0,0,0,3,2)
#VAR amafal %array(0,0,0,1)
#VAR amatan %array(0,0,1)
#VAR amatre %array(0,3,2)
#VAR amaalt %array(0,1,0)
#VAR amaill %array(0,1,1,0)
#VAR amatea %array(0,1,1,1,1,0)
#VAR amamay %array(0,1,1,1,1,1,0)
#VAR altban %array(2,3,0,0,0,1)
#VAR altjaf %array(2,3,0,0,3,2)
#VAR altfal %array(2,3,0,0,1)
#VAR alttan %array(2,3,0,1)
#VAR alttre %array(2,3,3,2)
#VAR altama %array(2,3,2)
#VAR altill %array(2,1,0)
#VAR alttea %array(2,1,1,1,0)
#VAR altmay %array(2,1,1,1,1,0)
#VAR illban %array(2,3,3,0,0,0,1)
#VAR illjaf %array(2,3,3,0,0,3,2)
#VAR illfal %array(2,3,3,0,0,1)
#VAR illtan %array(2,3,3,0,1)
#VAR illtre %array(2,3,3,3,2)
#VAR illama %array(2,3,3,2)
#VAR illalt %array(2,3,0)
#VAR illtea %array(2,1,1,0)
#VAR illmay %array(2,1,1,1,0)
#VAR teaban %array(2,3,3,3,3,0,0,0,1)
#VAR teajaf %array(2,3,3,3,3,0,0,3,2)
#VAR teafal %array(2,3,3,3,3,0,0,1)
#VAR teatan %array(2,3,3,3,0,1)
#VAR teatre %array(2,3,3,3,3,3,2)
#VAR teaama %array(2,3,3,3,3,2)
#VAR teaalt %array(2,3,3,3,0)
#VAR teaill %array(2,3,3,0)
#VAR teamay %array(2,1,0)
#VAR mayban %array(2,3,3,3,3,3,0,0,0,1)
#VAR mayjaf %array(2,3,3,3,3,3,0,0,3,2)
#VAR mayfal %array(2,3,3,3,3,3,0,0,1)
#VAR maytan %array(2,3,3,3,3,0,1)
#VAR maytre %array(2,3,3,3,3,3,3,2)
#VAR mayama %array(2,3,3,3,3,3,2)
#VAR mayalt %array(2,3,3,3,3,0)
#VAR mayill %array(2,3,3,3,0)
#VAR maytea %array(2,3,0)
#VAR illwhi %array(0,0,1)
#VAR illirj %array(0,0,0,0)
#VAR whiirj %array(3,0,0)
#VAR whiill %array(3,2,2)
#VAR irjwhi %array(2,2,1)
#VAR irjill %array(0,0,0,0)
#VAR teaari %array(0,0,3)
#VAR teacai %array(0,0,1,0)
#VAR teatar %array(0,0,0,0)
#VAR aritea %array(1,2,2)
#VAR aricai %array(1,1,0)
#VAR aritar %array(1,0,0)
#VAR tarcai %array(2,2,1,0)
#VAR tartea %array(2,2,2,2)
#VAR tarari %array(2,2,3)
#VAR caitea %array(2,3,2,2)
#VAR caiari %array(2,3,3)
#VAR caitar %array(2,3,0,0)
#VAR sailDir %array("sail north","sail east","sail south","sail west")
#VAR startSail {}
#VAR endSail {}
#VAR trip {}
#VAR index {}
#VAR nextSail {}
#VAR moveShip {}
#ALIAS riverSail {
   #VAR startSail %copy(%1,1,3)
   #VAR endSail %copy(%2,1,3)
   #VAR trip %concat(@startSail,@endSail)
   #VAR index {0}
   #VAR nextSail %arrget(@trip,@index)
   #VAR moveShip %arrget(sailDir,@nextSail)
   #SEND @moveShip
   #SHOW %crlf"AutoSailing Script ON. Sit back and enjoy the ride."%crlf
   #T+ riverSailTrigger
   #TRIGGER {^Sweeps churning the water steer the ship onto the river.} {#MATH index @index+1;#VAR nextSail %arrget(@trip,@index);#VAR moveShip %arrget(saildir,@nextSail)} riverSailTrigger
   #TRIGGER {^A sailor *} {@moveShip} riverSailTrigger
   #COND {^Ropes are pulled to adjust the sail as the ship sails *} {#MATH index @index+1;#VAR nextSail %arrget(@trip,@index);#VAR moveShip %arrget(saildir,@nextSail)} riverSailTrigger
   #TRIGGER {^Sails are lowered *} {stopSailing} riverSailTrigger
   }
#ALIAS oceanSail {
   #VAR startSail %copy(%1,1,3)
   #VAR endSail %copy(%2,1,3)
   #VAR trip %concat(@startSail,@endSail)
   #VAR index {0}
   #VAR nextSail %arrget(@trip,@index)
   #VAR moveShip %arrget(sailDir,@nextSail)
   #SEND @moveShip
   #SHOW %crlf"AutoSailing Script ON. Sit back and enjoy the ride."%crlf
   #T+ oceanSailTrigger
   #TRIGGER {^Sweeps steer the ship *} {#MATH index @index+1;#VAR nextSail %arrget(@trip,@index);#VAR moveShip %arrget(sailDir,@nextSail)} oceanSailTrigger
   #TRIGGER {^A sailor *} {#SEND @moveShip} oceanSailTrigger
   #COND {^The ship sails *} {#MATH index @index+1;#VAR nextSail %arrget(@trip,@index);#VAR moveShip %arrget(sailDir,@nextSail)} oceanSailTrigger
   #TRIGGER {^The ship sails into the harbor of Mayene.} {stopSailing} oceanSailTrigger
   #TRIGGER {^The ship sails towards the shore of Tremalking.} {stopSailing} oceanSailTrigger
   #TRIGGER {^The ship sails into the harbor of Tear.} {stopSailing} oceanSailTrigger
   #TRIGGER {^The ship sails towards Falme.} {stopSailing} oceanSailTrigger
   #TRIGGER {^The ship sails towards Bandar Eban.} {stopSailing} oceanSailTrigger
   #TRIGGER {^The ship sails towards the shore of Jafar.} {stopSailing} oceanSailTrigger
   #TRIGGER {^The ship sails east to the docks of Tanchico.} {stopSailing} oceanSailTrigger
   #TRIGGER {^The ship sails into a sheltered cove.} {stopSailing} oceanSailTrigger
   #TRIGGER {^The ship sails towards the shore of Illian.} {stopSailing} oceanSailTrigger
   #TRIGGER {^The ship sails towards the coast of Altara.} {stopSailing} oceanSailTrigger
   }
#ALIAS stopSailing {
   #SHOW %crlf"Autosailing Script OFF"%crlf
   #T- riverSailTrigger
   #T- oceanSailTrigger
   }
#CLASS 0
#CLASS {OceanMapScript}
#ALIAS oceanMap {#SHOW %crlf%crlf%crlf"                            <font size=5>Ocean Ports Of the World</font>"%crlf%crlf
#SHOW "                [ ]----[X] Bandar Eban"
#SHOW "                 ¦"
#SHOW "                 ¦"
#SHOW "    [ ]---------[ ]----[X] Falme"
#SHOW "     |           ¦"
#SHOW "     |           ¦                      Altara      Illian            Tear    Mayene"
#SHOW "    [X]         [ ]----[X] Tanchico       [X]        [X]               [X]      [X]"
#SHOW "   Jafar         ¦                         ¦          ¦                 ¦        ¦"
#SHOW "                 ¦                         ¦          ¦                 ¦        ¦"
#SHOW "    [ ]---------[ ]-----------------------[ ]--------[ ]------[ ]------[ ]------[ ]"
#SHOW "     ¦           ¦"
#SHOW "     ¦           ¦"
#SHOW "    [X]         [X]"
#SHOW "Tremalking    Amadacia"}

#ALIAS riverMap {#SHOW %crlf%crlf%crlf"                            <font size=5>River Ports Of the World</font>"%crlf%crlf
#SHOW "      Irjavnar                    Tar Valon"
#SHOW "        [X]                          [X]"
#SHOW "         ¦                            ¦"
#SHOW "         ¦                            ¦  Cairhein"
#SHOW "        [ ]                          [ ]   [X]"
#SHOW "         ¦                            ¦     ¦"
#SHOW "         ¦  White Bridge    Aringill  ¦     ¦"
#SHOW "        [ ]------[X]           [X]---[ ]---[ ]"
#SHOW "         ¦                            ¦"
#SHOW "         ¦                            ¦        SHIPS"
#SHOW "        [ ]         SHIPS            [ ]    River Flame "
#SHOW "         ¦        Hummingbird         ¦     River Sun"
#SHOW "         ¦        Kingfisher          ¦     River Stork"
#SHOW "        [X]       Swallow            [X]    River Queen"
#SHOW "       Illian    *Starling           Tear  *River Lady"%crlf%crlf}
#CLASS 0
Rent Script

Code: Select all

#CLASS {rents}
#ALIAS addtemptobase {#SHOW %ansi(bold,cyan)Rent Updated!;#VAR %concat( @currentchar, @thisrent) {@tempcontent} {_nodef} "rents|content";#VARIABLE tempcontent {}}
#ALIAS showrent {#IF (%len( %1)=0) {#SHOW %crlf Usage showrent ~<rentnumber~> ~[character, current if omitted~];#SHOW %crlf Available rents %crlf;#LOOP 1,%numitems( @rentroomnumbers) {#SHOW %i. %item( @rentroomcity, %i) - %item( @rentroomnames, %i)}} {#IF (%len( %2)>0) {#VARIABLE thischar %2} {#VARIABLE thischar @currentchar};#IF (%1 == "all") {#SHOW %crlf;#SHOW %ansi(bold,cyan)Available rents for %proper(@thischar);#SHOW %crlf;#LOOP 1,%numitems(@rentroomnumbers) {#VARIABLE thisrent %item( @rentroomnumbers, %i);#IF (%len(%eval(%concat( "@", @thischar, @thisrent)))==0) {#NOOP} {#SHOW %item( @rentroomcity, %i) - %item( @rentroomnames, %i);#LOOP 1,%numitems( %eval( %concat( "@", @thischar, @thisrent))) {#SHOW %char(32)%char(32)%j~). %item( %eval( %concat( "@", @thischar, @thisrent)), %j)};#SHOW %crlf}}} {#VARIABLE thisrent %item( @rentroomnumbers, %1);#SHOW %crlf %item( @rentroomnames, %1) - %item( @rentroomcity, %1) %crlf;#IF (%len(%eval(%concat( "@", @thischar, @thisrent)))==0) {#SHOW %ansi(bold,cyan)You have no items stored at this Location} {#LOOP 1,%numitems( %eval( %concat( "@", @thischar, @thisrent))) {#SHOW %char(32)%char(32)%char(32)%i). %item( %eval( %concat( "@", @thischar, @thisrent)), %i)};#SHOW %crlf}}}}
#ALIAS addrent {#IF (%ismember( %roomnum, @rentroomnumbers)=0) {#VARIABLE rentroomnumbers %replace( %concat( @rentroomnumbers, "|", %string( %roomnum)), "~"","");#VARIABLE rentroomnames %replace( %concat( @rentroomnames, "|", %string( %roomname)), "~"","");#VARIABLE rentroomcity %replace( %concat( @rentroomcity, "|", %string( %zonename)), "~"","");#SHOW %crlf Rent added!} {#SHOW %crlf Rent already in database.}}
#ALIAS searchrent {#IF (%len( %-1) > 0) {#VAR searchsuccessful {0};#VAR searchItem {%lower(%-1)};#SHOW %crlf %char(32)Searching rents for: %ansi(bold,purple)%-1;#LOOP 1,%numitems(@rentcharnames) {#LOOP 1,%numitems(@rentroomnumbers) {#IF (%pos( @searchItem, %eval(%concat( "@", %item( @rentcharnames, %i), %item( @rentroomnumbers, %j)))) > 0) {#VAR searchsuccessful {1};#SHOW %crlf %proper(%item( @rentcharnames, %i)) - %item( @rentroomcity, %j) - %item( @rentroomnames, %j);#LOOP 1,%numitems(%eval(%concat( "@", %item( @rentcharnames, %i), %item( @rentroomnumbers, %j)))) {#IF ( %pos( @searchitem, %item( %eval(%concat( "@", %item( @rentcharnames, %i), %item( @rentroomnumbers, %j))), %k)) > 0) {#SHOW %char(32)%char(32)%ansi(bold,purple)%k~). %item( %eval(%concat( "@", %item( @rentcharnames, %i), %item( @rentroomnumbers, %j))), %k)} {#SHOW %char(32)%char(32)%k~). %item( %eval(%concat( "@", %item( @rentcharnames, %i), %item( @rentroomnumbers, %j))), %k)}}} {#NOOP}}};#IF (@searchsuccessful=0) {#SHOW %crlf %char(32)Did not find any %ansi(bold,purple)@searchitem} {#NOOP}} {#SHOW %crlf Usage searchrent ~<item keyword~(s~)~>}}
#VAR rentroomnumbers {}
#VAR rentroomnames {}
#VAR rentroomcity {}
#VAR rentcharnames {}
#VAR tempcontent {}
#VAR thisrent {}
#VAR currentchar {}
#VAR thischar {}
#TRIGGER {* tells you, 'I don't have any items for you here.'} {#VARIABLE thisrent %roomnum;#VAR %concat( @currentchar, @thisrent) {@tempcontent} {_nodef} "rents|content"}
#TRIGGER "List" {1. * item* stored for} {#IF (%ismember( %roomnum, @rentroomnumbers)) {#VARIABLE thisrent %roomnum;#VARIABLE tempcontent {};#T+ ItemGrabber;#ALARM "igrab" +3 {#T- ItemGrabber;addtemptobase}}} "" {disable}
#TRIGGER "ItemGrabber" {^    (a?*)$} {#PRIORITY {#VARIABLE tempcontent %additem( "%1", @tempcontent)}} "" {disable}
#ONINPUT {list} {#T+ List;#ALARM "listal" +3 {#T- List}} "" {notrig}
#TRIGGER {This ranks you as (%w) * ~(Level (%d)~).} {#VAR currentchar %lower( %1);#IF (( %2>10) & ( %ismember( @currentchar, @rentcharnames)=0)) {#CW bold,white;#SHOW %lower( %1);#VARIABLE rentcharnames {%additem( %lower( %1), @rentcharnames)}} {#NOOP}}
#TRIGGER {^Don't forget to read the forums at http://www.wotmud.org/forums !} {score}
#TRIGGER {^Reconnecting.$} {score}
#TRIGGER {^    (some?*)$} {#PRIORITY {#VARIABLE tempcontent %additem( "%1", @tempcontent)}}
#CLASS 0
#CLASS {rents|content}
#CLASS 0
Bash Stab Charge counter

Code: Select all

#CLASS {Clumsylog 1.1}
#VAR clumsycharge {0} {0}
#VAR charged {0} {0}
#VAR totalcharge {0} {0}
#VAR stabclumsy {0} {0}
#VAR stabland {0} {0}
#VAR totalstabs {0} {0}
#VAR chargepercentage {0} {0}
#VAR stabpercentage {0} {0}
#VAR missbash {0} {0}
#VAR landbash {0} {0}
#VAR totalbash {0} {0}
#VAR bashpercentage {0} {0}
#TRIGGER {Oops. Your lame efforts cause you to miss.} {#MATH clumsycharge @clumsycharge+1;#MATH totalcharge @clumsycharge+@charged;#MATH chargepercentage (@charged*100 / @totalcharge);#ECHO This session you've clumsied @clumsycharge out of @totalcharge charges (@{chargepercentage}~% landed)}
#TRIGGER {Chaaaaarrrge!! %1 bleeds profusely as you skewer %2 with %3!} {#MATH charged @charged+1;#MATH totalcharge @clumsycharge+@charged;#MATH chargepercentage (@charged*100 / @totalcharge);#ECHO This session you've landed @charged out of @totalcharge charges (@{chargepercentage}~% landed)}
#TRIGGER {%1 makes a strange sound as you place %2 in %3 back!} {#MATH stabland @stabland+1;#MATH totalstabs @stabland+@stabclumsy;#MATH stabpercentage (@stabland*100 / @totalstabs);#ECHO This session you've landed @stabland out of @totalstabs stabs (@{stabpercentage}~% landed).}
#TRIGGER {Ooops. Your clumsy execution broadcasts your intentions.} {#MATH stabclumsy @stabclumsy+1;#MATH totalstabs @stabland+@stabclumsy;#MATH stabpercentage (@stabland*100 / @totalstabs);#ECHO This session you've clumsied @stabclumsy out of @totalstabs stabs (@{stabpercentage}~% landed)}
#TRIGGER "bashlandedtrigger" {Your bash at %1 sprawling!} {#MATH landbash @landbash+1;#MATH totalbash @landbash+@missbash;#MATH bashpercentage (@landbash*100 / @totalbash);#ECHO This session you've landed @landbash out of @totalbash bashes (@{bashpercentage}~% landed);#T- bashlandedtrigger;#ALARM +1 {#T+ bashlandedtrigger}}
#TRIGGER {As %1 your bash, you topple over and fall to the ground!} {#MATH missbash @missbash+1;#MATH totalbash @landbash+@missbash;#MATH bashpercentage (@landbash*100 / @totalbash);#ECHO This session you've missed @missbash out of @totalbash bashes (@{bashpercentage}~% landed)}
#CLASS 0
Post Reply