• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Functionality and uses of the function OnThink

Xibecaman

New Member
Joined
Aug 17, 2010
Messages
8
Reaction score
0
Hi, I'm new to lua scripting, and scripts for OT.
My question is does 'OnThink', how to I use it?

Is an equivalent to PHP timers?
(I need to make a timer in lua)

Thank you very much for the answers
 
Last edited:
Yep, it executes onThink events on a regular interval which you set in the .xml file.
In newer revisions (post 0.3.6pl1) onTime is also available which allows a globalevent to execute, well on a certain time that's yet again, set in the .xml file.

The interval is in milliseconds.
 
Thansk for the information, Korrex.

Can i only use OnThink on GlobalEvents?.

For example:I want to show effects for 10 seconds to equip a sword.

It is posible with OnThink or OnTime? :S,

Thanks You very much :)
 
Thansk for the information, Korrex.

Can i only use OnThink on GlobalEvents?.

For example:I want to show effects for 10 seconds to equip a sword.

It is posible with OnThink or OnTime? :S,

Thanks You very much :)

onThink and onTime are only useable in globalevents.
For all others you can use addEvent.
 
Back
Top