if spell2 == 28272 then |
local max = #msgs.PolyPig |
local random = math.random(max) |
SendChatMessage(msgs.PolyPig[random] , db.channel) |
if db.channel == "Self" then |
self:Print(msgs.PolyPig[random]) |
else |
SendChatMessage(msgs.PolyPig[random] , db.channel) |
end |
--IF TURTLE, THEN TURTLE MESSAGE-- |
elseif spell2 == 28271 then |
local max = #msgs.PolyTurtle |
local random = math.random(max) |
SendChatMessage(msgs.PolyTurtle[random] , db.channel) |
if db.channel == "Self" then |
self:Print(msgs.PolyTurtle[random]) |
else |
SendChatMessage(msgs.PolyTurtle[random] , db.channel) |
end |
--IF SHEEP, THEN SHEEP MESSAGE-- |
else |
local max = #msgs.PolySheep |
local random = math.random(max) |
SendChatMessage(msgs.PolySheep[random] , db.channel) |
if db.channel == "Self" then |
self:Print(msgs.PolySheep[random]) |
else |
SendChatMessage(msgs.PolySheep[random] , db.channel) |
end |
end |
--CLEAR SPELL IDs JUST IN CASE ANOTHER MAGE RESHEEPS MY FOCUS-- |
spell, spell2 = nil |
end |
end |
end |
end |
-- end |
end |
|
--PORTAL MESSAGES-- |
function Broadcaster:UNIT_SPELLCAST_START() |
function Broadcaster:UNIT_SPELLCAST_START(source, spell) |
local db = Broadcaster.db.profile |
local msgs = BroadcasterMageMsgs |
--IS THE ADDON IN STANDBY AND AM I IN A GROUP?-- |
if not db.standby and db.channel then |
-- if not db.standby and db.channel then |
--LOOK FOR PORTAL SPELL CAST BY ME-- |
if arg1 == "player" and string.match(arg2, L["Portal:"]) then |
if source == "player" and string.match(spell, L["Portal:"]) then |
--TRIM SPELL NAME TO GET DESTINATION-- |
local dest = strtrim(select(2, strsplit(":", arg2))) |
--GET RANDOM MESSAGE AND REPLACE %d WITH DEST-- |
local dest = strtrim(select(2, strsplit(":", spell))) |
--GET RANDOM MESSAGE AND REPLACE %%d WITH DEST-- |
local max = #msgs.Portals |
local random = math.random(max) |
local msg,_ = string.gsub(msgs.Portals[random], "%%d", dest) |
SendChatMessage(msg , db.channel) |
if db.channel == "Self" then |
self:Print(msg) |
else |
SendChatMessage(msg , db.channel) |
end |
end |
end |
-- end |
end |