Help with SetScript - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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

WoWInterface » Developer Discussions » Lua/XML Help » Help with SetScript

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off