Skip to content

Instantly share code, notes, and snippets.

@Gnarfoz
Last active May 3, 2018 18:09
Show Gist options
  • Save Gnarfoz/0d30d26b20f2c4c7150e9aabd642dc13 to your computer and use it in GitHub Desktop.
Save Gnarfoz/0d30d26b20f2c4c7150e9aabd642dc13 to your computer and use it in GitHub Desktop.
Output scenario info to chat
local f=CreateFrame("Frame")
local stageNameOld
local stageName
local stageDescription
local function handler(self, event)
stageName, stageDescription = C_Scenario.GetStepInfo()
if stageName ~= stageNameOld then
stageNameOld = stageName
DEFAULT_CHAT_FRAME:AddMessage("Stage: "..stageName.." Description: "..stageDescription)
end
end
f:SetScript("OnEvent",handler)
f:RegisterEvent("SCENARIO_UDPATE")
## Interface: 70300
## Title: Scenario to Chat
## Notes: Dumps the current scenario stage name and description to chat
scenario_to_chat.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment