You need to edit the #action match to work with your prompt (unless you use equal/very similar to mine). Most important here is %9, which in my case is in-game HOUR.
This #action can be used to trigger other things as well which are triggered by prompt. Otherwise, you may want to add {6} at the end of the #action to avoid conflicts with other similar #actions of yours.
#var time 0
#var cur_time 0
#var old_time 0

#action {^<%1/%2h(%3/%4m)%5/%6mv(%7)%8g(%9)%10>$}
{
	#format {time} {%T};
	#if {"%9" != "$cur_hour"}
	{
		#var cur_hour %9;
		#math cur_time {$time - $old_time};
		#if {$cur_time < 2} {ticker_trigger prompt};
	};
	#var old_time $time;
}

#alias {ticker_trigger}
{
	#if {$delay == 0}
	{
		#var delay 1;
		#delay {25} {#showme Tick in 5 seconds!;#NOP %0;#var delay 0}
	}	
}
NOTE: This alone is not "fool-proof", this shoots #alias ticker_trigger only when prompt runs thru the screen repeatedly, in example when you move.
NOTE: Leaving the variable presets out may result into unpredictable behavior.

These below are not demanded, but will certainly make the timer start more often.
#action {%1's hunger %2 {him|her|it}{\.|!}$} {ticker_trigger %0}
#action {%1's thirst %2 {him|her|it}{\.|!}$} {ticker_trigger %0}
#action {%1 fades into existence.$} {ticker_trigger %0}
#action {%1 phases back into existence.$} {ticker_trigger %0}
#action {%1 twitches slightly.$} {ticker_trigger %0}
#action {^A Caravan disappears.$} {ticker_trigger %0}
#action {^A magical spring dries up.$} {ticker_trigger %0}
#action {^A translucent outline of something wavers and disappears.$} {ticker_trigger %0}
#action {^Alcedor yells 'Caravan for Rheydin now departing! All whom wish to, best follow it now.'$} {ticker_trigger %0}
#action {^Ringing with holy fervor the temple of light bell announces high noon.$} {ticker_trigger %0}
#action {^The air around %1 blurs and shimmers momentarily.$} {ticker_trigger %0}
#action {^The clouds disappear.$} {ticker_trigger %0}
#action {^The day has begun.$} {ticker_trigger %0}
#action {^The Golden Banner of Val Miran flaps triumphantly in the city's glorious winds.$} {ticker_trigger %0}
#action {^The night is about to end.$} {ticker_trigger %0}
#action {^The Planar Blade %1moves into another dimension.$} {ticker_trigger %0}
#action {^The sun slowly disappears in the west.$} {ticker_trigger %0}
#action {^The sun rises in the east.$} {ticker_trigger %0}
#action {^The white aura around %1 fades.$} {ticker_trigger %0} {6}
#action {^You are allowed to leave the realms.$} {ticker_trigger %0} {4}
#action {^You are suddenly thrown back with huge force.$} {ticker_trigger %0} {4}
#action {^You spot a pile of gold in the corner of your eyes, this must be your lucky day!$} {ticker_trigger %0}
And, if you add your spell-droppings into the list, you're all set!
#action {^You rub the dirt out of your eyes.$} {ticker_trigger %0}
(dispel magic-spell may give you false shoot, though - I'll fix that some day)


Explanations

#if {$cur_time < 2} {ticker_trigger prompt};
Means, that if $cur_time is less than two (seconds), timer is started. Word "prompt" after ticker_trigger is sort of debugging, look below.

#if {$delay == 0}
We don't want the timer start every time when ticker_trigger is called. Or would you like five alerts in a row after series of your spells time out? Also helps with killing effect of dispelling, if timer is started already.

#var delay 1;
Thus we use variable to prevent several instants of #delay. I'm aware of the ability to name #delays, but in such case and without this aproach, the timer would reset each time when ticker_trigger is called. With named #delay it would be possible to kill badly timed timer, thus I'll make some changes some day on that too.

#delay {25} {#showme Tick in 5 seconds!;#NOP %0;#var delay 0}
Purpose of that #NOP there is, that you can use command #delay (without arguments) to view what triggered the timer.


  • You have no special abilities

  • This page is read-only | View other revisions | View recent changes | Preferences
    Last edited July 20, 2011 10:55 am by F-3000 (diff)

    Search: