Thread Tools Display Modes
03-24-17, 02:02 PM   #1
ccbrat17
A Defias Bandit
Join Date: Sep 2016
Posts: 2
new to coding need some help

hopefully someone could help/point me in the write direction in making this addon

i either want a command based call for example /qcench (where as wc would be the addon call- and the ench would the i guess sub call)

eventually i want a botton call where you see a series of several buttons (all proffessions and you click the one your actively working to achieve) but im having bad enough luck running my script just to run one single list (im working with alchemy as a tester) on log in once.

now i got the addon to show in the addon list, compadable no issues apparent from the addon screen.

now when i log in, nothing, i go to the addon manager from in game its reading at 0kb used- not suprising since it did nothing.

this is all the files that i have in this project before anyone says this is more advanced than a beginer should be playing with: yes i am still very much a beginer i am fully aware that programing of this caliper is more advanced than my level of knoledge on programing but its how i learn to do it ("hello world" as good of a tutorial it is it just doesnt challenge me enough to actually learn) hopefully someone could point out what the issue is it seems to be missing the start-up command like the info is there it just doesnt know when to do it or so it seems

-ive tried running multiple quests in one grouping and ive tried running several single quest "macros" neither seems to work.


my toc reads:

## Interface: 70100
## Title: Alchemyquests
Alchemyquests.Lua


my LATEST lua reads

Ui Xmlns="http://www.blizzard.com/wow/ui"
xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"
xsi:schemalocation="http://www.blizzard.com/wow/ui .. |framexml\ui.xsd"
<button name="Alchemy" Text="Alchemy"
Parent="UIParent" inherits=Secureactionbuttontemplate,optionsbuttontemplate">
<anchors>
<Anchor point="CENTER"/>
</Anchors>
<Size>
<absdimention c="128" y="24"/>
</size>
<Scripts>
<Onload>
Self:registerforclicks("anyup")
</onload>

</Scripts>
</Button>
</UI>

Alchemybutton:setattribute("Macrotext","/run for q,i in pairs({["Get Your Mix On"]=39325,["Missing Shipments"]=39326,["Theres A Scribe For That"]=39327,["Ancient Knowledge"]=39328,["A Dormant Burner"]=39329,["Ley Hunting"]=39330,["Eye Of Azshara: Put A Cork In It"]=39331,["Furbolg Firewater"]=39332,["Flasking For A Favor"]=39430,["Thanks For Flasking"]=39334,["Neltharion's Lair: Potent Power"]=39335,["We Need More Powder!"]=39336,["Forlorn Filter"]=39337,["Mending The Filter"]=39431,["Trading For Dreams"]=44112,["Return The Filter"]=39338,["Bendy Glass Tubes"]=39343}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end"


prior to that it was:

["Get Your Mix On"]=39325}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Missing Shipments"]=39326}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Theres A Scribe For That"]=39327}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Ancient Knowledge"]=39328}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["A Dormant Burner"]=39329}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Ley Hunting"]=39330}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Eye Of Azshara: Put A Cork In It"]=39331}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Furbolg Firewater"]=39332}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Flasking For A Favor"]=39430}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Thanks For Flasking"]=39334}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Neltharion's Lair: Potent Power"]=39335}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["We Need More Powder!"]=39336}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Forlorn Filter"]=39337}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Mending The Filter"]=39431}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Trading For Dreams"]=44112}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Return The Filter"]=39338}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
["Bendy Glass Tubes"]=39343}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end



prior to that lua attempt it was:

/script for q,i in pairs({["Get Your Mix On"]=39325,["Missing Shipments"]=39326,["Theres A Scribe For That"]=39327,["Ancient Knowledge"]=39328,["A Dormant Burner"]=39329,["Ley Hunting"]=39330,["Eye Of Azshara: Put A Cork In It"]=39331,["Furbolg Firewater"]=39332,["Flasking For A Favor"]=39430,["Thanks For Flasking"]=39334,["Neltharion's Lair: Potent Power"]=39335,["We Need More Powder!"]=39336,["Forlorn Filter"]=39337,["Mending The Filter"]=39431,["Trading For Dreams"]=44112,["Return The Filter"]=39338,["Bendy Glass Tubes"]=39343}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end


any assistance would be greatly appreciated even if its what attempt was on the right track
  Reply With Quote
03-24-17, 02:20 PM   #2
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
I'll probably get ripped a new one for this, but, why do you have XML code in the Lua file?? That doesn't seem right. Of course, I'm not a very good addon writer myself, so.............

I DO know, however, that putting "/run" commands in Lua code is a no go.

(Don't pay ANY attention to the Addon Author under my avatar. I just wrote a bunch of plug-ins" for Masque and Minimap Button Frame, and they put that there.)
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!

Last edited by jeffy162 : 03-24-17 at 02:36 PM.
  Reply With Quote
03-24-17, 02:46 PM   #3
ccbrat17
A Defias Bandit
Join Date: Sep 2016
Posts: 2
Originally Posted by jeffy162 View Post
I'll probably get ripped a new one for this, but, why do you have XML code in the Lua file?? That doesn't seem right. Of course, I'm not a very good addon writer myself, so.............

I DO know, however, that putting "/run" commands in Lua code is a no go.

(Don't pay ANY attention to the Addon Author under my avatar. I just wrote a bunch of plug-ins" for Masque and Minimap Button Frame, and they put that there.)
that could definitely be where my problem lies (or some of it anyway)
  Reply With Quote
03-24-17, 04:38 PM   #4
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 309
I can't test this but, it should work.

1. Go here to create your own addon: http://addon.bool.no/
2. Follow directions on the website
3. Insert the code below
4. Insert your new addon into your addon folder, load game and type: /qc to poll through the list


Code:
local objList = {
	["Get Your Mix On"] = 39325,
	["Missing Shipments"] = 39326,
	["Theres A Scribe For That"] = 39327,
	["Ancient Knowledge"] = 39328,
	["A Dormant Burner"] = 39329,
	["Ley Hunting"] = 39330,
	["EOA: Put A Cork In It"] = 39331,
	["Furbolg Firewater"] = 39332,
	["Flasking For A Favor"] = 39430,
	["Thanks For Flasking"] = 39334,
	["NL: Potent Power"] = 39335,
	["We Need More Powder!"] = 39336,
	["Forlorn Filter"] = 39337,
	["Mending The Filter"] = 39431,
	["Trading For Dreams = 44112,
	["Return The Filter"] = 39338,
	["Bendy Glass Tubes"] = 39343,
}

SlashCmdList.QUESTCOMPLETED = function()

   for k, v in pairs(objList) do
      print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r"))
   end

end
SLASH_QUESTCOMPLETED1 = "/qc"
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » new to coding need some help

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