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

Boss Script

Himii

Premium User
Premium User
Joined
Jan 19, 2011
Messages
1,268
Solutions
5
Reaction score
188
Location
Sweden
Can anyone make a actipt that spawn one of 3 bosses in an arena every 3rd hour but the countdown shuld not start to count down before the last boss is dead/Disapeared.
Repp++
 
LUA:
local config = {
	respawnSecs = 10800, -- how many seconds until next boss spawns
	storage = 5050,
	bosspos = {x=1000,y=1000,z=7}, -- position of the boss spawn
	bossspawnstorage = 5053
}

local t = {'boss1','boss2','boss3'}

local function orlend()
	doCreateMonster(t[math.random(#t)], config.bosspos)
	doBroadcastMessage('A boss was spawned in the arena', MESSAGE_STATUS_CONSOLE_ORANGE)
	doSetStorage(config.bossspawnstorage, 0)
end

function onKill(cid, target, damage, flags)
	if bit.band(flags, 1) == 1 and isMonster(target) and getCreatureMaster(target) == target and getPlayerStorageValue(cid,config.storage) == 1 then
		local s = getCreatureName(target)
		if isInArray(t, s:lower()) and getStorage(config.bossspawnstorage) == 0 then
			doBroadcastMessage(getCreatureName(cid)..' has just killed the boss "'..s..'", a new boss will spawn in '..config.respawnSecs..' seconds!', MESSAGE_STATUS_CONSOLE_ORANGE)
			doSetStorage(config.bossspawnstorage,1)
			addEvent(orlend, config.respawnSecs*1000)
		end
	end
	return true
end

just edited an existing script to fit ur wanted thingys; I'm sure it will work, but not tested yet :D
 
Thx works Perfect rep++!!

- - - Updated - - -

[02/02/2013 15:23:33] [Warning - Event::loadScript] Event onStartup not found (data/globalevents/scripts/bossraid.lua) Huh??
 
I actualy got it working, if you wanna use the script and dont get it working pm me and i send the code :P
 
Back
Top