• 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!

How to add spawns that cannot be blocked

jclay

Member
Joined
Dec 18, 2011
Messages
109
Reaction score
6
Gunzodus OT server has this setup.

It does this teleport effect for about 3 seconds then spawns the monster even if a player is on screen.

How do you do this? Is there a distribution that has it built in? Or is there some code you can edit?
 
@HalfAway
Keep in mind that with this PR it will be set to all monsters, and there is a few monsters that you can block the spawn, this PR did not merged due this. It should be done by setting monsters flag :p
 
I handle spawns trough Lua
spawns are created on server startUp and respawn activates on monster death.
 
@jclay

Im not 100% sure, but in configmanager.cpp try to change this

Code:
    m_confBool[ALLOW_BLOCK_SPAWN] = getGlobalBool("allowBlockSpawn", true);

to false

I searched for this and couldn't find it, maybe my distribution is different, but I looked in configmanager.cpp

The new spawn system.
If you use TFS 1.X add this to your source files and recompile the engine.

https://github.com/otland/forgottenserver/commit/c02bafa02fc63034cdda98bbf58325f6867c0184

I dont know how to recompile I'm not that nerdy lol I just know basic stuff
I handle spawns trough Lua
spawns are created on server startUp and respawn activates on monster death.

Could you explain more? Can you make a monster spawn in even if a player is on screen? You know like real Tibia, some monsters will spawn with a teleport effect for about 3 secs before spawning
 
I searched for this and couldn't find it, maybe my distribution is different, but I looked in configmanager.cpp



I dont know how to recompile I'm not that nerdy lol I just know basic stuff


Could you explain more? Can you make a monster spawn in even if a player is on screen? You know like real Tibia, some monsters will spawn with a teleport effect for about 3 secs before spawning
Tried to only search for

"ALLOW_BLOCK_SPAWN
BLOCK
BLOCK_SPAWN "

etc?
 
Could you explain more? Can you make a monster spawn in even if a player is on screen? You know like real Tibia, some monsters will spawn with a teleport effect for about 3 secs before spawning
yes almost everything you imagine is possible.
What there is to explain?
you set the monster spawn position and monster names in lua table
on monster creation attach the onDeath creaturescript and thats about it.
You can modify or randomize monster stats/spawns and create delay with effects on spawnPoint as an extra features.
 
Gunzodus OT server has this setup.

It does this teleport effect for about 3 seconds then spawns the monster even if a player is on screen.

How do you do this? Is there a distribution that has it built in? Or is there some code you can edit?

If you want to have the ability to do both, just make a globalEvent, Table the X's and Y's and spawn on an interval with magic effects.
You can use addEvent recursion to check if the monster is still alive or not.(call the function inside the function)

If you want to do that with only a few monsters.
50+ monsters that route would suck tho so I wouldn't recommend it.

If you can go the source route I would, just an alternative.
 
Last edited:
If you want to have the ability to do both, just make a globalEvent, Table the X's and Y's and spawn on an interval with magic effects.
You can use addEvent recursion to check if the monster is still alive or not.(call the function inside the function)

If you want to do that with only a few monsters.
50+ monsters that route would suck tho so I wouldn't recommend it.
Much better alternative to do the edits in spawn.cpp/spawn.h when the spawn system is already handled by sources. All you have to add to that pr is just add a flag, and check if the sb.mtype is blockable. (Brief explanation. Of course there's more to it.)
 
If you want to have the ability to do both, just make a globalEvent, Table the X's and Y's and spawn on an interval with magic effects.
You can use addEvent recursion to check if the monster is still alive or not.(call the function inside the function)

If you want to do that with only a few monsters.
50+ monsters that route would suck tho so I wouldn't recommend it.

If you can go the source route I would, just an alternative.

Would this make the server more laggy if the monsters spawn from a global event instead of normally?
 
Back
Top