Random coordinates

09/15/2019 22:13 Sandro1029#1
Hello there. I have an question. I want to add world boss event but don't know why it's not working. What's wrong there? The boss spawning only on last coordinates. Math random does not work. Help me please.

Script:

09/15/2019 22:36 InkDevil#2
Quote:
Originally Posted by Sandro1029 View Post
Hello there. I have an question. I want to add world boss event but don't know why it's not working. What's wrong there? The boss spawning only on last coordinates. Math random does not work. Help me please.

Script:

Because math.random needs 2 numbers. Start and End.
Use math.random(1,3) to create a first-time-random-spawn.
09/15/2019 22:40 Sandro1029#3
Quote:
Originally Posted by InkDevil View Post
Because math.random needs 2 numbers. Start and End.
Use math.random(1,3) to create a first-time-random-spawn.
I tried that too. But even with 2 numbers it does not work

By the way.
How to buff all online players via timed buff? Not event_state
09/16/2019 00:37 InkDevil#4
Quote:
Originally Posted by Sandro1029 View Post
I tried that too. But even with 2 numbers it does not work

By the way.
How to buff all online players via timed buff? Not event_state
I only answered on your question how math.random works to select a random position.

And I also said
Quote:
Use math.random(1,3) to create a first-time-random-spawn.
respawn_rare_mob won't call math.random again when the monster is respawning. just when server is starting and "registering" the respawner.

If you want to make it random automatically without ScheduledCommand, take a look into random respawn script.
*Hint is given* :)


The buff-command you're looking for is cast_world_state(id,lv,duration)
09/16/2019 00:38 Sandro1029#5
Quote:
Originally Posted by InkDevil View Post
I only answered on your question how math.random works to select a random position.

And I also said

respawn_rare_mob won't call math.random again when the monster is respawning. just when server is starting and "registering" the respawner.

If you want to make it random automatically without ScheduledCommand, take a look into random respawn script.
*Hint is given* :)
Ok thanks