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
laser_colour={}
for a=1,32 do
	laser_colour[a]=1
end
addhook('attack2','attack2')
function attack2(id,mode)
	laser_colour[id]=mode
end
addhook('hit','hit')
function hit(id,source,weapon,hpdmg,apdmg,rawdmg)
	if weapon == 45 then
		if laser_colour[source]==2 then
			parse('speedmod '..id..' -50')
			return 1
		elseif laser_colour[source]==3 then
			parse('sethealth '..id..' '..player(id,"maxhealth"))
			return 1
		elseif laser_colour[source]==1 then
			parse('setpos '..id..' '..player(source,"x")..' '..player(source,"y"))
			return 1
		else
			parse('speedmod '..id..' 10')
			return 1
		end
	end
end