Quantcast WoWInterface - View Single Post - Help with SetScript
View Single Post
08-14-16, 01:59 PM   #1
A Rage Talon Dragon Guard
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 305
Help with SetScript

I'm trying to make a clickable button for my data panel that allows the user to one click either a Repair Bot or Repair Mount.

I can not seem to get it to go threw all the options.

Here is the code I'm trying to wwork with:
	plugin:SetScript("OnMouseDown", function(self, btn)
		local RepairProfession = GetProfessions()
		if btn == "LeftButton" then
			if RepairProfession == "Engineering" then
				CastSpellByName("Field Repair Bot 74A") or CastSpellByName("Field Repair Bot 110G") or CastSpellByName("MOLL-E") or CastSpellByName("Scrapbot") or CastSpellByName("Jeeves")
				CastSpellByName("Guild Page") or CastSpellByName("Guild Page") or CastSpellByName("Guild Herald") or CastSpellByName("ĽArgent Squire") or CastSpellByName("Argent Gruntling")
				print('|cff33ff99cData:|r |cffFF0000No Repair bots Available|r')
		elseif btn == "MiddleButton" then
		elseif btn == "RightButton" then
			CastSpellByName("Traveler's Tundra Mammoth") or CastSpellByName("Grand Expedition Yak")
I was able to get the CastSpellByName("Traveler's Tundra Mount") to cast the mount spell so I know it works but I keep getting an error with the "or" in the formula.

Thanks for any help with this.
  Reply With Quote