firefox125
New Member
- Joined
- Apr 8, 2023
- Messages
- 14
- Reaction score
- 1
this is what i have by now it does spawn monsters basicly one by one to be precise hehe, it is for a private hunting area for donor players, i need to make this a bit more compact i was trying but just making the script stop working. i would appreciate if anyone could help me if not with shortening the code also i want to clean already created monsters so if a player tries to summon more than 1 wave just remove previous monsters and spawn new ones(im trying to adapt creating a spawn so the monsters respawn after killed just like normal ones), this is for a multi lvl area so 1 item summons x monsters and the other one summons x different monsters by level.
i know this sounds hard but few hours ago i had nothing xD, will continue trying and going to post the final script here so anyone can use, been looking for a script like this but none work also tried modular map one but as im using OTBR it does not function properly(doesnt create or remove anything also tried to fix it but got frustated thats why im creating atleast the random monster spawn)
also i have to change storage everytime to test if the script works as it is not actually working it just propmts that i have to wait, and i have done so hahaha
i know this sounds hard but few hours ago i had nothing xD, will continue trying and going to post the final script here so anyone can use, been looking for a script like this but none work also tried modular map one but as im using OTBR it does not function properly(doesnt create or remove anything also tried to fix it but got frustated thats why im creating atleast the random monster spawn)
Lua:
local topL = Position(1500, 300, 7)
local botR = Position(1650, 420, 7)
local kb = Action()
local cTime = os.time()
function kb.onUse(player, item, position, creature)
if Game.getStorageValue(1235) > cTime then
player:sendTextMessage(MESSAGE_STATUS_WARNING, 'wait a while to continue next wave.'
else
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Dragon Lord", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
Game.createMonster("Demon", Position(math.random(topL.x, botR.x), math.random(topL.y, botR.y), topL.z))
end
Game.setStorageValue(1235, os.time() + 1)
return true
end
kb:uid(14785)
kb:register()
also i have to change storage everytime to test if the script works as it is not actually working it just propmts that i have to wait, and i have done so hahaha