Quantcast WoWInterface - View Single Post - Help with making my addon (WoW classic)
View Single Post
03-30-20, 05:35 AM   #1
awildgoose11
A Defias Bandit
Join Date: Mar 2020
Posts: 2
Help with making my addon (WoW classic)

Hello, I am VERY new to addon programming but I wanted to make a simple one that dismounts your character if you right click on an ore vein while mounted. Here is what I made, (it doesn't seem to be working) any help would be appreciated. (WoW Classic btw)

Code:
local f = CreateFrame("Frame",nil,UIParent)
f:SetWidth(4000) 
f:SetHeight(4000)
f:SetPoint("CENTER",0,0)
while(1=1)
do
   local u = UnitName("mouseover");
f:SetScript("OnClick", function (self, button, down)
 if (button = "RightButton" and down = true and u = "Tin Vein" or u = "Iron Deposit" or u = "Mithril Vein" or u = "Copper Vein" or u = "Gold Vein" or u = "Truesilver Vein" or u = "Thorium Vein" or u = "Dark Iron Vein" or u = "Elementium Vein" or u = "Snall Obsidian Chunk" or u = "Large Obsidian Chunk") then
 Dismount();	
end
end
end
Again the goal is to dismount when an ore is right clicked. Thanks.
  Reply With Quote