Quote Originally Posted by Hendy View Post
Below is a description of modules, explanation from @Spectrus

Code:
A module is a function that when created, is added to the TIMER_TICK event. It is then executed every 200ms, as is the behavior of the TIMER_TICK. 

To create a Module, simply call the constructor for it: Module.New(name, func). The parameter name is a string which can then be used to modify the status of the module (i.e. Module.Stop(name), etc.). The function is the function that will be called when the TIMER_TICK event occurs.

In essence, a module is as simple as this:

###############################

-- First create a function for your module.
function checkCreature()
   local c = Creature.New('Demon')
   if c:isAlive() and c:isOnScreen() then
      print('Run!')
   end
end

-- Then create a module for that function.
Module.New('creature check', checkCreature)

################################

If you would like to control your module at any time, you can start or stop it with Module.Start(name) and Module.Stop(name).
That somehow gave me a little insight and I rewrote the module and got it running seemingly perfect including Module.Start() and Module.Stop() on labels.

Now I just need to figure out the whole Channel class. xD I need to start/stop modules by typing stuff in a channel.