All pastes #1581018 Raw Edit

dean

public text v1 · immutable
#1581018 ·published 2009-09-27 05:11 UTC
rendered paste body
/loaded __betters.tf__/require -q utils.tf/setif _spell=/def -i -mglob -q -h"SEND cast *" catch_cast = \	/let i=$[strrchr({-1}, "'")]%; \	/if (i > 0) \		/set _spell=$[replace(" ", "_", substr({-1}, 1, i-1))]%; \	/else \		/set _spell=$[replace(" ", "_", {2})]%; \	/endif/def -i evoke = \	/if ({#} > 1) \		/set _spell=$[tolower({-L1})]_evocation%; \	/else \		/set _spell=$[tolower({*})]_evocation%; \	/endif%; \	evoke %{*}/def -i invoke = \	/set _spell=$[tolower({1})]_invocation%; \	invoke %{*}%; \    /set _blindcast=0/def -i play = \	/set _spell=music%; \    play %{*}/def -i uses = \    /listvar uses*;/def -i status_counters = \;	/status_rm @active%; \;	/status_rm @mail%; \;	/status_rm kbnum%; \;	/status_rm insert%; \;	/status_rm @read%; \;	/status_rm uses_spear%; \;	/status_add -A@world -s0 uses_spear:-5:%; \;	/status_rm "Sp:"%; \;	/status_add -A@world "Sp:"::%; \;	/status_rm uses_sword%; \;	/status_add -A@world -s0 uses_sword:-5:%; \;	/status_rm "Sw:"%; \;	/status_add -A@world "Sw:"::%; \;	/status_rm uses_cure_light%; \;	/status_add -A@world -s0 uses_cure_light:-5:%; \;	/status_rm "CL:"%; \;	/status_add -A@world "CL:"::%; \;	/status_rm uses_dodge%; \;	/status_add -A@world -s0 uses_dodge:-5:%; \;	/status_rm "Dg:"%; \;	/status_add -A@world "Dg:"::;	/status_rm tnl%; \;	/status_add -A@more tnl::%; \;	/status_rm "TNL:"%; \;	/status_add -A@more "TNL:":4:; /test betterlog:=strcat(character, "-betters.log")  character changed to ALT/test betterlog:=strcat(ALT, "-betters.log")/def -i log_better = \	/let _handle=$[tfopen({betterlog}, "a")]%; \	/let _time=$[ftime("%F %T")]%; \	/let _str=$[strcat(_time, ": Better at '", {1}, "' after ", {2}, " uses.")]%; \	/test tfwrite(_handle, _str)%; \	/test tfclose(_handle)/def -q quit = \	/saveuses%; \	/@quit/def -q dc = \	/saveuses%; \	/@dc/def -F -p100 -h"DISCONNECT" disconnect_save = \	/saveuses; /test useslog:=strcat(character, "-uses.tf")   character changed to ALT/test useslog:=strcat(ALT, "-uses.tf")/def -i saveuses = \	/listvar uses_* %| /savelist %{useslog}%; \	/eval /_echo ### Saved %? variables./eval /load %{useslog}/def reload = \	/saveuses%; \	/load betters.tf%; \	/load %{useslog}/def -i -F -p100 -mregexp -t"^You have become (?:more learned|a master) at '([^']+)'\\.$" more_leared = \	/let _skill=uses_$[replace(" ", "_", tolower({P1}))]%; \    /let _uses=0%; \    /if (isvar(_skill)) \        /eval /test _uses:={%{_skill}}%; \    /else \    	/let _uses=(not counted)%; \    /endif%; \    /eval /set %{_skill} 0%; \    /echo ### Better at %{P1} after %{_uses} uses.%; \    /test log_better({P1}, "%{_uses}")	/purge -i count_*/def -i -F -p100 -mregexp -t"is ([a-z]+) on the [a-z]+ with your [a-z]+ causing" count_hit = \	/if ({P1} =~ "jabbed") \		/test ++uses_spear%; \    /elseif ({P1} =~ "harmed") \        /test ++uses_magical_wand%; \	/elseif ({P1} =~ "cut") \		/if (slash =~ "axe") \			/test ++uses_axe%; \		/elseif (slash =~ "sword") \			/test ++uses_sword%; \		/elseif (slash =~ "2hs") \			/test ++uses_twohanded_sword%; \		/elseif (slash =~ "2ha") \			/test ++uses_twohanded_axe%; \        /elseif (slash =~ "whip") \            /test ++uses_whip%; \		/endif%; \	/elseif (({P1} =~ "smashed") | ({P1} =~ "burned")) \		/if (bash =~ "flail") \            /test ++uses_flail%; \        /elseif (bash =~ "h2h") \            /test ++uses_hand_to_hand%; \        /endif%; \	/elseif ({P1}) =~ "bash") \		/test ++uses_h2h%; \	/endif/def -i -F -p100 -mglob -t"You deliver a roundhouse kick*" count_kick = \	/test ++uses_kick/def -i count_defenses = \	/test ++defenses%; \	/if (defenses > 1) \		/test ++uses_second_defense%; \	/endif/def -i -F -p100 -mglob -t"You dodge out of the way*" count_dodge = \	/test ++uses_dodge%; \	/count_defenses/def -i -F -p100 -mglob -t"You catch * on *" count_shield_block = \	/test ++uses_shield_block%; \	/count_defenses/def -i -F -p100 -mglob -t"You skillfully parry * attack." count_parry = \	/test ++uses_parry%; \	/count_defenses/def -i -F -p100 -mglob -t"You slip inbetween planes for a moment, evading * attack." count_fade = \	/test ++uses_magical_fade%; \	/count_defenses/def -i -F -p100 -mglob -t"You * backflip out of the way * attack." count_acrobatics = \	/test ++uses_acrobatics%; \	/count_defenses/def -i -F -p100 -mglob -t"You * tumble out of the way * attack." count_acrobatics2 = \    /test ++uses_acrobatics%; \    /count_defenses/def -i -F -p100 -mglob -t"You * sidestep out of the way * attack." count_acrobatics3 = \    /test ++uses_acrobatics%; \    /count_defenses/def -i -F -p100 -mglob -t"You * leap out of the way * attack." count_acrobatics4 = \    /test ++uses_acrobatics%; \    /count_defenses/def -i -F -p100 -mglob -t"You react to a gap in * defenses, landing a stronger than normal blow." count_martial_arts = \    /test ++uses_martial_arts/def -i -F -p100 -msubstr -t"You sink your fangs into" count_feed = \	/test ++uses_feed/def -i -F -p100 -mglob -t"With bared fangs you attempt to attack * from behind, but miss." count_feed_miss = \	/test ++uses_feed    /def -i -F -p100 -msubstr -t"A white-hot rage flashes through you as you lash out at" count_rage = \	/test ++uses_battle_rage/def -i -F -p100 -mglob -t"You bash * over the head with *" count_bash = \	/test ++uses_bash/def -i -F -p100 -mglob -t"You attempt to bash * over the head with *" count_bash_miss = \	/test ++uses_bash/def -i -F -p100 -mglob -t"* lunges towards you, but you dodge out of the way." count_evasion = \	/test ++uses_evasion/def -i -F -p100 -mglob -t"You mix several herbs together in a cracked mortar and pestle, concentrating carefully..." count_herbalism = \    /test ++uses_herbalism/def -i -F -p100 -mglob -t"You take a didactic parchment from the corpse *" count_didactic_corpse = \    /test ++uses_didactic/def -i -F -p100 -mglob -t"You take a didactic parchment." count_didactic_ground = \    /test ++uses_didactic/def -i -F -p100 -mregexp -t"You have completed your (invocation|evocation|casting|song)" count_complete_cast = \	/let _tmp=uses_%_spell%; \	/if (isvar(_tmp)) \		/eval /test ++%{_tmp}%; \	/else \		/set %{_tmp}=1%; \	/endif%; \	/set _spell=