kito2
www.masteria.net
Hello,
I have a few days trying to simulate the following: If a certain condition is true, then monsters will respawn (after the game starts), but if the condition is not true, it wont start.
I have done this part so far, but I am missing now the "event" where those monsters are respawned at the specific position again.
For example les says if the condition is true, then 6 rats are respawned at different positions. If one of those rats dies, it should be respawned as normal as it was.
Any ideas?
Here is the code for the starting respawn:
I have a few days trying to simulate the following: If a certain condition is true, then monsters will respawn (after the game starts), but if the condition is not true, it wont start.
I have done this part so far, but I am missing now the "event" where those monsters are respawned at the specific position again.
For example les says if the condition is true, then 6 rats are respawned at different positions. If one of those rats dies, it should be respawned as normal as it was.
Any ideas?
Here is the code for the starting respawn:
Code:
local spawns = {
-- Spawns
[1] = {position = Position(33514, 32471, 7), monster = 'Sight of Surrender'},
[2] = {position = Position(33585, 32459, 7), monster = 'Sight of Surrender'},
[3] = {position = Position(33625, 32490, 7), monster = 'Sight of Surrender'},
[4] = {position = Position(33670, 32485, 7), monster = 'Sight of Surrender'},
[5] = {position = Position(33659, 32540, 7), monster = 'Sight of Surrender'},
[6] = {position = Position(33607, 32536, 7), monster = 'Sight of Surrender'}
}
function onStartup()
if (getGlobalStorageValueDB(ROSHAMUUL_HORN_WALL) < 200) then
Game.createMonster('Sight of Surrender', Position(33514, 32471, 7), false, true)
Game.createMonster('Sight of Surrender', Position(33585, 32459, 7), false, true)
Game.createMonster('Sight of Surrender', Position(33625, 32490, 7), false, true)
Game.createMonster('Sight of Surrender', Position(33670, 32485, 7), false, true)
Game.createMonster('Sight of Surrender', Position(33659, 32540, 7), false, true)
Game.createMonster('Sight of Surrender', Position(33607, 32536, 7), false, true)
print("Sight of Surrender summoned!")
return true
else
setGlobalStorageValueDB(ROSHAMUUL_HORN_WALL,0)
print("Sight of Surrender NOT summoned!")
end
end