roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,210
- Solutions
- 35
- Reaction score
- 206
How i can remove boss if not die in 10min?
The msg says, a boss will be created in 5 minutes.... and execute
the error is in this function, i dont know how can i get the monster, to check if he died or not
here a full script
The msg says, a boss will be created in 5 minutes.... and execute
the error is in this function, i dont know how can i get the monster, to check if he died or not
LUA:
addEvent(removeBoss, 15 * 60 * 1000)
here a full script
LUA:
function addBoss()
Game.createMonster("Orshabaal", Position(33000, 33000, 7), false, true)
end
function removeBoss(cid)
local creature = Creature(cid)
if creature then
creature:remove()
end
end
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
Game.broadcastMessage("Boss will be created in 5 minutes!", MESSAGE_STATUS_WARNING)
addEvent(addBoss, 5 * 60 * 1000)
addEvent(removeBoss, 15 * 60 * 1000) -this function, how can i put the boss here?
return true
end