-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccelerator.lua
More file actions
63 lines (50 loc) · 1.75 KB
/
Accelerator.lua
File metadata and controls
63 lines (50 loc) · 1.75 KB
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
local shoot_cooldown = 0
local max_shoot_cooldown = 80
local bul_id = 4
local spurMode = false
ModCS.Arms.Shoot[2] = function ()
-- Set the Bullet ID variable based on the weapon level
if ModCS.Key.Shoot(true) then
if shoot_cooldown > max_shoot_cooldown then
if (ModCS.Player.IsLookingUp()) then
if (ModCS.Player.direct == 0) then
ModCS.Bullet.Spawn(bul_id, ModCS.Player.x - 1, ModCS.Player.y - 8, 1)
else
ModCS.Bullet.Spawn(bul_id, ModCS.Player.x + 1, ModCS.Player.y - 8, 1)
end
elseif (ModCS.Player.IsLookingDown()) then
if (ModCS.Player.direct == 0) then
ModCS.Bullet.Spawn(bul_id, ModCS.Player.x - 1, ModCS.Player.y + 8, 3)
else
ModCS.Bullet.Spawn(bul_id, ModCS.Player.x + 1, ModCS.Player.y + 8, 3)
end
else
if (ModCS.Player.direct == 0) then
ModCS.Bullet.Spawn(bul_id, ModCS.Player.x - 6, ModCS.Player.y + 3, 0)
else
ModCS.Bullet.Spawn(bul_id, ModCS.Player.x + 6, ModCS.Player.y + 3, 2)
end
end
if spurMode == false then
max_shoot_cooldown = max_shoot_cooldown * 0.5
end
shoot_cooldown = 0
end
else
max_shoot_cooldown = 80
spurMode = false
bul_id = 4
end
end
function ModCS.Game.Act()
shoot_cooldown = shoot_cooldown + 1
if spurMode == false then
if max_shoot_cooldown < 3 then
bul_id = 37
spurMode = true
max_shoot_cooldown = 3
end
else
max_shoot_cooldown = 10
end
end