• 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 If broadcast = x then execute script.

Exoltes

Novia OTserv Developer
Joined
Jul 2, 2009
Messages
563
Reaction score
47
Location
Belgium
I'm working on a 8.54 Open Tibia Server using The Forgotten Server - Version 0.2.7 (Mystic Spirit).

I wondered if it was possible to create a script that executes once a certain broadcast message is sent across the server.

Any ideas are welcome.

Thanks in advance.
 
The thing is I want to use the same broadcast in a dozen of scripts so it would be easier if I could execute it with a couple lines of codes instead of pasting the whole script in each and every one of them.
 
If you are looking for a message that is send of out a certin time or with some interval then use globalevents.
Otherwise if you just want it in certin scripts then make the strings global by adding them to 050-functions.lua without local next to them, and then use that variable in those scripts you want to broadcast in.
 
If you have alot of code you want to use in alot of scripts, you can add it in a Lua made function, then add that function to global.lua.
It will work the same way like the local functions I made for the actions scripts, but then without local and you can use the function in every script.
 
Back
Top Bottom