bum bum
zatania developer
- Joined
- Aug 23, 2010
- Messages
- 24
- Reaction score
- 1
hello otlanders i have a problem with this creaturescript of boss event the movement scripts are fine and working but when the boss die it is not respawning like the spript even not start at all thanks in advance
bum bum
Lua:
local config = {
respawnSecs = 1, -- how many seconds until next boss spawns
storage = 70200,
bosspos = {x=32044,y=31927,z=7},
bossspawnstorage = 70400
}
local t = {'rotworm','Ghazbaran','Ferumbras','Orshabaal','Countess Sorrow','Massacre','Fluffy','Dracola','the plasmother','Mr. Punish','The Handmaiden'}
local function f()
doCreateMonster(t[math.random(#t)], config.bosspos, false, true, true)
doBroadcastMessage('A new boss has spawned in the boss 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(f, config.respawnSecs*100)
end
end
return true
end
bum bum
Last edited by a moderator: