Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. local DMW = DMW
  2. local EHFrame = CreateFrame("Frame")
  3.  
  4. EHFrame:RegisterEvent("ENCOUNTER_START")
  5. EHFrame:RegisterEvent("ENCOUNTER_END")
  6. EHFrame:RegisterEvent("LOOT_CLOSED")
  7.  
  8. local function EventHandler(self, event, ...)
  9. if GetObjectWithGUID then
  10. if event == "LOOT_CLOSED" then
  11. for bag = 0, 4, 1 do
  12. for slot = 1, 36, 1 do
  13. local name = GetContainerItemLink(bag, slot)
  14. if (name and string.find(name, "19 Pound Catfish"))
  15. or (name and string.find(name, "Raw Longjaw Mud Snapper"))
  16. or (name and string.find(name, "Raw Bristle Whisker Catfish"))
  17. or (name and string.find(name, "Raw Brilliant Smallfish"))
  18. or (name and string.find(name, "Raw Spotted Yellowtail"))
  19. or (name and string.find(name, "Zesty Clam Meat"))
  20. or (name and string.find(name, "Raw Glossy Mightfish"))
  21. or (name and string.find(name, "Raw Rockscale Cod"))
  22. or (name and string.find(name, "40 Pound Grouper"))
  23. then
  24. PickupContainerItem(bag, slot)
  25. DeleteCursorItem()
  26. end
  27. local itemID = GetContainerItemID(bag, slot)
  28. local container = itemID == 7973 and true or false
  29. if container then
  30. UseContainerItem(bag, slot)
  31. end
  32. end
  33. end
  34. end
  35. end
  36. end
  37.  
  38. EHFrame:SetScript("OnEvent", EventHandler)
  39.  
  40. SLASH_TimeToDc1 = "/TimeToDc"
  41. SlashCmdList["TimeToDc"] = function(msg)
  42. local SetTime = 7000
  43. print("Time " .. SetTime)
  44. C_Timer.After(SetTime, function()
  45. RunMacroText(".dc")
  46. end)
  47. end
  48.  
  49. local function OniriPlugin()
  50. if DMW and DMW.Player and DMW.Player.Target and DMW.Player.Target.Dead and IsHackEnabled("follow") then SetHackEnabled("follow", false) end
  51. end
  52.  
  53.  
  54. DMW.Plugins.TestPlugin = OniriPlugin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement