/def -i blueecho = /echo -aCbgblue %* /def -i redecho = /echo -aCbgred %* /def -i greenecho = /echo -aCbggreen %* /def -i yellowecho = /echo -aCbgyellow %* /def -i cyanecho = /echo -aCbgcyan %* /def -i magentaecho = /echo -aCbgmagenta %* /def -i bblueecho = /echo -aBCblue %* /def -i bredecho = /echo -aBCred %* /def -i bgreenecho = /echo -aBCgreen %* /def -i byellowecho = /echo -aBCyellow %* /def -i bcyanecho = /echo -aBCcyan %* /def -i bmagentaecho = /echo -aBCmagenta %* /def colors = /load testcolor.tf /alias icof /if (morgue) exa morgue all%;/endif%;/send icof /alias c2 unwrap corpse%;get corpse%;give corpse to %* /onoffvar coffin 0 /alias swap remove %1%; wear %* /alias swapsword unwield sword%;wield sword %* /alias swaprings sm remove ring%;sm remove ring%;sm ring 3%;sm ring 3%;wear all /alias gemchant remove %1 %2%;/send gemchant gem into %1 %2%;wear %1 %2 /alias kq keep all corpse%;keep all wrapper%;keep symbol%;keep crowbar%;keep all equip%;keep all torch%;keep all flashlight%;keep all box%;keep all bag%;keep all pack%;keep freezer%;keep bell%;keep all scroll%; /alias wimpydir \ /if ({1} =~ 's') /send wimpydir south%;/endif%;\ /if ({1} =~ 'n') /send wimpydir north%;/endif%;\ /if ({1} =~ 'e') /send wimpydir east%;/endif%;\ /if ({1} =~ 'w') /send wimpydir west%;/endif%;\ /if ({1} =~ 'sw') /send wimpydir southwest%;/endif%;\ /if ({1} =~ 'se') /send wimpydir southeast%;/endif%;\ /if ({1} =~ 'nw') /send wimpydir northwest%;/endif%;\ /if ({1} =~ 'ne') /send wimpydir northeast%;/endif%; /onoffvar abag 1 /alias gaf get all from %* /alias pbags \ /set bagi 1%; \ /while (bagi <= packnum) \ /eval /send put %* in bp %{bagi}%;\ /eval /set bagi $[bagi+1]%;\ /done%; /alias smugbags \ /set bagi %{packnum}%; \ /while (bagi > 0) \ /eval /send smuggle bp %{bagi}%;\ /eval /set bagi $[bagi-1]%;\ /done%; /alias turtleeq unkeep all%;keep tiara%;keep all bp%;pbags all%;smugbags%;sm /alias unturtleeq smuggle remove all%;keep all bp%;gbags all%;wear all%;remove bp%;wield sword%;kq /unset enemy /alias kill /if (!({1} =~ '')) /set enemy %1%;/endif%;ak %2 /alias k \ /eval /kill %{pid__killing}%;\ /eval /kill %{pid__stepping}%;\ /kwon%;\ /if (!({1} =~ '')) /set enemy %1%;/endif%;\ /if (followmob) follow %{enemy} %2%;/endif%;\ /if (alookmob) /send look at %{enemy} %2%;/endif%;\ /guild_pre_kill_hook %{enemy} %2%;\ /if (!combat) \ ak %2%;\ /endif%;\ /guild_post_kill_hook %{enemy} %2%;\ /alias ak \ /if (enemy !~ "") \ /send kill %{enemy} %1%;/killall%;\ /endif%;\ passist p /alias addenemy /set enemies %{enemies} %* /def killall = /_killall %{enemies} ; bleh whatever /def _killall = \ /if ({1} !~ '' ) /send kill %1%;/endif%;\ /if ({2} !~ '' ) /send kill %2%;/endif%;\ /if ({3} !~ '' ) /send kill %3%;/endif%;\ /if ({4} !~ '' ) /send kill %4%;/endif%;\ /if ({5} !~ '' ) /send kill %5%;/endif%;\ /if ({6} !~ '' ) /send kill %6%;/endif%;\ /if ({7} !~ '' ) /send kill %7%;/endif%;\ /if ({8} !~ '' ) /send kill %8%;/endif%;\ /if ({9} !~ '' ) /send kill %9%;/endif%;\ /if ({10} !~ '' ) /send kill %10%;/endif%; /def reload = /purge%;/load .tfrc /alias reload /reload /alias sq skillquests %* /alias ex explorer %* /alias pab put all in bag %* /alias dosearch x /alias kb keep blood red gloves%;keep blood red helmet%;keep spiderskin codpiece%;keep precious stone%;keep titanium breastplate%;keep rod of garnthax /def -aCblue -p999999 -t"^ ?# Item *$" reset_inventory_nums = \ /set bcrystal 0%;\ /set boxnum 0%;\ /set necrobags 0%;\ /set bagnum 0%;\ /set packnum 0%;\ /set coffin 0%;\ /set autowrangle 0%;\ /set gemcount 0%;\ /set morgue 0%;\ /set hscrolls 0%;\ /set avorm 0 /def -PCcyan -t"^ *(\d+) \*?Healing scroll\.$" hscrolls = /eval /set hscrolls %1 /onoffvar parse 1 /def -F -h"SEND ;" multicmd = \ /set cmd %* %;\ /if (parse) \ /while (cmd !~ "") \ ; /if (regmatch("\\\;", {cmd})) \ ; /send %{cmd} %;\ ; /return %;\ ; /endif%;\ /if (regmatch("^([^;]*);?(.*)$$", {cmd})) \ /eval %P1 %;\ /set cmd=%P2 %;\ /else \ /eval %{cmd} %;\ /set cmd "" %;\ /endif %;\ /done %;\ /else \ /eval /send %{cmd} %;\ /endif ; irepeat is a /repeat for inline macros, as /repeat -0 delays execution ; until the end of tthe macro and fuck everything up. /irepeat # command /def irepeat = \ /set irep 1%;\ /while (irep <= {1}) \ /eval %{-1}%;\ /set irep $[irep+1]%;\ /done%; /alias # /irepeat %1 %{-1} /alias echo /eval /echo %%{%1} %%{%2} %%{%3} %%{%4} %%{%5} %%{%6} %%{%7} %%{%8} %%{%9} ; inventory handling, autobags, etc. ; 1 An enchanted coffin (5 corpses) [.|....] [Moderately Full]. /def -PCred -t"^ \d+ An enchanted coffin \((\d+) corpses?\) \[[^]]+\] \[[ A-Za-z]+\]\." coffin_watch = \ /eval /set coffin 1%;\ /eval /set coffin_corpses %{P1}; ; 1 An enchanted coffin (10/12 corpses) [.....|]. /def -PCred -t"^ \d+ An enchanted coffin \((\d+)\/(\d+) corpses?\) \[[^]]+\]\.$" coffin_watch2 = \ /eval /set coffin 1%;\ /eval /set coffin_corpses %{P1}; /def -PCcyan -t"^ 1 \*The Blood Crystal" = /set bcrystal 1 /def -PCcyan -t"^ 1 \*Vortex Mail \([A-Z][a-z]+\) \(worn\)\.$" vortex_mail = /set avorm 1 /def -PCcyan -t"^ \d \*Death's Freezer \(\d+ corpses\)\.$" havemorguewilltravel = /set morgue 1 /def -PCcyan -p999999 -t"^ ?(\d+) \*An autostacking backpack (\(worn\) )?\[\d+% full\]\." gentechpack = \ /eval /set packnum $[packnum + {P1}]%; /def -t"^The arms finish their labors and have stacked as efficiently as possible\.$" bagempty = \ /set bagsfull 0%; /def -t"^The arms stack as efficiently as possible, but are unable to retrieve everything\.$" bagfull =\ /set bagsfull 1%; /def -PCcyan -t"^ (\d+) \*Bag of (Holding|Stretching)\.$" setbagnum2 = \ /eval /set bagnum $[bagnum + {P1}]%; /def -PCcyan -t"^\*A Jedi Backpack \[([0-9]+)\]$" setbagnum = \ /eval /set bagnum $[bagnum + {P1}]%; /def -PCcyan -t"^ (\d+) \*a velvet bag, \d+\% full\.$" setbagnum = \ /eval /set necrobags $[necrobags + {P1}]%; /def -F -PCcyan -t"^ ?([0-9]+) \*?A Music Box" setboxnum = \ /set tmp %{P1}%;\ /eval /set boxnum $[boxnum + tmp]%; /def -ag -t"Too heavy\.$$" gagbox /def -F -ag -t"\.$$" gagbox2 /def -ag -t"getting the crystal\!$$" gagbox3 /def -ag -t"^ 1 \*Brilliant light\.$" /def -ag -t"^ 1 \*Marionette strings\.$" /def -ag -t"^ 1 \*An auction line\.$" /def -ag -t"^ 1 \*A ring of house keys\.$" /def -ag -t"^ 1 \*A Crafter's Satchel\.$" /def -ag -t"^ 1 \*Worn leather book\.$" /def -ag -t"^ 1 \*A Reforger's Kit\.$" /alias bags \ /if (aget) g%;/endif%;\ /set bagi 1%; \ /if ((acorpse | pcorpse) & corpseinroom) y%;di%;/endif%;\ /if (necrobags) gather%;/endif%;\ /set boxi 1%; \ /while (boxi <= packnum) \ /eval /send stack %{boxi}%;\ /set boxi $[boxi+1]%;\ /done%;\ /set boxi 1%; \ /while (bagi <= bagnum) \ g%;/eval /send put all in bag %{bagi}%;\ /set bagi $[bagi+1]%;\ /done%; \ /set boxi 1%; \ /while (boxi <= boxnum) \ g%;/eval /send put all in box %{boxi}%;\ /set boxi $[boxi+1]%;\ /done%;\ /if (bagnum | boxnum ) drop remains%;/endif%;\ /if ((acorpse | pcorpse) & aget) g%;/endif%; /def bag = /set j 0%;/while (j < {1}) g%;pab $[{1} - j]%;/set j $[j+1]%;/done /def sab = keep all%;/set j 0%;/while (j < {1}) sell all from bag $[j+1]%;/set j $[j+1]%;/done /alias sab sell all from box %*%;sell all from bag %* ; bag 1 for holding saber sells. /alias sbags \ /if ({1}) /set boxi %1%;/else /set boxi 1%;/endif%;\ /while (bagi <= bagnum+necrobags) \ /eval /send sell all from bag %{bagi}%;\ /set bagi $[bagi+1]%;\ /done%; \ /if ({1}) /set boxi %1%;/else /set boxi 1%;/endif%;\ /while (boxi <= boxnum) \ /eval /send sell all from box %{boxi}%;\ /set boxi $[boxi+1]%;\ /done%;\ /if ({1}) /set boxi %1%;/else /set boxi 1%;/endif%;\ /while (boxi <= packnum) \ /eval /send sell all from pack %{boxi}%;\ /set boxi $[boxi+1]%;\ /done /alias dbags \ /set bagi 1%; \ /while (bagi <= bagnum+necrobags) \ /eval /send donate all from bag %{bagi}%;\ /eval /set bagi $[bagi+1]%;\ /done%; \ /set boxi 1%; \ /while (boxi <= boxnum) \ /eval /send donate all from box %{boxi}%;\ /eval /set boxi $[boxi+1]%;\ /done%;\ /while (boxi <= packnum) \ /eval /send donate all from pack %{boxi}%;\ /set boxi $[boxi+1]%;\ /done /alias rbags \ /set boxi 1%; \ /while (boxi <= packnum) \ /eval /send recycle all from pack %{boxi}%;\ /eval /set boxi $[boxi+1]%;\ /done%;recycler check /alias tbags \ /set bagi 1%; \ /while (bagi <= bagnum) \ /eval /send trash all from bag %{bagi}%;\ /eval /set bagi $[bagi+1]%;\ /done%; \ /set boxi 1%; \ /while (boxi <= boxnum) \ /eval /send trash all from box %{boxi}%;\ /eval /set boxi $[boxi+1]%;\ /done%;\ /set boxi 1%; \ /while (boxi <= packnum) \ /eval /send trash all from pack %{boxi}%;\ /eval /set boxi $[boxi+1]%;\ /done /alias gbags \ /set bagi 1%; \ /while (bagi <= bagnum) \ /eval /send get %* from bag %{bagi}%;\ /eval /set bagi $[bagi+1]%;\ /done%; \ /set boxi 1%; \ /while (boxi <= boxnum) \ /eval /send get %* from box %{boxi}%;\ /eval /set boxi $[boxi+1]%;\ /done%;\ /set bagi 1%; \ /while (bagi <= packnum) \ /eval /send get %* from bp %{bagi}%;\ /eval /set bagi $[bagi+1]%;\ /done%; \ ; let's boot up our autobagger :P /send mi /alias keepeq keep stone%;keep all equip /alias armorup \ wear ring%;wear ring 2%;wear armour%;wear cloak%;\ wear boots%;wear gloves%;wear amulet%;wear shield%;\ wear aura%;wear other%;wear helmet%;keepeq /eval /set looktyped %{looktyped-0} /alias l /set looktyped 1%;/send l /alias look /set looktyped 1%;/send look %* /alias gl /set looktyped 1%;/send gl /alias glance /set looktyped 1%;/send glance /def lasttime = /eval /echo $[time()-{last_input}] /def s = /speedwalk /def ne = /_dokeyaux ne /def nw = /_dokeyaux nw /def se = /_dokeyaux se /def sw = /_dokeyaux sw ;/def key_Home = /nw ;/def key_Up = n ;/def key_PgUp = /ne ;/def key_Left = w ;/def key_Center = k ;/def key_Right = e ;/def key_End = /sw ;/def key_Down = s ;/def key_PgDn = /se /def key_nkpEnt = k /def key_nkp7 = /nw /def key_nkp8 = n /def key_nkp9 = /ne /def key_nkp4 = w /def key_nkp5 = k /def key_nkp6 = e /def key_nkp1 = /sw /def key_nkp2 = s /def key_nkp3 = /se /def key_nkp+ = l /def key_nkp/ /def key_nkp* /def key_nkp- /def key_nkpEnt ; qt amulet worlddrop, qtport/qtmark/qtview /alias qtport remove amulet%;wear qt amulet%;/send qtport %*%;remove amulet%;wear twilight amulet /alias qtmark remove amulet%;wear qt amulet%;/send qtmark %*%;remove amulet%;wear twilight amulet /alias qtview remove amulet%;wear qt amulet%;/send qtview %*%;remove amulet%;wear twilight amulet /set auction_time 24 /alias a0 collect%;auction %*%;100%;1000%;4 /alias a1 auction %*%;10%;1000%;%auction_time /alias a2 auction %*%;10%;2000%;%auction_time /alias a4 auction %*%;10%;4000%;%auction_time /alias a5 auction %*%;10%;5000%;%auction_time /alias a10 auction %*%;10%;10000%;%auction_time /alias a15 auction %*%;10%;15000%;%auction_time /alias a20 auction %*%;10%;20000%;%auction_time /alias a30 auction %*%;10%;30000%;%auction_time /alias a40 auction %*%;10%;40000%;%auction_time /alias a50 auction %*%;10%;50000%;%auction_time /alias a75 auction %*%;10%;75000%;%auction_time /alias a100 auction %*%;25000%;100000%;%auction_time /alias a150 auction %*%;50000%;150000%;%auction_time /alias a200 auction %*%;75000%;200000%;%auction_time /alias a500 auction %*%;100000%;500000%;%auction_time /def onein = \ ; onein , e.g. onein(2) = 50% odds, returns value of 1 1 in x times. /set rand $[rand(1,{1})]%;\ /if (rand = {1}) \ /return 1%;\ /else \ /return 0%;\ /endif%; /def get_val = /result $[{1}]