-
Notifications
You must be signed in to change notification settings - Fork 0
/
ForgeMenu.gsc
369 lines (329 loc) · 9.64 KB
/
ForgeMenu.gsc
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
Toggle_ForgeMode()
{
self notify("StopForgeMode");
if(isDefined(self.AdvancedForgeMode) && self.AdvancedForgeMode)
Toggle_AdvancedForgeMode();
if(!isDefined(self.ForgeMode))
self.ForgeMode = false;
self.ForgeMode = !self.ForgeMode;
if(self.ForgeMode)
self thread doForgeMode();
else
self.CurrentForgeEntity = undefined;
self stealth_iprintln("Forge Mode " + (self.ForgeMode ? "^2ON" : "^1OFF"));
}
doForgeMode()
{
self notify("StopForgeMode");
self endon("StopForgeMode");
self endon("disconnect");
level endon("game_ended");
self endon("death");
self stealth_iprintln("Press ^2[{+speed_throw}]^7 To Pick Up/Drop Objects");
while(isDefined(self.ForgeMode) && self.ForgeMode)
{
while(self AdsButtonPressed())
{
trace = bulletTrace(self GetTagOrigin("j_head"), self GetTagOrigin("j_head") + anglesToForward(self GetPlayerAngles()) * 1000000, true, self);
while(self adsbuttonpressed())
{
trace["entity"] ForceTeleport(self getTagOrigin("j_head") + anglesToForward(self getPlayerAngles()) * 200);
trace["entity"] setOrigin(self getTagOrigin("j_head") + anglesToForward(self getPlayerAngles()) * 200);
trace["entity"].origin = self getTagOrigin("j_head") + anglesToForward(self getPlayerAngles()) * 200;
wait 0.05;
}
}
wait 0.05;
}
}
Toggle_AdvancedForgeMode()
{
self notify("StopAdvancedForgeMode");
self notify("StopAdvancedForgeMode_Move");
if(isDefined(self.ForgeMode) && self.ForgeMode)
Toggle_ForgeMode();
if(!isDefined(self.AdvancedForgeMode))
self.AdvancedForgeMode = false;
self.AdvancedForgeMode = !self.AdvancedForgeMode;
if(self.AdvancedForgeMode)
self thread doAdvancedForgeMode_NzV();
else
self.CurrentForgeEntity = undefined;
self stealth_iprintln("Advanced Forge Mode " + (self.AdvancedForgeMode ? "^2ON" : "^1OFF"));
}
doAdvancedForgeMode_NzV()
{
self notify("StopAdvancedForgeMode");
self notify("StopAdvancedForgeMode_Move");
self endon("StopAdvancedForgeMode");
self endon("disconnect");
self endon("death");
level endon("game_ended");
self stealth_iprintln("Press ^2[{+speed_throw}]^7 To Pick Up/Drop Entity");
self stealth_iprintln("^2Use menu ^7to do more");
while(isDefined(self.AdvancedForgeMode) && self.AdvancedForgeMode)
{
if(self adsbuttonpressed())
{
self notify("StopAdvancedForgeMode_Move");
if(isdefined(self.CurrentForgeEntity))
{
if(isdefined(self.CurrentForgeEntity.SpEffect))
{
if(self.CurrentForgeEntity.SpEffect == "Flipping")
self.CurrentForgeEntity thread doFlippingEntity();
else if(self.CurrentForgeEntity.SpEffect == "Rolling")
self.CurrentForgeEntity thread doRollingEntity();
else if(self.CurrentForgeEntity.SpEffect == "Spinning")
self.CurrentForgeEntity thread doSpinningEntity();
else if(self.CurrentForgeEntity.SpEffect == "IceSkater")
self.CurrentForgeEntity thread doIceSkaterEntity();
else if(self.CurrentForgeEntity.SpEffect == "Trap")
self.CurrentForgeEntity thread doTrapEntity();
}
self.CurrentForgeEntity = undefined;
self stealth_iprintln("Entity ^1released");
}
else
{
self.CurrentForgeEntity = self NormalisedTrace("entity");
if(isdefined(self.CurrentForgeEntity))
{
if(isdefined(self.CurrentForgeEntity.IsForgeEntity) && self.CurrentForgeEntity.IsForgeEntity)
{
self thread doMoveEntity();
self stealth_iprintln("Entity ^2picked up");
}
else
{
self.CurrentForgeEntity = undefined;
self stealth_iprintln("^1You can only pickup user spawned entity");
}
}
}
}
wait 0.3;
}
}
SetEntityEffect_NzV(Effect)
{
if(!isDefined(self.AdvancedForgeMode) || !self.AdvancedForgeMode)
{
self stealth_iprintln("^1You need to enable ^2Advanced Forge Mode ^1first");
}
else if(!isDefined(self.CurrentForgeEntity))
{
self stealth_iprintln("^1You need to pickup an entity first^7, use [{+speed_throw}] to do it");
}
else
{
if(isDefined(Effect))
{
self.CurrentForgeEntity.SpEffect = Effect;
self stealth_iprintln("Entity Effect Set To ^2" + Effect);
}
else
{
self.CurrentForgeEntity.SpEffect = "None";
self stealth_iprintln("Entity Effect Set To ^2None");
}
}
}
DeleteEntity_NzV()
{
if(!isDefined(self.AdvancedForgeMode) || !self.AdvancedForgeMode)
{
self stealth_iprintln("^1You need to enable ^2Advanced Forge Mode ^1first");
}
else if(!isDefined(self.CurrentForgeEntity))
{
self stealth_iprintln("^1You need to pickup an entity first^7, use [{+speed_throw}] to do it");
}
else
{
self notify("StopAdvancedForgeMode_Move");
self.CurrentForgeEntity notify("StopAnimEntity");
self.CurrentForgeEntity delete();
self.CurrentForgeEntity = undefined;
self stealth_iprintln("Entity ^2deleted");
}
}
DeleteAllEntity_NzV()
{
if(isDefined(self.ForgeEntity))
{
for (i = 0; i < 100; i++)
{
if(isdefined(self.ForgeEntity[i]))
{
self.ForgeEntity[i] notify("StopAnimEntity");
self.ForgeEntity[i] delete();
self.ForgeEntity[i] = undefined;
}
}
}
self stealth_iprintln("All entity ^2deleted");
}
SpawnEntity_NzV(Entity)
{
if(!isDefined(self.AdvancedForgeMode) || !self.AdvancedForgeMode)
{
self stealth_iprintln("^1You need to enable ^2Advanced Forge Mode ^1first");
}
else
{
if(isDefined(self.CurrentForgeEntity))
self.CurrentForgeEntity delete();
self notify("StopAdvancedForgeMode_Move");
self.CurrentForgeEntity = undefined;
if(!isdefined(self.ForgeEntity))
self.ForgeEntity = [];
if(!isdefined(self.CountForgeEntity))
self.CountForgeEntity = 0;
if(self.CountForgeEntity >= 99)
self.CountForgeEntity = 0;
if(isdefined(self.ForgeEntity[self.CountForgeEntity]))
{
self.ForgeEntity[self.CountForgeEntity] notify("StopAnimEntity");
self.ForgeEntity[self.CountForgeEntity] delete();
self.ForgeEntity[self.CountForgeEntity] = undefined;
}
self.ForgeEntity[self.CountForgeEntity] = spawn("script_model", self NormalisedTrace("position"));
self.CurrentForgeEntity = self.ForgeEntity[self.CountForgeEntity];
self.CountForgeEntity++;
self.CurrentForgeEntity.SpEffect = "None";
self.CurrentForgeEntity.IsForgeEntity = true;
self.CurrentForgeEntity setmodel(Entity);
self thread doMoveEntity();
self stealth_iprintln("Entity (" + Entity + ") ^2Spawned");
}
}
NormalisedTrace(type)
{
struct = self getS(9999);
return bullettrace(struct.start, struct.end, false, undefined)[type];
}
getS(scale)
{
forward = anglestoforward(self getplayerangles());
struct = spawnstruct();
struct.start = self geteye();
struct.end = struct.start + vectorScale(forward, scale);
return struct;
}
doMoveEntity()
{
self notify("StopAdvancedForgeMode_Move");
self endon("StopAdvancedForgeMode_Move");
self endon("StopAdvancedForgeMode");
self endon("disconnect");
self endon("death");
level endon("game_ended");
if(isdefined(self.CurrentForgeEntity))
{
self.CurrentForgeEntity notify("StopAnimEntity");
while(isdefined(self.CurrentForgeEntity) && isDefined(self.AdvancedForgeMode) && self.AdvancedForgeMode)
{
org = self getS(100).end;
self.CurrentForgeEntity ForceTeleport(org);
self.CurrentForgeEntity setOrigin(org);
self.CurrentForgeEntity.origin = org;
self.CurrentForgeEntity.angles = (0, self.angles[1], self.angles[2]);
wait 0.1;
}
}
}
doFlippingEntity()
{
self notify("StopAnimEntity");
self endon("StopAnimEntity");
self.SpEffect = "Flipping";
while(isdefined(self))
{
self rotateroll(-360, 1);
self waittill("rotatedone");
}
}
doRollingEntity()
{
self notify("StopAnimEntity");
self endon("StopAnimEntity");
self.SpEffect = "Rolling";
while(isdefined(self))
{
self rotatepitch(-360, 1);
self waittill("rotatedone");
}
}
doSpinningEntity()
{
self notify("StopAnimEntity");
self endon("StopAnimEntity");
self.SpEffect = "Spinning";
while(isdefined(self))
{
self rotateyaw(-360, 1);
self waittill("rotatedone");
}
}
doIceSkaterEntity()
{
self notify("StopAnimEntity");
self endon("StopAnimEntity");
self.SpEffect = "IceSkater";
while(isdefined(self))
{
self RotateYaw(3240, 9);
self MoveY(-180, 1);
wait 1;
self MoveY(180, 1);
wait 1;
self MoveX(-180, 1);
wait 1;
self MoveX(180, 1);
wait 1;
self MoveZ(90, .5);
wait .5;
self MoveZ(-90, .5);
wait .5;
self MoveY(180, 1);
wait 1;
self MoveY(-180, 1);
wait 1;
self MoveX(180, 1);
wait 1;
self MoveX(-180, 1);
wait 1;
}
}
doTrapEntity()
{
self notify("StopAnimEntity");
self endon("StopAnimEntity");
self.SpEffect = "Trap";
while(isdefined(self))
{
self RotateYaw(720, 2);
self MoveZ(120, 1);
wait 1.1;
self MoveZ(-120, 1);
wait 1.1;
if (isDefined(level._effect["def_explosion"]))
playfx(level._effect["def_explosion"], self.origin);
self playSound("evt_nuked");
earthquake(1, .4, self.origin, 512);
zombies = GetAiSpeciesArray("axis", "all");
for (i = 0; i < zombies.size; i++)
{
if(distance(zombies[i].origin, self.origin ) < 200)
{
zombies[i] dodamage(zombies[i].health + 666, zombies[i].origin);
if (isDefined(level._effect["zombie_guts_explosion"]))
playfx(level._effect["zombie_guts_explosion"], zombies[i].origin);
zombies[i] playSound("fly_riotshield_zm_impact_flesh");
wait 0.1;
}
}
wait 0.1;
}
}