Thread Tools Display Modes
09-06-16, 05:13 AM   #1
bluefox100
A Kobold Labourer
Join Date: Sep 2016
Posts: 1
Please help fix. It is not the Add-on function.

Hello.
I can not English well.
But still such a question.
First of all, I am sorry to the difficult ask.
I am currently creating an integrated add-on.
However, when you create an integrated add-on, really important add-on is not working.
7.0.3 not have any patches subsequent operations.
This add-on is, PopupDialogs when you first install the "/ reflux switch profile" and then the function that will come calling.
However, I do not know what to how to fix.
I do not know what you say to learn not to LUA language.
Lifted data is compressed.
Modified to be able to operate please ...!
Thank you. : D

!DevilUI
Lua Code:
  1. local L = GetLocale()
  2. local index = GetCurrentResolution();
  3. local resolution = select(index, GetScreenResolutions());
  4. local NORMAL = (resolution == "720x576"
  5.         or resolution == "800x600"
  6.         or resolution == "1024x768"
  7.         or resolution == "1152x864"
  8.         or resolution == "1280x960"
  9.         or resolution == "1280x1024"
  10.         or resolution == "1400x1050"
  11.         or resolution == "1600x1200"
  12.         or resolution == "1680x1200"
  13.         or resolution == "1920x1440"
  14.         or resolution == "2048x1536"
  15.         or resolution == "3200x2400");
  16.  
  17. local LOW = (resolution == "720x576"
  18.         or resolution == "800x600"
  19.         or resolution == "1024x768"
  20.         or resolution == "1280x768"
  21.         or resolution == "1280x720"
  22.         or resolution == "1280x800"
  23.         or resolution == "1920x1080"
  24.         or resolution == "2048x1152"
  25.         or resolution == "2560x1440"
  26.         or resolution == "2880x1620"
  27.         or resolution == "3200x1800"
  28.         or resolution == "3840x2160"
  29.         or resolution == "4096x2160");
  30.  
  31. local MEDIUM = (resolution == "1152x864"
  32.         or resolution == "1360x768"
  33.         or resolution == "1366x768"
  34.         or resolution == "1440x900"
  35.         or resolution == "1680x1050"
  36.         or resolution == "1920x1200"
  37.         or resolution == "2560x1600"
  38.         or resilution == "2880x1800"
  39.         or resolution == "3840x2400");
  40.        
  41. local function installNormal()
  42.     ChatFrame1EditBox:SetText("/reflux switch ShapaNormal");
  43.     ChatEdit_SendText( ChatFrame1EditBox );
  44.     Devilinstall = true
  45. end
  46.  
  47. local function installWide()
  48.     ChatFrame1EditBox:SetText("/reflux switch ShapaWide");
  49.     ChatEdit_SendText( ChatFrame1EditBox );
  50.     Devilinstall = true
  51. end
  52.  
  53. local function chatset()
  54.     FCF_ResetChatWindows()
  55.     FCF_SetLocked(ChatFrame1, 1)
  56.     FCF_DockFrame(ChatFrame2)
  57.     FCF_SetLocked(ChatFrame2, 1)
  58.     ChatFrame1:Show()
  59.    
  60.     for i = 1, NUM_CHAT_WINDOWS do
  61.         local frame = _G[format("ChatFrame%s", i)]
  62.         local chatFrameId = frame:GetID()
  63.         local chatName = FCF_GetChatWindowInfo(chatFrameId)            
  64.         if i == 1 then
  65.             frame:ClearAllPoints()
  66.             frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 8, 166)
  67.             frame:SetHeight(200)
  68.             frame:SetWidth(400)
  69.             frame:Show()
  70.         end
  71.     end
  72.    
  73.     FCF_SavePositionAndDimensions(ChatFrame1)
  74.     FCF_StopDragging(ChatFrame1)
  75.     ChatFrame1:SetUserPlaced(true)
  76.     FCF_SetChatWindowFontSize(self, ChatFrame1, 14)
  77.     FCF_SetChatWindowFontSize(self, ChatFrame3, 14)
  78.     FCF_SetWindowAlpha(ChatFrame1, 0)
  79.     FCF_SetWindowAlpha(ChatFrame2, 0)
  80.     FCF_SetWindowAlpha(ChatFrame3, 0)          
  81.     ToggleChatColorNamesByClassGroup(true, "SAY")
  82.     ToggleChatColorNamesByClassGroup(true, "EMOTE")
  83.     ToggleChatColorNamesByClassGroup(true, "YELL")
  84.     ToggleChatColorNamesByClassGroup(true, "GUILD")
  85.     ToggleChatColorNamesByClassGroup(true, "OFFICER")
  86.     ToggleChatColorNamesByClassGroup(true, "GUILD_ACHIEVEMENT")
  87.     ToggleChatColorNamesByClassGroup(true, "ACHIEVEMENT")
  88.     ToggleChatColorNamesByClassGroup(true, "WHISPER")
  89.     ToggleChatColorNamesByClassGroup(true, "PARTY")
  90.     ToggleChatColorNamesByClassGroup(true, "PARTY_LEADER")
  91.     ToggleChatColorNamesByClassGroup(true, "RAID")
  92.     ToggleChatColorNamesByClassGroup(true, "RAID_LEADER")
  93.     ToggleChatColorNamesByClassGroup(true, "RAID_WARNING")
  94.     ToggleChatColorNamesByClassGroup(true, "INSTANCE_CHAT")
  95.     ToggleChatColorNamesByClassGroup(true, "INSTANCE_CHAT_LEADER") 
  96.     ChangeChatColor("CHANNEL5", 195/255, 230/255, 232/255)
  97.     ChangeChatColor("CHANNEL6", 55/255, 172/255, 92/255)
  98.  
  99.     StaticPopup_Show("DEVILSETTING")
  100.     if (NORMAL) then
  101.         StaticPopup_Show("NORMAL")
  102.     else
  103.         StaticPopup_Show("WIDE")
  104.     end
  105. end
  106.  
  107. local function installdevil()
  108.     if (NORMAL) then
  109.         StaticPopup_Show("NORMAL")
  110.     else
  111.         StaticPopup_Show("WIDE")
  112.     end
  113. end
  114.    
  115. StaticPopupDialogs["NORMAL"] = {
  116.     text = "Hello. Start DevilUI.",
  117.     button1 = "OK",
  118.     OnAccept = installNormal,
  119.     timeout = 0,
  120.     whileDead = 1,
  121. }
  122. StaticPopupDialogs["WIDE"] = {
  123.     text = "Hello. Start DevilUI.",
  124.     button1 = "OK",
  125.     OnAccept = installWide,
  126.     timeout = 0,
  127.     whileDead = 1,
  128. }
  129. StaticPopupDialogs["CHATSETTING"] = {
  130.     text = "Are you sure you want to initialize the settings of the chat?\n\n(Please for the first time only person to install initialize the DevilUI.)",
  131.     button1 = ACCEPT,
  132.     button2 = CANCEL,
  133.     OnAccept = chatset,
  134.     OnCancel = installdevil,
  135.     timeout = 0,
  136.     whileDead = 1,
  137. }
  138. StaticPopupDialogs["DEVILSETTING"] = {
  139.     text = "※Personal settings of the chat window is available after re-connection.\n(If you change before re-connection, settings will be initialized.).",
  140.     timeout = 0,
  141.     showAlert = 1,
  142.     whileDead = 1,
  143.     hideOnEscape = 1
  144. }
  145.  
  146. local DevilUIcheckinstall = CreateFrame("Frame")
  147.     DevilUIcheckinstall:RegisterEvent("PLAYER_ENTERING_WORLD")
  148.     DevilUIcheckinstall:SetScript("OnEvent", function(self, event)
  149.     self:UnregisterEvent("PLAYER_ENTERING_WORLD")
  150.  
  151.     print("Welcome on DevilUI for patch 7.0.3 !")
  152.     print("Current resolution:", resolution);
  153.     print("Fix: SHAPA.")
  154.     print(" ")
  155.  
  156.     SetCVar("screenshotQuality", 8)
  157.     SetCVar("useUiScale", 1)
  158.     SetCVar("checkAddonVersion", 0)
  159.     SetCVar("scriptErrors", 0)
  160.     SetCVar("countdownForCooldowns", 1)
  161.  
  162.     if not (Devilinstall) then
  163.  
  164.         SetCVar("cameraDistanceMaxFactor", 2)
  165.         SetCVar("cameraDistanceMax", 50)
  166.         SetCVar("chatStyle", "classic")
  167.  
  168.         if (LOW) then
  169.             SetCVar("uiScale", 0.9)
  170.         elseif (MEDIUM) then
  171.             SetCVar("uiScale", 0.825)
  172.         else
  173.             SetCVar("uiScale", 0.75)
  174.         end
  175.  
  176.         StaticPopup_Show("CHATSETTING")
  177.         StaticPopup_Hide("GTFO_POPUP_MESSAGE")
  178.     end
  179. end)
  180.  
  181. BNToastFrame:HookScript("OnShow", function(self)
  182.     self:ClearAllPoints()
  183.     self:SetPoint("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 10, 50)
  184. end)
  185.  
  186. TimeAlertFrame:HookScript("OnShow", function(self)
  187.     self:ClearAllPoints()
  188.     self:SetPoint("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 10, 50)
  189. end)


Devilconfig
Lua Code:
  1. local dataobj = LibStub("LibDataBroker-1.1"):NewDataObject("Devilconfig", {
  2.     icon = "Interface\\AddOns\\Devilconfig\\Devilicon.tga",
  3.     label = "Devilconfig",
  4.     type     = "launcher",
  5.     text    = "DevilUI Alpha 7.0.3 Fan Normal Ver."
  6. })
  7.  
  8. local index = GetCurrentResolution();
  9. local resolution = select(index, GetScreenResolutions());
  10. local NORMAL = (resolution == "720x576" or resolution == "800x600" or resolution == "1024x768" or resolution == "1152x864" or resolution == "1280x960" or resolution == "1280x1024" or resolution == "1400x1050" or resolution == "1600x1200" or resolution == "1680x1200" or resolution == "1920x1440");
  11.  
  12. local AceConfig         = LibStub("AceConfig-3.0")
  13. --local AceConfigReg    = LibStub("AceConfigRegistry-3.0")
  14. local AceConfigDialog   = LibStub("AceConfigDialog-3.0")
  15.  
  16. function dataobj.OnTooltipShow(tip)
  17.     tip:AddLine("DevilUI")
  18.     tip:AddLine(" ")
  19.     tip:AddLine("|cff69b950left-Click:|r |cffeeeeeeDevilUI setting|r")
  20.     tip:AddLine("|cff69b950Right-Click:|r |cffeeeeeehotkey setting|r")
  21.     tip:AddLine("|cff69b950alt-Click:|r |cffeeeeeeUI reload|r")
  22.     tip:AddLine("|cff69b950Shift-Click:|r |cffeeeeeeDisconnection|r")
  23. end
  24.  
  25. function dataobj.OnClick()
  26.     local button = GetMouseButtonClicked()
  27.         if button == "LeftButton" then
  28.             if IsShiftKeyDown() then
  29.                 Logout()
  30.             elseif IsAltKeyDown() then
  31.                 ReloadUI()
  32.         else InterfaceOptionsFrame_OpenToCategory("DevilUI")
  33.         end
  34.         elseif ( button == "RightButton" ) then
  35.             ChatFrame1EditBox:SetText("/kb");
  36.             ChatEdit_SendText( ChatFrame1EditBox );
  37.         end
  38. end
  39.  
  40. local options = {
  41.     name = "DevilUI",
  42.     type = "group",
  43.     args = {
  44.         confdesc = {
  45.             order = 1,
  46.             type = "description",
  47.             name = "It displays some of the settings of the DevilUI.(Beta)\n",
  48.             cmdHidden = true
  49.         },
  50.         centerbar = {
  51.             inline = true,
  52.             name = "Centerbar",
  53.             type = "group",
  54.             order = 2,
  55.             args ={
  56.                 showcenter = {
  57.                     type = 'execute',
  58.                     order = 3,
  59.                     name = "Centerbar On",
  60.                     desc = "센터바를 불러옵니다.",
  61.                     func = function()
  62.                         ChatFrame1EditBox:SetText("/dom toggle 9 10");
  63.                         ChatEdit_SendText( ChatFrame1EditBox );
  64.                     end,
  65.                 },
  66.                 hidecenter = {
  67.                     type = 'execute',
  68.                     order = 4,
  69.                     name = "Centerbar off",
  70.                     desc = "센터바를 끕니다.",
  71.                     func = function()
  72.                         ChatFrame1EditBox:SetText("/dom Hide 9 10");
  73.                         ChatEdit_SendText( ChatFrame1EditBox );
  74.                     end,
  75.                 },
  76.                 disableAll = {
  77.                     type = 'execute',
  78.                     order = 5,
  79.                     name = "dominos",
  80.                     desc = "도미노스 설정창을 불러 옵니다.",
  81.                     func = function()
  82.                         ChatFrame1EditBox:SetText("/dom config");
  83.                         ChatEdit_SendText( ChatFrame1EditBox );
  84.                     end,
  85.                 },
  86.             },
  87.         },
  88.         layout = {
  89.             inline = true,
  90.             name = "layout change",
  91.             type = "group",
  92.             order = 6,
  93.             args ={
  94.                 showcenter = {
  95.                     type = 'execute',
  96.                     order = 7,
  97.                     name = "bottom",
  98.                     desc = "센터바를 불러옵니다.",
  99.                     func = function()
  100.                         ChatFrame1EditBox:SetText("/reflux switch ShapaWide");
  101.                         ChatEdit_SendText( ChatFrame1EditBox );
  102.                     end,
  103.                     disabled = NORMAL,
  104.                 },
  105.                 hidecenter = {
  106.                     type = 'execute',
  107.                     order = 8,
  108.                     name = "Right action bar(4:3)",
  109.                     desc = "센터바를 끕니다.",
  110.                     func = function()
  111.                         ChatFrame1EditBox:SetText("/reflux switch ShapaNormal");
  112.                         ChatEdit_SendText( ChatFrame1EditBox );
  113.                     end,
  114.                     disabled = NORMAL,
  115.                 },
  116.             },
  117.         },
  118.         Addons = {
  119.             inline = true,
  120.             name = "Addon setting",
  121.             type = "group",
  122.             order = 9,
  123.             args ={
  124.                 showcenter = {
  125.                     type = 'execute',
  126.                     order = 10,
  127.                     name = "T-raid setting",
  128.                     desc = "막공골드도우미(T-raid) 설정창을 불러옵니다.",
  129.                     func = function()
  130.                         ChatFrame1EditBox:SetText("/tr");
  131.                         ChatEdit_SendText( ChatFrame1EditBox );
  132.                     end,
  133.                    
  134.                 },
  135.                 hidecenter = {
  136.                     type = 'execute',
  137.                     order = 11,
  138.                     name = "Findyparty",
  139.                     desc = "파티찾기(Findyparty) 설정창을 불러옵니다.",
  140.                     func = function()
  141.                         ChatFrame1EditBox:SetText("/fp");
  142.                         ChatEdit_SendText( ChatFrame1EditBox );
  143.                     end,
  144.                                 },
  145.                 disableAll = {
  146.                     type = 'execute',
  147.                     order = 12,
  148.                     name = "Tiptac",
  149.                     desc = "툴팁(Tiptac) 설정창을 불러 옵니다.",
  150.                     func = function()
  151.                         ChatFrame1EditBox:SetText("/tiptac");
  152.                         ChatEdit_SendText( ChatFrame1EditBox );
  153.                     end,
  154.  
  155.                    
  156.                 },
  157.             },
  158.         },
  159.  
  160.         setting = {
  161.             inline = true,
  162.             name = "addon setting II",
  163.             type = "group",
  164.             order = 13,
  165.             args ={
  166.                 showcenter = {
  167.                     type = 'execute',
  168.                     order = 14,
  169.                     name = "kg panels",
  170.                     desc = "바탕배경 판넬(kg panels) 설정창을 불러옵니다.",
  171.                     func = function()
  172.                         ChatFrame1EditBox:SetText("/kgpanels config");
  173.                         ChatEdit_SendText( ChatFrame1EditBox );
  174.                     end,
  175.                 },
  176.             },
  177.         },
  178.  
  179.     }
  180. }
  181. -- Add config to Blizzard menu
  182. LibStub("AceConfig-3.0"):RegisterOptionsTable("DevilUI", options)
  183. LibStub("AceConfigDialog-3.0"):AddToBlizOptions("DevilUI")
Attached Files
File Type: zip DevilUI.zip (333.4 KB, 112 views)

Last edited by bluefox100 : 09-06-16 at 07:36 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Please help fix. It is not the Add-on function.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off