WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   whats wrong with this (https://www.wowinterface.com/forums/showthread.php?t=11722)

jonthegamer 08-13-07 09:26 PM

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.

Layrajha 08-13-07 09:31 PM

Post the code in [code][/code] tags rather than in a rar file we'll have to download and extract, please ;)

jonthegamer 08-13-07 09:39 PM

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>


jonthegamer 08-13-07 10:39 PM

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')

Layrajha 08-14-07 08:34 AM

Here you go:
http://www.wowwiki.com/Events_(API)


All times are GMT -6. The time now is 06:44 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI