1local reloadTypes = {
2 ["all"] = RELOAD_TYPE_ALL,
3
4 ["action"] = RELOAD_TYPE_ACTIONS,
5 ["actions"] = RELOAD_TYPE_ACTIONS,
6 ["act"] = RELOAD_TYPE_ACTIONS,
7
8 ["chat"] = RELOAD_TYPE_CHAT,
9 ["channel"] = RELOAD_TYPE_CHAT,
10 ["chatchannels"] = RELOAD_TYPE_CHAT,
11
12 ["config"] = RELOAD_TYPE_CONFIG,
13 ["configuration"] = RELOAD_TYPE_CONFIG,
14
15 ["creaturescript"] = RELOAD_TYPE_CREATURESCRIPTS,
16 ["creaturescripts"] = RELOAD_TYPE_CREATURESCRIPTS,
17 ["cs"] = RELOAD_TYPE_CREATURESCRIPTS,
18
19 ["events"] = RELOAD_TYPE_EVENTS,
20
21 ["global"] = RELOAD_TYPE_GLOBAL,
22
23 ["globalevent"] = RELOAD_TYPE_GLOBALEVENTS,
24 ["globalevents"] = RELOAD_TYPE_GLOBALEVENTS,
25
26 ["items"] = RELOAD_TYPE_ITEMS,
27
28 ["monster"] = RELOAD_TYPE_MONSTERS,
29 ["monsters"] = RELOAD_TYPE_MONSTERS,
30
31 ["mount"] = RELOAD_TYPE_MOUNTS,
32 ["mounts"] = RELOAD_TYPE_MOUNTS,
33
34 ["aura"] = RELOAD_TYPE_AURAS,
35 ["auras"] = RELOAD_TYPE_AURAS,
36
37 ["wing"] = RELOAD_TYPE_WINGS,
38 ["wings"] = RELOAD_TYPE_WINGS,
39
40 ["shader"] = RELOAD_TYPE_SHADERS,
41 ["shaders"] = RELOAD_TYPE_SHADERS,
42
43 ["runeffect"] = RELOAD_TYPE_RUNEEFFECTS,
44 ["runeeffects"] = RELOAD_TYPE_RUNEEFFECTS,
45
46 ["outfit"] = RELOAD_TYPE_OUTFITS,
47 ["outfits"] = RELOAD_TYPE_OUTFITS,
48
49 ["move"] = RELOAD_TYPE_MOVEMENTS,
50 ["movement"] = RELOAD_TYPE_MOVEMENTS,
51 ["movements"] = RELOAD_TYPE_MOVEMENTS,
52
53 ["npc"] = RELOAD_TYPE_NPCS,
54 ["npcs"] = RELOAD_TYPE_NPCS,
55
56 ["quest"] = RELOAD_TYPE_QUESTS,
57 ["quests"] = RELOAD_TYPE_QUESTS,
58
59 ["raid"] = RELOAD_TYPE_RAIDS,
60 ["raids"] = RELOAD_TYPE_RAIDS,
61
62 ["spell"] = RELOAD_TYPE_SPELLS,
63 ["spells"] = RELOAD_TYPE_SPELLS,
64
65 ["talk"] = RELOAD_TYPE_TALKACTIONS,
66 ["talkaction"] = RELOAD_TYPE_TALKACTIONS,
67 ["talkactions"] = RELOAD_TYPE_TALKACTIONS,
68
69 ["weapon"] = RELOAD_TYPE_WEAPONS,
70 ["weapons"] = RELOAD_TYPE_WEAPONS,
71
72 ["scripts"] = RELOAD_TYPE_SCRIPTS,
73 ["libs"] = RELOAD_TYPE_GLOBAL
74}
75
76function onSay(player, words, param)
77 if player:getGroup():getId() < 3 then
78 return false
79 end
80
81 logCommand(player, words, param)
82
83 local reloadType = reloadTypes[param:lower()]
84 if not reloadType then
85 player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Reload type not found.")
86 return false
87 end
88
89 Game.reload(reloadType)
90 player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, string.format("Reloaded %s.", param:lower()))
91 return false
92end
93