; ; newbat.tf ; Batmud /loaded newbat_base.tf ;***** startup /SET redef=1 /SET space=" " /lcd ~/tf-dir /SET hp=0 /SET hpmax=0 /SET sp=0 /SET spmax=0 /SET ep=0 /SET epmax=0 /SET cash=0 /SET exp=0 /SET exp_to_level=0 /SET dodged=0 ;***** macros /DEF -mregexp -h"PROMPT H:([0-9]*)/([0-9]*) S:([0-9]*)/([0-9]*) E:([0-9]*)/([0-9]*) C:([0-9]*) X:([0-9]*) >" prompt_hook = /test prompt({*}) %;\ /SET hp=%P1%; /SET hpmax=%P2%; /SET sp=%P3%; /SET spmax=%P4%;\ /SET ep=%P5%; /SET epmax=%P6%; /SET cash=%P7%; /SET exp=%P8 /DEF -F -t"H: * (*) \[*\] S: * (*) \[*\] E: * (*) \[*\] C: * \[*\] X: * \[*\]" get_sc_data = \ /SET oldhp=%{hp}%; /SET hp=%{2}%; /SET hpmax=$[substr({3},1,-1)]%; \ /SET sp=%{6}%; /SET spmax=$[substr({7},1,-1)]%; \ /SET cash=%{14}%; /SET exp=%{17} ;***** You have to make sure that your prompt is set correctly to have ;***** the prompt hook pick it up correctly. Type 'setprompt' to set your ;***** prompt correctly. Also this sets your short score format so status ;***** line gets updated correctly. /DEF -h"send {setprompt}" set_prompt_correct = \ /SEND prompt H:/ S:/ E:/ C: X: > %; \ /SEND sc set H: {colorhp} () [{diffhp}] S: {colorsp} () [{diffsp}] E: {colorep} () [{diffep}] C: [{diffcash}] X: [{diffexp}] ;***** builtins /DEF -h"send {la}*" la = /SEND look at %{-1} /DEF -h"send {ga}" ga = /SEND get all /DEF -h"send {r}*" report = /SEND report %{-1} /DEF -h"send {rps}*" report_stats = /SEND report stats %{-1} /DEF -h"send {lac}*" lac = /SEND look at corpse %{-1} /DEF -h"send {lab}*" lab = /SEND look at bag %{-1} /DEF -h"send {gab}*" gab = /SEND get all from bag %{-1} /DEF -h"send {gac}*" gac = /SEND get all from corpse %{-1} /DEF -h"send {ec}*" ec = /SEND get corpse %{-1}%;/SEND eat corpse /DEF -h"send {bg}*" gb = /SEND get %{-1} from bag /DEF -h"send {bp}*" pb = /SEND put %{-1} in bag /DEF -h"send {wa}" wa = /SEND wear all /DEF -h"send {ext}" ext = /SEND extinguish /DEF -h"send {x}" x = /SEND scan /DEF -h"send {z}" cast_stop = /SEND cast stop %; /SET casting=0 ;***** "Alias" Macros /DEF -h"send {hsp}*" hsp = /SEND help spell %{-1} /DEF -h"send {hsk}*" hsk = /SEND help skill %{-1} /DEF -h"send {f}" forward = /SEND forward /DEF -h"send {b}" backward = /SEND backward ;***** communication /DEF -F -p9 -P0Ccyan -t"[[{<(]nomad[]}>)]" nomad_lite = /DEF -F -p9 -P0Ccyan -t"[[{<(]newbie[]}>)]" newbie_lite = /DEF -F -p9 -P0Cmagenta -t"[[{<(]ghost[]}>)]" ghost_lite = /DEF -F -p9 -P0BCred -t"[[{<(]wanted[]}>)]" wanted_lite = /DEF -F -p9 -P0BCblue -t"[[{<(]bat[]}>)]" bat_lite = /DEF -F -p9 -P0BCgreen -t"[[{<(]sales[]}>)]" sales_lite = /DEF -F -p9 -P0Ccyan -t"[[{<(]chat[]}>)]" chat_lite = /DEF -F -p9 -P0Ccyan -t"[[{<(]race[]}>)]" race_lite = /DEF -F -p9 -P0Cbgyellow,Cblack -t"^Info:" inform_lite = /DEF -F -p9 -aCred -t"*shouts '*" shout_lite = /DEF -F -p9 -P0Cbgmagenta,Cblack -t"[[{<(]party[]}>)]" party_lite = /DEF -F -p9 -P0Cbgmagenta,Cblack -t"[[{<(]report[]}>)]" party2_lite = /DEF -F -p9 -ag -t"*tells*you '*" tell_lite = \ /SET reply_to=$[tolower(%{1})] %;\ /ECHO -p @{BCmagenta}%{1}@{n} %{-1} /DEF -t"send {pr}*" party_report_say = /SEND party report %{-1} ;***** skills /DEF -ag -h"send {app}*" skl_appraise = /IF /TEST $[%{-1} !~ ""] %;\ /THEN /SEND use appraise at %{-1} %;\ /ELSE /ECHO This spell requires a target %; /ENDIF /DEF -ag -h"send {bash}*" skl_bash = /IF /TEST $[%{-1} !~ ""] %;\ /THEN /SEND use bash at %{-1} %;\ /ELSE /SEND use bash %;\ /ENDIF /DEF -ag -h"send {bc}*" skl_battlecry = /IF /TEST $[%{-1} !~ ""] %;\ /THEN /SEND use battlecry at %{-1} %;\ /ELSE /ECHO This skill requires a target %; /ENDIF /DEF -ag -h"send {bless}*" skl_bless = /IF /TEST $[%{-1} !~ ""] %;\ /THEN /SEND use bless at %{-1} %;\ /ELSE /ECHO This spell requires a target %; /ENDIF /DEF -ag -h"send {cere}" skl_ceremony = use ceremony /DEF -ag -h"send {fin}*" skl_finish = use finish at monster %{-1} /DEF -ag -h"send {grp}*" skl_grapple = use grapple at monster %{-1} /DEF -ag -h"send {hear}*" skl_hear_noises = /IF /TEST $[%{-1} !~ ""] %;\ /THEN /SEND use hear noises at %{-1} %;\ /ELSE /ECHO This skill requires a target %; /ENDIF /DEF -ag -h"send {med}" skl_meditation = use meditation /DEF -ag -h"send {plock}*" skl_pick_locks = use pick locks at door %{-1} /DEF -ag -h"send {plst}*" skl_plastic_surgery = /IF /TEST $[%{-1} !~ ""] %;\ /THEN /SEND use plastic surgery at %{-1} %;\ /ELSE /ECHO This spell requires a target %; /ENDIF ;/DEF -ag -h"send {zap}*" skl_zapping = zap monster %{2} with wand %{3} ;***** spells ;/DEF -ag -h"send {cf}" spl_create_food = cast create food /DEF -ag -h"send {cm}" spl_create_money = cast create money /DEF -ag -h"send {dark}" spl_dark = cast darkness /DEF -ag -h"send {da}" spl_detect_align = cast detect alignment /DEF -ag -h"send {dg}" dig_the_grave = dig grave /DEF -ag -h"send {lt}" spl_light = cast light /DEF -ag -h"send {mm}*" spl_magic_missile = /IF /TEST $[{-1} !~ ""] %;\ /THEN /SEND cast magic missile at {-1} %;\ /ELSE /SEND cast magic missile %; /ENDIF /DEF -ag -h"send {pcor}" spl_preserve_corpse = cast preserve corpse /DEF -ag -h"send {qs}*" spl_quicksilver = cast quicksilver at %{-1-%character} /DEF -ag -h"send {si}*" spl_see_invisible = cast see invisible at %{-1-%character} ;***** status /DEF -F -aBCred -t"You wish your wounds would stop BLEEDING so much!" wounded = /DEF -F -aCgreen -t"*: #*" essence_eye_lite = /DEF -F -aCgreen -t"You start concentrating on*skill." skill_start_lite = /DEF -F -aCgreen -t"You start chanting." spell_start_lite = /SET casting=1 /DEF -F -aCgreen -t"You are done with the chant." spell_done_lite = /SET casting=0 /DEF -F -aCgreen -t"Your movement prevents you casting the spell." move_abort = /SET casting=0 /DEF -F -aCgreen -t"You need * more spell points to cast this spell." low_sp_abort = /SET casting=0 /DEF -F -aCgreen -t"You are done concentrating on your skill." skill_done_lite = /DEF -F -ag -t"You nimbly dodge*hit." dodged_hit = /SET dodged=$[%{dodged}+1] %; /ECHO [DODGE] /DEF -F -aCyellow -t"You feel fully healed." hps_charge = /DEF -F -aCyellow -t"You sizzle with magical energy." sps_charge = /DEF -F -aCyellow -t"An image of * vanishes." image_gone = /DEF -F -aCyellow -t"Your disc wavers dangerously." disc_going = /SEND party say Floating disc is disappearing. ;Protections /DEF -F -aCyellow -t"You turn visible." invisibilty_down = /SEND party say Invisibility down. /DEF -F -aCyellow -t"You skin feels like it is burning." unstun_down = /SEND party say Unstun down. /DEF -F -aCyellow -t"You no longer have a active regeneration spell on you." regeneration_down = /SEND party say Regeneration down. /DEF -F -aCyellow -t"Your Unpain spell dissipates." unpain_down = /SEND party say Unpain down. /DEF -F -aBCyellow -t"All images of * vanish!" mirrors_down = /SEND party say Mirror Images down. /DEF -F -aCyellow -t"Your armour feels thinner." sop_down = /SEND party say Protection spell is down. /DEF -F -aCyellow -t"You feel lighter, but it doesn't seem to affect your weight!" hw_down = /SEND party say Heavy Weight is down. /DEF -F -aCyellow -t"You are no longer sensitive to magical things." see_magic_down = /SEND party say See magic down. /DEF -F -aCyellow -t"Your floating disc suddenly disappears." disc_down = /SEND party say Floating disc is gone! /DEF -F -aCyellow -t"Your Major Resistance stops working," major_res_down = /SEND party say Major resistance is down. /DEF -F -aCyellow -t"You feel the poison leaving your veins!" rp_worked = /SEND party say Poison removed! /DEF -F -aCyellow -t"The sauna cured your poison!" sauna_worked = \ /SEND party report Poison removed! /DEF -F -aBCgreen -t"*You are prepared to do the skill*" fin_skill_lite = /DEF -F -aBCred -t"Your movement prevents you from doing the skill." interrupted_skill = /DEF -F -aBCcyan -t"You hear a low rumble from the sewers. Then it is silent again." ring_is_made = /DEF -F -aBCbgred,BCwhite -t"You shiver and suffer from POISON!!" you_are_poisoned = /SEND party report I'm Poisoned! /DEF -F -t"You feel fully healed." inform_fully_healed = \ /SEND @party report Fully Healed ;***** gags /DEF -ag -F -p9 -t"It's night and very dark*" rgag_1 = /DEF -ag -F -p9 -t"There are no light sources here, but you can still see." rgag_28 = /DEF -ag -F -p9 -t"........Autosave!!!" rgag_30 = /DEF -ag -F -p9 -t"You feel that * is satiated." rgag_35 = /DEF -ag -F -p9 -t"Short score is now on." rgag_38 = ;***** miscellaneous ; ***** batcity sewers stuff /DEF -F -aBCwhite -t"A piece of old paper" ring_lite1 = /DEF -F -aBCyellow -t"A piece of magic copper" ring_lite2 = /DEF -F -aBCgreen -t"A ring shaped mould" ring_lite3 = /DEF -F -P0BCbgwhite,Cblack -t"A piece of coal" ring_lite4 = /DEF -F -P0BCbgblue,BCwhite -t"A forge" ring_lite5 = /DEF -h"send {makering}" make_sewer_ring = \ /SEND put coal in forge %; /SEND put mould in forge %;\ /SEND light forge %; /SEND put copper in mould ; ***** end batcity sewers stuff /DEF -F -aBCcyan -t"Your attack causes * to lose focus slightly." stunned_him_lite = /DEF -F -aBCred -t"* is DEAD, R.I.P." is_dead_lite = /DEF -ag -h"send {target}*" set_1_target = \ /IF /TEST $[%{-1} !~ ""] %; \ /THEN /SET target=%{-1} %; \ /SEND party report Target --> %{-1} %; \ /SEND target %{-1} %; \ /ELSE /ECHO -aCbgyellow,Cblack *** Target: %{target} *** %; \ /ENDIF /DEF -h"send {autodig}" autodig_on = \ /ECHO -aCbgyellow,Cblack *** AUTODIG ON *** %;\ /DEF -t"* is DEAD, R.I.P." autodig = \ /SEND @dig grave`gg`l /DEF -h"send {noautodig}" autodig_off = \ /ECHO -aCbgyellow,Cblack *** AUTODIG OFF *** %;\ /UNDEF autodig /DEF -h"send {autolc}" auto_leather_craft_on = \ /ECHO -aCbgyellow,Cblack *** AUTOLC ON *** %; \ /DEF -t"* is DEAD, R.I.P." autolc = \ /SEND @use leather craft at corpse %; \ /DEF -t"You start skinning the corpse." lc_loot = \ /SEND gg`l /DEF -h"send {noautolc}" auto_leather_craft_off = \ /ECHO -aCbgyellow,Cblack *** AUTOLC OFF *** %; \ /UNDEF autolc ;***** battle /DEF -aCmagenta -t"You are not in combat." stat_00 = /DEF -aCmagenta -t"*in excellent shape*" stat_1 = /DEF -aCmagenta -t"*is in good shape*" stat_20 = /DEF -aCmagenta -t"*is in a good shape*" stat_20a = /DEF -aCmagenta -t"*is in very good shape*" stat_8 = /DEF -aCmagenta -t"*is slightly hurt*" stat_17 = /DEF -aCmagenta -t"*is not in a good shape*" stat_18 = /DEF -aCmagenta -t"*has a few bruises*" stat_2 = /DEF -aCmagenta -t"*has a few minor cuts and bruises*" stat_3 = /DEF -aCmagenta -t"*has a few gashes and bruises*" stat_19 = /DEF -aCmagenta -t"*has seen better days*" stat_4 = /DEF -aCmagenta -t"*is bleeding due to some bad cuts*" stat_14 = /DEF -aCmagenta -t"*is bleeding due to some very bad cuts*" stat_13 = /DEF -aCmagenta -t"*has had the poop kicked out of it*" stat_5 = /DEF -aCmagenta -t"*has some bad gashes*" stat_6 = /DEF -aCmagenta -t"*has some very bad gashes*" stat_7 = /DEF -aCmagenta -t"*is in bad shape*" stat_15 = /DEF -aCmagenta -t"*is in very bad shape*" stat_9 = /DEF -aCmagenta -t"*is in very very bad shape*" stat_11 = /DEF -aCmagenta -t"*has some gashes*" stat_10 = /DEF -aCmagenta -t"*looks like*will drop any moment*" stat_12 = /DEF -aCmagenta -t"*is near death*" stat_25 = /DEF -aCmagenta -t"*is noticeably hurt*" stat_26= /DEF -aCmagenta -t"*unconscious, think ya can take him?" stat_16 = /DEF -aCmagenta -t"You score a CRITICAL*" stat_0 = /DEF -aBCmagenta -t"Your STUN*" stat_999 = ;/DEF -aBCmagenta -t"You are STUNNED from the force of the attack." stat_998 = \ ; /SEND party say I'm stunned... /DEF -aBCbgmagenta,Cwhite -t"You lose connection to reality, becoming truly STUNNED." stat_998 = \ /SEND party say I'm stunned... /DEF -aBCmagenta -t"....Your superb concentration quickly breaks the stun." stat_997 = /DEF -aBCbgmagenta,Cblue -t"...BUT you break it off with intense concentration." break_stun1 = \ /SEND party say Broke stun... /DEF -aBCmagenta -t"You are no longer stunned." stat_996 = /DEF -h"send {wield}*" set_wielded_r = \ /SET wielded_r=%{-1} %;\ /SEND wield %wielded_r %;\ /DEF -F -p99 -aCred -t"OOPS!! You DROP your WIELDED weapon!" dropped_l = \ /SEND get %%wielded_r %%; /SEND wield %%wielded_r /DEF -aBCbgred,Cgreen -t"You lose your concentration and cannot do the skill." broken_skill = /DEF -aBCyellow -t"You get hit hard but your discipline saves concentration on your skill." discipline_save = ;***** travel ;***** scratch