; TinyFuge 3k stepper ; Need: ; (area) area name (area, area-h aliases to go to and return from area) ; (area_path) path within area ; (area_mobnames) method to detect mobs (list of mob names separated by |)? ; method to detect room name (\(n, e, s...) ; (area_killname) name of mob to kill or aggressive ; ; You must have the prompt gag triggers enabled from triggers-g.tf to catch the prompt, ; and you need to have a prompt to catch. On the mud, type "prompt >$space$" (note the ; space) to make sure your prompt is enabled like the mud's default. ; ; awalk - keep walking until you find a mob to kill ; abagbag - pick up shit in every room /load ../walking_routes.tf /load ../map.tf /onoffvar await 1 /onoffvar awalk 1 /onoffvar asearch 0 /onoffvar debug 0 /set killbeep 1 /eval /unset area /eval /set area %{area-0} /eval /set corpsesinroom %{corpsesinroom-0} /eval /set foundroom %{foundroom-0} /eval /set revstate %{revstate-0} /eval /set mobsinroom %{mobsinroom-0} /eval /set stepper_path %{stepper_path-0} /eval /set coinsinroom %{coinsinroom-0} /eval /set beasttype 0 /set directions n|e|s|w|ne|nw|se|sw|u|d|vortex|enter|cave|cavern|chute|out|portal|gate|in|mist|left|right|out1|out2|house|tree|stairs|ladder|port|stern|forward|hole|alley|leave|tear|guild|chaos|pub|fantasy|science|newbie|login|shop|bank|smithy|gypsy|arundin|office|jump|magic|sci|sinkhole /eval /set waitC $[rand(2,20)]%; /eval /blueecho Chance to wait: 1 in %{waitC}%; /def -t'^You already have a light spell operating\.$' lighted = /set dark 0%; /onoffvar adonate 0 /onoffvar asell 0 /onoffvar atransfer 0 /alias donatecoffin tomorgue%;top guilds%;top players boot%;donate coffin%;frommorgue /def getbacktowork = \ /repeat -4 1 tomob%;\ /repeat -6 1 /eval /stepper %{area}%;\ /repeat -8 1 /set borg=1%;\ /repeat -8 1 /set awalk 1%;\ /repeat -10 1 go%; /eval /def -F -aBCrgb444 -p3 -t"^(.+)\\((%directions}|,)+\\)" grab_short = \ /set roomshort %%{P1}%%;\ /set roomlong %%{P0} /eval /def -F -p2 -aCbgrgb015 -t'\\((%{directions}|,)+\\)(\\.)?$$' grab_brief_room = \ /set combat 0%%;\ /set corpsesinroom 0%%;\ /set mobsinroom 0%%;\ /if (!looktyped ) \ /set foundroom 1%%;\ /set playersinroom 0%%;\ /endif%%;\ ; /set looktyped 0%%;\ /set coinsinroom 0%%;\ ; /if (asearch) dosearch%%;/endif%%; /if (pathlen > 0 & stepper & area) \ /eval /set patlines=$$[tfopen("pathstatus.tf", "w")]%%;\ /eval /set patstate=/set path %%{path}%%;\ /eval /let retval=$$[tfwrite(patlines, patstate)]%%;\ $$[tfclose(patlines)]%%;\ /endif%%; /def -p2 -F -t'There (are|is) [a-z]+ obvious exit[s]?:' grab_verbose_room = \ /set combat 0%;\ /set corpsesinroom 0%;\ /if (!looktyped) /set foundroom 1%%;/set playersinroom 0%;/endif%;\ /set mobsinroom 0%;\ /if (asearch) dosearch%;/endif%;\ ; /set looktyped 0 /set minmobsinroom 0 /def prompt_hook = \ /set looktyped 0%;\ /if (corpsesinroom & (acorpse|pcorpse) & !playersinroom) /qrepeat _guild_corpse -0.05 1 /guild_corpse%;/endif%;\ /if ((stepper) & (foundroom)) \ /if ((mobsinroom > 0) & (!playersinroom) ) \ ; Look! A mob! Stop moving.%;\ /elseif ( awalk ) \ /try_step%;\ /endif %;\ /set foundroom 0 %;\ /endif%; ; e.g. "/stepper crystals" /def stepper = \ /if ({#} >= 1) \ /guild_defense_check%;\ /set stepper 1%;\ /eval /set area %{1} %;\ /eval /greenecho Walker set to %{area}%;\ /eval /alias tomob %{area} %;\ /eval /alias frommob %{area}-h %;\ /eval /set path %%{%{area}_path} %;\ setpathlen%;/unset revpath%;\ /else \ /set stepper 0%;\ /endif %;\ ; /echo %{path} %;\ /if (stepper) \ /eval /set enemy %%{%{area}_killname} %;\ /eval /set enemies %%{%{area}_killnames} %;\ /eval /set block_pattern %%{%{area}_block} %;\ /eval /set fear_hack %%{%{area}_fearmobnames} %;\ /if ({fear_hack} !~ "") \ /eval /def -F -aCbgred -p5 -t'^([0-9]+ )?(%%{%{area}_fearmobnames})' stepper_fearmob_line = \ ; set playersinroom to bypass room /eval /set playersinroom 1%;\ /endif %;\ /eval /def -F -aBCgreen -p3 -t'^%%{%{area}_mobnames} arrives\\\\.$$$' stepper_arrivals = \ /eval /set mobsinroom $$$[mobsinroom + 1] %%%;\ %;\ /eval /def -F -aCyellow -p3 -t'^%%{%{area}_mobnames} leaves ' stepper_exits = \ /eval /set mobsinroom $$$[mobsinroom - 1] %%%;\ %;\ /eval /def -F -aBCgreen -p3 -t'^([0-9]+ )?(%%{%{area}_mobnames})( \\\\[[a-z]*\\\\])? ?(?:\\\\(s\\\\))?( \\\\{([0-9]+)\\\\})?(?: !?attacking you!)?( \\\\[[0-9]+%%%\\\\])?\\\\.?$$$' stepper_grabmob = \ /if (debug)\ /eval /blueecho :: 2 %%%%{P2} 3 %%%%{P3} 4 %%%%{P4} 5 %%%%{P5} 6 %%%%{P6} 7 %%%%{P7} 8 %%%%{P8} 9 %%%%{P9} %%%;\ /endif%%%;\ /if ({P5} !~ '') \ /eval /set mobsinroom $$$[mobsinroom + {P5}] %%%;\ /elseif ({P1} !~ '') \ /eval /set mobsinroom $$$[mobsinroom + {P1}] %%%;\ /else \ /eval /set mobsinroom $$$[mobsinroom + 1] %%%;\ /endif%%%;\ /if (debug) /blueecho Mobs in room %%%{mobsinroom}%%%;/endif%%%;\ ; /set lineismob 1 %%%;\ ; /elseif (regmatch("\\\\{([0-9]+)\\\\}$$$", {stepper_grabmob_line})) \ ; /eval /blueecho I SEE %{P1} mobs%%%;\ ; /eval /set mobsinroom $$$[mobsinroom + {P1}] %%%;\ ; /eval /blueecho mobs: %{mobsinroom}%%%;\ ; /eval /def -F -p1 -t'^([0-9]+ )?(%%{%{area}_mobnames})( \\\\[[a-z]+\\\\])? ?(\\\\(s\\\\))?( \\\\{[0-9]+\\\\})?\\\\.?$$$' killlineismob = /set lineismob 0%;\ %;\ /eval /def -F -aBCred -p3 -t"^%%{%{area}_block}$$$" stepper_nostep = /unstep%%%;\ %;\ /else \ /redecho killing stepper macros %;\ /if /ISMACRO stepper_grabmob%; /then /undef stepper_grabmob%; /endif%;\ /if /ISMACRO stepper_fearmob_line%; /then /undef stepper_fearmob_line%; /endif%;\ /unset fear_hack%;\ /set stepper 0%;\ /set pathlen 0%;\ /set pathpoint 0%;\ /set pathwalked 0%;\ /endif ; put it in the guild settings... /def partydef /alias j \ /if (mobsinroom | combat) \ k%;\ /else \ /if (abag) /guild_corpse%;bags%;/endif%;\ /eval /echo stepping...%;\ /step%;\ /endif%; /def -p100 -aCyellow -F -t'^A [A-Z|a-z| ]+ gold coins\.$' auto_coin_divvy = \ ; /if (acoin) /set coinsinroom 1%;/endif%;\ /if (!playersinroom & adivvy) di%;/endif%; /def stat2 = /eval /blueecho step:%{stepper} mob:%{mobsinroom} play:%{playersinroom} found:%{foundroom} corpse:%{corpsesinroom} look:%{looktyped} (%{pathwalked} \/ %{pathlen})%; /def stat = \ /blueecho (!rev & (!mobs|players) & (found|!mobs) & !corpses & !ltyped & awalk|!combat)%;\ /eval /blueecho !%{revstate} & (!%{mobsinroom}|%{playersinroom}) & (%{foundroom}|!%{mobsinroom}) & !%{corpsesinroom} & !%{looktyped} & (%{awalk}|!%{combat}) %;\ /def try_step = \ /if (debug) /stat%;/endif%;\ ; kwon may call back try_step until there are no more corpses, yay /if (corpsesinroom) /blueecho Corpses remain in the room, recursive kwon call.%;/kwon%;/endif%;\ /if (stepper & !revstate & ( !mobsinroom | playersinroom ) & (foundroom|!mobsinroom) & !corpsesinroom & !looktyped & awalk) \ /set playersinroom 0%;\ /if (aparty) /partydef%;/endif%;\ setpathpoint%;\ /if (!combat & stepper) /qrepeat _stepping -0.1 1 /step%;/if (asearch) dosearch%;/endif%;/endif%;\ /endif /def -F -t"^Your legs run away with you" wimpy_hard_stop = stop /alias go \ /set borg 1%;\ /set stepper 1%;\ /set mobsinroom 0%;\ /set corpsesinroom 0%;\ /set foundroom 1%;\ /set awalk 1%;\ /set combat 0%;\ /set revstate 0%;\ /if (botpaused) \ pause%;\ /endif%;\ /step /alias stop /set awalk 0%; ; ; Ochtochromatic armor does wierd shit: ; /def -t"^The hit strikes a grey scale overwhelming your opponent with fear!$" runningspiders = \ /eval /set mobsinroom $[mobsinroom - 1]%;/handlecorpse /def -t"The hit strikes a yellow scale, releasing a blinding flash of light!$" strangespiders ; ********************************** Bouncer bot ****************** /eval /set bouncermob %{bouncermob-none} /def bouncer = \ /if ({#} >= 1) \ /set area %1 %;\ /alias tomob %{area} %;\ /alias frommob %{area}-h %;\ /set bouncermob %area %;\ /dorunner %;\ /endif /def dorunner = \ /if ((suithps == 0) & (power < minpowereh)) \ /if (bouncer & atmob) \ frommob %; \ guild %; \ dh %;\ /repeat -5 1 rc %; \ atmob %;\ /endif %;\ /endif%; ; Remote commands: ;/def -F -p1 -mregexp -t'^\[PARTY\] [A-Za-z]+: go (.*)$' botcmd = %{P1} /def -F -mregexp -t'(An |A |Living |Crystal )?([Qq]uartz|[Gg]arnet|[Jj]ade|[Ss]pinel|[S|s]apphire|[Aa]methyst|[Aa]mber|[Ee]merald|[Rr]uby|[Aa]quamarine)( entity| creature)?( \(shining\)?| \(living\)?| \(crystalline\)?)' grabbeast = \ /if (!beasttype)\ /set beasttype %{P2}%;\ ;[Ss]apphire|[Aa]mber) ; amber - electric. (mind) ; garnet - cold. (mind) ; jade - fire, acid, radiation (mind) ; quartz - cold, radiation (mind) ; spinel - ice, radiation (fire) ; sapphire - ice, electric (mind) /if (regmatch('([Ss]apphire|[Aa]mber)',{beasttype})) \ ; one%;\ /elseif (regmatch('([Aa]quamarine|[Qq]uartz)',{beasttype}) ) \ ; ole%;\ /endif%;\ /set beasttype 1%;\ /endif%;\ ;/alias gohome /repeat -0 5000 /step%;stepper%;frommob%;shop%;sell all%;shop-h%;fantasy /alias gohome /set stepper 0%;\ /set borg 0%;/repeat -8 1 /set borg 1%;\ /guild_home_pre_hook%;\ /set awalk 0%;\ /set abagbag 0%;\ /eval /set forward $(/length %%{%path})%;\ /eval /set backward $(/length %%{%revpath})%;\ /if (forward < backward) \ /eval /repeat -S $(/length %%{%path}) /step%;frommob%;\ /else \ /eval /set revpath2 $(/reverse %{revpath})%;\ /eval /dopath %{revpath2}%;frommob%;\ /endif%;bank%;deposit 50000%;home%;\ /if (asell) /toshop%;sbags%;/fromshop%;/endif%;\ /if (abag & adonate) tobox%;rbags%;frombox%;/endif%;\ /unset enemies%;\ /guild_home_post_hook%;\ /profession_home_hook%; /alias goback /set stepper 0%;\ /guild_home_pre_hook%;\ /set awalk 0%;\ /set abagbag 0%;\ /eval /set revpath2 $(/reverse %{revpath})%;\ /eval /dopath %{revpath2}%; ;************************************ CORPSE AND KBLOW HANDLING ***************************** ; ** ALWAYS ON ** /def -aCred -t"^[-.A-Za-z0-9| ]+ gasps for breath, then slumps into death\.$" coprsetriggasp = \ /handlecorpse%; /def -aCred -t"^[-.A-Za-z0-9| ]+ gurgles in (his|her|its) own blood as (he|she|it) dies\.$" corpsetriggurgle = \ /handlecorpse%; /def -aCred -t"^[-.A-Za-z0-9| ]+ screeches in agony and falls to the ground, dead\.$" corpsetrigsreech = \ /handlecorpse%; /def handlecorpse =\ /eval /set mobsinroom $[mobsinroom - 1]%;\ /eval /set corpsesinroom $[corpsesinroom + 1]%;\ /set combat 0%;\ /if (mobsinroom > 0) \ /blueecho Still at least %{mobsinroom} mobby in room. Stick around.%;\ /elseif (mobsinroom < 1) \ /set mobsinroom 0%;\ /endif%;\ /def -t"^([A-Za-z ]+) dealt the killing blow to" killing_blow = \ /set lastkiller %{P1}%;\ /set lastTotalDmg %{totaldmg}%;\ /set totaldmg 0%;\ /set rounds 0%;/set entrapped 0%;\ /set combat 0%;\ /if (rounds > 0) /set lastRounds %{rounds}%;/endif%;\ /if (killbeep) /beep 1%;/endif%;\ /def gotcorpse = /eval /set corpsesinroom $[corpsesinroom - 1]%;\ /if ({corpsesinroom} <0) /set corpsesinroom 0%;/endif%;\ /if (!corpsesinroom & !playersinroom) \ ; /if (abag & (acorpse | pcorpse)) bags%;/endif%;\ /endif%; /def -t"^There is no corpse" nocorpse1 = \ /set corpsesinroom 0%; /def -t"^You activate the reclamation program on your casing\. A small$" recchambercorpse = /gotcorpse /def -t"^A small beam of light is emitted from the assimilator and scans$" assimilatorcorpse = /gotcorpse /def -t"^plunges his right thumb into the chest cavity of the remains$" cybercorpse = /gotcorpse /def -t"^A green glow spreads from around your body to encompass the corpse\.$" aminamtionringcorpse = /eval /set mobsinroom $[%mobsinroom + 1]%;/gotcorpse /def -t"^The corpse collapses to the ground in a pile of putrid filth" iforgetcorpse = /gotcorpse /def -t"^Slabbing corpse\.\.\.$" slabcorpse = /gotcorpse /def -t"^[A-Z][a-z]+ begin a soft incantation\. What little remaining life essence of" bardcorpse_bead = /gotcorpse /def -t"^[A-Z][a-z]+ begins? a soft incantation\. [A-Za-z ]+'s minute remaining life$" bardcorpse2 = /gotcorpse /def -t"^[A-Z][a-z]+ plays? a death dirge for the fallen corpse\. The corpse slowly$" bardcorpse = /gotcorpse /def -t"^[A-Za-z ]+takes The [a-z, ]+freshly slain corpse of$" mobcorpse = /gotcorpse /def -t"^[A-Za-z]+ studies the damage done to the corpse in an effort to learn$" monkcorpse = /gotcorpse /def -t"^[A-Za-z]+ Main Armor comes to life as a side compartment opens and sprays$" cryocorpse = /gotcorpse /def -t"^essence of the corpse and infuses [a-z]+ form with the remaining energy$" mentalcorpse = /gotcorpse /def -t"^[A-Za-z]+ reclaims the DNA of the corpse for later study\.$" gentechcorpse = /gotcorpse /def -t"^They perform a short ceremony, and the corpse is taken away\.$" fremencorpse = /gotcorpse /def -t"^[A-Za-z]+ covers a corpse and it blows away on the wind\.$" fremencorpse2 = /gotcorpse /def -t"^[A-Za-z]+ absorbs the remaining energy from the corpse\.$" jedicorpse = /gotcorpse /def -t"^You absorb the remaining energy from the corpse\.$" mycorpse = /gotcorpse /def -aBCyellow -t"^The corpse explodes in a violent burst of energy!$" my_mage_corpse = /gotcorpse /def -t"^A cloud of steam escapes from the hissing pressure doors as they open$" thawedcorpse = /gotcorpse /def -t"^[A-Za-z\']+ eyes flash as [a-z]+ calls upon the forces of nature\.$" witchcorpse = /gotcorpse /def -F -t"^[A-Za-z]+ prays to [A-Za-z]+\. The corpse fades from view\.$" priestcorpse = /gotcorpse /def -t"^[A-Za-z]+ devours the corpse!$" changelingcorpse = /gotcorpse /def -t"^[A-Za-z]+ buries a corpse and performs a small ritual\.$" knightcorpse = /gotcorpse /def -t"^You don't have anymore room for another corpse in your CryoVault\.$" cryofull = /alias corpse deener%;dr /def -t"^The corpse rots away\.$" wardercorpse = /gotcorpse /def -t"^[A-Za-z]+ prepares the corpse with a mixture of ginseng and goldenrod silk\.$" necrocorpse = /gotcorpse /def -t"^Powerful energy wells into the room, enveloping the corpse\.$" necrocorpse2 = /gotcorpse /def -t"^[A-Za-z]+ chants softly while kneeling by the corpse\.$" necrocorpse3 = ; /gotcorpse ;/eval /set corpsesinroom $[corpsesinroom +1] /def -t"^The corpse freezes solid, then shatters, scattering crystals about\.$" necrocorpse4 = /gotcorpse /def -t"^You offer the corpse up to [A-Za-z]+\.$" priestcorpseyou = /gotcorpse /def -t"White lightning strikes forth from Wraithvein, enveloping the corpse" wvcorpse = /gotcorpse /def -t"The corpse disintegrates in a bright green flash!" orarecorpse = /gotcorpse /def -t"[A-Za-z]+ envelop(s)? the corpse (with|in) (his|her|your) elemental energies\." elementalcoprsedrain = /gotcorpse /def -t"As all living things are from the earth, [A-Z][a-z]+ now return" bsingercorpsebury = /gotcorpse%; /def -t"^Out of nowhere a crazed hockey fan leaps towards the Cup\. The fan is struck$" stancup = /gotcorpse /def -t"Sorry but there are no corpses present\." bsingerzerocorpse = /set corpsesinroom 0 /def -t"^You must have a corpse to use this spell\.$" bardzerocorpse1 = /set corpsesinroom 0 /def -t"^There is no corpse around here\!$" gentechzerocorpse1 = /set corpsesinroom 0 /def -t"^There is no usable corpse here for you to envelop\.$" siicorpses = /set corpsesinroom 0 /def -t"^You feel a tendril of thought leave your consciousness, wrap around the$" siicorpseused = /gotcorpse /def -t"^You carefully collect a sample of tissue from the corpse, discarding the$" siicorpsednasample = /gotcorpse /def -t"^[A-za-z]+ makes use of the remaining life energy in the corpse\.$" magecorpse = /gotcorpse /def -t"^The umbral tides sweep through you, bitter cold but refreshing\.$" davien_mage_corpse = /gotcorpse /def -t"^The brine of an ethereal ocean floods into the area, shrouding everything$" magecorpse = /gotcorpse /def handlecorpses2 = \ /if (!playersinroom & corpsesinroom) /kwon%;/endif%; /def -t"into the coffin's protective hold!$" coffinwrapped = /gotcorpse /def -t"^The [ A-Za-z0-9,]+ corpse of [ A-Za-z0-9]+\.$" corpsejustsittin = /handlecorpses2 /def -t"wraps? a corpse into (your|her|his) coffin\.$" corpseincoffin = /gotcorpse /def -t"^There is no corpse here to wrap\!$" coffinzerocorpse = /set corpsesinroom 0 /def -t"^There is no corpse here\.$" magezerocorpse = /set corpsesinroom 0 /def -t"^There are no corpses here to wrap\!$" coffinzerocorpse2 = /set corpsesinroom 0 /def -t"^There is no preservation here\.$" nopreservecorpse = /set corpsesinroom 0 /def -t"^preservation\: Taken\.$" presrvation_taken = /gotcorpse /def -t"^A puddle of slime\.$" changelinginroom = /eval /set playersinroom $[playersinroom + 1] ;/if (pathlen < 1) \ ; /load pathstatus.tf%;\ ; /eval /blueecho Path remaining %{path}%;\ ;/endif