Forum

> > CS2D > Scripts > Request Lasermine script that CS1.6
Forums overviewCS2D overview Scripts overviewLog in to reply

English Request Lasermine script that CS1.6

11 replies
To the start Previous 1 Next To the start

old Request Lasermine script that CS1.6

Deevix
User Off Offline

Quote
I want a script that is lasermine as in CS1.6
put them on the floor or wall and bind to either zm and plz people who I can create it
a script that can be added to a 1.15 ZombiePlague by Blazzingxx

old Re: Request Lasermine script that CS1.6

Black Wolf
User Off Offline

Quote
He me the script from cs 1.6 zombies like when you but it to will it continues infinite and when zombies go to laser it doesn't blow up the zombie just die, but laser don't removes

old Re: Request Lasermine script that CS1.6

BlazingStan
User Off Offline

Quote
Translating their Language :

They need a Laser Mine from Zombie Mod in CS 1.6.
This Laser Mine doesn't kills Humans,but kills Zombies.
It doesn't explodes,it hurts like Laser. It can be planted on something solid. And it is lasts some time,or forever. (I think that server sets time.)

old REPLY

Deevix
User Off Offline

Quote
exactly what I want

old Re: Request Lasermine script that CS1.6

Happy eyes
User 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
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
lasermines={}
images={}
for a =1,32 do
	images[a]={}
end

addhook('startround','startround')
function startround()
	lasermines={}
end


addhook('movetile','movetile')
function movetile(id,tilex,tiley)	
	if player(id,"team")==1 then
		for n,w in pairs (lasermines) do
			if w[1]==tilex and w[2]==tiley then
				parse('customkill '..w[3]..' \"laser mine \" '..id)
			end
		end
	end
end

function resetplayermines(id)	
	for n,w in pairs (lasermines) do
		if w[3]==id then
			table.remove(lasermines,n)
		end
	end
	for n,w in pairs (images[id]) do
		freeimage(w)
		images[id]={}
	end
end

addhook('leave','resetplayermines')
addhook('team','resetplayermines')

function rotbyside(rot)
	if rot >= -45 and rot <= 45 then
		return 1
	elseif rot > 45 and rot < 135 then
		return 2
	elseif rot > 135 or rot < -135 then
		return 3
	elseif rot < -45 and rot > -135 then
		return 4
	else
		return 5
	end
end

addhook('say','say')
function say(id,t)
	local text = string.lower(t)
	if t == "!lasermine" and player(id,"team")==2 then
		local rot = rotbyside(player(id,"rot"))
		local tilex,tiley=player(id,"tilex"),player(id,"tiley")
		tilex,tiley=moveposition(tilex,tiley,rot,1)
		if tile(tilex,tiley,"wall") then
			plantmine(id,tilex,tiley,rot)
			msg2(id,"©000255000You've planted lasermine!")
		else
			msg2(id,"©255000000You can't plant lasermine here!")
		end
		return 1
	end
end

function moveposition(tilex,tiley,rot,distance)
	if not distance then distance = 1 end
	local x,y = 0,0
	if rot == 1 then
		y=-1		
	elseif rot == 2 then
		x=1
	elseif rot == 3 then
		y=1
	else
		x=-1
	end
	return tilex+(x*distance),tiley+(y*distance)
end

function plantmine(id,tilex,tiley,rot)
	local pos={tilex,tiley}
	if tile(tilex,tiley,"wall") then
		for a=1,6 do
			tilex,tiley=moveposition(tilex,tiley,rot,-1)
			if tile(tilex,tiley,"walkable") then
				table.insert(lasermines,{tilex,tiley,id})
				local img
				if a==1 then
					local position={x=0,y=0}
					if rot == 1 then
						position.x=16
						position.y=2
					elseif rot == 2 then
						position.x=30
						position.y=16
					elseif rot == 3 then
						position.y=30
						position.x=16
					else
						position.y=16
						position.x=2
					end
					img = image('gfx/weapons/lasermine.bmp<m>',tilex*32+16,tiley*32+16,1)
					imagepos(img,tilex*32+position.x,tiley*32+position.y,rot*90-90)
					table.insert(images[id],img)
				end
			end
		end
		img = image('gfx/hud_shade.bmp<a>',tilex*32+16,tiley*32+16,1)
		imagescale(img,0.9,3)
		imagecolor(img,0,0,255)
		if rot == 1 then
			pos[2]=pos[2]*32+150
			pos[1]=pos[1]*32+16
			rot = 90
		elseif rot == 2 then
			pos[1]=pos[1]*32-118
			pos[2]=pos[2]*32+16
			rot = 180
		elseif rot == 3 then
			pos[1]=pos[1]*32+17
			pos[2]=pos[2]*32-120
			rot = 270
		else
			pos[1]=pos[1]*32+150
			pos[2]=pos[2]*32+17
			rot = 0
		end
		imagepos(img,pos[1],pos[2],rot)
		table.insert(images[id],img)
	end
end

old Re: Request Lasermine script that CS1.6

