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

Spawn - Block certain monster.

Fabi Marzan

Well-Known Member
Joined
Aug 31, 2020
Messages
135
Solutions
6
Reaction score
66
Hello, I wanted to know if it is possible to block the spawn of certain monsters... In my sources I modified the block spawn code that would be if a player is on screen the monster still respawns.


The thing would be how to eliminate the block to certain monsters, as in this case I want to use it for the quest monsters and bosses.

I have this scripts as an example, but it doesn't work yet they respawn me in the face.


Lua:
local boss_name = "Demodras" -- boss name
local boss_pos = {x = 1491, y = 1100, z = 15} -- boss spawn
local pos_room = {fromx = 1503, tox = 1100, fromy = 1477, toy = 1075, z = 15} -- boss room

function onThink(interval, lastExecution)
local check_boss = 0
for x = pos_room.fromx, pos_room.tox do
for y = pos_room.fromy, pos_room.toy do
for z = pos_room.z, pos_room.z do

creatureaa = {x = x, y = y, z = z}
mob = getTopCreature(creatureaa).uid

    if getCreatureName(mob) == boss_name then
        check_boss = 1
    end
end
end
end

if check_boss == 1 then
end

if check_boss == 0 then
        Game.createMonster(boss_name, boss_pos)
end

return true
end
 
Back
Top