Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function EventHandler(self, Event, ...)
- local myself = UnitName("player")
- local Range = UnitInRange("target")
- -- SetMapToCurrentZone()
- local mapID = C_Map.GetBestMapForUnit("player")
- WorldMapFrame:SetMapID(mapID)
- local X, Y = C_Map.GetPlayerMapPosition(mapID, "player"):GetXY()
- CleanUp()
- for i = 3, 16 do
- --print(string.sub(X,i,i))
- local frame4 = CreateFrame("Frame", "frame4", UIparent)
- frame4:SetWidth(10)
- frame4:SetHeight(10)
- frame4:SetPoint("TOPLEFT", 10*i, 0)
- frame4:SetFrameStrata("TOOLTIP")
- local textureFrame4 = frame4:CreateTexture("TOOLTIP")
- --textureFrame4:SetColorTexture(1, 1, 1, 1)
- if string.sub(X,i,i) == "5" then
- textureFrame4:SetColorTexture(0, 0.5, 1, 1) -- Darker Blue 5
- textureFrame4:SetAllPoints(frame4)
- elseif string.sub(X,i,i) == "6" then --- Light Blue 6
- textureFrame4:SetColorTexture(0, 1, 1, 1)
- textureFrame4:SetAllPoints(frame4)
- elseif string.sub(X,i,i) == "7" then
- textureFrame4:SetColorTexture(0.5, 1, 1, 1)
- textureFrame4:SetAllPoints(frame4)
- elseif string.sub(X,i,i) == "8" then
- textureFrame4:SetColorTexture(1, 1, 0.5, 1) -- Yellow 8
- textureFrame4:SetAllPoints(frame4)
- elseif string.sub(X,i,i) == "9" then
- textureFrame4:SetColorTexture(0, 0.5, 0.5, 1) --- Darker green 9
- textureFrame4:SetAllPoints(frame4)
- elseif string.sub(X,i,i) == "4" then
- textureFrame4:SetColorTexture(0, 0, 1, 1) -- Blue 4
- textureFrame4:SetAllPoints(frame4)
- elseif string.sub(X,i,i) == "3" then --- Green 3
- textureFrame4:SetColorTexture(0, 1, 0, 1)
- textureFrame4:SetAllPoints(frame4)
- elseif string.sub(X,i,i) == "2" then ---- Red 2
- textureFrame4:SetColorTexture(1, 0, 0, 1)
- textureFrame4:SetAllPoints(frame4)
- elseif string.sub(X,i,i) == "1" then ---- White 1
- textureFrame4:SetColorTexture(1, 1, 1, 1)
- textureFrame4:SetAllPoints(frame4)
- else
- textureFrame4:SetColorTexture(0, 0, 0, 1) --- Black 0
- textureFrame4:SetAllPoints(frame4)
- end
- textureFrame4:SetAllPoints(frame4)
- end
- print(X)
- print(Y)
- end
- local CounterPoofDaddy = 1
- function CleanUp()
- for i = 3,16 do
- if textureFrame4 == nil then
- else
- print("asd")
- textureFrame4:SetColorTexture(1, 1, 1, 1)
- --textureFrame4:SetAllPoints(frame4)
- --frame4:Hide()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement