Forum

> > CS2D > Scripts > tibia error
Forums overviewCS2D overview Scripts overviewLog in to reply

English tibia error

5 replies
To the start Previous 1 Next To the start

old tibia error

goldfish
GAME BANNED Off Offline

Quote
hi i have problem with lua i added some monsters to tibia

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])

old Re: tibia error

Yates
Reviewer Off Offline

Quote
I cannot find the line in this code, please tell me which monster is using this line.

old Re: tibia error

goldfish
GAME BANNED Off Offline

Quote
in console i get error on line 420 and on tht line is tht code where i putted and srr for my english ;d

old Re: tibia error

goldfish
GAME BANNED Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
addhook("ms100", "MONSTERms100")
function MONSTERms100()
	t = t + 1
	if t % 100 == 0 then
		while #MONSTERS < CONFIG.MAXMONSTERS do
			local rand
			repeat
				rand = math.random(#CONFIG.MONSTERS)
			until math.random(0, 100) < CONFIG.MONSTERS[rand].spawnchance
			local m = deepcopy(CONFIG.MONSTERS[rand])
			local x, y, tilex, tiley
			repeat
				if m.spawn1 then
					tilex, tiley = math.random(m.spawn1[1], m.spawn2[1]), math.random(m.spawn1[2], m.spawn2[2])
				else
					tilex, tiley = math.random(map'xsize'), math.random(map'ysize')
				end
			until not gettile(tilex, tiley).SAFE and not gettile(tilex, tiley).PVP and tile(tilex, tiley, "walkable") and tile(tilex, tiley, "frame") ~= 76
			m.x, m.y = math.floor(tilex*32+16), math.floor(tiley*32+16)
			Monster:new(m)
		end
	end
edited 1×, last 08.05.12 11:18:17 pm

old Re: tibia error

Black Wolf
User Off Offline

Quote
Dude, there is topic for tibia bugs. Don't create new topic for each error what you get.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview