roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,188
- Solutions
- 34
- Reaction score
- 200
HI! I'm using this onSpawn code, creatred by @Delusion (Feature - [TFS 1.2] Monster:onSpawn(position, startup, artificial) (https://otland.net/threads/tfs-1-2-monster-onspawn-position-startup-artificial.257140/))
but it have one BUG....
My server have orshabaal respaw, and i put % chance to "spawn" ghazbaran, if orshaball dies.
The problem is when "ghazbaran" spawn, orshabaal spawn too (they are stacked in the same place).
wanted to modify, so if the boss was born, the other monster would not be born until the boss is killed
but it have one BUG....
My server have orshabaal respaw, and i put % chance to "spawn" ghazbaran, if orshaball dies.
The problem is when "ghazbaran" spawn, orshabaal spawn too (they are stacked in the same place).
wanted to modify, so if the boss was born, the other monster would not be born until the boss is killed
Lua:
function Monster:onSpawn(position, startup, artificial)
if self:getName() == "Orshabaal" then
if math.random(100) <= 5 then
Game.createMonster("Ghazbaran", position, true, true)
end
end
return true
end