Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-19-10, 04:53 PM   #1
izbatt
A Defias Bandit
Join Date: Dec 2010
Posts: 2
Help for a new addon creator

Hey Guys quick run down.
For my first addon I wanted to write a very simple addon that has a few buttons that do a few simple tasks that I was always typing to do (i.e. /invite, /love, etc...)
After creating my addon I have a nice frame of 4 buttons. invite, guild invite, love, and a button that moves the frame around. Everything works fine.

So then I wanted to add a button that would cast my Hearthstone.
So I put my hearthstone in slot 1 of my back pack and tried running UseContainerItem(0,1);
when the button is pushed. I get a Blizzard UI has blocked this operation error.

Is there a way around this or a better way to do it?
I have researched and researched and can't seem to find anything
I tried casting by spell but got nothing and now i'm stuck.
Any help would be much appreciated.

My code:
XML code for button:
<Button name="$parent_Hearth_Button" parent="SimpleButtons_MainFrame">
<Size>
<AbsDimension x="27" y="25" />
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
<NormalTexture file="Interface\Addons\SimpleButtons\SB_UI\SB_H" />
<HighlightTexture file="Interface\Addons\SimpleButtons\SB_UI\SB_H_HL" />
<Scripts>
<OnClick>
SB_Hearth_OnClick();
</OnClick>
</Scripts>
</Button>

LUA code:
function SB_Hearth_OnClick()
UseContainerItem(0,1);--is blocked by Blizzard UI
end


PS i know I could just use an action bar but I don't want to use up my bars as I seem to use them all for different stuff.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Help for a new addon creator


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