Tercio@11: Tercio@11: local DF = _G ["DetailsFramework"] Tercio@11: if (not DF) then Tercio@11: print ("|cFFFFAA00Please restart your client to finish update some AddOns.|c") Tercio@11: return Tercio@11: end Tercio@21: Tercio@0: local floor = floor Tercio@0: local min = min Tercio@0: local UnitExists = UnitExists Tercio@0: local GetPlayerMapPosition = GetPlayerMapPosition Tercio@0: local UnitHealth = UnitHealth Tercio@4: local GetNumGroupMembers = GetNumGroupMembers Tercio@4: local abs = abs Tercio@6: local GetPlayerFacing = GetPlayerFacing Tercio@11: local db Tercio@11: local _ Tercio@0: Tercioo@32: local f = DF:Create1PxPanel (_, 155, 166, "Hans & Franz Assist", "Hansgar_And_Franzok_Assist", nil, "top", true) Tercio@33: f:SetFrameStrata ("LOW") Tercio@36: f.version = "v0.18a" Tercio@11: Tercio@11: f.Close:SetScript ("OnClick", function (self) Tercio@11: if (f.StampersPhase) then Tercio@11: return f:StopTracking() Tercio@11: end Tercio@11: f:EndTrackPlayerPosition() Tercio@11: end) Tercio@11: Tercio@11: f.Lock:SetScript ("OnClick", function (self) Tercio@11: if (db.FRAME_LOCK) then Tercio@11: f:SetLockState() Tercio@11: print ("|cFFFFAA00Hansgar and Franzok Assist|r frame unlocked.") Tercio@11: Tercio@11: f.unlocked_frame = true Tercio@11: f.player_pos_frame:Show() Tercio@11: f.player_bar:Show() Tercio@11: f.stop_casting_frame:Show() Tercio@11: else Tercio@11: f:SetLockState() Tercio@11: print ("|cFFFFAA00Hansgar and Franzok Assist|r frame locked.") Tercio@11: f.unlocked_frame = false Tercio@11: f.stop_casting_frame:Hide() Tercio@11: end Tercio@11: end) Tercio@0: Tercio@4: local tframe = CreateFrame ("frame", "Hansgar_And_Franzok_Assist_PTrack", UIParent) Tercio@4: Tercio@11: f:SetSize (155, 159) Tercio@0: f:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, insets = {left = -1, right = -1, top = -1, bottom = -1}, Tercio@0: edgeFile = "Interface\\AddOns\\Hansgar_And_Franzok_Assist\\border_2", edgeSize = 8}) Tercio@7: f:SetPoint ("center", UIParent, "center", 300, 200) Tercio@0: f:SetBackdropColor (0, 0, 0, 0) Tercio@0: f:SetBackdropBorderColor (0, 0, 0, 1) Tercio@0: f:SetMovable (true) Tercio@0: f:EnableMouse (true) Tercio@5: f.all_blocks = {} Tercio@0: f:Hide() Tercio@0: Tercio@0: -- Tercio@0: local frame_event = CreateFrame ("frame", "Hansgar_And_Franzok_AssistEvents", f) Tercio@0: frame_event:RegisterEvent ("ENCOUNTER_START") Tercio@0: frame_event:RegisterEvent ("ENCOUNTER_END") Tercio@0: frame_event:RegisterEvent ("ADDON_LOADED") Tercio@0: Tercio@0: -- Tercio@7: local player_bar = CreateFrame ("statusbar", "Hansgar_And_Franzok_PlayerAssistBar", UIParent) Tercio@7: Tercio@7: player_bar:SetPoint ("center", UIParent, "center", 0, 300) Tercio@9: player_bar:SetSize (280, 16) Tercio@7: Tercio@7: player_bar:SetMovable (true) Tercio@7: player_bar:EnableMouse (true) Tercio@7: player_bar:SetResizable (true) Tercio@0: player_bar:SetStatusBarColor (0, 0, 0, 0) Tercio@0: player_bar:SetMinMaxValues (0, 100) Tercio@0: player_bar:SetValue (0) Tercio@7: player_bar:SetMinResize (50, 15) Tercio@7: player_bar:SetMaxResize (500, 40) Tercio@7: player_bar:Hide() Tercio@7: Tercio@7: local player_bar_backgroud = player_bar:CreateTexture (nil, "background") Tercio@7: player_bar_backgroud:SetTexture (0, 0, 0, 0.2) Tercio@7: player_bar_backgroud:SetAllPoints() Tercio@7: Tercio@7: local icon = player_bar:CreateTexture (nil, "overlay") Tercio@7: icon:SetTexture ([[Interface\HELPFRAME\ReportLagIcon-Movement]]) Tercio@7: icon:SetPoint ("left", player_bar, "left") Tercio@7: icon:SetDesaturated (true) Tercio@7: player_bar.icon = icon Tercio@7: Tercio@7: local text = player_bar:CreateFontString (nil, "overlay", "GameFontNormal") Tercio@7: text:SetPoint ("right", player_bar, "right", -2, 0) Tercio@7: player_bar.text = text Tercio@7: Tercio@7: player_bar:SetScript ("OnMouseDown", function (self) Tercio@7: if (not self.isMoving) then Tercio@7: self:StartMoving() Tercio@7: self.isMoving = true Tercio@7: end Tercio@7: end) Tercio@7: player_bar:SetScript ("OnMouseUp", function (self) Tercio@7: if (self.isMoving) then Tercio@7: self:StopMovingOrSizing() Tercio@7: self.isMoving = false Tercio@7: end Tercio@7: end) Tercio@7: player_bar:SetScript ("OnSizeChanged", function (self) Tercio@7: self.icon:SetSize (self:GetHeight(), self:GetHeight()) Tercio@7: Tercio@7: end) Tercio@7: local grip = CreateFrame ("button", "Hansgar_And_Franzok_AssistPlayerBarButton", player_bar) Tercio@7: grip:SetPoint ("bottomright", player_bar, "bottomright") Tercio@7: grip:SetSize (16, 16) Tercio@7: grip:SetScript ("OnMouseDown", function (self, button) Tercio@7: if (not player_bar.isMoving and button == "LeftButton") then Tercio@7: player_bar:StartSizing ("bottomright") Tercio@7: player_bar.isMoving = true Tercio@7: end Tercio@7: end) Tercio@7: grip:SetScript ("OnMouseUp", function (self, button) Tercio@7: if (player_bar.isMoving and button == "LeftButton") then Tercio@7: player_bar:StopMovingOrSizing() Tercio@7: player_bar.isMoving = false Tercio@7: end Tercio@7: end) Tercio@7: grip:SetNormalTexture ([[Interface\CHATFRAME\UI-ChatIM-SizeGrabber-Up]]) Tercio@7: grip:SetHighlightTexture ([[Interface\CHATFRAME\UI-ChatIM-SizeGrabber-Highlight]]) Tercio@7: grip:SetPushedTexture ([[Interface\CHATFRAME\UI-ChatIM-SizeGrabber-Down]]) Tercio@7: Tercio@7: player_bar.grip = grip Tercio@0: f.player_bar = player_bar Tercio@0: Tercio@7: Tercio@0: player_bar.texture = player_bar:CreateTexture (nil, "overlay") Tercio@0: player_bar.texture:SetTexture ("Interface\\AddOns\\Hansgar_And_Franzok_Assist\\bar_skyline") Tercio@0: player_bar:SetStatusBarTexture (player_bar.texture) Tercio@0: Tercio@0: -- Tercio@0: Tercio@7: local player_pos_frame = CreateFrame ("frame", "Hansgar_And_Franzok_Assist_BarDance", UIParent) Tercio@13: local player_pos_frame2 = CreateFrame ("frame", "Hansgar_And_Franzok_Assist_BarDance2", UIParent) Tercio@7: Tercio@7: player_pos_frame:SetPoint ("center", UIParent, "center", 0, -75) Tercio@13: player_pos_frame2:SetPoint ("bottomleft", player_pos_frame, "bottomleft") Tercio@7: Tercio@13: player_pos_frame2:SetSize (6, 155) Tercio@7: player_pos_frame:SetSize (155, 6) Tercio@13: Tercio@13: local player_pos_frame_backdrop = {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, insets = {left = -1, right = -1, top = -1, bottom = -1}} Tercio@13: player_pos_frame:SetBackdrop (player_pos_frame_backdrop) Tercio@13: player_pos_frame2:SetBackdrop (player_pos_frame_backdrop) Tercio@9: player_pos_frame:SetBackdropColor (0, 0, 0, 1) Tercio@13: player_pos_frame2:SetBackdropColor (0, 0, 0, 1) Tercio@13: player_pos_frame2:Hide() Tercio@7: player_pos_frame:SetMovable (true) Tercio@7: player_pos_frame:EnableMouse (true) Tercio@7: player_pos_frame:SetScript ("OnMouseDown", function (self) Tercio@7: if (not self.isMoving) then Tercio@7: self:StartMoving() Tercio@7: self.isMoving = true Tercio@7: end Tercio@7: end) Tercio@7: player_pos_frame:SetScript ("OnMouseUp", function (self) Tercio@7: if (self.isMoving) then Tercio@7: self:StopMovingOrSizing() Tercio@7: self.isMoving = false Tercio@7: end Tercio@7: end) Tercio@4: player_pos_frame:Hide() Tercio@11: f.player_pos_frame = player_pos_frame Tercio@4: Tercio@4: --red Tercio@4: local t1 = player_pos_frame:CreateTexture (nil, "artwork") Tercio@4: t1:SetPoint ("left", player_pos_frame, "left") Tercio@7: t1:SetSize (player_pos_frame:GetWidth()*0.30, 6) Tercio@4: t1:SetTexture (1, 1, 1) Tercio@4: t1:SetVertexColor (1, 0.2, 0.2, 0.4) Tercio@4: --green Tercio@4: local t2 = player_pos_frame:CreateTexture (nil, "artwork") Tercio@4: t2:SetPoint ("left", t1, "right") Tercio@7: t2:SetSize (player_pos_frame:GetWidth()*0.15, 6) Tercio@4: t2:SetTexture (0.2, 1, 0.2, 0.4) Tercio@4: --red Tercio@4: local middle = player_pos_frame:CreateTexture (nil, "artwork") Tercio@4: middle:SetPoint ("left", t2, "right") Tercio@7: middle:SetSize (player_pos_frame:GetWidth()*0.10, 6) Tercio@4: middle:SetTexture (1, 1, 1) Tercio@4: middle:SetVertexColor (1, 0.2, 0.2, 0.4) Tercio@4: --green Tercio@4: local t3 = player_pos_frame:CreateTexture (nil, "artwork") Tercio@4: t3:SetPoint ("left", middle, "right") Tercio@7: t3:SetSize (player_pos_frame:GetWidth()*0.15, 6) Tercio@4: t3:SetTexture (0.2, 1, 0.2, 0.4) Tercio@4: --red Tercio@4: local t4 = player_pos_frame:CreateTexture (nil, "artwork") Tercio@4: t4:SetPoint ("left", t3, "right") Tercio@7: t4:SetSize (player_pos_frame:GetWidth()*0.30, 6) Tercio@4: t4:SetTexture (1, 1, 1) Tercio@4: t4:SetVertexColor (1, 0.2, 0.2, 0.4) Tercio@4: Tercio@13: --red Tercio@13: local t1_2 = player_pos_frame:CreateTexture (nil, "artwork") Tercio@13: t1_2:SetPoint ("bottomleft", player_pos_frame, "bottomleft") Tercio@13: t1_2:SetSize (6, player_pos_frame:GetWidth()*0.30) Tercio@13: t1_2:SetTexture (1, 1, 1) Tercio@13: t1_2:SetVertexColor (1, 0.2, 0.2, 0.4) Tercio@13: --green Tercio@13: local t2_2 = player_pos_frame:CreateTexture (nil, "artwork") Tercio@13: t2_2:SetPoint ("bottom", t1_2, "top") Tercio@13: t2_2:SetSize (6, player_pos_frame:GetWidth()*0.15) Tercio@13: t2_2:SetTexture (0.2, 1, 0.2, 0.4) Tercio@13: --red Tercio@13: local middle_2 = player_pos_frame:CreateTexture (nil, "artwork") Tercio@13: middle_2:SetPoint ("bottom", t2_2, "top") Tercio@13: middle_2:SetSize (6, player_pos_frame:GetWidth()*0.10) Tercio@13: middle_2:SetTexture (1, 1, 1) Tercio@13: middle_2:SetVertexColor (1, 0.2, 0.2, 0.4) Tercio@13: --green Tercio@13: local t3_2 = player_pos_frame:CreateTexture (nil, "artwork") Tercio@13: t3_2:SetPoint ("bottom", middle_2, "top") Tercio@13: t3_2:SetSize (6, player_pos_frame:GetWidth()*0.15) Tercio@13: t3_2:SetTexture (0.2, 1, 0.2, 0.4) Tercio@13: --red Tercio@13: local t4_2 = player_pos_frame:CreateTexture (nil, "artwork") Tercio@13: t4_2:SetPoint ("bottom", t3_2, "top") Tercio@13: t4_2:SetSize (6, player_pos_frame:GetWidth()*0.30) Tercio@13: t4_2:SetTexture (1, 1, 1) Tercio@13: t4_2:SetVertexColor (1, 0.2, 0.2, 0.4) Tercio@13: Tercio@13: t1_2:Hide() Tercio@13: t2_2:Hide() Tercio@13: t3_2:Hide() Tercio@13: t4_2:Hide() Tercio@13: middle_2:Hide() Tercio@13: Tercio@4: local div = player_pos_frame:CreateTexture (nil, "overlay") Tercio@4: div:SetPoint ("left", player_pos_frame, "left", 0, 0) Tercio@4: div:SetTexture (1, 1, 1, 1) Tercio@4: div:SetSize (1, 16) Tercio@4: div:Hide() Tercio@4: -- Tercio@4: Tercio@4: local AceTimer = LibStub:GetLibrary ("AceTimer-3.0") Tercio@4: AceTimer:Embed (f) Tercio@4: local AceComm = LibStub:GetLibrary ("AceComm-3.0") Tercio@4: AceComm:Embed (f) Tercio@4: Tercio@5: function f:CommReceived (_, data, _, source) Tercio@5: if (data == "US") then Tercio@5: f:SendCommMessage ("HAFR", UnitName ("player") .. " " .. f.version, "RAID") Tercio@6: elseif (f.users) then Tercio@5: f.users [data] = true Tercio@5: end Tercio@5: end Tercio@5: function f:ShowUsers() Tercio@5: Tercio@5: local users_frame = Hansgar_And_Franzok_Assist_UsersPanel Tercio@5: if (not users_frame) then Tercio@5: users_frame = CreateFrame ("frame", "Hansgar_And_Franzok_Assist_UsersPanel", UIParent) Tercio@5: users_frame:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, insets = {left = -1, right = -1, top = -1, bottom = -1}, Tercio@5: edgeFile = "Interface\\AddOns\\Hansgar_And_Franzok_Assist\\border_2", edgeSize = 8}) Tercio@5: users_frame:SetBackdropColor (0, 0, 0, 1) Tercio@5: tinsert (UISpecialFrames, "Hansgar_And_Franzok_Assist_UsersPanel") Tercio@5: users_frame:SetSize (200, 500) Tercio@5: users_frame:SetPoint ("right", f, "left", -15, 0) Tercio@5: users_frame.text = users_frame:CreateFontString (nil, "overlay", "GameFontHighlight") Tercio@5: users_frame.text:SetPoint ("topleft", users_frame, "topleft", 10, -10) Tercio@5: users_frame.text:SetJustifyH ("left") Tercio@5: Tercio@5: users_frame.title = users_frame:CreateFontString (nil, "overlay", "GameFontNormal") Tercio@5: users_frame.title:SetText ("Hansgar & Franzok Assist: Users") Tercio@5: users_frame.title:SetPoint ("center", users_frame, "center") Tercio@5: users_frame.title:SetPoint ("bottom", users_frame, "top", 0, 2) Tercio@5: Tercio@20: local close = CreateFrame ("button", "Hansgar_And_Franzok_Assist_UsersPanel_CloseButton", users_frame, "UIPanelCloseButton") Tercio@20: close:SetPoint ("topright", users_frame, "topright") Tercio@20: users_frame.close_button = close Tercio@5: end Tercio@5: Tercio@5: local s = "" Tercio@5: Tercio@5: for key, value in pairs (f.users) do Tercio@5: s = s .. "|cFF33FF33" .. key .. "\n" Tercio@5: end Tercio@5: Tercio@5: s = s .. "|r\n\n\n|cFFFFFFFFOut of Date or Not installed:|r\n\n" Tercio@5: Tercio@5: for i = 1, GetNumGroupMembers() do Tercio@5: local name = UnitName ("raid" .. i) Tercio@5: if (not s:find (name)) then Tercio@5: s = s .. "|cFFFF3333" .. name .. "|r\n" Tercio@5: end Tercio@5: end Tercio@5: Tercio@5: users_frame.text:SetText (s) Tercio@5: Tercio@5: users_frame:Show() Tercio@6: Tercio@6: f.users = nil Tercio@6: f.users_schedule = nil Tercio@5: Tercio@5: end Tercio@5: f:RegisterComm ("HAFR", "CommReceived") Tercio@5: Tercio@4: f.block_tracker = {} Tercio@4: Tercio@0: frame_event:SetFrameStrata ("FULLSCREEN") Tercio@0: Tercio@0: frame_event:SetScript ("OnEvent", function (self, event, ...) Tercio@0: Tercio@0: if (event == "ADDON_LOADED" and select (1, ...) == "Hansgar_And_Franzok_Assist") then Tercio@33: Tercio@0: db = Hansgar_And_Franzok_DB Tercio@0: if (not db) then Tercio@0: db = {} Tercio@0: Hansgar_And_Franzok_DB = db Tercio@0: end Tercio@4: -- Tercio@0: db.STAMPERS_DELAY = db.STAMPERS_DELAY or 5 Tercio@4: if (db.CD_NUMBER == nil) then Tercio@4: db.CD_NUMBER = false Tercio@4: end Tercio@4: if (db.SHOW_DANCE == nil) then Tercio@4: db.SHOW_DANCE = true Tercio@4: end Tercio@5: if (db.FRAME_LOCK == nil) then Tercio@5: db.FRAME_LOCK = false Tercio@5: end Tercio@6: if (db.AUTO_FACING == nil) then Tercio@6: db.AUTO_FACING = true Tercio@6: end Tercio@6: if (db.FACING_SIDE == nil) then Tercio@6: db.FACING_SIDE = 1 Tercio@6: end Tercio@7: if (db.SHOW_MAIN_FRAME == nil) then Tercio@7: db.SHOW_MAIN_FRAME = true Tercio@7: end Tercio@7: if (db.PLAY_SOUND == nil) then Tercio@7: db.PLAY_SOUND = false Tercio@7: end Tercio@9: if (db.STOP_CAST == nil) then Tercio@9: db.STOP_CAST = true Tercio@9: end Tercio@14: if (db.NO_VERTICAL == nil) then Tercio@14: db.NO_VERTICAL = false Tercio@14: end Tercio@16: if (db.DANCE_SIZE == nil) then Tercio@37: db.DANCE_SIZE = 8 Tercio@16: end Tercio@4: -- Tercio@7: Tercio@7: f:SetLockState (true) Tercio@7: Tercio@0: elseif (event == "ENCOUNTER_START" or event == "ENCOUNTER_END") then Tercio@0: Tercio@0: local encounterID, encounterName, difficultyID, raidSize = select (1, ...) Tercio@4: Tercio@4: if (encounterID == 1693) then Tercio@9: if (f.unlocked_frame) then Tercio@9: f.unlocked_frame = false Tercio@9: end Tercio@9: Tercio@4: if (event == "ENCOUNTER_START") then Tercio@4: f.on_encounter = true Tercio@9: f:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") Tercio@9: Tercio@4: elseif (event == "ENCOUNTER_END") then Tercio@4: f.on_encounter = false Tercio@9: f:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") Tercio@4: end Tercio@4: end Tercio@4: Tercio@4: if (encounterID == 1693 and db.SHOW_DANCE) then Tercio@4: if (event == "ENCOUNTER_START") then Tercio@4: SetMapToCurrentZone() Tercio@4: f:StartTrackPlayerPosition() Tercio@4: elseif (event == "ENCOUNTER_END") then Tercio@4: f:EndTrackPlayerPosition() Tercio@4: end Tercio@4: end Tercio@4: Tercio@0: if (encounterID == 1693 and difficultyID == 16) then Tercio@0: Tercio@0: if (event == "ENCOUNTER_START") then Tercio@0: print ("|cFFFFAA00Hansgar and Franzok Assist|r: addon enabled, good look!") Tercio@0: Tercio@0: if (f.StampersPhase) then Tercio@0: f:StopTracking() Tercio@0: end Tercio@0: Tercio@0: elseif (event == "ENCOUNTER_END") then Tercio@0: if (f.StampersPhase) then Tercio@0: f:StopTracking() Tercio@0: end Tercio@4: Tercio@4: f:EndTrackPlayerPosition() Tercio@0: end Tercio@0: end Tercio@0: end Tercio@0: Tercio@0: end) Tercio@0: Tercio@6: SLASH_Hansgar_And_Franzok_Assist1, SLASH_Hansgar_And_Franzok_Assist2 = "/hansgar", "/franzok" Tercio@6: function SlashCmdList.Hansgar_And_Franzok_Assist (msg, editbox) Tercio@6: Tercio@6: local command, rest = msg:match ("^(%S*)%s*(.-)$") Tercio@6: Tercio@6: if (command == "users") then Tercio@6: if (f.users_schedule) then Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r please wait 5 seconds...") Tercio@6: elseif (IsInRaid()) then Tercio@6: f.users = {} Tercio@6: f:SendCommMessage ("HAFR", "US", "RAID") Tercio@6: f.users_schedule = f:ScheduleTimer ("ShowUsers", 5) Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r please wait 5 seconds...") Tercio@6: else Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r you aren't in a raid group.") Tercio@6: end Tercio@6: Tercio@10: elseif (command == "st") then Tercio@10: f.stop_casting_frame:Show() Tercio@10: f.stop_casting_frame.alert.animOut:Stop() Tercio@10: f.stop_casting_frame.alert.animIn:Play() Tercio@10: f:ScheduleTimer ("HideStopSpellAlert", 1.2) Tercio@10: Tercio@9: elseif (command == "stopcast") then Tercio@9: db.STOP_CAST = not db.STOP_CAST Tercio@9: Tercio@9: if (db.STOP_CAST) then Tercio@9: print ("|cFFFFAA00Hansgar and Franzok Assist|r stop cast alert enabled.") Tercio@9: else Tercio@9: print ("|cFFFFAA00Hansgar and Franzok Assist|r stop cast alert disabled.") Tercio@9: end Tercio@9: Tercio@9: elseif (command == "resetpos") then Tercio@9: f:ClearAllPoints() Tercio@9: f:SetPoint ("center", UIParent, "center") Tercio@9: Tercio@9: player_bar:ClearAllPoints() Tercio@9: player_bar:SetPoint ("center", UIParent, "center") Tercio@9: Tercio@9: player_pos_frame:ClearAllPoints() Tercio@9: player_pos_frame:SetPoint ("center", UIParent, "center") Tercio@9: Tercio@9: if (f.StampersPhase) then Tercio@9: f:EndTrackPlayerPosition() Tercio@9: f:StopTracking() Tercio@9: end Tercio@9: Tercio@9: db.FRAME_LOCK = true Tercio@9: f:SetLockState() Tercio@9: Tercio@9: f.unlocked_frame = true Tercio@9: Tercio@9: f:StartTracking() Tercio@9: f:StartTrackPlayerPosition() Tercio@9: Tercio@9: print ("|cFFFFAA00Hansgar and Franzok Assist|r: position reseted.") Tercio@9: print ("|cFFFFAA00Hansgar and Franzok Assist|r: move between the tracks to show the other frames.") Tercio@9: print ("|cFFFFAA00Hansgar and Franzok Assist|r: type '/hansgar lock' to lock the frames.") Tercio@9: Tercio@6: elseif (command == "delay") then Tercio@6: local t = tonumber (rest) Tercio@6: if (t) then Tercio@6: db.STAMPERS_DELAY = t Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r delay set to: ", t) Tercio@6: else Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r invalid time.", t) Tercio@6: end Tercio@6: Tercio@6: elseif (command == "test" or command == "show") then Tercio@6: if (f.StampersPhase) then Tercio@6: f:EndTrackPlayerPosition() Tercio@6: return f:StopTracking() Tercio@6: end Tercio@6: Tercio@6: f:StartTracking() Tercio@6: f:StartTrackPlayerPosition() Tercio@6: Tercio@6: elseif (command == "hide") then Tercio@6: if (f.StampersPhase) then Tercio@6: return f:StopTracking() Tercio@6: end Tercio@6: f:EndTrackPlayerPosition() Tercio@6: Tercio@7: elseif (command == "unlock") then Tercio@7: db.FRAME_LOCK = true Tercio@7: f:SetLockState() Tercio@7: print ("|cFFFFAA00Hansgar and Franzok Assist|r frame unlocked.") Tercio@9: Tercio@9: f.unlocked_frame = true Tercio@9: player_pos_frame:Show() Tercio@9: player_bar:Show() Tercio@10: f.stop_casting_frame:Show() Tercio@7: Tercio@6: elseif (command == "lock") then Tercio@6: f:SetLockState() Tercio@6: Tercio@6: if (db.FRAME_LOCK) then Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r frame locked.") Tercio@9: f.unlocked_frame = false Tercio@10: f.stop_casting_frame:Hide() Tercio@6: else Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r frame unlocked.") Tercio@9: Tercio@9: f.unlocked_frame = true Tercio@9: player_pos_frame:Show() Tercio@9: player_bar:Show() Tercio@10: f.stop_casting_frame:Show() Tercio@9: Tercio@6: end Tercio@6: Tercio@6: elseif (command == "facing") then Tercio@6: if (rest == "1") then Tercio@6: db.FACING_SIDE = 1 Tercio@6: tframe.facing = true Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r facing set to south.") Tercio@6: Tercio@6: elseif (rest == "2") then Tercio@6: db.FACING_SIDE = 2 Tercio@6: tframe.facing = false Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r facing set to north.") Tercio@6: Tercio@6: elseif (rest == "auto") then Tercio@6: db.AUTO_FACING = true Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r auto facing enabled.") Tercio@6: Tercio@6: else Tercio@6: print ("|cFFFFFF00/hansgar facing|r: |cFF00FF001|r = south |cFF00FF002|r = north, use to set the dance bar when auto facing is disabled.") Tercio@6: end Tercio@6: Tercio@6: elseif (command == "autofacing") then Tercio@6: db.AUTO_FACING = not db.AUTO_FACING Tercio@6: if (db.AUTO_FACING) then Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r auto facing enabled.") Tercio@6: else Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r auto facing disabled.") Tercio@6: tframe.facing = db.FACING_SIDE == 1 Tercio@6: end Tercio@6: Tercio@16: elseif (command == "dancesize") then Tercio@16: local t = tonumber (rest) Tercio@16: if (t) then Tercio@16: db.DANCE_SIZE = t Tercio@16: f:SetDanceBarSize() Tercio@16: print ("|cFFFFAA00Hansgar and Franzok Assist|r dance bar size set to: ", t) Tercio@16: else Tercio@16: print ("|cFFFFAA00Hansgar and Franzok Assist|r invalid size, usage: /hansgar dancesize .", t) Tercio@16: end Tercio@16: Tercio@16: f:SetDanceBarSize() Tercio@16: Tercio@6: elseif (command == "dance") then Tercio@6: db.SHOW_DANCE = not db.SHOW_DANCE Tercio@6: if (db.SHOW_DANCE) then Tercio@6: if (f.on_encounter) then Tercio@6: f:StartTrackPlayerPosition() Tercio@6: end Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r dance bars enabled.") Tercio@6: else Tercio@6: f:EndTrackPlayerPosition() Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r dance bars disabled.") Tercio@6: end Tercio@6: Tercio@6: elseif (command == "cooldown") then Tercio@6: db.CD_NUMBER = not db.CD_NUMBER Tercio@6: f:RefreshCooldownSettings() Tercio@6: Tercio@6: else Tercio@11: Tercio@11: if (f.StampersPhase) then Tercio@11: f:EndTrackPlayerPosition() Tercio@11: return f:StopTracking() Tercio@11: end Tercio@11: Tercio@11: f:StartTracking() Tercio@11: f:StartTrackPlayerPosition() Tercio@11: Tercio@6: print ("|cFFFFAA00Hansgar and Franzok Assist|r |cFF00FF00" .. f.version .. "|r Commands:") Tercio@9: print ("|cFFFFFF00/hansgar resetpos|r: reset the position of all frames.") Tercio@6: print ("|cFFFFFF00/hansgar lock|r: toggle lock and unlock on the frame.") Tercio@6: print ("|cFFFFFF00/hansgar test show hide|r: active the addon on test mode or hide it.") Tercio@6: print ("|cFFFFFF00/hansgar delay