-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathemotes.lua
More file actions
180 lines (159 loc) · 6.33 KB
/
emotes.lua
File metadata and controls
180 lines (159 loc) · 6.33 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
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
EMOTE_TYPE =
{
EMOTION = 0,
ACTION = 1,
UNLOCKABLE = 2,
}
local EMOTES =
{
["wave"] = {
aliases = { "waves", "hi", "bye", "goodbye" },
data = { anim = { "emoteXL_waving1", "emoteXL_waving2", "emoteXL_waving3" }, randomanim = true, sitting = true, mounted = true },
type = EMOTE_TYPE.EMOTION,
},
["rude"] = {
aliases = { "goaway", "threaten" },
data = { anim = { "emoteXL_waving4" }, randomanim = true, sitting = true, mounted = true, mountsound = "angry" },
type = EMOTE_TYPE.EMOTION,
},
["happy"] = {
data = { anim = "emoteXL_happycheer", sitting = true, mounted = true, mountsound = "yell" },
type = EMOTE_TYPE.EMOTION,
},
["angry"] = {
aliases = { "anger", "grimace", "grimaces", "frustrate", "frustrated", "frustration" },
data = { anim = "emoteXL_angry", sitting = true, mounted = true, mountsound = "angry", mountsounddelay = 7 * FRAMES },
type = EMOTE_TYPE.EMOTION,
},
["cry"] = {
aliases = { "sad", "cries" },
data = { anim = "emoteXL_sad", fx = "tears", fxdelay = 17 * FRAMES, sitting = true, mounted = true, mountsound = "grunt" },
type = EMOTE_TYPE.EMOTION,
},
["no"] = {
aliases = { "annoyed", "annoy", "shakehead", "shake", "confuse", "confused" },
data = { anim = "emoteXL_annoyed", sitting = true, mounted = true, mountsound = "grunt", mountsounddelay = 12 * FRAMES },
type = EMOTE_TYPE.EMOTION,
},
["joy"] = {
aliases = { "click", "heelclick", "heels", "celebrate", "celebration" },
data = { anim = "research", fx = false, mounted = true, mountsound = "curious" },
type = EMOTE_TYPE.EMOTION,
},
["dance"] = {
data = { anim = { "emoteXL_pre_dance0", "emoteXL_loop_dance0" }, loop = true, fx = false, beaver = true, moose = true, goose = true, mounted = true, mountsound = "curious", tags = { "dancing" } },
type = EMOTE_TYPE.ACTION,
},
["sit"] = {
data = { anim = { { "emote_pre_sit2", "emote_loop_sit2" }, { "emote_pre_sit4", "emote_loop_sit4" } }, randomanim = true, loop = true, fx = false, mounted = true, mountsound = "walk", mountsounddelay = 6 * FRAMES },
type = EMOTE_TYPE.ACTION,
},
["squat"] = {
data = { anim = { { "emote_pre_sit1", "emote_loop_sit1" }, { "emote_pre_sit3", "emote_loop_sit3" } }, randomanim = true, loop = true, fx = false, mounted = true, mountsound = "walk", mountsounddelay = 10 * FRAMES },
type = EMOTE_TYPE.ACTION,
},
["bonesaw"] = {
aliases = { "ready", "goingnowhere", "playtime", "threeminutes" },
data = { anim = "emoteXL_bonesaw", mounted = true, mountsound = "angry" },
type = EMOTE_TYPE.ACTION,
},
["facepalm"] = {
aliases = { "doh", "slapintheface" },
data = { anim = "emoteXL_facepalm", sitting = true, mounted = true, mountsound = "grunt" },
type = EMOTE_TYPE.ACTION,
},
["kiss"] = {
aliases = { "blowkiss", "smooch", "mwa", "mwah" },
data = { anim = "emoteXL_kiss", sitting = true, mounted = true, mountsound = "curious" },
type = EMOTE_TYPE.EMOTION,
},
["pose"] = {
aliases = { "strut", "strikepose" },
data = { anim = "emote_strikepose", zoom = true, soundoverride = "pose", mounted = true },
type = EMOTE_TYPE.ACTION,
},
["toast"] = {
aliases = { "toasting", "cheers" },
data = { anim = { "emote_pre_toast", "emote_loop_toast" }, sitting = true, mounted = true, soundoverride = "pose", loop = true, fx = false, sounddelay = 0.55, },
type = EMOTE_TYPE.ACTION,
},
["pet"] = {
aliases = { "pat" },
data = {
anim = { "pet_small" },
mounted = true,
mountonly = true,
mountsound = "curious",
mountsounddelay = 25 * FRAMES,
soundoverride = "pose",
sounddelay = 11 * FRAMES,
fx = false,
},
type = EMOTE_TYPE.ACTION,
},
["bigpet"] = {
aliases = { "bigpat" },
data = {
anim = { "pet_big" },
mounted = true,
mountonly = true,
mountsound = "curious",
mountsounddelay = 25 * FRAMES,
soundoverride = "pose",
sounddelay = 11 * FRAMES,
fx = false,
zoom = true,
},
type = EMOTE_TYPE.ACTION,
},
}
local function CreateEmoteCommand(emotedef)
return {
aliases = emotedef.aliases,
prettyname = function(command) return string.format(STRINGS.UI.BUILTINCOMMANDS.EMOTES.PRETTYNAMEFMT, FirstToUpper(command.name)) end,
desc = function() return STRINGS.UI.BUILTINCOMMANDS.EMOTES.DESC end,
permission = COMMAND_PERMISSION.USER,
params = {},
emote = true,
slash = true,
usermenu = false,
servermenu = false,
vote = false,
serverfn = function(params, caller)
local player = UserToPlayer(caller.userid)
if player ~= nil then
player:PushEvent("emote", emotedef.data)
end
end,
displayname = emotedef.displayname
}
end
for k, v in pairs(EMOTES) do
AddUserCommand(k, CreateEmoteCommand(v))
end
--------------------------------------------------------------------------
for item_type, v in pairs(EMOTE_ITEMS) do
local cmd_data = CreateEmoteCommand(v)
cmd_data.requires_item_type = item_type
cmd_data.hasaccessfn = function(command, caller)
if caller == nil or TheWorld == nil then
return false
end
if v.data and v.data.needshat then
local player = UserToPlayer(caller.userid)
if player == nil or player.replica.inventory == nil or player.replica.inventory:GetEquippedItem(EQUIPSLOTS.HEAD) == nil then
return false
end
end
if TheWorld.ismastersim then
return TheInventory:CheckClientOwnership(caller.userid, item_type)
end
return caller.userid == TheNet:GetUserID() and TheInventory:CheckOwnership(item_type)
end
AddUserCommand(v.cmd_name, cmd_data)
end
function GetCommonEmotes()
return EMOTES
end
--------------------------------------------------------------------------
CreateEmoteCommand = nil