Thread Tools Display Modes
08-13-07, 09:26 PM   #1
jonthegamer
A Defias Bandit
Join Date: Aug 2007
Posts: 3
whats wrong with this

Hi, I am trying to make this addon that will evantualy automaticialy buy any new spells automaticialy but right now it isnt anywhere near close. http://jonsupersite.com/autoupgrade.rar right now it should display a message box when you go to a merchant. I did get the hello world to work from the blizzard tutorial so I know "message("text");" works on my install. Does anyone have any idea.
  Reply With Quote
08-13-07, 09:31 PM   #2
Layrajha
A Frostmaul Preserver
 
Layrajha's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 275
Post the code in [code][/code] tags rather than in a rar file we'll have to download and extract, please
  Reply With Quote
08-13-07, 09:39 PM   #3
jonthegamer
A Defias Bandit
Join Date: Aug 2007
Posts: 3
ok, just thought it would be easier

autoupgrade.lua
Code:
function OnLoad()

  	this:RegisterEvent('MERCHANT_SHOW')    
	
end

function merchanttest()
	message("Merchant has opened");
end
function OnEvent()
	if ( event == "MERCHANT_SHOW" ) then
		merchanttest();
	end
end
autoupgrade.toc
Code:
## Interface: 20100
## Title: Auto Upgrade
## Notes: Will automaticialy buy the upgrades for your character.
## Dependencies:
autoupgrade.lua
autoupgrade.xml
autoupgrade.xml
Code:
<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"> 
<Frame name="HelloWorldFrame">
	<Scripts>
		<OnLoad>
			<OnLoad> OnLoad(); </OnLoad>
			<OnEvent> OnEvent(); </OnEvent>
		</OnLoad>
	</Scripts>
</Frame>
</Ui>
  Reply With Quote
08-13-07, 10:39 PM   #4
jonthegamer
A Defias Bandit
Join Date: Aug 2007
Posts: 3
nvm, I figured it out. Do any of you know of some place with a list of events that can go in here:
Code:
this:RegisterEvent('MERCHANT_SHOW')
  Reply With Quote
08-14-07, 08:34 AM   #5
Layrajha
A Frostmaul Preserver
 
Layrajha's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 275
Here you go:
http://www.wowwiki.com/Events_(API)
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » whats wrong with this


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