forums wiki races classes cabals religions world history immortals all pages bugs items helps changes calendar map login donate play now

Tick Timer CMUD

There's a thread about this but it's archived and I can't post on it.  I'm currently using the method of anything time controlled by tics activates a #ts 30 trigger but I'd like to have it pay attention to my prompt so that I can be more accurate.

Erelei posted the following:

#action {~^.%1/%2(hp) %3/%4(mn) %5/%6(mv) %7tnl/%8cp/%9gl %10t/%11.$} {  #if {"%10" != "$bg"}  {    #var bg %10;    #var ltick 0;    #ticker ltick {#math {ltick} {$ltick +1}} {1}  };        #format lticks {%s%s} {$ltick} {s};        #var hpstuff2 %1(@pcnt{%1;%2}%)h %3(@pcnt{%3;%4}%)m %5(@pcnt{%5;%6}%)v - ($lticks);        #var hpstuff %1(@percent{%1;%2}%)h %3(@percent{%3;%4}%)m %5(@percent{%5;%6}%)v - ($lticks);        #var otstuff [%8] @time{%10} (%7TNL/$@gold{%9}K);        #var otstuff2 [%8] @time{%10} (%7TNL/$@gold{%9}K);        #var result2 %1(@percent{%1;%2}%)h %3(@percent{%3;%4}%)m %5(@percent{%5;%6}%)v  $lticks ago >  [%8] @time{%10} (%7TNL/$@gold{%9}K) ;        #showme {@ralign{{$otstuff }{ $hpstuff}}} {1}}{9}

 

Now I get from the beginning that it's pulling info from when my prompt changes but how do I get it to match my prompt?  I currently use: 

%i - %l6%a%L - %l#%g%L - %l@%t%Ltime%c%n%P%l&%p%c%l9%h%L|%l9%H%L %l^%m%L|%l^%M %l7%v%L|%l7%V%c%l&%e%L%c 

Looks like:

D - 0 - 5488 - 12time

274|274 333|333 266|266

Assuming I'd change code to something like:

#action {~^.%1 - %2 - %3 - $4time.$} { #if {"%4" != "$bg"} { #var bg %4; #var ltick 0; #ticker ltick {#math {ltick} {$ltick +1}} {1} }; #format lticks {%s%s} {$ltick} {s}; #var hpstuff2 %1(@pcnt{%1;%2}%)h %3(@pcnt{%3;%4}%)m %5(@pcnt{%5;%6}%)v - ($lticks); #var hpstuff %1(@percent{%1;%2}%)h %3(@percent{%3;%4}%)m %5(@percent{%5;%6}%)v - ($lticks); #var otstuff [%8] @time{%4} (%7TNL/$@gold{%9}K); #var otstuff2 [%8] @time{%4} (%7TNL/$@gold{%9}K); #var result2 %1(@percent{%1;%2}%)h %3(@percent{%3;%4}%)m %5(@percent{%5;%6}%)v $lticks ago > [%8] @time{%4} (%7TNL/$@gold{%9}K) ; #showme {@ralign{{$otstuff }{ $hpstuff}}} {1}}{9}

Not sure how to finish my prompt in it or if I even need to, or if I even did this right...or how to port but I can google that.

 

Any help is appreciated!

Edited

My code is integrated with the rest of my TinTin so it may be hard to understand.

Basically, the way I worked with it is this:

Whenever the prompt shows (ie, moving, hitting enter, etc) it checks if the previous set value for 'hour' has changed. If it has, it resets a timer to 30 seconds. And slowly counts down on the prompt I make tintin show. It's not perfect, but within 5 seconds from 0 if you sleep, you'll more than likely get the tick. I don't know how to code in CMUD, but follow that initial way of thinking and you'll have one like mine.

#TRIGGER {<(%d)/(%d) * (%d)/(%d) * (%d)/(%d)>[(%d)]} {

hp=%1

hpMax=%2

and so on to define your variables

#IF (%7!=@lastHour) {lastHour=%7;#TS 30}

}

Got this from zuggsoft forum, someone has the same issue: http://forums.zuggsoft.com/forums/viewtopic.php?p=176418#176418

Do you think that'd work if I simplified my prompt down to <389/406 * 414/454 * 419/419>[11]?  I hate loosing all the extra info in my prompt but I don't know how to enter it in since it's more than one line. I also hate sleeping for 15 seconds to catch a tick or waking up to miss one 2 seconds later more so I'm willing to loose the extras.

Edited

Hrmmm.

I've found tick timers unreliable. 

What I do is pay attention to the duration of a "tick" and get into the rhythm of when they are going to hit after a few hours. Then you just ask your brain to keep track. (this is probably why I miss all the ticks).

you are making it way over complicated ambroas.

It will work fine with your prompt. Do it like this:

Pattern: (%d)time

Custon script:

#if (@time != %1) {#ts 30} {}

#var time %1

Thats all you need man.

Just count 30 seconds in your head, then sleep.

1....2...3....

Trick's already dead no need to sleep.

The only problem I have with tick timers off a prompt is if there's no prompt update, there's no tick timer update.

Yeah but if you are so idle that there is no prompt activity, will catching a tick even matter?

Yes and no.

Now, I had started going through a number of scenarios as examples, but I've ended up virtually countering all my arguments as what one could do, so could the other.  So I've thought about what I've been doing as opposed to a prompt trigger.  Grudgingly I've come to the conclusion that while what I've been doing works, a prompt timer could be more efficient.  In some cases, superior.

 

That aside, a simple trigger has its pros and cons.  Generally though, the longer it is, the more things that can go wrong.  Keep it simple.  The biggest problem is identifying what your specific time reference on your prompt would be that doesn't conflict with anything else.  Based off the prompt shown in the first post, you made a very lovely distinction by putting "time" directly behind and adjacent to the numerals.  Being said, Manual Labor's trigger would be the route I'd suggest and there's no reason I see that you'd need to adjust your prompt.

Magick, mate, cut the crap. Manual labours and morles way are very relible as long as you have half a brain and press enter often enough.

Such an eloquent way of repeating what I just said.  Thank you, Foxx.

Lol. Can't we have a single thread without people being dicks to each other? Damn..

 

P.S.

F0xx you suck at PK. Scrub ass n00b.

Get ganged scrub.