Ambroas Posted August 22, 2016 Report Share Posted August 22, 2016 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 <ecb>%1(<g20>@percent{%1;%2}%<ecb>)h <bdd>%3(<g20>@percent{%3;%4}%<bdd>)m <cdb>%5(<g20>@percent{%5;%6}%<cdb>)v<g21> - (<bcc>$lticks<g21>); #var otstuff <g09>[<g19>%8<g09>] <g20>@time{%10} <g09>(<g20>%7TNL<g09>/<dca>$<g20>@gold{%9}K<g09>); #var otstuff2 [%8] @time{%10} (%7TNL/$@gold{%9}K); #var result2 <G02> <ecb>%1(<g20>@percent{%1;%2}%<ecb>)h <bdd>%3(<g20>@percent{%3;%4}%<bdd>)m <cdb>%5(<g20>@percent{%5;%6}%<cdb>)v <g19> <g09>< lt:<g20> $lticks ago <g09>> <g19> <g09><g09>[<g19>%8<g09>] <g20>@time{%10} <g09>(<g20>%7TNL<g09>/<dca>$<g20>@gold{%9}K<g09>) <088>; #showme {<G00>@ralign{{$otstuff<G00> }{<G00> $hpstuff}}<088>} {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 <ecb>%1(<g20>@percent{%1;%2}%<ecb>)h <bdd>%3(<g20>@percent{%3;%4}%<bdd>)m <cdb>%5(<g20>@percent{%5;%6}%<cdb>)v<g21> - (<bcc>$lticks<g21>); #var otstuff <g09>[<g19>%8<g09>] <g20>@time{%4} <g09>(<g20>%7TNL<g09>/<dca>$<g20>@gold{%9}K<g09>); #var otstuff2 [%8] @time{%4} (%7TNL/$@gold{%9}K); #var result2 <G02> <ecb>%1(<g20>@percent{%1;%2}%<ecb>)h <bdd>%3(<g20>@percent{%3;%4}%<bdd>)m <cdb>%5(<g20>@percent{%5;%6}%<cdb>)v <g19> <g09>< lt:<g20> $lticks ago <g09>> <g19> <g09><g09>[<g19>%8<g09>] <g20>@time{%4} <g09>(<g20>%7TNL<g09>/<dca>$<g20>@gold{%9}K<g09>) <088>; #showme {<G00>@ralign{{$otstuff<G00> }{<G00> $hpstuff}}<088>} {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! Link to comment Share on other sites More sharing options...
Implementor Erelei Posted August 22, 2016 Implementor Report Share Posted August 22, 2016 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. Link to comment Share on other sites More sharing options...
Ambroas Posted August 22, 2016 Author Report Share Posted August 22, 2016 #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. Link to comment Share on other sites More sharing options...
Aulian Posted August 22, 2016 Report Share Posted August 22, 2016 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). Link to comment Share on other sites More sharing options...
Manual Labour Posted August 22, 2016 Report Share Posted August 22, 2016 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. Link to comment Share on other sites More sharing options...
Trick Posted August 22, 2016 Report Share Posted August 22, 2016 Just count 30 seconds in your head, then sleep. Link to comment Share on other sites More sharing options...
f0xx Posted August 22, 2016 Report Share Posted August 22, 2016 1....2...3.... Trick's already dead no need to sleep. Link to comment Share on other sites More sharing options...
Magick Posted August 22, 2016 Report Share Posted August 22, 2016 The only problem I have with tick timers off a prompt is if there's no prompt update, there's no tick timer update. Link to comment Share on other sites More sharing options...
Manual Labour Posted August 22, 2016 Report Share Posted August 22, 2016 Yeah but if you are so idle that there is no prompt activity, will catching a tick even matter? Link to comment Share on other sites More sharing options...
Magick Posted August 22, 2016 Report Share Posted August 22, 2016 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. Link to comment Share on other sites More sharing options...
f0xx Posted August 22, 2016 Report Share Posted August 22, 2016 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. Link to comment Share on other sites More sharing options...
Magick Posted August 22, 2016 Report Share Posted August 22, 2016 Such an eloquent way of repeating what I just said. Thank you, Foxx. Link to comment Share on other sites More sharing options...
Trick Posted August 22, 2016 Report Share Posted August 22, 2016 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. Link to comment Share on other sites More sharing options...
f0xx Posted August 23, 2016 Report Share Posted August 23, 2016 Get ganged scrub. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.