Spoiler
thts wht i add and i get erorr = bad argument #2 'random' (interval is emty) on line 440 = tilex, tiley = math.random(m.spawn1[1], m.spawn2[1]), math.random(m.spawn1[2], m.spawn2[2]) {
name = 'Tree', health = 240, image = 'gfx/mumax/monster/1.png', scalex = 0.9, scaley = 0.9, r = 255, g = 0, b = 0,
atk = 0.6, def = 0.8, spd = 3, atkspd = 15, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 50, runat = 10, spawn1 = {120, 20}, spawn2 = {30, 230},
exp = 3, money = 15, loot = {},
},
{
name = 'wolf', health = 160, image = 'gfx/mumax/monster/2.png', scalex = 0.8, scaley = 0.8, r = 128, g = 128, b = 128,
atk = 0.5, def = 1.1, spd = 4, atkspd = 16, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 50, runat = 10, spawn1 = {90, 10}, spawn2 = {190, 290},
exp = 3, money = 10, loot = {},
},
{
name = 'tarantula', health = 160, image = 'gfx/mumax/monster/5.png', scalex = 1.2, scaley = 1.2,
atk = 0.7, def = 1.1, spd = 5, atkspd = 13, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 50, runat = 10, spawn1 = {230, 25}, spawn2 = {50, 280},
exp = 3, money = 25, loot = {},
spc = {50, function(self)
radiusmsg("tarantula uses web attack!", self.x, self.y)
parse('flashposition ' .. self.x .. ' ' .. self.y .. ' 100')
end},
},
{
name = 'Wolf', health = 160, image = 'gfx/mumax/monster/2.png', scalex = 0.8, scaley = 0.8,
atk = 0.5, def = 0.8, spd = 5, atkspd = 13, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 50, runat = 10, spawn1 = {160, 30}, spawn2 = {160, 250},
exp = 4, money = 10, loot = {},
},
{
name = '3 head wolf', health = 210, image = 'gfx/mumax/monster/9.png', scalex = 0.6, scaley = 0.6,
atk = 0.6, def = 0.8, spd = 4, atkspd = 15, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 50, runat = 10, spawn1 = {135, 20}, spawn2 = {145, 100},
exp = 4, money = 20, loot = {},
},
{
name = 'Ghost', health = 210, image = 'gfx/mumax/monster/11.png', scalex = 0.9, scaley = 0.9,
atk = 1, def = 1.0, spd = 5, atkspd = 12, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 20, runat = 15, spawn1 = {220, 220}, spawn2 = {226, 179},
exp = 7, money =40, loot = {},
},
{
name = 'black ghost', health = 310, image = 'gfx/mumax/monster/10.png', scalex = 0.9, scaley = 0.9,
atk = 1.3, def = 1.2, spd = 6, atkspd = 11, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 20, runat = 0, spawn1 = {250, 165}, spawn2 = {250, 150},
exp = 12, money = 80, loot = {},
spc = {300, function(self, id, dist)
if dist <= 96 then
radiusmsg("PoisonWolf uses poison attack!", self.x, self.y)
self:hit(id, 15)
end
end},
},
{
name = 'giant', health = 250, image = 'gfx/mumax/monster/8.png', scalex = 1, scaley = 1,
atk = 1.3, def = 1.3, spd = 5, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 30, runat = 10, spawn1 = {190, 70}, spawn2 = {1, 90},
exp = 7, money = 60, loot = {},
spc = {500, function(self, id, dist)
if dist <= 96 then
radiusmsg("giant uses special attack!", self.x, self.y)
self:hit(id, 15)
end
end},
},
{
name = 'evil black ghost', health = 400, image = 'gfx/mumax/monster/7.png', scalex = 1.7, scaley = 1.7,
atk = 1.7, def = 1.4, spd = 5, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 30, runat = 10, spawn1 = {220, 165}, spawn2 = {200, 240},
exp = 15, money = 110, loot = {},
spc = {800, function(self, id, dist)
if dist <= 96 then
radiusmsg("ghost uses invisible attack!", self.x, self.y)
self:hit(id, 18)
end
end},
},
{
name = 'tarantula', health = 160, image = 'gfx/mumax/monster/5.png', scalex = 1.2, scaley = 1.2,
atk = 0.9, def = 2.6, spd = 9, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 40, runat = 0, spawn1 = {150, 260}, spawn2 = {95, 76},
exp = 15, money = 50, loot = {},
spc = {1000, function(self, id, dist)
if dist <= 96 then
radiusmsg("tarantula uses web attack!", self.x, self.y)
self:hit(id, 20)
end
end},
},
{
name = 'Giant', health = 250, image = 'gfx/mumax/monster/8.png', scalex = 1.2, scaley = 1.2,
atk = 2.4, def = 2.8, spd = 7, atkspd = 12, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 40, runat = 0, spawn1 = {140, 45}, spawn2 = {80, 286},
exp = 10, money = 110, loot = {},
spc = {3000, function(self, id, dist)
if dist <= 96 then
radiusmsg("Giant monster uses wood attack!", self.x, self.y)
self:hit(id,
end
end},
},
{
name = 'dragon', health = 400, image = 'gfx/mumax/monster/6.png', scalex = 1.2, scaley = 1.2,
atk = 2.3, def = 2.3, spd = 10, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 40, runat = 0, spawn1 = {40, 246}, spawn2 = {240, 28},
exp = 32, money = 220, loot = {},
spc = {5000, function(self, id, dist)
if dist <= 96 then
radiusmsg("dragon uses fast attack!", self.x, self.y)
self:hit(id, 5)
end
end},
},
{
name = '[Boss]Super dragon', health = 1200, image = 'gfx/mumax/monster/12.png', scalex = 1, scaley = 1,
atk = 2.5, def = 4.7, spd = 11, atkspd = 6, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 5, runat = 0, spawn1 = {275, 77}, spawn2 = {290, 86},
exp = 100, money = 500, loot = {{chance = 400, id = 320},{chance = 400, id = 321},{chance = 400, id = 322},{chance = 400, id = 323},{chance = 300, id = 324},{chance = 300, id = 325},{chance = 300, id = 326},{chance = 200, id = 327},{chance = 500, id = 422}},
spc = {2500, function(self, id, dist)
if dist <= 96 then
radiusmsg("dragon uses fast attack!", self.x, self.y)
self:hit(id, 15)
end
end},
},
{
name = '[Boss]titan', health = 1500, image = 'gfx/mumax/monster/3.png', scalex = 1., scaley = 1,
atk = 4.7, def = 4, spd = 8, atkspd = 13, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 5, runat = 0, spawn1 = {281, 61}, spawn2 = {260, 77},
exp = 150, money = 700, loot = {{chance = 1000, id = 422},{chance = 250, id = 437},{chance = 250, id = 438},{chance = 250, id = 439},{chance = 250, id = 440},{chance = 250, id = 441}}, range = 96,
spc = {1500, function(self, id, dist)
radiusmsg("titan uses poison!", self.x, self.y)
local x1, y1 = self.x, self.y
local rot = math.atan2(player(id, 'y')-y1, player(id, 'x')-x1) + math.pi/2
local x2, y2 = math.sin(rot), -math.cos(rot)
local poison = image("gfx/sprites/spot.bmp", 0, 0, 1)
imagepos(poison, x1+x2*64, y1+y2*64, math.deg(rot)+180)
imagescale(poison, 1.5, 2)
imagecolor(poison, 135, 0, 200)
imageblend(poison, 1)
addtimer(500, freeimage, poison)
parse('explosion ' .. x1+x2*100 .. ' ' .. y1+y2*100 .. ' 48 40')
parse('explosion ' .. x1+x2*50 .. ' ' .. y1+y2*50 .. ' 32 40')
end},
},
{
name = '[Boss]titan kid', health = 700, image = 'gfx/mumax/monster/3.png', scalex = 1., scaley = 1,
atk = 2.3, def = 5, spd = 10, atkspd = 14, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 5, runat = 0, spawn1 = {220, 113}, spawn2 = {220, 113},
exp = 50, money = 500, loot = {{chance = 100, id = 444},{chance = 100, id = 445},{chance = 100, id = 446},{chance = 100, id = 447},{chance = 100, id = 448},{chance = 100, id = 449}}, range = 96,
spc = {1500, function(self, id, dist)
radiusmsg("titan uses fire ball!", self.x, self.y)
local x1, y1 = self.x, self.y
local rot = math.atan2(player(id, 'y')-y1, player(id, 'x')-x1) + math.pi/2
local x2, y2 = math.sin(rot), -math.cos(rot)
local poison = image("gfx/sprites/spot.bmp", 0, 0, 1)
imagepos(poison, x1+x2*64, y1+y2*64, math.deg(rot)+180)
imagescale(poison, 1.5, 2)
imagecolor(poison, 255, 0, 0)
imageblend(poison, 1)
addtimer(500, freeimage, poison)
parse('explosion ' .. x1+x2*100 .. ' ' .. y1+y2*100 .. ' 48 60')
parse('explosion ' .. x1+x2*50 .. ' ' .. y1+y2*50 .. ' 32 60')
end},
},
{
name = 'big wolf', health = 200, image = 'gfx/mumax/monster/2.png', scalex = 2, scaley = 2,
atk = 1.7, def = 2.1, spd = 7, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 0, runat = 10, spawn1 = {162, 48}, spawn2 = {72, 88},
exp = 27, money = 35, loot = {},
spc = {100, function(self)
radiusmsg("wolf uses sand attack!", self.x, self.y)
parse('flashposition ' .. self.x .. ' ' .. self.y .. ' 100')
end},
},
{
name = 'tree', health = 200, image = 'gfx/mumax/monster/1.png', scalex = 2, scaley = 2,
atk = 1.8, def = 1.2, spd = 7, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 0, runat = 10, spawn1 = {80, 270}, spawn2 = {137, 44},
exp = 15, money = 25, loot = {},
spc = {100, function(self, id, dist)
if dist <= 96 then
radiusmsg("tree uses poison sting!", self.x, self.y)
self:hit(id, 20)
end
end},
},
name = 'Tree', health = 240, image = 'gfx/mumax/monster/1.png', scalex = 0.9, scaley = 0.9, r = 255, g = 0, b = 0,
atk = 0.6, def = 0.8, spd = 3, atkspd = 15, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 50, runat = 10, spawn1 = {120, 20}, spawn2 = {30, 230},
exp = 3, money = 15, loot = {},
},
{
name = 'wolf', health = 160, image = 'gfx/mumax/monster/2.png', scalex = 0.8, scaley = 0.8, r = 128, g = 128, b = 128,
atk = 0.5, def = 1.1, spd = 4, atkspd = 16, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 50, runat = 10, spawn1 = {90, 10}, spawn2 = {190, 290},
exp = 3, money = 10, loot = {},
},
{
name = 'tarantula', health = 160, image = 'gfx/mumax/monster/5.png', scalex = 1.2, scaley = 1.2,
atk = 0.7, def = 1.1, spd = 5, atkspd = 13, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 50, runat = 10, spawn1 = {230, 25}, spawn2 = {50, 280},
exp = 3, money = 25, loot = {},
spc = {50, function(self)
radiusmsg("tarantula uses web attack!", self.x, self.y)
parse('flashposition ' .. self.x .. ' ' .. self.y .. ' 100')
end},
},
{
name = 'Wolf', health = 160, image = 'gfx/mumax/monster/2.png', scalex = 0.8, scaley = 0.8,
atk = 0.5, def = 0.8, spd = 5, atkspd = 13, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 50, runat = 10, spawn1 = {160, 30}, spawn2 = {160, 250},
exp = 4, money = 10, loot = {},
},
{
name = '3 head wolf', health = 210, image = 'gfx/mumax/monster/9.png', scalex = 0.6, scaley = 0.6,
atk = 0.6, def = 0.8, spd = 4, atkspd = 15, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 50, runat = 10, spawn1 = {135, 20}, spawn2 = {145, 100},
exp = 4, money = 20, loot = {},
},
{
name = 'Ghost', health = 210, image = 'gfx/mumax/monster/11.png', scalex = 0.9, scaley = 0.9,
atk = 1, def = 1.0, spd = 5, atkspd = 12, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 20, runat = 15, spawn1 = {220, 220}, spawn2 = {226, 179},
exp = 7, money =40, loot = {},
},
{
name = 'black ghost', health = 310, image = 'gfx/mumax/monster/10.png', scalex = 0.9, scaley = 0.9,
atk = 1.3, def = 1.2, spd = 6, atkspd = 11, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 20, runat = 0, spawn1 = {250, 165}, spawn2 = {250, 150},
exp = 12, money = 80, loot = {},
spc = {300, function(self, id, dist)
if dist <= 96 then
radiusmsg("PoisonWolf uses poison attack!", self.x, self.y)
self:hit(id, 15)
end
end},
},
{
name = 'giant', health = 250, image = 'gfx/mumax/monster/8.png', scalex = 1, scaley = 1,
atk = 1.3, def = 1.3, spd = 5, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 30, runat = 10, spawn1 = {190, 70}, spawn2 = {1, 90},
exp = 7, money = 60, loot = {},
spc = {500, function(self, id, dist)
if dist <= 96 then
radiusmsg("giant uses special attack!", self.x, self.y)
self:hit(id, 15)
end
end},
},
{
name = 'evil black ghost', health = 400, image = 'gfx/mumax/monster/7.png', scalex = 1.7, scaley = 1.7,
atk = 1.7, def = 1.4, spd = 5, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 30, runat = 10, spawn1 = {220, 165}, spawn2 = {200, 240},
exp = 15, money = 110, loot = {},
spc = {800, function(self, id, dist)
if dist <= 96 then
radiusmsg("ghost uses invisible attack!", self.x, self.y)
self:hit(id, 18)
end
end},
},
{
name = 'tarantula', health = 160, image = 'gfx/mumax/monster/5.png', scalex = 1.2, scaley = 1.2,
atk = 0.9, def = 2.6, spd = 9, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 40, runat = 0, spawn1 = {150, 260}, spawn2 = {95, 76},
exp = 15, money = 50, loot = {},
spc = {1000, function(self, id, dist)
if dist <= 96 then
radiusmsg("tarantula uses web attack!", self.x, self.y)
self:hit(id, 20)
end
end},
},
{
name = 'Giant', health = 250, image = 'gfx/mumax/monster/8.png', scalex = 1.2, scaley = 1.2,
atk = 2.4, def = 2.8, spd = 7, atkspd = 12, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 40, runat = 0, spawn1 = {140, 45}, spawn2 = {80, 286},
exp = 10, money = 110, loot = {},
spc = {3000, function(self, id, dist)
if dist <= 96 then
radiusmsg("Giant monster uses wood attack!", self.x, self.y)
self:hit(id,
end
end},
},
{
name = 'dragon', health = 400, image = 'gfx/mumax/monster/6.png', scalex = 1.2, scaley = 1.2,
atk = 2.3, def = 2.3, spd = 10, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 40, runat = 0, spawn1 = {40, 246}, spawn2 = {240, 28},
exp = 32, money = 220, loot = {},
spc = {5000, function(self, id, dist)
if dist <= 96 then
radiusmsg("dragon uses fast attack!", self.x, self.y)
self:hit(id, 5)
end
end},
},
{
name = '[Boss]Super dragon', health = 1200, image = 'gfx/mumax/monster/12.png', scalex = 1, scaley = 1,
atk = 2.5, def = 4.7, spd = 11, atkspd = 6, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 5, runat = 0, spawn1 = {275, 77}, spawn2 = {290, 86},
exp = 100, money = 500, loot = {{chance = 400, id = 320},{chance = 400, id = 321},{chance = 400, id = 322},{chance = 400, id = 323},{chance = 300, id = 324},{chance = 300, id = 325},{chance = 300, id = 326},{chance = 200, id = 327},{chance = 500, id = 422}},
spc = {2500, function(self, id, dist)
if dist <= 96 then
radiusmsg("dragon uses fast attack!", self.x, self.y)
self:hit(id, 15)
end
end},
},
{
name = '[Boss]titan', health = 1500, image = 'gfx/mumax/monster/3.png', scalex = 1., scaley = 1,
atk = 4.7, def = 4, spd = 8, atkspd = 13, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 5, runat = 0, spawn1 = {281, 61}, spawn2 = {260, 77},
exp = 150, money = 700, loot = {{chance = 1000, id = 422},{chance = 250, id = 437},{chance = 250, id = 438},{chance = 250, id = 439},{chance = 250, id = 440},{chance = 250, id = 441}}, range = 96,
spc = {1500, function(self, id, dist)
radiusmsg("titan uses poison!", self.x, self.y)
local x1, y1 = self.x, self.y
local rot = math.atan2(player(id, 'y')-y1, player(id, 'x')-x1) + math.pi/2
local x2, y2 = math.sin(rot), -math.cos(rot)
local poison = image("gfx/sprites/spot.bmp", 0, 0, 1)
imagepos(poison, x1+x2*64, y1+y2*64, math.deg(rot)+180)
imagescale(poison, 1.5, 2)
imagecolor(poison, 135, 0, 200)
imageblend(poison, 1)
addtimer(500, freeimage, poison)
parse('explosion ' .. x1+x2*100 .. ' ' .. y1+y2*100 .. ' 48 40')
parse('explosion ' .. x1+x2*50 .. ' ' .. y1+y2*50 .. ' 32 40')
end},
},
{
name = '[Boss]titan kid', health = 700, image = 'gfx/mumax/monster/3.png', scalex = 1., scaley = 1,
atk = 2.3, def = 5, spd = 10, atkspd = 14, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 5, runat = 0, spawn1 = {220, 113}, spawn2 = {220, 113},
exp = 50, money = 500, loot = {{chance = 100, id = 444},{chance = 100, id = 445},{chance = 100, id = 446},{chance = 100, id = 447},{chance = 100, id = 448},{chance = 100, id = 449}}, range = 96,
spc = {1500, function(self, id, dist)
radiusmsg("titan uses fire ball!", self.x, self.y)
local x1, y1 = self.x, self.y
local rot = math.atan2(player(id, 'y')-y1, player(id, 'x')-x1) + math.pi/2
local x2, y2 = math.sin(rot), -math.cos(rot)
local poison = image("gfx/sprites/spot.bmp", 0, 0, 1)
imagepos(poison, x1+x2*64, y1+y2*64, math.deg(rot)+180)
imagescale(poison, 1.5, 2)
imagecolor(poison, 255, 0, 0)
imageblend(poison, 1)
addtimer(500, freeimage, poison)
parse('explosion ' .. x1+x2*100 .. ' ' .. y1+y2*100 .. ' 48 60')
parse('explosion ' .. x1+x2*50 .. ' ' .. y1+y2*50 .. ' 32 60')
end},
},
{
name = 'big wolf', health = 200, image = 'gfx/mumax/monster/2.png', scalex = 2, scaley = 2,
atk = 1.7, def = 2.1, spd = 7, atkspd = 7, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 0, runat = 10, spawn1 = {162, 48}, spawn2 = {72, 88},
exp = 27, money = 35, loot = {},
spc = {100, function(self)
radiusmsg("wolf uses sand attack!", self.x, self.y)
parse('flashposition ' .. self.x .. ' ' .. self.y .. ' 100')
end},
},
{
name = 'tree', health = 200, image = 'gfx/mumax/monster/1.png', scalex = 2, scaley = 2,
atk = 1.8, def = 1.2, spd = 7, atkspd = 8, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 0, runat = 10, spawn1 = {80, 270}, spawn2 = {137, 44},
exp = 15, money = 25, loot = {},
spc = {100, function(self, id, dist)
if dist <= 96 then
radiusmsg("tree uses poison sting!", self.x, self.y)
self:hit(id, 20)
end
end},
},