/def -ag -mglob -h"REDEF" gagredef ;/def -p10000001 -F -mregexp -h"PROMPT (> )+" catch_prompt = /prompt_hook /def -p10000001 -F -mregexp -h"PROMPT ^(> )+" catch_prompt = /prompt_hook /def -p10000000 -F -t"^(> )+(.*)?$" badpromptfix2 = /substitute -- %P2%;/prompt_hook ;/def -p10000000 -F -t"^(> )+(.*)?$" badpromptfix = /substitute %P2%;/prompt_hook ;/def -p10000000 -F -t"^(> )+(.*)?$" badpromptfix = /eval /echo $[substr(%P0,1)]%;/prompt_hook /def -p1000000 -F -t"^More: [0-9]+-[0-9]+\([0-9]+\) : \[q,b,\].*" moreprompt = /prompt %P0%;/send ""%; ;; cautious macro: /set warn_curly_re=off /require ../damage_calc.tf /set snarf on /require stack-q.tf ;/load dmglist.tf /eval /set playersinroom %{playersinroom-0} /def -ag -p10000 -t"^\s*$" gagblanklines /def onoffvar = \ /eval /set %%1 %%{%{1}-%{2}} %;\ /def get_%1 = /echo $$[%{1}?"on":"off"] %;\ /alias %1 /set %1 $$[%{1}?"0":"1"]%%;/blueecho Variable (%1) is $$(/get_%1)%%;\ /if (list("-s ^%1$$")) /%1 %%*%%;/endif%;/eval /if (list("-s ^%1$$")) /%1%%;/endif /def truefalsevar = \ /eval /set %%1 %%{%{1}-%{2}} %;\ /def get_%1 = /echo $$[%{1}?"true":"false"] %;\ /alias %1 /set %1 $$[%{1}?"0":"1"]%%;/blueecho Variable (%1) is $$(/get_%1)%%;\ /if (list("-s ^%1$$")) /%1 %%*%%;/endif%;/eval /if (list("-s ^%1$$")) /%1%%;/endif /def -t"offers to guard your hit points and spell points\.$" autopriestguard = accept /onoffvar followmob 0 /onoffvar antiidle 1 /def -h"KEYBINPUT" = /qrepeat _stopshort -1300 1 /stopall%;/if (antiidle) /qrepeat _idlewatch -1660 1 /dc_if_antiidle%;/endif%;/guild_input_hook%;/crafting_input_hook%; /alias aidle antiidle%;/kill %{pid__stopshort}%;/kill %{pid__idlewatch}%; /def stopall = /set awalk 0%; /def dc_if_antiidle = /if (antiidle) /dc%;/endif /def guild_input_hook /def crafting_input_hook /def -t"^To do so, type: tskill (.*)$" autotrain = \ /qrepeat _training -5.32 1 tskill %{P1}%; ;/eval /def -F -p2 -aCbgmagenta -t'(\\((%{alignments})\\)|^a Komodo dragon|^an Anole|^an Alligator|^a Crocodile|^an Anaconda|^a Python|^a Gila monster|^a Caiman|^a Viper|^a Skink|^a Gecko|^an Eagle|^a Teiid|^a Hawk|^an Owl|^a Cheetah|^a Fox)(\\.)?$$' hiliteplayers = /eval /set playersinroom $[playersinroom + 1] ;/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 ;/set alignments good|very good|peeronic|mean|evil|satanic|heavenly|neutral|moral|saintly|tensoric|malicious|immoral|pure|demonic|nice|corrupt|righteous|sinister /def -F -t"^([A-Z][A-Za-z ]+) dealt the killing blow to" get_lastkiller = /set lastkiller %P1 /def -aCgreen -t"^You have never been here before." hiliteexplorers /def -aCred -t"^You attack" hiliteyouattack = /if (mobsinroom < 1) /set mobsinroom 1%;/endif%;/set combat 1%; /def -t"^Resistances:\s+([A-Za-z0-9 ]+){10}$" restistances = \ /echo -aCgreen Resistances: Edge Blun Fire Ice Acid Elec Mind Ener Pois Radi /def -t"^\s+What luck! You have found (a fragment|an essence)" defrag = \ /if ({P1} =~ 'a fragment') /eval /set drop_frag 1%;/endif%;\ /if ({P1} =~ 'an essence') /eval /set drop_esse 1%;/endif%;\ ;/eval /def -F -p2 -aCblack -aCbgmagenta -t'(\\((%{alignments})\\))(\\.)?$$' hiliteplayers = /eval /set playersinroom $[playersinroom + 1] /def -F -p2 -aBCmagenta -t'^Bunghulio \-\> \|' hiliteplayers = /eval /set playersinroom $[playersinroom + 1] /def -t"^A puddle of slime\.$" changelinginroom = /eval /set playersinroom $[playersinroom + 1] ; queued /repeat: ; /qrepeat - <#> /def qrepeat = \ /eval /kill %%{pid_%1} %;\ /eval /repeat %{2} %{3} %{-3} %;\ /eval /set pid_%1 %? %; /def -t"^The train comes to a halt at the .+ station. The train doors open\.$" train1 = /if (atrain) leave%;/endif /def -t"^A speeding bullet train pulls into the station\.$" train2 = /if (atrain) enter train%;/endif /alias toedock toeforest%;3es6e%;board ship%;stairs%;open door%;/set fromscrow 0 /alias fromedock 6wn3w%;portal%;home%;/set fromscrow 0%; ;/def -t"^The ship pulls to a stop and the gangplank mysteriously$" taslenship = /if (!fromscrow) board ship%;stairs%;open door%;k scarecrow%;/elseif (fromscrow) gangplank%;/endif%; ;/def -t"^You see land appear far to the west.$" taslenshipscrow = /set fromscrow 1%; ;/onoffvar ahmheal 1 ;/def -t"^ You must wait (\d+) min\(s\) to heal another\.$" hmhealafar1 = /set ahmheal 0%;/eval /set hmhealreset %{P1} ;/def -t"^ You may heal others at this time\.$" hmhealafar2 = /set ahmheal 1 /def -F -t'^From afar, (Drizzt) stares at you in his Jesus Christ pose\.' hmhealother = /eval /repeat -5 1 /send hmheal $[tolower({P1})] /def -t"^You are unable to perform actions: you are imprisoned in your own body,$" borgborgborg = \ resist%;resist%;resist%;resist%;resist%;resist%; /alias tao 0%;h%;cloud on takataomon%;dv for takataomon %* ; ***************** Gag that annoying shit ********************* ; Assholes: ;/def -p10000000 -ag -t'Pantera' gagpantera /set xp 0 /set total_xp 0 /set old_xp 0 /set gs_gxp 0 /set gs_total_gxp 0 /set gs_old_gxp 0 ;-------------------------XP TRIGGER------------------------------------------- /alias xp divvy%;/send gs%;/send xp /def -p10 -mregexp -F -t"^You have ([0-9,]+) total xp" xpcheck = \ /set xp $[replace(",","",{P1})]%;\ ; /set xp4 %P4%; \ ; /set xp $[1000000000 * xp1 + 1000000 * xp2 + 1000 * xp3 + xp4]%; \ /if (total_xp == 0 & old_xp == 0) /set old_xp %xp%;/endif%; \ /set delta_xp $[xp - old_xp]%; \ /set old_xp %xp%; \ /set total_xp $[total_xp+delta_xp]%; \ /time_check%; \ /if (hours > 0) /set xp_per_hour $[total_xp*100/hours]%; \ /else /set xp_per_hour 0%;/endif%; \ /if (hours > 0) /set gxp_per_hour $[gs_total_gxp*100/hours]%; \ /else /set gxp_per_hour 0%;/endif%; \ /eval /echo CURRENT XP: %delta_xp%; \ /eval /echo TOTAL XP: %total_xp%; \ /eval /echo XP PER HOUR: %xp_per_hour%; \ /eval /echo GXP: %gs_total_gxp GXP/HOUR: %gxp_per_hour%; \ /def -p10 -mregexp -F -t"^-= Guild Level : [0-9]+ Luck: [0-9]+ GXP : ([0-9]+)" gxpcheck = \ /set gs_gxp %{P1}%;\ /if (gs_total_gxp == 0 & gs_old_gxp == 0) /set gs_old_gxp %gs_gxp%;/endif%;\ /set gs_delta_gxp $[gs_gxp - gs_old_gxp]%; \ /set gs_old_gxp %gs_gxp%; \ /set gs_total_gxp $[gs_total_gxp+gs_delta_gxp]%; \ /def time_reset = \ /eval /set init_day $(/time %%d) %; \ /eval /set init_hour $(/time %%H) %; \ /eval /set init_min $(/time %%M) /def time_check = \ /if (total_xp == 0) /time_reset%;/endif%;\ /eval /set day $(/time %%d) %; \ /eval /set hour $(/time %%H) %; \ /eval /set min $(/time %%M) %; \ /if (day != init_day) /set d_hour $[hour+24-init_hour]%; \ /else /set d_hour $[hour-init_hour]%;/endif%; \ /set d_min $[min-init_min] %; \ /if (d_min < 0) /set d_hour $[d_hour-1]%;/set d_min $[d_min+60]%; \ /endif%; \ /set minutes $[d_hour*60+d_min]%; \ /set hours $[d_hour*100+d_min*100/60] /def clearxp = \ /time_reset%;\ /set total_xp 0%;\ /set old_xp 0%;\ /set gs_total_gxp 0%;\ /set gs_old_gxp 0%;\ /echo XP STASTISTICS CLEARED /clearxp /def r = /more on%;/recall /%{1} /onoffvar await 1 /def -F -p100 -t"gasps for breath, then slumps into death\.$" kwon3 = /kblow /def -F -p100 -t"gurgles in [herisit]+ own blood as [sheit]+ dies\.$" kwon4 = /kblow /def -F -p100 -t"screeches in agony and falls to the ground, dead\.$" kwon5 = /kblow /def kblow = \ /set lastkiller %{P1}%;\ /set corpsesinroom $[corpsesinroom+1]%;\ ; /eval /set mobsinroom $[mobsinroom - 1]%;\ /if (mobsinroom < 0) \ /set mobsinroom 0%;\ /endif%;\ /eval /set lastRounds %{rounds}%;\ /eval /set lastTotalDmg %{totaldmg}%;\ /eval /set totaldmg 0%;\ /set rounds 0%;\ /eval /set combat 0%;\ /if (killbeep) /beep 1%;/endif%;\ /def -t"^The cryohydra's head smacks you hard, sending you flying off the mountain$" pmount = pmount ; ******************* Echo Back XP Returns Off rcost ****************** ;You need 472861 more experience points to advance your level. ;You have 527139 experience points to raise your stats with. /def -ag -t"^([A-Z][a-z]+) seems briefly distracted. Suddenly he fades briefly and reforms as$" gagascended1 = /echo %{P1} shielded you. /def -ag -t"^(his|her) godlike body ethereally manifests in front of you to absorb some of the$" /def -ag -t"^attack\. *$" ;/def -t"^You have ([0-9]+) experience points to raise your stats with.$" rcost = \ ;/def -t"You have ([,0-9]+) experience points to put towards raising your stats$" rcost = \ /def -t"^\s*You have ([,0-9]+) experience points to put towards raising your stats\." rcost = \ /eval /set xp $[replace(",","",{P1}) ] %;\ /eval /set lastrxp %{rxp} %;\ /eval /set rxp %{xp} %;\ /eval /set deltaxp2 $[rxp-lastrxp] %;\ /blueecho - You have acquired %{deltaxp2} XP since the last rcost.%; ; random area specific trigs /def -t"^The Cow King brushes you, and electricity arcs from him to you!$" d2cowkingwantstofuckyou = g%;wear all%;wield sword /def -t"^While shuffling about the mishappened bones, you accidently kick a small$" get_the_trolls_scroll = get scroll%;/repeat -0 30 burn mass /def -aB -t"^Kathaelis chants 'Do ertan reldan go mach' as a shimmering field forms around him\." /def -aB -t"^The protective field around Kathaelis weakens and fades into nothing\." /unset status_pad