Spoiler
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
-------------------------------------- --		Build Helper		-- --		By Vectar666		-- -------------------------------------- --presetup function initArray(m) 	local array = {} 	for i = 1, m do 		array[i]=0 	end 	return array end vbh_px=initArray(32) vbh_py=initArray(32) vbh_mode=initArray(32) --hooks addhook("say","vbh_say") addhook("movetile","vbh_movetile") addhook("spawn","vbh_spawn") addhook("parse","vbh_con") --funcs function toTable(t,match) local cmd = {} if not match then match = "[^%s]+" else match = "[^"..match.."]+" end for word in string.gmatch(t, match) do table.insert(cmd, word) end return cmd end function vbh_con(text) 	if(text=="buildings_destroy_CT") then 		ii=object(0,"table") 		for i=1,#ii do 			if(player(object(i,"player"),"team")==2) then parse("killobject "..i) end 		end 		print("CT buildings destroyed") 		return 1 	elseif(text=="buildings_destroy_T") then 		ii=object(0,"table") 		for i=1,#ii do 			if(player(object(i,"player"),"team")==1) then parse("killobject "..i) end 		end 		print("T buildings destroyed") 		return 1 	elseif(text=="buildings_destroy_N") then 		ii=object(0,"table") 		for i=1,#ii do 			if(object(i,"player")==0) then parse("killobject "..i) end 		end 		print("Neutral buildings destroyed") 		return 1 	elseif(text=="buildings_destroy_ALL") then 		ii=object(0,"table") 		for i=1,#ii do 			parse("killobject "..i) 		end 		print("All buildings destroyed") 		return 1 	end 	iii=toTable(text) 	if(iii[1]=="buildings_destroy_player") then 		ii=object(0,"table") 		for i=1,#ii do 			if(object(i,"player")==tonumber(iii[2])) then parse("killobject "..i) end 		end 		return 1 	end end function vbh_say(id,message) --Wall 1 	if (message=="-wall 1") then 		vbh_mode[id]=3 		msg2(id,"Now placing wall 1") 		return 1 --Wall 2 	elseif (message=="-wall 2") then 		vbh_mode[id]=4 		msg2(id,"Now placing wall 2") 		return 1 --Wall 3 	elseif (message=="-wall 3") then 		vbh_mode[id]=5 		msg2(id,"Now placing wall 3") 		return 1 --Barricade 	elseif (message=="-barricade") then 		vbh_mode[id]=1 		msg2(id,"Now placing barricade") 		return 1 --Barbed Wire 	elseif (message=="-wire") then 		vbh_mode[id]=2 		msg2(id,"Now placing barbed wire") 		return 1 --Turret 	elseif (message=="-turret 1") then 		vbh_mode[id]=8 		msg2(id,"Now placing turret") 		return 1 --Double Turret 	elseif (message=="-turret 2") then 		vbh_mode[id]=11 		msg2(id,"Now placing double turret") 		return 1 --Triple Turret 	elseif (message=="-turret 3") then 		vbh_mode[id]=12 		msg2(id,"Now placing triple turret") 		return 1 --Gate Field 	elseif (message=="-gate") then 		vbh_mode[id]=6 		msg2(id,"Now placing gate field") 		return 1 --Supply 	elseif (message=="-supply") then 		vbh_mode[id]=9 		msg2(id,"Now placing supply") 		return 1 --Dispencer 	elseif (message=="-dispencer") then 		vbh_mode[id]=7 		msg2(id,"Now placing dispencer") 		return 1 --Mine 	elseif (message=="-mine") then 		vbh_mode[id]=20 		msg2(id,"Now placing mines") 		return 1 --Stop building 	elseif (message=="-nobuild") then 		vbh_mode[id]=0 		msg2(id,"Now placing nothing") 		return 1 --DESTROY!!! 	elseif (message=="-destroy") then 		ii=object(0,"table") 		for i=1,#ii do 			if(object(i,"player")==id) then parse("killobject "..i) end 		end 		msg2(id,"Your buildings have been destroyed") 		return 1 	end end function vbh_movetile(id,x,y) 	if(vbh_mode[id]>0) then 		parse("spawnobject "..vbh_mode[id].." "..vbh_px[id].." "..vbh_py[id].." 0 1 "..player(id,"team").." "..id) 	end 	vbh_px[id]=player(id,"tilex") 	vbh_py[id]=player(id,"tiley") end function vbh_spawn(id) 	vbh_px[id]=player(id,"tilex") 	vbh_py[id]=player(id,"tiley") end dofile("sys/lua/build.lua")
But he just changed some stuff but was too stupid to change the By Vectar666