-
Notifications
You must be signed in to change notification settings - Fork 0
/
rpg_util_module.lua
59 lines (50 loc) · 1.22 KB
/
rpg_util_module.lua
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
local util_module = {}
function util_module.GetClassName(class_id)
local class_table = {
"Scout",
"Sniper",
"Soldier",
"Demoman",
"Medic",
"HWGuy",
"Pyro",
"Spy",
"Engineer",
"Civilian"
}
return class_table[class_id]
end
function util_module.RandomLimb()
local rand_int = RandomInt(1, 15)
local models = {
"models/player/soldier/soldier_leftarm.mdl",
"models/player/soldier/soldier_rightarm.mdl",
"models/player/soldier/soldier_head.mdl",
"models/player/demoman/demoman_head.mdl",
"models/player/engineer/engineer_head.mdl",
"models/player/soldier/soldier_leftleg.mdl",
"models/player/soldier/soldier_rightleg.mdl",
"models/gibs/gib1.mdl",
"models/gibs/gib2.mdl",
"models/gibs/gib3.mdl",
"models/gibs/gib4.mdl",
"models/gibs/gib5.mdl",
"models/gibs/gib6.mdl",
"models/gibs/gib7.mdl",
"models/gibs/gib8.mdl"
}
return models[rand_int]
end
function util_module.NewUlt(name1, desc1, name2, desc2, name3, desc3, name4, desc4)
local self = {}
local ult_name = {name1, name2, name3, name4}
local ult_desc = {desc1, desc2, desc3, desc4}
function self.GetUltName(int)
return ult_name[int]
end
function self.GetUltDesc(int)
return ult_desc[int]
end
return self
end
return util_module