Basic TIC Timer - Help!

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Basic TIC Timer - Help!

Post by Vadi »

Hm. Not putting in any code for the trigger to do when it matches, I reckon.

Try putting:
Code: [show] | [select all] lua
reset_ticktimer()
As the code.

RonaldReagansCorpse
Posts: 8
Joined: Tue Jun 18, 2013 10:56 am

Re: Basic TIC Timer - Help!

Post by RonaldReagansCorpse »

I'm sorry.. but it's still not working. I'm only belaboring this topic because from what I see it is the only 'non user friendly' aspect to Mudlet, and I feel it should be an option.

As I've only really played one MUD for the past 15 years or so, I can only speak from my personal experience, so I'm going to assume that most muds are similar in this aspect. Tic(k) timers are huge in gameplay. Every 1 min real time is when you gain hps, finish memorizing spells, gain movement points, etc etc. As such there are plenty of mud generated text that is created that can be used to sync your own timer with the muds timer.

In ZMUD the interface was very simple. There was a button for tick timers. You specified the second amt for a tick on your mud (usually 60), set a timeout margin (usually 5 or 10 seconds before the 60 seconds are up) and the specific command you wanted to send when it got to the timeout (usually a group tell, something like "TICK IN 10 SECONDS"). This is huge. Being able to move around until the last second and then "rest" right before the tic would enable you to get HPS or whatever without randomly resting for potentially a long time not knowing when the tick is going to occur.

That being said.. the tick timer was only as good as it was accurate. The more sync triggers it had the better.

I'm sure other users on other muds use the same technique, or I would assume they do. Everyone tries to use have accurate tic timers on the mud I play on. I think this would be a very used and welcome addition to future mudlet releases.

This is a pic of the tic timer on zmud: http://www.zuggsoft.com/zmud/help6/Tick_Tim.jpg

Also, I'm still having trouble trying to create a timer in mudlet. Below is the screen shot of my current predicament.
http://s24.postimg.org/ttveldt8l/mudlet1_1.jpg

I've tried following the previous instructions in this thread to no avail :(

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Basic TIC Timer - Help!

Post by Vadi »

Yes, but have you made your trigger actually do anything? Your trigger to reset the tic timer: http://s12.postimg.org/5qf3zd7h9/trigger.jpg does not have any code in it. It does nothing. That's why I mentioned to you that you want to put the reset line into it, to make the trigger actually do something when it matches :)

energyau
Posts: 5
Joined: Mon Jun 12, 2017 9:55 am

Re: Basic TIC Timer - Help!

Post by energyau »

Hey guys, I know this is a old post.

And the timer works well.

How would I stop this timer with a button ?

Thanks

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Basic TIC Timer - Help!

Post by Vadi »

Make a group, make a button in it, and in the button code put: reset_ticktimer()

Let me know how you go!

energyau
Posts: 5
Joined: Mon Jun 12, 2017 9:55 am

Re: Basic TIC Timer - Help!

Post by energyau »

Thanks for reply vadi.

Thats what i did to start with.

Made the script with tick.
Code: [show] | [select all] lua
local ticktimer
function reset_ticktimer()
   if ticktimer then
      killTimer(ticktimer)
   end
   ticktimer = tempTimer(1, function() increment_ticktimer(60) end)
end

function increment_ticktimer(time_left)
   time_left = time_left - 1
   if time_left == 40 then
      send("mine rock")
   elseif time_left == 0 then
      reset_ticktimer()
      return
   end
   ticktimer = tempTimer(1, function() increment_ticktimer(time_left) end)
end
then made a group for buttons
then first button i added
Code: [show] | [select all] lua
reset_ticktimer()
turning the tick on works well.

but thats where I cant stop it. It keeps ticking the command!

I tried to make a new so I could turn it off.
Code: [show] | [select all] lua
killTimer()
but that didn't work.

So maybe i think I might need to make the script go through a aliases. then use enable and disable (aliasname) as buttons.

but no idea how to do that.

What do you think.

Thanks

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Basic TIC Timer - Help!

Post by Vadi »

Do killTimer(ticktimer)

energyau
Posts: 5
Joined: Mon Jun 12, 2017 9:55 am

Re: Basic TIC Timer - Help!

Post by energyau »

You my friend are a legend. Thanks. Works perfect.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Basic TIC Timer - Help!

Post by Vadi »

Enjoy Mudlet :D come back if you'll help with something else.

Post Reply