Advertisement
Guest User

Untitled

a guest
Feb 12th, 2025
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.49 KB | None | 0 0
  1. iconRis={}
  2. iconRisText={}
  3. iconRisText2={}
  4. iconRisBO={}
  5. tochki = {}
  6. iconRisEv3={}
  7. iconRisEvO3 ={}
  8. icN = 1
  9. iconCh = {}
  10. iconChText = {}
  11. iconRisEv3 = {}
  12. iconRisEvent3 = {}
  13. iconRisEvent3Tex={}
  14. iconQ = {}
  15. iconQText = {}
  16. fenix = {}
  17. fenixText = {}
  18. ahtnG = {}
  19. ahtnGText = {}
  20. risPet = {}
  21. risPetText = {}
  22. mgznIcon = {}
  23. mgznText = {}
  24. dkT = {}
  25. dkText = {}
  26. unT = {}
  27. unText = {}
  28.  
  29. nIcon = {}
  30. function nIcon:new(id,object,x,y,Rx,Ry,texture,point1,point2,strata)
  31.  
  32.     local obj = {}
  33.    
  34.     function obj:configure()
  35.         self[id] = self[id] or CreateFrame("FRAME", "myAddonIconFrame", object)
  36.         self[id]:SetFrameStrata(strata)
  37.         self[id] = self[id]:CreateTexture("myAddonIcon", "OVERLAY")
  38.         self[id]:SetTexture("Interface\\AddOns\\NSQC\\libs\\" .. texture .. ".tga")
  39.         self[id]:SetSize(Rx,Ry)
  40.         self[id]:SetPoint(point1,object,point2,x,y)
  41.     end
  42.    
  43.     function obj:Show()
  44.         if obj[id] == nil then
  45.             obj:configure()
  46.         else
  47.             obj[id]:Show()
  48.         end
  49.     end
  50.    
  51.     function obj:Hide()
  52.         obj[id]:Hide()
  53.     end
  54.  
  55.     function obj:reSize(Rx,Ry)
  56.         self[id]:SetSize(Rx, Ry)
  57.     end
  58.  
  59.     function obj:reMove(x,y)
  60.         self[id]:SetPoint(point1,object,point2,x,y)
  61.     end
  62.  
  63.     setmetatable(obj, self)
  64.     self.__index = self; return obj
  65. end
  66.  
  67. --1-16   17-32   33-48 49-64
  68. function dkT:configure(id,Rx,Ry)
  69.     self[id] = self[id] or CreateFrame("FRAME", "myAddonIconFrame", UIParent)
  70.     --self[id]:SetSize(Rx, Ry)
  71.     self[id]:SetWidth(Rx)
  72.     self[id]:SetHeight(Ry)
  73.     --self[id]:SetPoint("BOTTOMLEFT", WorldMapDetailFrame,"BOTTOMLEFT")
  74. end
  75. function dkText:configure(id,Rx,Ry,x,y,nome)
  76.     self[id] = dkT[id]:CreateTexture("myAddonIcon", "OVERLAY")
  77.     self[id]:SetTexture("Interface\\AddOns\\NSQC\\libs\\" .. nome .. ".png")
  78.     --self[id]:SetSize(Rx, Ry)
  79.     self[id]:SetWidth(Rx)
  80.     self[id]:SetHeight(Ry)
  81.     self[id]:SetPoint("BOTTOMLEFT", UIParent,"BOTTOMLEFT", x, y)
  82. end
  83. function dkIcon(id,Rx,Ry,x,y,nome,sign)
  84.     if sign == "show" then
  85.         if dkT[id] == nil then
  86.             dkT:configure(id,Rx,Ry)
  87.             dkText:configure(id,Rx,Ry,x,y,nome)
  88.             dkT[id]:SetFrameStrata("FULLSCREEN_DIALOG")
  89.             dkText[id]:SetPoint("CENTER", UIParent,"CENTER",0,0)
  90.         else
  91.             dkT[id]:Show()
  92.         end
  93.     else
  94.         if dkT[id] ~= nil then
  95.             dkT[id]:Hide()
  96.         end
  97.     end
  98. end
  99. function unT:configure(id,Rx,Ry)
  100.     self[id] = self[id] or CreateFrame("FRAME", "myAddonIconFrame", UIParent)
  101.     --self[id]:SetSize(Rx, Ry)
  102.     self[id]:SetWidth(Rx)
  103.     self[id]:SetHeight(Ry)
  104.     --self[id]:SetPoint("BOTTOMLEFT", WorldMapDetailFrame,"BOTTOMLEFT")
  105. end
  106. -- function unText:configure(id,Rx,Ry,x,y,nome,frame,pnt,pnt1)
  107. --  self[id] = unT[id]:CreateTexture("myAddonIcon", "OVERLAY")
  108. --  self[id]:SetTexture("Interface\\AddOns\\NSQC\\libs\\" .. nome .. ".tga")
  109. --  --self[id]:SetSize(Rx, Ry)
  110. --  self[id]:SetWidth(Rx)
  111. --  self[id]:SetHeight(Ry)
  112. --  self[id]:ClearAllPoints()
  113. --  self[id]:SetPoint(pnt, frame,pnt1, x, y)
  114. -- end
  115. function unText:configure(id,Rx,Ry,x,y,nome,frame,pnt,pnt1)
  116.     if id ~= nil then
  117.         self[id] = unT[id]:CreateTexture("myAddonIcon", "OVERLAY")
  118.         self[id]:SetTexture("Interface\\AddOns\\NSQC\\libs\\" .. nome .. ".tga")
  119.         --self[id]:SetSize(Rx, Ry)
  120.         self[id]:SetWidth(Rx)
  121.         self[id]:SetHeight(Ry)
  122.         self[id]:ClearAllPoints()
  123.         self[id]:SetPoint(pnt, frame,pnt1, x, y)
  124.     end
  125. end
  126. -- function unIcon(id,Rx,Ry,x,y,nome,sign,frame,pnt,pnt1)
  127. --  if sign == "show" then
  128. --      if unT[id] == nil then
  129. --          unT:configure(id,Rx,Ry)
  130. --          unText:configure(id,Rx,Ry,x,y,nome,frame,pnt,pnt1)
  131. --          unT[id]:SetFrameStrata("FULLSCREEN_DIALOG")
  132. --          unT[id]:ClearAllPoints()
  133. --          unText[id]:SetPoint(pnt, frame,pnt1,x,y)
  134. --          unT[id]:SetWidth(Rx)
  135. --          unT[id]:SetHeight(Ry)
  136. --      else
  137. --          unT[id]:ClearAllPoints()
  138. --          unT[id]:Show()
  139. --          unT[id]:SetWidth(Rx)
  140. --          unT[id]:SetHeight(Ry)
  141. --      end
  142. --  else
  143. --      if unT[id] ~= nil then
  144. --          unT[id]:Hide()
  145. --      end
  146. --  end
  147. -- end
  148. function unIcon(id,Rx,Ry,x,y,nome,sign,frame,pnt,pnt1)
  149.     if id ~= nil then
  150.         if sign == "show" then
  151.             if unT[id] == nil then
  152.                 unT:configure(id,Rx,Ry)
  153.                 unText:configure(id,Rx,Ry,x,y,nome,frame,pnt,pnt1)
  154.                 if string.utf8sub(nome,1,4) == "rage" then
  155.                     if nome ~= "rage0" then
  156.                         unT[id]:SetFrameStrata("LOW")
  157.                     else
  158.                         unT[id]:SetFrameStrata("BACKGROUND")
  159.                     end
  160.                 else
  161.                     unT[id]:SetFrameStrata("BACKGROUND")
  162.                 end
  163.                 unT[id]:ClearAllPoints()
  164.                 unText[id]:SetPoint(pnt, frame,pnt1,x,y)
  165.                 unT[id]:SetWidth(Rx)
  166.                 unT[id]:SetHeight(Ry)
  167.             else
  168.                 unT[id]:ClearAllPoints()
  169.                 unT[id]:Show()
  170.                 unT[id]:SetWidth(Rx)
  171.                 unT[id]:SetHeight(Ry)
  172.             end
  173.         else
  174.             if unT[id] ~= nil then
  175.                 unT[id]:Hide()
  176.             end
  177.         end
  178.     end
  179. end
  180. function iconCh:configure(id,Rx,Ry)
  181.     self[id] = self[id] or CreateFrame("FRAME", "myAddonIconFrame", WorldMapDetailFrame)
  182.     --self[id]:SetSize(Rx, Ry)
  183.     self[id]:SetWidth(Rx)
  184.     self[id]:SetHeight(Ry)
  185.     --self[id]:SetPoint("BOTTOMLEFT", WorldMapDetailFrame,"BOTTOMLEFT")
  186. end
  187.  
  188. function iconChText:configure(id,Rx,Ry,x,y)
  189.     self[id] = iconCh[id]:CreateTexture("myAddonIcon", "OVERLAY")
  190.     self[id]:SetTexture("Interface\\AddOns\\NSQC\\libs\\ch.png")
  191.     --self[id]:SetSize(Rx, Ry)
  192.     self[id]:SetWidth(Rx)
  193.     self[id]:SetHeight(Ry)
  194.     self[id]:SetPoint("BOTTOMLEFT", WorldMapDetailFrame,"BOTTOMLEFT", x, y)
  195. end
  196.  
  197. function chMuestro(iCh,X0,Y0)
  198.     iconCh:configure(iCh,576,384)
  199.     iconChText:configure(iCh,32,32,X0,Y0)
  200.     iconCh:configure(iCh,X0,Y0)
  201.     iconChText:configure(iCh,32,32,X0,Y0)
  202.     iconCh[iCh]:SetFrameStrata("TOOLTIP")
  203.     iconChText[iCh]:SetPoint("BOTTOMLEFT", WorldMapDetailFrame,"BOTTOMLEFT", X0, Y0)
  204. end
  205. function iconQ:configure()
  206.     self[1] = self[1] or CreateFrame("FRAME", "myAddonIconFrame", UIParent)
  207.     --self[1]:SetSize(512, 396)
  208.     self[1]:SetWidth(512)
  209.     self[1]:SetHeight(396)
  210. end
  211. function iconQText:configure()
  212.     self[1] = iconQ[1]:CreateTexture("myAddonIcon", "OVERLAY")
  213.     self[1]:SetTexture("Interface\\AddOns\\NSQC\\libs\\quest.tga")
  214.     --self[1]:SetSize(512, 396)
  215.     self[1]:SetWidth(512)
  216.     self[1]:SetHeight(396)
  217.     self[1]:SetPoint("CENTER", UIParent,"CENTER", 0, 0)
  218. end
  219. function fenix:configure()
  220.     self[1] = self[1] or CreateFrame("FRAME", "myAddonIconFrame", UIParent)
  221.     --self[1]:SetSize(512, 396)
  222.     self[1]:SetWidth(512)
  223.     self[1]:SetHeight(512)
  224. end
  225. function fenixText:configure()
  226.     self[1] = fenix[1]:CreateTexture("myAddonIcon", "OVERLAY")
  227.     self[1]:SetTexture("Interface\\AddOns\\NSQC\\libs\\fnx.tga")
  228.     --self[1]:SetSize(512, 396)
  229.     self[1]:SetWidth(512)
  230.     self[1]:SetHeight(512)
  231.     self[1]:SetPoint("CENTER", UIParent,"CENTER", 0, 0)
  232. end
  233. function ahtnG:configure()
  234.     self[1] = self[1] or CreateFrame("FRAME", "myAddonIconFrame", UIParent)
  235.     --self[1]:SetSize(512, 396)
  236.     self[1]:SetWidth(400)
  237.     self[1]:SetHeight(450)
  238. end
  239. function ahtnGText:configure()
  240.     self[1] = ahtnG[1]:CreateTexture("myAddonIcon", "OVERLAY")
  241.     self[1]:SetTexture("Interface\\AddOns\\NSQC\\libs\\AHTUNG.tga")
  242.     --self[1]:SetSize(512, 396)
  243.     self[1]:SetWidth(350)
  244.     self[1]:SetHeight(450)
  245.     self[1]:SetPoint("CENTER", SendMailFrame,"CENTER", -22, 50)
  246. end
  247. function risPet:configure(id)
  248.     self[id] = self[1] or CreateFrame("FRAME", "myAddonIconFrame", UIParent)
  249.     --self[1]:SetSize(512, 396)
  250.     self[id]:SetWidth(32)
  251.     self[id]:SetHeight(32)
  252. end
  253. function risPetText:configure(id,pet)
  254.     self[id] = risPet[id]:CreateTexture("myAddonIcon", "OVERLAY")
  255.     self[id]:SetTexture("Interface\\AddOns\\NSQC\\libs\\" .. pet .. ".tga")
  256.     --self[1]:SetSize(512, 396)
  257.     self[id]:SetWidth(32)
  258.     self[id]:SetHeight(32)
  259.     self[id]:SetPoint("BOTTOMRIGHT", SendMailFrame,"BOTTOMRIGHT", 0, 0)
  260. end
  261. function mgznIcon:configure()
  262.     self[1] = self[1] or CreateFrame("FRAME", "myAddonIconFrame", UIParent)
  263.     --self[1]:SetSize(768, 512)
  264.     self[1]:SetWidth(768)
  265.     self[1]:SetHeight(512)
  266. end
  267. function mgznText:configure()
  268.     self[1] = mgznIcon[1]:CreateTexture("myAddonIcon", "OVERLAY")
  269.     self[1]:SetTexture("Interface\\AddOns\\NSQC\\libs\\quest.tga")
  270.     self[1]:SetPoint("CENTER", UIParent,"CENTER", 0, 0)
  271.     --self[1]:SetSize(768, 700)
  272.     self[1]:SetWidth(768)
  273.     self[1]:SetHeight(700)
  274. end
  275. function magazin(sign)
  276.     GameTooltip:Hide()
  277.     if sign == "show" then
  278.         if mgznIcon[1] == nil then
  279.             mgznIcon:configure()
  280.             mgznText:configure()
  281.             mgznIcon[1]:SetFrameStrata("DIALOG")
  282.             mgznText[1]:SetPoint("CENTER", UIParent,"CENTER",-80,48)
  283.             if mgznZ == nil then
  284.                 mgznZ = CreateFrame("Button", nil, UIParent, "");
  285.                 mgznZ:SetFrameStrata("FULLSCREEN_DIALOG")
  286.                 mgznZ:SetPoint("BOTTOMLEFT", resursy[5],"BOTTOMLEFT",0, 0)
  287.                 --mgznZ:SetSize(64, 64)
  288.                 mgznZ:SetWidth(64)
  289.                 mgznZ:SetHeight(64)
  290.                 mgznZ:SetNormalTexture("Interface\\AddOns\\NSQC\\libs\\smg.tga")
  291.                 mgznZ:SetHighlightTexture("Interface\\AddOns\\NSQC\\libs\\smg.tga")
  292.                 --mgznZ:SetFrameStrata("LOW")
  293.                 mgznZ:SetScript("OnEnter",function(self)
  294.                     GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
  295.                     GameTooltip:AddLine("|cff99ff99Валюта")
  296.                     GameTooltip:AddLine("|cffFFCF40Иногда падает с квеста на шерсть и прочую ткань")
  297.                     GameTooltip:AddLine("|cffFFCF40Можно купить на аукционе: |cff99ff99\"Обычное письмо\" |cffFFCF40от персонажа \"Хефе\"")
  298.                     GameTooltip:AddLine("|cff99ff99ЛКМ: |cffFFCF40Открыть/Закрыть магазин")
  299.                     GameTooltip:Show()
  300.                 end)
  301.                 mgznZ:SetScript("OnLeave",function(self)
  302.                     GameTooltip:Hide()
  303.                 end)
  304.                 mgznZ:SetScript("OnClick",function(self)
  305.                     PlaySoundFile("Interface\\AddOns\\NSQC\\libs\\clc.ogg")
  306.                     if testQ["magSign"] == nil then
  307.                         dmG1[1005]:Show()
  308.                         dmG1[1005]:SetFrameStrata("TOOLTIP")
  309.                         mgznIcon[1]:Show()
  310.                         for i = 1, 100 do
  311.                             fBtn[i]:Hide()
  312.                         end
  313.                         resursy[5]:Hide()
  314.                         mgznZ:Show()
  315.                         mgznZ:SetFrameStrata("LOW")
  316.                     else
  317.                         dmgText1("",mgznZ,1005,22,"FF8C00")
  318.                         mgznIcon[1]:Hide()
  319.                         for i = 1, 100 do
  320.                             fBtn[i]:Show()
  321.                             if mBtn[i] ~= nil then
  322.                                 mBtn[i]:Hide()
  323.                             end
  324.                         end
  325.                         if not resursy[5]:IsVisible() and not mgznZ:IsVisible() then
  326.                             for i = 1, 10000 do
  327.                                 if dmG1[i] ~= nil then
  328.                                     dmG1[i]:Hide()
  329.                                 end
  330.                                 if dmG2[i] ~= nil then
  331.                                     dmG2[i]:Hide()
  332.                                 end
  333.                             end
  334.                         end
  335.                         resursy[5]:Show()
  336.                         btn[989]:Show()
  337.                     end
  338.                     GameTooltip:Hide()
  339.                 end)
  340.             else
  341.                 dmG1[1005]:Show()
  342.                 dmG1[1005]:SetFrameStrata("TOOLTIP")
  343.                 mgznZ:Show()
  344.                 GameTooltip:Hide()
  345.             end
  346.         else
  347.             mgznIcon[1]:Show()
  348.         end
  349.     else
  350.         if mgznIcon[1] ~= nil then
  351.             mgznIcon[1]:Hide()
  352.         end
  353.     end
  354. end
  355. function iconRis:configure(id,Rx,Ry)
  356.     self[id] = self[id] or CreateFrame("FRAME", "myAddonIconFrame", WorldMapDetailFrame)
  357.     --self[id]:SetSize(Rx, Ry)
  358.     self[id]:SetWidth(Rx)
  359.     self[id]:SetHeight(Ry)
  360.     --self[id]:SetPoint("BOTTOMLEFT", WorldMapDetailFrame,"BOTTOMLEFT")
  361. end
  362. function iconRisEv3:configure(id,Rx,Ry)
  363.     self[id] = self[id] or CreateFrame("FRAME", "myAddonIconFrame", WorldMapDetailFrame)
  364.     --self[id]:SetSize(Rx, Ry)
  365.     self[id]:SetWidth(Rx)
  366.     self[id]:SetHeight(Ry)
  367.     --self[id]:SetPoint("BOTTOMLEFT", WorldMapDetailFrame,"BOTTOMLEFT")
  368. end
  369. function iconRisEvent3:configure(id,Rx,Ry)
  370.     self[id] = self[id] or CreateFrame("FRAME", "myAddonIconFrame", UIParent)
  371.     --self[id]:SetSize(Rx, Ry)
  372.     self[id]:SetWidth(Rx)
  373.     self[id]:SetHeight(Ry)
  374.     --self[id]:SetPoint("BOTTOMLEFT", WorldMapDetailFrame,"BOTTOMLEFT")
  375. end
  376.  
  377. function iconRisText:configure(id,Rx,Ry,x,y,nRis)
  378.     self[id] = iconRis[id]:CreateTexture("myAddonIcon", "OVERLAY")
  379.     self[id]:SetTexture("Interface\\AddOns\\NSQC\\" .. nRis ..".tga")
  380.     --self[id]:SetSize(Rx, Ry)
  381.     self[id]:SetWidth(Rx)
  382.     self[id]:SetHeight(Ry)
  383.     self[id]:SetPoint("BOTTOMLEFT", WorldMapDetailFrame,"BOTTOMLEFT", x, y)
  384. end
  385. function iconRisBO:configure(id,Rx,Ry,x,y,nRis)
  386.     self[id] = iconRis[id]:CreateTexture("myAddonIcon", "OVERLAY")
  387.     self[id]:SetTexture("Interface\\AddOns\\NSQC\\121212.tga")
  388.     --self[id]:SetSize(Rx, Ry)
  389.     self[id]:SetWidth(Rx)
  390.     self[id]:SetHeight(Ry)
  391.     self[id]:SetPoint("CENTER", WorldMapDetailFrame,"BOTTOMLEFT", x, y)
  392. end
  393. function iconRisEvO3:configure(id,Rx,Ry,x,y,nRis)
  394.     self[id] = iconRisEv3[id]:CreateTexture("myAddonIcon", "OVERLAY")
  395.     self[id]:SetTexture("Interface\\AddOns\\NSQC\\" .. nRis ..".tga")
  396.     --self[id]:SetSize(Rx, Ry)
  397.     self[id]:SetWidth(Rx)
  398.     self[id]:SetHeight(Ry)
  399.     self[id]:SetPoint("CENTER", WorldMapDetailFrame,"BOTTOMLEFT", x, y)
  400. end
  401. function iconRisEvent3Tex:configure(id,Rx,Ry,x,y,nRis)
  402.     self[id] = iconRisEvent3[id]:CreateTexture("myAddonIcon", "OVERLAY")
  403.     self[id]:SetTexture("Interface/COMMON/Indicator-Green.png")
  404.     self[id]:SetPoint("CENTER", UIParent,"BOTTOMLEFT", x, y)
  405. end
  406.  
  407. function quesT(sign)
  408.     if sign == "show" then
  409.         if iconQ[1] == nil then
  410.             iconQ:configure()
  411.             iconQText:configure()
  412.             iconQ[1]:SetFrameStrata("FULLSCREEN_DIALOG")
  413.             iconQText[1]:SetPoint("CENTER", UIParent,"CENTER",0,0)
  414.         else
  415.             iconQ[1]:Show()
  416.         end
  417.     else
  418.         if iconQ[1] ~= nil then
  419.             iconQ[1]:Hide()
  420.         end
  421.     end
  422. end
  423. function showFenix(sign)
  424.     if sign == "show" then
  425.         if fenix[1] == nil then
  426.             fenix:configure()
  427.             fenixText:configure()
  428.             fenix[1]:SetFrameStrata("FULLSCREEN_DIALOG")
  429.             fenixText[1]:SetPoint("CENTER", UIParent,"CENTER",0,-70)
  430.         else
  431.             fenix[1]:Show()
  432.         end
  433.     else
  434.         if fenix[1] ~= nil then
  435.             fenix[1]:Hide()
  436.         end
  437.     end
  438. end
  439. function ahtunGSH(sign)
  440.     if sign == "show" then
  441.         if ahtnG[1] == nil then
  442.             ahtnG:configure()
  443.             ahtnGText:configure()
  444.             ahtnG[1]:SetFrameStrata("FULLSCREEN_DIALOG")
  445.             ahtnGText[1]:SetPoint("CENTER", SendMailFrame,"CENTER",-15,20)
  446.         else
  447.             ahtnG[1]:Show()
  448.         end
  449.     else
  450.         if ahtnG[1] ~= nil then
  451.             ahtnG[1]:Hide()
  452.         end
  453.     end
  454. end
  455. function risPetShow(id,sign,pet,nome,igol)
  456.     if sign == "show" then
  457.         if risPet[id] == nil then
  458.             risPet:configure(id)
  459.             risPetText:configure(id,pet)
  460.             risPet[id]:SetFrameStrata("FULLSCREEN_DIALOG")
  461.             risPetText[id]:SetPoint("BOTTOMRIGHT", fBtn[id],"BOTTOMRIGHT",0,0)
  462.         else
  463.             risPet[id]:Show()
  464.         end
  465.         SendAddonMessage("ns_pokazhiHozyaina " , nome, "guild")
  466.     else
  467.         if risPet[id] ~= nil then
  468.             risPet[id]:Hide()
  469.         end
  470.     end
  471. end
  472.  
  473. function bo(n,n1)
  474.     for k, v in pairs(mapTables[testQ["эвент1"]]) do
  475.         if type(k)=="string" then
  476.         tKont = k
  477.     end
  478.         for k, v in pairs(mapTables[testQ["эвент1"]][k]) do
  479.             if type(k)=="string" then
  480.                 tLok = k
  481.             end
  482.         end
  483.     end
  484.     iconRis:configure(n,n,n1)
  485.     local xx,yy = getPOS(tonumber(mapTables[testQ["эвент1"]][tKont][tLok][tostring(n)]["x"]), tonumber(mapTables[testQ["эвент1"]][tKont][tLok][tostring(n)]["y"]))
  486.     iconRisBO:configure(n,n1,n1,xx,yy,121212)
  487.     iconRis[n]:SetFrameStrata("TOOLTIP")
  488.     iconRisBO[n]:SetPoint("CENTER", WorldMapDetailFrame,"BOTTOMLEFT",xx,yy )
  489. end
  490. function event3(n,n1,show)
  491.     if show == "show" then
  492.         if iconRisEvent3[1] == nil then
  493.             iconRisEvent3:configure(1,576,384)
  494.             iconRisEvent3Tex:configure(1,n1,n1,0,0,121212)
  495.             --iconRisEvent3Tex[n]:SetSize(n1, n1)
  496.             iconRisEvent3Tex[n]:SetWidth(n1)
  497.             iconRisEvent3Tex[n]:SetHeight(n1)
  498.             iconRisEvent3[1]:SetFrameStrata("BACKGROUND")
  499.             iconRisEvent3Tex[1]:SetPoint("CENTER", UIParent,"CENTER",0,0)
  500.         else
  501.             if not iconRisEvent3[1]:IsVisible() then
  502.                 iconRisEvent3[1]:Show()
  503.                 --iconRisEvent3Tex[1]:SetSize(n1, n1)
  504.                 iconRisEvent3Tex[1]:SetWidth(n1)
  505.                 iconRisEvent3Tex[1]:SetHeight(n1)
  506.             else
  507.                 --iconRisEvent3Tex[1]:SetSize(n1, n1)
  508.                 iconRisEvent3Tex[1]:SetWidth(n1)
  509.                 iconRisEvent3Tex[1]:SetHeight(n1)
  510.             end
  511.         end
  512.     else
  513.         if iconRisEvent3[1] ~= nil then
  514.             iconRisEvent3[1]:Hide()
  515.         end
  516.     end
  517. end
  518. function ev3(tabella,n,n1)
  519.     for k, v in pairs(mapTables[tabella]) do
  520.         if type(k)=="string" then
  521.         tKont = k
  522.     end
  523.         for k, v in pairs(mapTables[tabella][k]) do
  524.             if type(k)=="string" then
  525.                 tLok = k
  526.             end
  527.         end
  528.     end
  529.     iconRisEv3:configure(n,576,384)
  530.     local xx,yy = getPOS(tonumber(mapTables[tabella][tKont][tLok][tostring(n)]["x"]), tonumber(mapTables[tabella][tKont][tLok][tostring(n)]["y"]))
  531.     iconRisEvO3:configure(n,n1,n1,xx,yy,121212)
  532.     iconRisEv3[n]:SetFrameStrata("TOOLTIP")
  533.     iconRisEvO3[n]:SetPoint("CENTER", WorldMapDetailFrame,"BOTTOMLEFT",xx,yy )
  534. end
  535.  
  536. function iconRisText2:configure(id,Rx,Ry,x,y,nRis)
  537.     self[id] = iconRis[id]:CreateTexture("myAddonIcon", "OVERLAY")
  538.     self[id]:SetTexture("Interface\\AddOns\\NSQC\\" .. nRis ..".tga")
  539.     --self[id]:SetSize(Rx, Ry)
  540.     self[id]:SetWidth(Rx)
  541.     self[id]:SetHeight(Ry)
  542.     self[id]:SetPoint("TOPLEFT", WorldMapDetailFrame,"TOPLEFT", x, y)
  543. end
  544.  
  545. function setka()
  546. mostraKrtl2("Show",0,0,0,650,50,1,3)
  547. mostraKrtl2("Show",50,0,50,650,50,1,3)
  548. mostraKrtl2("Show",100,0,100,650,50,1,3)
  549. mostraKrtl2("Show",150,0,150,650,50,1,3)
  550. mostraKrtl2("Show",200,0,200,650,50,1,3)
  551. mostraKrtl2("Show",250,0,250,650,50,1,3)
  552. mostraKrtl2("Show",300,0,300,650,50,1,3)
  553. mostraKrtl2("Show",350,0,350,650,50,1,3)
  554. mostraKrtl2("Show",400,0,400,650,50,1,3)
  555. mostraKrtl2("Show",450,0,450,650,50,1,3)
  556. mostraKrtl2("Show",500,0,500,650,50,1,3)
  557. mostraKrtl2("Show",550,0,550,650,50,1,3)
  558. mostraKrtl2("Show",600,0,600,650,50,1,3)
  559. mostraKrtl2("Show",650,0,650,650,50,1,3)
  560. mostraKrtl2("Show",700,0,700,650,50,1,3)
  561. mostraKrtl2("Show",750,0,750,650,50,1,3)
  562. mostraKrtl2("Show",800,0,800,650,50,1,3)
  563. mostraKrtl2("Show",850,0,850,650,50,1,3)
  564. mostraKrtl2("Show",900,0,900,650,50,1,3)
  565. mostraKrtl2("Show",950,0,950,650,50,1,3)
  566. mostraKrtl2("Show",1000,0,1000,650,50,1,3)
  567. mostraKrtl2("Show",0,0,1000,0,50,1,3)
  568. mostraKrtl2("Show",0,50,1000,50,50,1,3)
  569. mostraKrtl2("Show",0,100,1000,100,50,1,3)
  570. mostraKrtl2("Show",0,150,1000,150,50,1,3)
  571. mostraKrtl2("Show",0,200,1000,200,50,1,3)
  572. mostraKrtl2("Show",0,250,1000,250,50,1,3)
  573. mostraKrtl2("Show",0,300,1000,300,50,1,3)
  574. mostraKrtl2("Show",0,350,1000,350,50,1,3)
  575. mostraKrtl2("Show",0,400,1000,400,50,1,3)
  576. mostraKrtl2("Show",0,450,1000,450,50,1,3)
  577. mostraKrtl2("Show",0,500,1000,500,50,1,3)
  578. mostraKrtl2("Show",0,550,1000,550,50,1,3)
  579. mostraKrtl2("Show",0,600,1000,600,50,1,3)
  580. mostraKrtl2("Show",0,650,1000,650,50,1,3)
  581. end
  582. function mostraKrtl2(signalKrt,X0,Y0,X1,Y1,S,S1,diametr)
  583.     if signalKrt=="Show" then
  584.         tochki[icN] = true
  585.         iconRis:configure(icN,576,384)
  586.         iconRisText:configure(icN,diametr,diametr,X0,Y0,121212)
  587.         local x0 = X0
  588.         local y0 = Y0
  589.         local x1 = X1
  590.         local y1 = Y1
  591.  
  592.         local dx = x1 - x0
  593.         local dy = y1 - y0
  594.  
  595.  
  596.         local i0 = 1
  597.         local i1 = S
  598.         local step = S1
  599.         local stepCount = (i1 - i0) / step
  600.  
  601.  
  602.         dirX = dx / stepCount
  603.         dirY = dy / stepCount
  604.  
  605.  
  606.         local resX = x0
  607.         local resY = y0
  608.         for i=i0,i1,step do
  609.             icN = icN+i
  610.             tochki[icN] = true
  611.             resX = resX + dirX
  612.             resY = resY + dirY
  613.             iconRis:configure(icN,resX,resY)
  614.             iconRisText:configure(icN,diametr,diametr,1,1,121212)
  615.             iconRis[icN]:SetFrameStrata("TOOLTIP")
  616.             iconRisText[icN]:SetPoint("BOTTOMLEFT", WorldMapDetailFrame,"BOTTOMLEFT", resX, resY)
  617.  
  618.         end
  619.     else
  620.         iconRisText[icN][signalKrt](iconRisText[icN])
  621.     end
  622. end
  623. function krtHide(signalKrt)
  624.     if #tochki ~= nil then
  625.         for key, val in pairs(tochki) do
  626.             if tochki[key] == true then
  627.                 iconRis[key]["Hide"](iconRis[key])
  628.             end
  629.         end
  630.     end
  631. end
  632.  
  633. --[[
  634. iRis=1
  635. local UpdateSpeed = 1
  636. local fRis = CreateFrame("Frame")
  637. fRis.Text1 = fRis:CreateFontString()
  638.  
  639. fRis.UpdateSpeed = UpdateSpeed
  640. fRis:SetScript("OnUpdate", function(self, elapsed)
  641.     self.UpdateSpeed = self.UpdateSpeed - elapsed
  642.     if self.UpdateSpeed > 0 then
  643.         return
  644.     end
  645.  
  646.     self.UpdateSpeed = UpdateSpeed
  647.     mioKontRis,mioLokRis,mioXRis,mioYRis=Astrolabe:GetCurrentPlayerPosition()
  648.     XXXRis,YYYRis=getPOS(mioXRis,mioYRis)
  649.  
  650.     iconRis:configure(iRis,128,128)
  651.     iconRisText:configure(iRis,128,128,0,0)
  652.     iconRis[iRis]:SetPoint("BOTTOMLEFT", XXXRis, YYYRis)
  653.     iconRis[iRis]:Show()
  654.     iRis=iRis+1
  655.  
  656. end)
  657. --]]
  658.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement