Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("meteor_api.lua")
- if #arg < 5 then
- print("Usage: meteor_spawn x1 z1 x2 z2 qty")
- return
- end
- x1 = tonumber(arg[1])
- z1 = tonumber(arg[2])
- x2 = tonumber(arg[3])
- z2 = tonumber(arg[4])
- qty = tonumber(arg[5])
- for i=1,qty,1 do
- x = math.random(x1, x2)
- z = math.random(z1, z2)
- y = 50
- meteor_api.spawnMeteorAt(x, y, z)
- print("Spawned a meteor at "..tostring(x)..", "..tostring(y)..", "..tostring(z))
- end
Advertisement
Add Comment
Please, Sign In to add comment