Ray Rewind
Doctor
Is there any possability to remove Raid >Bosses when they are not killed within certain minutes?
-- How many seconds shall monster stay alive?
seconds = 4
-- Do you want people to be able to loot monster
-- after its dead? 0 = NO, 1 = YES.
loot = 0
function onThink(cid)
addEvent(fuckmylife,1000*seconds, {cid=cid})
return true
end
function fuckmylife(cid)
local cid = cid.cid
if isCreature(cid) then
if loot > 0 then
doCreatureAddHealth(cid, -getCreatureHealth(cid))
return true
else
doRemoveCreature(cid)
return true
end
end
return true
end
-- How many seconds shall monster stay alive?
seconds = 4
-- Do you want people to be able to loot monster
-- after its dead? 0 = NO, 1 = YES.
loot = 0
function onThink(cid)
addEvent(fuckmylife,1000*seconds, {cid=cid})
return true
end
function fuckmylife(cid)
local cid = cid.cid
if isCreature(cid) then
if loot > 0 then
doCreatureAddHealth(cid, -getCreatureHealth(cid))
return true
else
doRemoveCreature(cid)
return true
end
end
return true
end
Register the boss monsters with a creaturescript that will kill it after x seconds:
-- How many seconds shall monster stay alive?
seconds = 4
-- Do you want people to be able to loot monster
-- after its dead? 0 = NO, 1 = YES.
loot = 0
function onThink(cid)
addEvent(fuckmylife,1000*seconds, {cid=cid})
return true
end
function fuckmylife(cid)
local cid = cid.cid
if isCreature(cid) then
if loot > 0 then
doCreatureAddHealth(cid, -getCreatureHealth(cid))
return true
else
doRemoveCreature(cid)
return true
end
end
return true
end
Add the event to the demodras not the players.