• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Declaring a timer in lua

Soandso2

Well-known member
Joined
Mar 13, 2023
RedCents
937¢
So, there is a timer datatype. The values are normal integers, but the timer has a feature that makes it automatically count down to zero directly after being set. https://docs.macroquest.org/reference/data-types/datatype-timer/?h=timer

In macroscript you declare timers like this:
[CODE title="timer in macroscript"]/declare BuffTimer timer local
/varset BuffTimer 360[/CODE]

But in Lua you dont declare datatypes (as far as this here noob understands things)

How do I tell my Lua that "this variable, that currently holds an integer, is and should behave, like a timer"? I googled and found the question asked, but no answer given,
 
Yeah, that is one of the answers that I found when I googled. But this is code for making your own timers, right? Not using the timer that already exists as a macroquest datatype? Or am I failing to understand the documentation completely?
 
Well I'm not sure that you can make one like that. There were several examples of timers present and I'm sure one will fullfill the need. In Lua you declare variables in Lua, and you don't declare macro variables that I'm aware of, so presumably you'd need to use a method of creating timers that is used in Lua.
 
Right, so the easy method possible in macroscript simply isnt possible in Lua. Fair enough. Thanks for the clarification. :)
 
Question - Declaring a timer in lua

Users who are viewing this thread

Back
Top
Cart