#nop // Written by sqweekette@yahoo.com #nop // Aliases and actions shared between normal prompt recognition and #nop // percent prompt recognition. It keeps track of your hp, mana and #nop // movement, and uses movement to check if a tick has passed. You'll #nop // get a warning 10 seconds before WinTin thinks the next tick is #nop // going to be in the form of #TICK-10, when WinTin thinks the tick #nop // did pass it will say #TICK!!!, and 10 seconds after the tick it #nop // will say #TICK+10. #nop // Note that you will often get two #TICK!!! messages within close #nop // succession of each other. This is because WinTin just uses a timer #nop // to detect ticks. However, ticks are not always the same length, so #nop // sometimes WinTin's timer will reach 0, so it thinks there is a tick #nop // but the tick actually passes in a few seconds. When the tick _does_ #nop // pass, it is detected by my actions, and they reset the tick. When #nop // the tick is reset in this fashion, WinTin spews another #TICK!!! #nop // message. #nop // Also, this set of actions expect the two files 'ouch.wav' and #nop // 'heal.wav' in the same directory, which will be played when #nop // you are damaged and when you are healed respectively. If you want #nop // to have these noises but don't want the tick stuff, #nop the #tickon #nop // line. #nop #ticksize 39 #nop // #nop the following #tickon to turn off tick recognition #tickon #var refresh 0 #nop // Keeps track of whether you just refreshed yourself... If you did, #nop // then you don't want the tick timer reset. Gets reset every time #nop // a new prompt comes #var asstt 0 #nop // asstt keeps track of whether something has been assesed this tick yet. #nop // Without it, if you go to sleep then it would spam 'assess 1.' over and #nop // over =\ Gets reset every tick #action {You feel less tired.} {#var refresh 1} #action {You feel fully refreshed!} {#var refresh 1} #alias {proconce} {#nop} #alias {setstats} {#var oldhp $hp; #var oldmn $mn; #var oldmv $mv; #var hp %1; #var mn %2; #var mv %3} #alias {setmaxstats} {#var maxhp %1; #var maxmn %2; #var maxmv %3} #alias {procprompt} {#if {$oldhp>$hp} {#sound {ouch.wav}} {#if {$oldhp<$hp} {#sound {heal.wav}}}; #if {$mv>$oldmv && $refresh=0} {#tickset; #var asstt 0}; #if {$mv=$maxmv && $asstt=0} {assess 1.; #var asstt 1}; #var refresh 0} #nop // procprompt = processprompt #nop // Here's the algorithm: #nop // IF oldhp > hp THEN //if hp has decreased #nop // PLAY SOUND ouch.wav #nop // ELSE IF oldhp < hp THEN //else if hp has increased #nop // PLAY SOUND heal.wav #nop // END IF #nop // This is the tick recognition part: #nop // IF mv > oldmv AND refresh = 0 THEN //if mv has increased and you #nop // RESET TICK TIMER //weren't refreshed #nop // RESET asstt TO 0 #nop // END IF #nop // IF mv = maxmv AND asstt = 0 THEN //if you've got max mv and you #nop // SEND assess 1. TO MUD //haven't assessed this tick, #nop // SET asstt TO 1 //assess 1. to decrease mv #nop // END IF #nop // RESET refresh TO 0