-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhybridClasses.lua
More file actions
419 lines (394 loc) · 20.4 KB
/
hybridClasses.lua
File metadata and controls
419 lines (394 loc) · 20.4 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
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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
local MODULE_NAME = "Eluna hybridClasses"
local MODULE_VERSION = '1.3.4'
local MODULE_AUTHOR = "Mpromptu Gaming"
print("["..MODULE_NAME.."]: Loaded, Version "..MODULE_VERSION.." Active")
-- Configuration
local MIN_ADOPTION_LEVEL = 1 -- The level at which characters can become a Hybrid
local START_LEVEL = 10 -- The level to which characters will be reset when they become Hybrids
local XP_MODIFIER = 4 -- Multiplier for Hybrid bonus XP
local XP_MODIFIER_INSTANCE = 1 -- Multiplier for Hybrid bonus XP inside an instance
-- Hybrid Class IDs
local BATTLEMAGE = 801
local HIGHWAYMAN = 401
local SHADOWWARRIOR = 101
-- Gossip text
local BATTLEMAGE_INTRO_TEXT = "Congratulations, you are now a Battlemage!\n\n"..
"Your new Hybrid Class combines all the abilities of a Mage, with several new abilities that make you a formidable\nmelee fighter."..
"Your Stamina and Armor have been increased, and you will be able to dual-wield one-handed weapons.\n\n"..
"You also start with two new abilities: Shoulder Charge and Arcane Cleave. Shoulder Charge allows you to rush an opponent and stun them with your impact."..
"Arcane Cleave allows you to strike multiple opponents with a single blow.\n\n"..
"To speed you in your quests, cast Mount Speed+ to enjoy a super-fast riding experience!\n\n"..
"In addition to these abilities, you will gain additional skills as you level up. And level up you will, as your XP will accrue much faster as a Hybrid Class.\n\n"..
"Now, go forth, and become legend!"
local gear = {
-- Battlemage (801)
{class = 801, entry = 42985, pos = EQUIPMENT_SLOT_SHOULDERS}, -- Tattered Dreadmist Mantle
{class = 801, entry = 48691, pos = EQUIPMENT_SLOT_CHEST}, -- Tattered Dreadmist Robe
{class = 801, entry = 4309, pos = EQUIPMENT_SLOT_LEGS}, -- Handstitched Linen Britches
{class = 801, entry = 2283, pos = EQUIPMENT_SLOT_WAIST}, -- Rat Cloth Belt
{class = 801, entry = 4768, pos = EQUIPMENT_SLOT_HANDS}, -- Adept's Gloves
{class = 801, entry = 3307, pos = EQUIPMENT_SLOT_FEET}, -- Barbaric Cloth Boots
{class = 801, entry = 4308, pos = EQUIPMENT_SLOT_WRISTS}, -- Green Linen Bracers
{class = 801, entry = 2308, pos = EQUIPMENT_SLOT_BACK}, -- Fine Leather Cloak
{class = 801, entry = 42945, pos = EQUIPMENT_SLOT_MAINHAND}, -- Venerable Dal'Rend's Sacred Charge
{class = 801, entry = 44096, pos = EQUIPMENT_SLOT_OFFHAND}, -- Battleworn Thrash Blade
{class = 801, entry = 5069, pos = EQUIPMENT_SLOT_RANGED}, -- Stillpine Stinger
{class = 801, entry = 50255, pos = EQUIPMENT_SLOT_FINGER1}, -- Dread Pirate Ring
{class = 801, entry = 42991, pos = EQUIPMENT_SLOT_TRINKET1}, -- Swift Hand of Justice
{class = 801, entry = 44098, pos = EQUIPMENT_SLOT_TRINKET2}, -- Inherited Insignia of the Alliance
{class = 801, entry = 44097, pos = EQUIPMENT_SLOT_TRINKET2}, -- Inherited Insignia of the Horde
-- Highwayman (401)
{class = 401, entry = 42952, pos = EQUIPMENT_SLOT_SHOULDERS}, -- Stained Shadowcraft Shoulders
{class = 401, entry = 48689, pos = EQUIPMENT_SLOT_CHEST}, -- Stained Shadowcraft Tunic
{class = 401, entry = 4242, pos = EQUIPMENT_SLOT_LEGS}, -- Embossed Leather Pants
{class = 401, entry = 6558, pos = EQUIPMENT_SLOT_WAIST}, -- Bard's Belt
{class = 401, entry = 4239, pos = EQUIPMENT_SLOT_HANDS}, -- Embossed Leather Gloves
{class = 401, entry = 2309, pos = EQUIPMENT_SLOT_FEET}, -- Embossed Leather Boots
{class = 401, entry = 7281, pos = EQUIPMENT_SLOT_WRISTS}, -- Light Leather Bracers
{class = 401, entry = 2310, pos = EQUIPMENT_SLOT_BACK}, -- Embossed Leather Cloak
{class = 401, entry = 42944, pos = EQUIPMENT_SLOT_MAINHAND}, -- Balanced Heartseeker
{class = 401, entry = 42944, pos = EQUIPMENT_SLOT_OFFHAND}, -- Balanced Heartseeker
{class = 401, entry = 44093, pos = EQUIPMENT_SLOT_RANGED}, -- Upgraded Dwarven Hand Cannon
{class = 401, entry = 50255, pos = EQUIPMENT_SLOT_FINGER1}, -- Dread Pirate Ring
{class = 401, entry = 42991, pos = EQUIPMENT_SLOT_TRINKET1}, -- Swift Hand of Justice
{class = 401, entry = 44098, pos = EQUIPMENT_SLOT_TRINKET2}, -- Inherited Insignia of the Alliance
{class = 401, entry = 44097, pos = EQUIPMENT_SLOT_TRINKET2}, -- Inherited Insignia of the Horde
-- Shadow Warrior (101)
{class = 101, entry = 3427, pos = EQUIPMENT_SLOT_BODY}, -- Stylish Black Shirt
{class = 101, entry = 42949, pos = EQUIPMENT_SLOT_SHOULDERS}, -- Polished Spaulders of Valor
{class = 101, entry = 48685, pos = EQUIPMENT_SLOT_CHEST}, -- Polished Breastplate of Valor
{class = 101, entry = 2978, pos = EQUIPMENT_SLOT_LEGS}, -- Veteran Leggings
{class = 101, entry = 15492, pos = EQUIPMENT_SLOT_WAIST}, -- Bloodspattered Sash
{class = 101, entry = 2980, pos = EQUIPMENT_SLOT_HANDS}, -- Veteran Gloves
{class = 101, entry = 3302, pos = EQUIPMENT_SLOT_FEET}, -- Brackwater Boots
{class = 101, entry = 6550, pos = EQUIPMENT_SLOT_WRISTS}, -- Soldier's Wristguards
{class = 101, entry = 15309, pos = EQUIPMENT_SLOT_BACK}, -- Feral Cloak
{class = 101, entry = 42945, pos = EQUIPMENT_SLOT_MAINHAND}, -- Venerable Dal'Rend's Sacred Charge
{class = 101, entry = 44096, pos = EQUIPMENT_SLOT_OFFHAND}, -- Battleworn Thrash Blade
{class = 101, entry = 50255, pos = EQUIPMENT_SLOT_FINGER1}, -- Dread Pirate Ring
{class = 101, entry = 42991, pos = EQUIPMENT_SLOT_TRINKET1}, -- Swift Hand of Justice
{class = 101, entry = 44098, pos = EQUIPMENT_SLOT_TRINKET2}, -- Inherited Insignia of the Alliance
{class = 101, entry = 44097, pos = EQUIPMENT_SLOT_TRINKET2}, -- Inherited Insignia of the Horde
}
local spells = {
-- Battlemage
-- Level 10
{class = 801, level = 10, type = 0, entry = 12753, name = "Anticipation"},
{class = 801, level = 10, type = 0, entry = 50573, name = "Arcane Cleave"},
{class = 801, level = 10, type = 0, entry = 61222, name = "Armored to the Teeth"},
{class = 801, level = 10, type = 0, entry = 16492, name = "Blood Craze"},
{class = 801, level = 10, type = 0, entry = 73313, name = "Crimson Deathcharger"},
{class = 801, level = 10, type = 0, entry = 12856, name = "Cruelty"},
{class = 801, level = 10, type = 0, entry = 674, name = "Dual Wield"},
{class = 801, level = 10, type = 0, entry = 13852, name = "Dual Wield Specialization (Damage)"},
{class = 801, level = 10, type = 0, entry = 30819, name = "Dual Wield Specialization (Hit Rating)"},
{class = 801, level = 10, type = 0, entry = 16542, name = "One-Handed Weapon Specialization"},
{class = 801, level = 10, type = 0, entry = 29592, name = "Precision"},
{class = 801, level = 10, type = 0, entry = 31994, name = "Shoulder Charge"},
{class = 801, level = 10, type = 0, entry = 46865, name = "Strength of Arms"},
{class = 801, level = 10, type = 0, entry = 12815, name = "Sword Specialization (Extra Attack)"},
{class = 801, level = 10, type = 0, entry = 12764, name = "Toughness (Armor 1)"},
{class = 801, level = 10, type = 0, entry = 20147, name = "Toughness (Armor 2)"},
{class = 801, level = 10, type = 0, entry = 49789, name = "Toughness (Armor 3)"},
{class = 801, level = 10, type = 0, entry = 16309, name = "Toughness (Stamina)"},
{class = 801, level = 10, type = 0, entry = 29144, name = "Vitality"},
{class = 801, level = 10, type = 3, entry = 45, name = "Challenger"},
-- Level 20
{class = 801, level = 20, type = 0, entry = 46227, name = "Medallion of Immunity"},
{class = 801, level = 20, type = 0, entry = 15734, name = "Summon"},
{class = 801, level = 20, type = 0, entry = 8078, name = "Thunderclap"},
-- Level 30
{class = 801, level = 30, type = 0, entry = 55706, name = "Sinister Shield"},
-- Level 40
{class = 801, level = 40, type = 0, entry = 55866, name = "Thunderblade"},
{class = 801, level = 40, type = 3, entry = 44, name = "Rival"},
-- Level 50
{class = 801, level = 50, type = 0, entry = 16170, name = "Bloodlust"},
-- Level 60
{class = 801, level = 60, type = 0, entry = 35265, name = "Fire Shield"},
{class = 801, level = 60, type = 3, entry = 163, name = "Vanquisher"},
-- Level 70
{class = 801, level = 70, type = 0, entry = 56715, name = "Plunder Health"},
-- Level 80
{class = 801, level = 80, type = 0, entry = 70306, name = "Frostblade"},
{class = 801, level = 80, type = 3, entry = 27, name = "Warlord"},
-- Highwayman
-- Level 10
{class = 401, level = 10, type = 0, entry = 19434, name = "Aimed Shot (1)"},
{class = 401, level = 10, type = 0, entry = 75, name = "Auto Shot"},
{class = 401, level = 10, type = 0, entry = 4900, name = "Gun Mastery"},
{class = 401, level = 10, type = 0, entry = 19431, name = "Lethal Shots"},
{class = 401, level = 10, type = 0, entry = 19490, name = "Mortal Shots"},
{class = 401, level = 10, type = 0, entry = 53254, name = "Wild Quiver Auto Shot"},
{class = 401, level = 10, type = 0, entry = 55531, name = "Mechano-Hog"},
{class = 401, level = 10, type = 0, entry = 19506, name = "Trueshot Aura"},
{class = 401, level = 10, type = 3, entry = 45, name = "Challenger"},
-- Level 20
{class = 401, level = 20, type = 0, entry = 20900, name = "Aimed Shot (2)"},
{class = 401, level = 20, type = 0, entry = 19883, name = "Track Humanoids"},
-- Level 30
{class = 401, level = 30, type = 0, entry = 20901, name = "Aimed Shot (3)"},
{class = 401, level = 30, type = 0, entry = 61508, name = "Disengage"},
{class = 401, level = 30, type = 0, entry = 79187, name = "Multi-Shadow Shot"},
-- Level 40
{class = 401, level = 40, type = 0, entry = 20902, name = "Aimed Shot (4)"},
{class = 401, level = 40, type = 0, entry = 53301, name = "Explosive Shot (1)"},
{class = 401, level = 40, type = 3, entry = 44, name = "Rival"},
-- Level 50
{class = 401, level = 50, type = 0, entry = 20903, name = "Aimed Shot (5)"},
{class = 401, level = 50, type = 0, entry = 60051, name = "Explosive Shot (2)"},
-- Level 60
{class = 401, level = 60, type = 0, entry = 20904, name = "Aimed Shot (6)"},
{class = 401, level = 60, type = 0, entry = 60052, name = "Explosive Shot (3)"},
{class = 401, level = 60, type = 3, entry = 163, name = "Vanquisher"},
-- Level 70
{class = 401, level = 70, type = 0, entry = 27065, name = "Aimed Shot (7)"},
{class = 401, level = 70, type = 0, entry = 60053, name = "Explosive Shot (4)"},
-- Leel 80
{class = 401, level = 80, type = 3, entry = 27, name = "Warlord"},
-- Shadow Warrior
-- Level 10
{class = 101, level = 10, type = 0, entry = 674, name = "Dual Wield"},
{class = 101, level = 10, type = 0, entry = 23246, name = "Purple Skeletal Warhorse"},
{class = 101, level = 10, type = 0, entry = 30479, name = "Resist Shadow"},
{class = 101, level = 10, type = 0, entry = 60449, name = "Shadowform"},
{class = 101, level = 10, type = 0, entry = 36563, name = "Shadowstep"},
{class = 101, level = 10, type = 0, entry = 36517, name = "Shadowsurge"},
{class = 101, level = 10, type = 3, entry = 45, name = "Challenger"},
-- Level 20
{class = 101, level = 20, type = 0, entry = 69492, name = "Shadow Cleave"},
{class = 101, level = 20, type = 0, entry = 37500, name = "Shadow Spiral"},
-- Level 30
{class = 101, level = 30, type = 0, entry = 31224, name = "Cloak of Shadows"},
{class = 101, level = 30, type = 0, entry = 32943, name = "Phasing Invisibility"},
-- Level 40
{class = 101, level = 40, type = 3, entry = 44, name = "Rival"},
-- Level 50
{class = 101, level = 50, type = 0, entry = 38226, name = "Black Cleave"},
-- Level 60
{class = 101, level = 60, type = 3, entry = 163, name = "Vanquisher"},
-- Level 70
-- Level 80
{class = 101, level = 80, type = 3, entry = 27, name = "Warlord"},
}
local function checkSpells(player, hybridClass)
local level = player:GetLevel()
for i, v in ipairs(spells) do
if v.class==hybridClass and v.level<=level then
if v.type==0 then
if not player:HasSpell(v.entry) then
player:LearnSpell(v.entry)
player:SendNotification("You have learned a new Hybrid Class ability: "..v.name)
end
elseif v.type==1 then
player:CastSpell(player, v.entry, true)
player:SendNotification("You have learned a new Hybrid Class ability: "..v.name)
elseif v.type==2 and player:HasItem(v.entry)==false then
player:AddItem(v.entry)
player:SendNotification("You have received a new Hybrid Class item: "..v.name)
elseif v.type==3 then
if not player:HasTitle(v.entry) then
player:SetKnownTitle(v.entry)
player:SendNotification("You have received a new Hybrid Class title: "..v.name)
end
end
end
end
end
local function dbInsertHybridClass(player, hybridClass)
if GetHybridClass(player) == 0 then
CharDBExecute("INSERT INTO eluna_hybrid_classes(guid,class) VALUES("..tostring(player:GetGUID())..","..hybridClass..");")
return true
else
return false
end
end
local function setEquipment(player, hybridClass)
for i = 0, 17 do
local item = player:GetItemByPos(255, i)
if item then
player:AddItem(item:GetEntry())
player:RemoveItem(item, 1)
end
end
for i, v in ipairs(gear) do
if v.class == hybridClass then
player:EquipItem(v.entry, v.pos)
end
end
if hybridClass == HIGHWAYMAN then
player:AddItem(2519, 1000)
player:AddItem(6947, 20)
player:AddItem(2892, 20)
end
end
function fixDbDupes(player, hybridClass)
if hybridClass == 801 then
CharDBExecute("DELETE FROM character_skills WHERE guid = "..tostring(player:GetGUID()).." and skill = 118")
end
if hybridClass == 101 then
CharDBExecute("DELETE FROM character_skills WHERE guid = "..tostring(player:GetGUID()).." and skill = 674")
end
end
function GetHybridClass(player)
local Query = CharDBQuery("SELECT class FROM eluna_hybrid_classes WHERE guid = "..tostring(player:GetGUID()).." LIMIT 1;")
if Query then
return Query:GetUInt32(0)
else
return 0
end
end
function GrantHybridClass(player, hybridClass)
if GetHybridClass(player) ~= 0 then
player:SendBroadcastMessage("You are already a Hybrid.")
return false
end
if player:GetLevel() < MIN_ADOPTION_LEVEL then
player:SendBroadcastMessage("You are too inexperienced to become a Hybrid.")
return false
end
if hybridClass == BATTLEMAGE then
if player:GetClass() ~= 8 then
player:SendBroadcastMessage("Only a Mage can become a Battlemage.")
return false
end
end
if hybridClass == HIGHWAYMAN then
if player:GetClass() ~= 4 then
player:SendBroadcastMessage("Only a Rogue can become a Highwayman.")
return false
end
end
if hybridClass == SHADOWWARRIOR then
if player:GetClass() ~= 1 then
player:SendBroadcastMessage("Only a Warrior can become a Shadow Warrior.")
return false
end
end
local result = dbInsertHybridClass(player, hybridClass)
if result then
UnlearnClassSpells(player, START_LEVEL+1, 80)
LearnClassSpells(player, 0, START_LEVEL)
if player:GetLevel() ~= START_LEVEL then
player:SetLevel(START_LEVEL)
end
checkSpells(player, hybridClass)
setEquipment(player, hybridClass)
print("["..MODULE_NAME.."]: "..player:GetName().." has been granted Hybrid status.")
player:PlayDirectSound(8960, player)
player:SendAddonMessage("HybridClassHelper", "Grant "..tostring(hybridClass), 7, player)
HybridSetTransmog(player, hybridClass)
fixDbDupes(player, hybridClass)
end
end
function HybridSetTransmog(player, hybridClass)
--hybridClass = GetHybridClass(player)
if hybridClass == BATTLEMAGE then
player:SendUnitSay("#transmog nude", 0)
player:SendUnitSay("#transmog 04 25822", 0)
player:SendUnitSay("#transmog 05 10404", 0)
player:SendUnitSay("#transmog 06 14045", 0)
player:SendUnitSay("#transmog 07 43839", 0)
elseif hybridClass == HIGHWAYMAN then
player:SendUnitSay("#transmog nude", 0)
player:SendUnitSay("#transmog 04 7950", 0)
player:SendUnitSay("#transmog 06 7949", 0)
player:SendUnitSay("#transmog 07 18424", 0)
player:SendUnitSay("#transmog 09 1944", 0)
elseif hybridClass == SHADOWWARRIOR then
player:SendUnitSay("#transmog nude", 0)
player:SendUnitSay("#transmog 03 3427", 0)
player:SendUnitSay("#transmog 04 30258", 0)
player:SendUnitSay("#transmog 06 25580", 0)
player:SendUnitSay("#transmog 07 25610", 0)
player:SendUnitSay("#transmog 09 25478", 0)
player:SendUnitSay("#transmog 15 30278", 0)
player:SendUnitSay("#transmog 16 30278", 0)
end
end
local function onChatMessage(event, player, msg, _, lang)
if (msg:find("#grant battlemage") == 1) and player:GetGMRank() > 0 then
if GrantHybridClass(player, BATTLEMAGE) then
player:SendBroadcastMessage("You are now a Battlemage!")
end
return false
end
if (msg:find("#grant highwayman") == 1) and player:GetGMRank() > 0 then
if GrantHybridClass(player, HIGHWAYMAN) then
player:SendBroadcastMessage("You are now a Highwayman!")
end
return false
end
if (msg:find("#grant shadowwarrior") == 1) and player:GetGMRank() > 0 then
if GrantHybridClass(player, SHADOWWARRIOR) then
player:SendBroadcastMessage("You are now a Shadow Warrior!")
end
return false
end
if (msg:find("#set equipment") == 1) and player:GetGMRank() > 0 then
setEquipment(player, GetHybridClass(player))
return false
end
if (msg:find("#hybrid unflag") == 1) and player:GetGMRank() > 0 then
CharDBExecute("DELETE FROM eluna_hybrid_classes WHERE guid = "..tostring(player:GetGUID()))
player:SendBroadcastMessage("Your Hybrid status has been removed.")
return false
end
if (msg:find("#hybrid bar") == 1) and player:GetGMRank() > 0 then
player:SendAddonMessage("HybridClassHelper", "Grant "..tostring(GetHybridClass(player)), 0x07, player)
player:SendBroadcastMessage("Action Bar reset.")
return false
end
if (msg:find("#hybrid mog") == 1) and player:GetGMRank() > 0 then
local hybridClass = GetHybridClass(player)
HybridSetTransmog(player, hybridClass)
return false
end
if (msg:find("#instance") == 1) and player:GetGMRank() > 0 then
player:SendBroadcastMessage("Instance: "..tostring(player:GetInstanceId()))
return false
end
end
local function onGainXP(event, player, amount, victim)
if GetHybridClass(player) ~= 0 then
if player:GetInstanceId() == 0 then
return amount * XP_MODIFIER
else
return amount * XP_MODIFIER_INSTANCE
end
end
end
local function onLevelUp(event, player, oldLevel)
local hybridClass = GetHybridClass(player)
if hybridClass ~= 0 then
checkSpells(player, hybridClass)
end
end
local function onLogout(event, player)
-- Check for Dual Wield, delete from table to avoid SQL error on logout
fixDbDupes(player, GetHybridClass(player))
-- if GetHybridClass(player) == 801 then
-- CharDBExecute("DELETE FROM character_skills WHERE guid = "..tostring(player:GetGUID()).." and skill = 118")
-- end
-- if GetHybridClass(player) == 101 then
-- CharDBExecute("DELETE FROM character_skills WHERE guid = "..tostring(player:GetGUID()).." and skill = 674")
-- end
end
local function onDelete(event, guid)
CharDBExecute("DELETE FROM eluna_hybrid_classes WHERE guid = "..tostring(guid))
end
CharDBQuery([[
CREATE TABLE IF NOT EXISTS `eluna_hybrid_classes` (
`guid` INT(10) UNSIGNED NOT NULL COMMENT 'Character GUID',
`class` INT(10) UNSIGNED NOT NULL COMMENT 'Hybrid Class',
PRIMARY KEY (`guid`)
)
COMMENT='version 4.0'
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;
]])
RegisterPlayerEvent(4, onLogout)
RegisterPlayerEvent(12, onGainXP)
RegisterPlayerEvent(13, onLevelUp)
RegisterPlayerEvent(18, onChatMessage)
RegisterPlayerEvent(2, onDelete)