1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
function Array(size,value)
	local array = {}
	for i = 1, size do
		array[i] = value
	end
	return array
end
my_image = Array(32,0)
addhook("spawn","HoC.races.spawn")
function HoC.races.spawn(id)
	if player(id,"bot") then
		HoC.races.class[id] = math.random(1,4)
	end
-- TAUREN
	if (HoC.races.class[id]<=1) then
		parse ("setmaxhealth "..id.." 250")
		parse ("setarmor "..id.." 206")
		parse ("speedmod "..id.." -10")
		freeimage(my_image[id])
		my_image[id] = image("gfx/HoC/1.png",1,1,200+id)
	end
-- HUMAN
	if (HoC.races.class[id]==2) then
		parse ("setmaxhealth "..id.." 100")
		parse ("setarmor "..id.." 206")
		parse ("speedmod "..id.." 5")
		freeimage(my_image[id])
		my_image[id] = image("gfx/HoC/2.png",1,1,200+id)
	end
-- ORC
	if (HoC.races.class[id]==3) then
		parse ("setmaxhealth "..id.." 150")
		parse ("setarmor "..id.." 206")
		parse ("speedmod "..id.." -5")
		freeimage(my_image[id])
		my_image[id] = image("gfx/HoC/3.png",1,1,200+id)
	end
-- ELF
	if (HoC.races.class[id]==4) then
		parse ("setmaxhealth "..id.." 75")
		parse ("setarmor "..id.." 206")
		parse ("speedmod "..id.." 15")
		freeimage(my_image[id])
		my_image[id] = image("gfx/HoC/4.png",1,1,200+id)
	end
end