-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRedHelper.lua
More file actions
31 lines (27 loc) · 918 Bytes
/
Copy pathRedHelper.lua
File metadata and controls
31 lines (27 loc) · 918 Bytes
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
debug = true;
function log(...)
if debug then
print(...);
end
end
local helloMessage = 'Hello! I\'m your helper.\n' ..
'You can chose addons for enable or disable it in instances or in world.\n' ..
'You can enable or disable auto repair function.'
local RedHelperMainFrame = CreateFrame('Frame', 'RedHelperMainFrame')
createText('$parentFontString', RedHelperMainFrame, helloMessage, { 'CENTER' })
RedHelperMainFrame:SetScript('OnEvent', function(_, event)
if event == 'PLAYER_LOGIN' then
addPanel(RedHelperMainFrame, 'RedHelper');
print('RedHelper loaded! For open addons window use command /redhelper');
end
end);
RedHelperMainFrame:RegisterEvent('PLAYER_LOGIN');
SLASH_REDHELPER1 = '/redhelper';
function SlashCmdList.REDHELPER()
debug = not debug;
if debug then
print('Debug enabled')
else
print('Debug disabled')
end
end