• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua onthink question

darkmu

Well-Known Member
Joined
Aug 26, 2007
Messages
278
Solutions
1
Reaction score
50
Location
Paraná,Brazil
I'm doing a system based on movements, where the players entered the teleport and when completing 10 players, it will activate the boss automatically and preventing people from entering until killing him, the solution to check the 10 people and summon the boss I should do for globalevents? onThink? like every 400 mileseconds?

what would be the best method in verifying that there are 10 people in the room and summoning the boss?
 
Solution
You can do it in movements. I believe if you do something related to getGlobalStorageValue is the easiest thing to do. Spawn the boss when getting the storage or using an addEvent to summon.

EDIT:
Another function that you can use to achieve your search is (activated whenever a player enters the room):

LUA:
Game.getSpectators (config.centerRoom, false, true, config.range, config.range, config.range, config.range)

I believe that these are the most effective ways.
You can do it in movements. I believe if you do something related to getGlobalStorageValue is the easiest thing to do. Spawn the boss when getting the storage or using an addEvent to summon.

EDIT:
Another function that you can use to achieve your search is (activated whenever a player enters the room):

LUA:
Game.getSpectators (config.centerRoom, false, true, config.range, config.range, config.range, config.range)

I believe that these are the most effective ways.
 
Solution
You can do it in movements. I believe if you do something related to getGlobalStorageValue is the easiest thing to do. Spawn the boss when getting the storage or using an addEvent to summon.

EDIT:
Another function that you can use to achieve your search is (activated whenever a player enters the room):

LUA:
Game.getSpectators (config.centerRoom, false, true, config.range, config.range, config.range, config.range)

I believe that these are the most effective ways.

True, I will try here and return later with the best answer.
 
Back
Top