Infinite Rain
Reviewer Off Offline

Quote
user Happy eyes has written
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
lasermines={}
images={}
for a =1,32 do
	images[a]={}
end

addhook('startround','startround')
function startround()
	lasermines={}
end


addhook('movetile','movetile')
function movetile(id,tilex,tiley)	
	if player(id,"team")==1 then
		for n,w in pairs (lasermines) do
			if w[1]==tilex and w[2]==tiley then
				parse('customkill '..w[3]..' \"laser mine \" '..id)
			end
		end
	end
end

function resetplayermines(id)	
	for n,w in pairs (lasermines) do
		if w[3]==id then
			table.remove(lasermines,n)
		end
	end
	for n,w in pairs (images[id]) do
		freeimage(w)
		images[id]={}
	end
end

addhook('leave','resetplayermines')
addhook('team','resetplayermines')

function rotbyside(rot)
	if rot >= -45 and rot <= 45 then
		return 1
	elseif rot > 45 and rot < 135 then
		return 2
	elseif rot > 135 or rot < -135 then
		return 3
	elseif rot < -45 and rot > -135 then
		return 4
	else
		return 5
	end
end

addhook('say','say')
function say(id,t)
	local text = string.lower(t)
	if t == "!lasermine" and player(id,"team")==2 then
		local rot = rotbyside(player(id,"rot"))
		local tilex,tiley=player(id,"tilex"),player(id,"tiley")
		tilex,tiley=moveposition(tilex,tiley,rot,1)
		if tile(tilex,tiley,"wall") then
			plantmine(id,tilex,tiley,rot)
			msg2(id,"©000255000You've planted lasermine!")
		else
			msg2(id,"©255000000You can't plant lasermine here!")
		end
		return 1
	end
end

function moveposition(tilex,tiley,rot,distance)
	if not distance then distance = 1 end
	local x,y = 0,0
	if rot == 1 then
		y=-1		
	elseif rot == 2 then
		x=1
	elseif rot == 3 then
		y=1
	else
		x=-1
	end
	return tilex+(x*distance),tiley+(y*distance)
end

function plantmine(id,tilex,tiley,rot)
	local pos={tilex,tiley}
	if tile(tilex,tiley,"wall") then
		for a=1,6 do
			tilex,tiley=moveposition(tilex,tiley,rot,-1)
			if tile(tilex,tiley,"walkable") then
				table.insert(lasermines,{tilex,tiley,id})
				local img
				if a==1 then
					local position={x=0,y=0}
					if rot == 1 then
						position.x=16
						position.y=2
					elseif rot == 2 then
						position.x=30
						position.y=16
					elseif rot == 3 then
						position.y=30
						position.x=16
					else
						position.y=16
						position.x=2
					end
					img = image('gfx/weapons/lasermine.bmp<m>',tilex*32+16,tiley*32+16,1)
					imagepos(img,tilex*32+position.x,tiley*32+position.y,rot*90-90)
					table.insert(images[id],img)
				end
			end
		end
		img = image('gfx/hud_shade.bmp<a>',tilex*32+16,tiley*32+16,1)
		imagescale(img,0.9,3)
		imagecolor(img,0,0,255)
		if rot == 1 then
			pos[2]=pos[2]*32+150
			pos[1]=pos[1]*32+16
			rot = 90
		elseif rot == 2 then
			pos[1]=pos[1]*32-118
			pos[2]=pos[2]*32+16
			rot = 180
		elseif rot == 3 then
			pos[1]=pos[1]*32+17
			pos[2]=pos[2]*32-120
			rot = 270
		else
			pos[1]=pos[1]*32+150
			pos[2]=pos[2]*32+17
			rot = 0
		end
		imagepos(img,pos[1],pos[2],rot)
		table.insert(images[id],img)
	end
end


You don't need \" if you using '

old Re: Request Lasermine script that CS1.6

Deevix
User Off Offline

Quote
I know how it goes, but it's not my way ..
I want to be added to human shop and to sell the ammo pack
but even for zombies in their shop ..
If I say what you need from zombieplague 1.15 script.lua you give it to me and add lasermine
edited 1×, last 19.08.12 02:47:03 pm

old Re: Request Lasermine script that CS1.6

Happy eyes
User Off Offline

Quote
user Deevix has written
I know how it goes, but it's not my way ..
I want to be added to human shop and to sell the ammo pack
but even for zombies in their shop ..
If I say what you need from zombieplague 1.15 script.lua you give it to me and add lasermine


I've already gave you all lasermines engine, I think it's not that hard to add some table with numbers lasermines carried, and to check does player has enough lasermines to place, while placing. Also add button to buy a lasermine if player has enough ammo packs.

old Re: Request Lasermine script that CS1.6

Deevix
User Off Offline

Quote
Sory i am Romanian :P:(:)

So can anyone do that?
is yes and lasers to stretch to infinity or till the end ie maps from a wall to another






can someone make me?
edited 1×, last 21.08.12 10:34:22 am
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview