Code: Select all
-----------------------------------
-- Area: Behemoth's Dominion
-- HNM: Behemoth
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/titles");
require("scripts/globals/status");
-----------------------------------
-- onMobInitialize
-----------------------------------
function onMobInitialize(mob)
end;
-----------------------------------
-- onMobDeath
-----------------------------------
function onMobDeath(mob, killer)
killer:addTitle(BEHEMOTHS_BANE);
end;
-----------------------------------
-- onMobDespawn
-----------------------------------
function onMobDespawn(mob)
local Behemoth = mob:getID();
local King_Behemoth = 17297441;
local ToD = GetServerVariable("[POP]King_Behemoth");
local kills = GetServerVariable("[PH]King_Behemoth");
if (LandKingSystem_HQ == 0 or LandKingSystem_HQ == 2) then
if (ToD <= os.time(t) and GetMobAction(King_Behemoth) == 0) then
if (math.random((1),(5)) == 3 or kills > 6) then
DeterMob(Behemoth, true);
DeterMob(King_Behemoth, false);
UpdateNMSpawnPoint(King_Behemoth);
GetMobByID(King_Behemoth):setRespawnTime(75600 + 1800 * math.random(0, 6)); --UPDATED FOR 30 MIN SPAWN WINDOWS
elseif (LandKingSystem_NQ == 0 or LandKingSystem_NQ == 2) then
UpdateNMSpawnPoint(Behemoth);
mob:setRespawnTime(75600 + 1800 * math.random(0, 6)); --UPDATED FOR 30 MIN SPAWN WINDOWS
SetServerVariable("[PH]King_Behemoth", kills + 1);
end
end
elseif (LandKingSystem_NQ == 0 or LandKingSystem_NQ == 2) then
UpdateNMSpawnPoint(Behemoth);
mob:setRespawnTime(75600 + 1800 * math.random(0, 6)); --UPDATED FOR 30 MIN SPAWN WINDOWS
SetServerVariable("[PH]King_Behemoth", kills + 1);
end
end;
Of course, the setRespawnTime commands have to be changed for the zone scripts for all of the kings and their hq counter parts.