; TinyFuge 3k stepper bot ; 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 ; How to detect people: ; by alignment: last word in parenthesis after title is alignment, true for all ; players. Alignments: ; /set alignments good|very good|peeronic|mean|evil|satanic|heavenly|neutral|moral|saintly|tensoric|malicious|immoral|pure|demonic|nice|corrupt|righteous ; 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 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 ; people leave these fuckin things down there sometimes: /def -aCbgred -t"^Hellwasp {([0-9]+)}\.$" wasp1 = /set awalk 0%;/dc%; /def -aCbgred -t"^Wasp \(hellswarm\) {([0-9]+)}\.$" wasp2 = /set awalk 0%;/dc%; /def -aCbgred -t"^Swarm {([0-9]+)}\.$" wasp3 = /set awalk 0%;/dc%; /set directions n|e|s|w|ne|nw|se|sw|u|d|vortex|enter|cave|cavern|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 /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 transfer = wssdde%;rc%;transfer all%;cy%;cy%;cy%;transfer all%;cy%;cy%;cy%;transfer all%;cy%;cy%;cy%;wuunne%;boxme%;dbags%;tbags%;unboxme /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}|,)+\\)(\\.)?$$' grabbriefroom = /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]?:' grabverboseroom = /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 = /if (corpsesinroom & (acorpse|pcorpse) & !playersinroom) /guild_corpse%;/endif%; /if ((stepper) & (foundroom)) /if ((mobsinroom > 0) & (!playersinroom) ) /elseif ( awalk & !amine) /try_step%; /elseif ( amine ) spelunk%; /endif %; /set foundroom 0 %; /endif%; ; e.g. "/stepper crystals" /def stepper = /if ({#} >= 1) /guild_defense_check%; /set awalk 1%; /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 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]+)\\\\})?\\\\.?$$$' stepper_grabmob = /if (debug) /eval /blueecho :: 2 %%%%{P2} 3 %%%%{P3} 4 %%%%{P4} 5 %%%%{P5} 6 %%%%{P6} 7 %%%%{P7} 8 %%%%{P8} 9 %%%%{P9} %%%; /endif%%%;; /if ({P7} =~ '^\d+' ) ; /eval /set mobsinroom $$$[mobsinroom + {P7}] %%%; /if ({P6} !~ '') /eval /set mobsinroom $$$[mobsinroom + {P6}] %%%; /elseif ({P1} !~ '') /eval /set mobsinroom $$$[mobsinroom + {P1}] %%%; /else /eval /set mobsinroom $$$[mobsinroom + 1] %%%; /endif%%%; /if (debug) /blueecho Mobs in room %%%{mobsinroom}%%%;/endif%%%; %; /eval /def -F -aBCred -p3 -t"^%%{%{area}_block}$$$" stepper_nostep = /unstep%%%; /endif%%%; %; /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 ; kill alias calls /kwon (to get corpses/loot and set up protections) which then calls /try_step to move us forward after a /handlecorpse (gurgle/gasp/screech) ;/def partydef = /eval soothe %{party} ;/def partydef = hh on spawn%; /def setoo = /send alias oo rhythmic actions 1 soothe \$1/oc/soothe \$1/oc/soothe \$1/oc/soothe \$1/oc/soothe \$1/oc/oo \$1 /def unsetoo = /send alias oo rhythmic actions 1 soothe \$1:45/oo \$1 /def partydef = soothe kintax%;oo kintax%; /alias j /if (mobsinroom) /blueecho Kill kill kill!%; /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)%;/eval /blueecho !%{revstate} & (!%{mobsinroom}|%{playersinroom}) & (%{foundroom}|!%{mobsinroom}) & !%{corpsesinroom} & !%{looktyped} & %{awalk} %; /def try_step = /if (debug) /stat%;/endif%;; kwon may call back try_step until there are no more corpses, yay /if (corpsesinroom) /kwon%;/endif%;; /if (abagbag) bags%;/endif%; /if (stepper & !revstate & ( !mobsinroom | playersinroom) & (foundroom|!mobsinroom) & !corpsesinroom & !looktyped & awalk) /set playersinroom 0%; /if (aparty) /partydef%;/endif%; setpathpoint%; /step%; /endif /def -F -t"^Your legs run away with you" dewalkwimpy = /set awalk 0%; /alias go /set stepper 1%; /set mobsinroom 0%; /set corpsesinroom 0%; /set foundroom 1%; /set awalk 1%; /set revstate 0%; /step /def gotcorpse = /eval /set corpsesinroom $[corpsesinroom - 1]%; /if ({corpsesinroom} <0) /set corpsesinroom 0%;/endif%; ; ; 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 ; ** ALWAYS ON ** /def -aCred -t"^[A-Za-z| ]+ gasps for breath, then slumps into death\.$" coprsetriggasp = /handlecorpse%; /def -aCred -t"^[A-Za-z| ]+ gurgles in (his|her|its) own blood as (he|she|it) dies\.$" corpsetriggurgle = /handlecorpse%; /def -aCred -t"^[A-Za-z| ]+ screeches in agony and falls to the ground, dead\.$" corpsetrigsreech = /handlecorpse%; /def -t"^There is no .* here\.$" nomob1 = /if (!combat) /set mobsinroom 0%;/endif%; /def -t"^There is no corpse" nocorpse1 = /set corpsesinroom 0%; /def handlecorpse = /eval /set mobsinroom $[mobsinroom - 1]%; /if (mobsinroom > 0) /blueecho Still at least %{mobsinroom} mobby in room. Stick around.%; /endif%; ; ********************************** Bouncer ****************** /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%; ; switch damage for the crystal /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 stepper%; /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%;dbags%;dbags%;dbags%;frombox%;/endif%; /alias goback stepper%; /set awalk 0%; /set abagbag 0%; /eval /set revpath2 $(/reverse %{revpath})%; /eval /dopath %{revpath2}%; /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 -t"^[A-za-z]+ makes use of the remaining life energy in the corpse\.$" magecorpse = /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 handlecorpses2 = /if (!playersinroom & corpsesinroom) /kwon%;/endif%; /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 preservation here\.$" nopreservecorpse = /set corpsesinroom 0 /def -t"^preservation\: Taken\.$" presrvation_taken = /gotcorpse