Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Commands
- --/ev -- Slaves follow /ev user and give lead
- --/ev sq -- Invites from friends list with "squad" in notes. Slaves only autoaccept master.
- SLASH_EVF1="/ev"
- SlashCmdList["EVF"]=function(msg)
- SendAddonMessage("EVF", msg, "PARTY" and "RAID")
- if (msg == "sq") then
- SquadUp()
- end
- end
- local SendRecieve = function(self, event, prefix, message, channel, sender)
- if event == "CHAT_MSG_ADDON" then
- if (prefix == "EVF") then
- if (message == "") then
- FollowUnit(sender)
- if (UnitIsPartyLeader(sender)~= 1) then
- PromoteToLeader(sender)
- end
- end
- end
- if (prefix == "EVR") then
- if (message == "master?") then
- SendAddonMessage("EVR", "Padawan", "WHISPER", sender)
- end
- if (message == "Padawan") then
- AcceptGroup()
- StaticPopup_Hide("PARTY_INVITE")
- end
- end
- end
- if event == "PARTY_INVITE_REQUEST" then
- SendAddonMessage("EVR", "master?", "WHISPER", prefix)
- end
- end
- function dosomeit()
- sdm_RunScript("Dance")- Run Blocked LUA from SuperDuperMacro
- --check for SDM addon
- --Create SDM Lua workaround if not present.
- --sdm_CreateNew("s", "test", character) -- Create New SDM scirpt
- end
- function SquadUp()
- local Friends =GetNumFriends()
- for i = 1, Friends do
- local name, level, class, loc, connected, status, note = GetFriendInfo(i);
- if (connected) and (note == "squad") then
- InviteUnit(name)
- end
- end
- end
- local EVF = CreateFrame("Frame")
- EVF:RegisterEvent("PARTY_INVITE_REQUEST")
- EVF:RegisterEvent("CHAT_MSG_ADDON")
- EVF:SetScript("OnEvent", SendRecieve)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement