UpInSmoke
Supreme Ruler
- Joined
- Nov 16, 2008
- Messages
- 303
- Reaction score
- 21
Made this for myself, thought others might benefit from it if there isn't already one out there
What it does:
Lua:
local t = {
effect = CONST_ME_HITBYFIRE,
[65001] = {"snake", 20, 1*60, {x = 1153, y = 1449, z = 7}, {x = 1169, y = 1465, z = 7}, {x = 1161, y = 1457, z = 7}, 13455}, -- UniqueId of lever, monster, cooldown(minutes), count, top left pos, bottom right pos, middle pos, exhaust storage
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = t[item.uid]
if getPlayerStorageValue(cid, v[7]) > os.time() then
return doPlayerSendCancel(cid, 'You must wait '..getPlayerStorageValue(cid, v[7])-os.time()..' seconds to spawn more monsters.')
end
for i = 1, v[2] do
local p = {x = math.random(v[4].x, v[5].x), y = math.random(v[4].y, v[5].y), z = math.random(v[4].z, v[5].z)}
doCreateMonster(v[1], p)
end
doSendMagicEffect(getCreaturePosition(cid), t.effect)
doPlayerSendTextMessage(cid, 21, "You have spawned "..v[2].." "..v[1].."s.")
doTeleportThing(cid, v[6])
setPlayerStorageValue(cid, v[7], os.time()+v[3])
return true
end
What it does:
enjoySpawns x amount of x monster within a certian area all different spots (you specify the size in the config)
it teleports you to the middle of the spawn
it sets a cooldown on the lever being used (you can set to 0 if you dont want one)
Last edited: