• 0

    posted a message on Help with my first
    Ok, so really this is very similar to JavaScript.

    Still will not work.

    Is there something wrong inside my .xml?

    -- Author      : wwwDot
    -- Create Date : 11/14/2010 5:05:10 PM
    
    
    function EasyControlMainFrame_OnLoad(self)
    	self:RegisterEvent("PLAYER_REGEN_DISABLED")	
    	self:RegisterEvent("PLAYER_REGEN_ENABLED")
    end
    
    function EasyControlMainFrame_OnEvent(self, event)
    	if event == "PLAYER_REGEN_DISABLED" then
    		self:Hide()
            else
    		self:Show()
    	end
    
    end
    
    
    function Leave_Party_OnClick()
    	LeaveParty()
    end
    
    function Invite_Guild_OnClick()
    	if UnitIsPlayer("target") and UnitIsFriend("target") then
    		GuildInvite(UnitName("target"))
    	end
    end
    
    function Follow_Target_OnClick()
    	if UnitIsPlayer("target") and UnitIsFriend("target") then
    		if CheckInteractDistance("target", 4) then
    			FollowUnit(UnitName("target"))
    		else
    			DEFAULT_CHAT_FRAME:AddMessage("Your target is too far away to follow!")
    		end
    	end
    end
    
    function Invite_Party_OnClick()
    	if UnitIsPlayer("target") and UnitIsFriend("target") then
    		InviteUnit(UnitName("target"))
    	end
    end
    
    function Grant_Level_OnClick()
    	if UnitIsPlayer("target") and UnitIsFriend("target") then
    		GrantLevel(UnitName("target"))
    	end
    end


    <Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
    	<Script file="EasyControl.lua" />
    	<Frame name="EasyControlMainFrame" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
    		<Size>
    			<AbsDimension x="200" y="110" />
    		</Size>
    		<Anchors>
    			<Anchor point="CENTER">
    				<Offset x="-2" y="57" />
    			</Anchor>
    		</Anchors>
    		<TitleRegion setAllPoints="true">
    			<Size>
    				<AbsDimension x="0" y="30" />
    			</Size>
    			<Anchors>
    				<Anchor point="TOPLEFT" />
    				<Anchor point="TOPRIGHT" />
    			</Anchors>
    		</TitleRegion>
    		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
    			<BackgroundInsets>
    				<AbsInset left="11" right="12" top="12" bottom="11" />
    			</BackgroundInsets>
    			<TileSize>
    				<AbsValue val="32" />
    			</TileSize>
    			<EdgeSize>
    				<AbsValue val="32" />
    			</EdgeSize>
    			<Color r="2" g="0.4" b="0.1" />
    			<BorderColor r="1.5" g="0.2" b="0.4" />
    		</Backdrop>
    		
    <Frames>
    	<Button name="Leave_Party" inherits="UIPanelButtonTemplate" text="Leave Party">
    	<Size>
    		<AbsDimension x="77" y="16" />
    	</Size>
    		<Anchors>
    			<Anchor point="TOPLEFT">
    				<Offset x="12" y="-16" />
    			</Anchor>
    		</Anchors>
    	<Scripts>
    		<OnClick>Leave_Party_OnClick();</OnClick>
    	</Scripts>
    		<HighlightColor r="0.94" g="0.94" b="0.94" />
    		<DisabledColor r="0" g="0" b="0" />
    	</Button>
    </Frames>
    	
    <Frames>
    	<Button name="Invite_Target" inherits="UIPanelButtonTemplate" text="Party Invite">
    	<Size>
    		<AbsDimension x="86" y="16" />
    	</Size>
    		<Anchors>
    			<Anchor point="TOPRIGHT">
    				<Offset x="-14" y="-16" />
    			</Anchor>
    		</Anchors>
    	<Scripts>
    		<OnClick>Invite_Party_OnClick();</OnClick>
    	</Scripts>
    		<HighlightColor r="0.94" g="0.94" b="0.94" />
    		<DisabledColor r="0" g="0" b="0" />
    	</Button>
    </Frames>
    
    <Frames>
    	<Button name="Follow_Target" inherits="UIPanelButtonTemplate" text="Follow">
    	<Size>
    		<AbsDimension x="77" y="15" />
    	</Size>
    		<Anchors>
    			<Anchor point="TOPLEFT">
    				<Offset x="12" y="-40" />
    			</Anchor>
    		</Anchors>
    	<Scripts>
    		<OnClick>Follow_Target_OnClick();</OnClick>
    	</Scripts>
    		<HighlightColor r="0.94" g="0.94" b="0.94" />
    		<DisabledColor r="0" g="0" b="0" />
    	</Button>
    </Frames>
    
    <Frames>
    	<Button name="Grant_Level" inherits="UIPanelButtonTemplate" text="Grant Level">
    	<Size>
    		<AbsDimension x="77" y="15" />
    	</Size>
    		<Anchors>
    			<Anchor point="TOPLEFT">
    				<Offset x="12" y="-64" />
    			</Anchor>
    		</Anchors>
    	<Scripts>
    		<OnClick>Grant_Level_OnClick();</OnClick>
    	</Scripts>
    		<HighlightColor r="0.94" g="0.94" b="0.94" />
    		<DisabledColor r="0" g="0" b="0" />
    	</Button>
    </Frames>
    	
    <Frames>
    	<Button name="Invite_Guild" inherits="UIPanelButtonTemplate" text="Guild Invite">
    	<Size>
    		<AbsDimension x="86" y="16" />
    	</Size>
    		<Anchors>
    			<Anchor point="TOPRIGHT">
    				<Offset x="-14" y="-40" />
    			</Anchor>
    		</Anchors>
    	<Scripts>
    		<OnClick>Invite_Guild_OnClick();</OnClick>
    	</Scripts>
    		<HighlightColor r="0.94" g="0.94" b="0.94" />
    		<DisabledColor r="0" g="0" b="0" />
    	</Button>
    </Frames>
    
    
    
    		<Layers>
    			<Layer level="OVERLAY">
    				<FontString name="EasyControl" inherits="GameFontNormal" text="EC v1.0">
    					<Size>
    						<AbsDimension x="100" y="10" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT">
    							<Offset x="119" y="-90" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    			</Layer>
    		</Layers>
    		<Scripts>
    			<OnEvent>EasyControlMainFrame_OnEvent();</OnEvent>
    			<OnDragStart>self:StartMoving();</OnDragStart>
    			<OnDragStop>self:StopMovingOrSizing();</OnDragStop>
    			<OnClick>Leave_Party_OnClick();</OnClick>
    			<OnClick>Invite_Guild_OnClick();</OnClick>
    		</Scripts>
    	</Frame>
    
    
    </Ui>
    Posted in: Addon Ideas
  • 0

    posted a message on Help with my first
    -- Author      : wwwDot
    -- Create Date : 11/14/2010 5:05:10 PM
    
    
    function OutsideFrame_OnLoad(self)
    	self:RegisterEvent("PLAYER_REGEN_DISABLED")	
    end
    
    function OutsideFrame_OnEvent(self, event)
    	if event == "PLAYER_REGEN_DISABLED" then
    	--	self:Hide()
    	        self:SetAlpha()
            -- else
    	-- if event == "PLAYER_REGEN_ENABLED" then
    	--	self:GetAlpha()
    	end
    
    end
    
    
    function Leave_Party_OnClick()
    	LeaveParty()
    end
    
    function Invite_Guild_OnClick()
    	if UnitIsPlayer("target") and UnitIsFriend("target") then
    		GuildInvite(UnitName("target"))
    	end
    end
    
    function Follow_Target_OnClick()
    	if UnitIsPlayer("target") and UnitIsFriend("target") then
    		if CheckInteractDistance("target", 4) then
    			FollowUnit(UnitName("target"))
    		else
    			DEFAULT_CHAT_FRAME:AddMessage("Your target is too far away to follow!")
    		end
    	end
    end
    
    function Invite_Party_OnClick()
    	if UnitIsPlayer("target") and UnitIsFriend("target") then
    		InviteUnit(UnitName("target"))
    	end
    end
    
    function Grant_Level_OnClick()
    	if UnitIsPlayer("target") and UnitIsFriend("target") then
    		GrantLevel(UnitName("target"))
    	end
    end


    The hiding still doesn't work :( I'll keep messing around with it.
    Posted in: Addon Ideas
  • 0

    posted a message on Help with my first
    Well thanks for raining on my parade.

    This really was just going to be a test AddOn, it's my first time creating one, so i went simple.

    I'm still going to create this, and post what i have so far. I kept going with the .xml file. I am having trouble however, getting the AddOn to 'hide' when entering combat.

    EasyControl.lua:
    -- Author      : wwwDot
    -- Create Date : 11/14/2010 5:05:10 PM
    
    
    function OutsideFrame_OnLoad()
    	this:RegisterEvent("ENTERING_COMBAT");
    end
    
    function OutsideFrame_OnEvent()
    	if (event == "ENTERING_COMBAT") then
    		OutsideFrame:Hide()
    	end
    
    end
    
    
    function Leave_Party_OnClick()
    	LeaveParty()
    end
    
    function Invite_Guild_OnClick()
    	GuildInvite(UnitName("target"))
    end
    
    function Follow_Target_OnClick()
    	FollowUnit(UnitName("target"))
    end


    EasyControl.xml:
    <Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
    	<Script file="EasyControl.lua" />
    	<Frame name="OutsideFrame" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
    		<Size>
    			<AbsDimension x="200" y="110" />
    		</Size>
    		<Anchors>
    			<Anchor point="CENTER">
    				<Offset x="-2" y="57" />
    			</Anchor>
    		</Anchors>
    		<TitleRegion setAllPoints="true">
    			<Size>
    				<AbsDimension x="0" y="30" />
    			</Size>
    			<Anchors>
    				<Anchor point="TOPLEFT" />
    				<Anchor point="TOPRIGHT" />
    			</Anchors>
    		</TitleRegion>
    		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
    			<BackgroundInsets>
    				<AbsInset left="11" right="12" top="12" bottom="11" />
    			</BackgroundInsets>
    			<TileSize>
    				<AbsValue val="32" />
    			</TileSize>
    			<EdgeSize>
    				<AbsValue val="32" />
    			</EdgeSize>
    			<Color r="2" g="0.4" b="0.1" />
    			<BorderColor r="1.5" g="0.2" b="0.4" />
    		</Backdrop>
    		
    <Frames>
    	<Button name="Leave_Party" inherits="UIPanelButtonTemplate" text="Leave Party">
    	<Size>
    		<AbsDimension x="77" y="16" />
    	</Size>
    		<Anchors>
    			<Anchor point="TOPLEFT">
    				<Offset x="12" y="-16" />
    			</Anchor>
    		</Anchors>
    	<Scripts>
    		<OnClick>Leave_Party_OnClick();</OnClick>
    	</Scripts>
    		<HighlightColor r="0.94" g="0.94" b="0.94" />
    		<DisabledColor r="0" g="0" b="0" />
    	</Button>
    </Frames>
    	
    
    <Frames>
    	<Button name="Follow_Target" inherits="UIPanelButtonTemplate" text="Follow">
    	<Size>
    		<AbsDimension x="77" y="15" />
    	</Size>
    		<Anchors>
    			<Anchor point="TOPLEFT">
    				<Offset x="12" y="-40" />
    			</Anchor>
    		</Anchors>
    	<Scripts>
    		<OnClick>Follow_Target_OnClick();</OnClick>
    	</Scripts>
    		<HighlightColor r="0.94" g="0.94" b="0.94" />
    		<DisabledColor r="0" g="0" b="0" />
    	</Button>
    </Frames>
    
    	
    <Frames>
    	<Button name="Invite_Guild" inherits="UIPanelButtonTemplate" text="Guild Invite">
    	<Size>
    		<AbsDimension x="86" y="16" />
    	</Size>
    		<Anchors>
    			<Anchor point="TOPRIGHT">
    				<Offset x="-14" y="-16" />
    			</Anchor>
    		</Anchors>
    	<Scripts>
    		<OnClick>Invite_Guild_OnClick();</OnClick>
    	</Scripts>
    		<HighlightColor r="0.94" g="0.94" b="0.94" />
    		<DisabledColor r="0" g="0" b="0" />
    	</Button>
    </Frames>
    
    
    		<Layers>
    			<Layer level="OVERLAY">
    				<FontString name="FontString1" inherits="GameFontNormal" text="EC v1.0">
    					<Size>
    						<AbsDimension x="100" y="10" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT">
    							<Offset x="119" y="-90" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    			</Layer>
    		</Layers>
    		<Scripts>
    			<OnEvent>OutsideFrame_OnEvent();</OnEvent>
    			<OnDragStart>self:StartMoving();</OnDragStart>
    			<OnDragStop>self:StopMovingOrSizing();</OnDragStop>
    			<OnClick>Leave_Party_OnClick();</OnClick>
    			<OnClick>Invite_Guild_OnClick();</OnClick>
    		</Scripts>
    	</Frame>
    
    
    </Ui>
    Posted in: Addon Ideas
  • 0

    posted a message on Help with my first
    Quote from Torhal
    Most of us don't - we generally create our frames in Lua, and eschew XML unless it's absolutely necessary for certain templates.


    How would you go about creating it in LUA?

    What me and my friend Kaovex are trying to do is create like a grid type thing..

    ======== Title ========
    | Button 1 | Button 2 |
    | Button 3 | Button 4 |
    | Button 5 | Button 6 |
    ====================


    I have the button's down, i think lol, but creating the template for the AddOn is what is confusing me.
    Posted in: Addon Ideas
  • 0

    posted a message on Help with my first
    Quote from myrroddin
    Never use Addon Studio. It is horribly outdated.


    I see that now lol, but what is it you guys use for creating the .xml file?

    Off the top of your head?
    Posted in: Addon Ideas
  • 0

    posted a message on Help with my first
    Here's the .xml

    <Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
    	<Script file="EasyControl.lua" />
    	<Frame name="OutsideFrame" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
    		<Size>
    			<AbsDimension x="200" y="95" />
    		</Size>
    		<Anchors>
    			<Anchor point="CENTER">
    				<Offset x="-2" y="57" />
    			</Anchor>
    		</Anchors>
    		<TitleRegion setAllPoints="true">
    			<Size>
    				<AbsDimension x="0" y="30" />
    			</Size>
    			<Anchors>
    				<Anchor point="TOPLEFT" />
    				<Anchor point="TOPRIGHT" />
    			</Anchors>
    		</TitleRegion>
    		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
    			<BackgroundInsets>
    				<AbsInset left="11" right="12" top="12" bottom="11" />
    			</BackgroundInsets>
    			<TileSize>
    				<AbsValue val="32" />
    			</TileSize>
    			<EdgeSize>
    				<AbsValue val="32" />
    			</EdgeSize>
    			<Color r="0" g="0.4" b="0.8" />
    			<BorderColor r="0" g="0" b="0" />
    		</Backdrop>
    		<Frames>
    			<Button name="Leave_Party" inherits="UIPanelButtonTemplate" text="Leave Party">
    				<Size>
    					<AbsDimension x="77" y="25" />
    				</Size>
    				<Anchors>
    					<Anchor point="TOPLEFT">
    						<Offset x="63" y="-57" />
    					</Anchor>
    				</Anchors>
    				<Backdrop />
    				<Scripts>
    					<OnClick>();</OnClick>
    				</Scripts>
    				<HighlightColor r="0.94" g="0.94" b="0.94" />
    				<DisabledColor r="0" g="0" b="0" />
    			</Button>
    		</Frames>
    		<Layers>
    			<Layer level="OVERLAY">
    				<FontString name="FontString1" inherits="GameFontNormal" text="Easy Control Interface">
    					<Size>
    						<AbsDimension x="122" y="27" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT">
    							<Offset x="44" y="-24" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    			</Layer>
    		</Layers>
    		<Scripts>
    			<OnDragStart>self:StartMoving();</OnDragStart>
    			<OnDragStop>self:StopMovingOrSizing();</OnDragStop>
    			<OnClick>Leave_Party_OnClick();</OnClick>
    		</Scripts>
    	</Frame>
    </Ui>


    I got the leave party to work, this part:

    <Scripts>
    <OnClick>();</OnClick>
    </Scripts>

    Needed to be:

    <OnClick>Leave_Party_OnClick();</OnClick>
    Posted in: Addon Ideas
  • 0

    posted a message on Help with my first
    -- Author      : wwwDot
    -- Create Date : 11/14/2010 5:05:10 PM
    
    
    -- function OutsideFrame_OnLoad()
    --	OutSideFrame:RegisterEvent("
    -- end
    
    
    function Leave_Party_OnClick()
    	LeaveParty()
    end
    
    -- function InviteGuild_OnClick()
    -- end


    I used AddOn Studio first, which made the xml but i'm trying to edit it.
    Posted in: Addon Ideas
  • 0

    posted a message on Help with my first
    I have now tried:

    -- Author      : wwwDot
    -- Create Date : 11/14/2010 5:05:10 PM
    
    function LeaveParty_OnClick()
    	LeaveParty()
    end


    and

    -- Author      : wwwDot
    -- Create Date : 11/14/2010 5:05:10 PM
    
    function LeaveParty_OnClick()
    	LeaveParty();
    end


    Neither of them work, I click the button and it delays for about a second and does nothing.
    Posted in: Addon Ideas
  • 0

    posted a message on Help with my first
    Inviting a person to a guild is a hassle, leaving the party can slow you down, inviting someone to join your party is also a little slower than it needs to be.

    I was thinking, I want to create and AddOn, where it will always be on the UI, but movable, And has the options of:

    Leave Party
    Invite to Party
    Invite to Guild
    Follow
    (and maybe more)

    But since this is my first time creating an AddOn, i was wondering a few things.

    Is the .xml file written by you, or does it create itself after writing the .lua?

    How would i 'write' an outside frame, the size, color, transparency, etc etc. In the .xml?

    I have what i think would be right for the Leave party inside the .lua:

    -- Author      : wwwDot
    -- Create Date : 11/14/2010 5:05:10 PM
    
    function LeaveParty_OnClick()
    	if  (LeaveParty())
    	   SetText("You have left the party!");
    	elseif  (!LeaveParty())
    	   SetText("You are not in a party!");
    end


    I'm not sure about the elseif (!LeaveParty()), In JavaScript that would be if it can't leave party.

    Can anyone help me out?
    Posted in: Addon Ideas
  • 0

    posted a message on Hello
    Testing to see if I got it working.

    /edit

    Got it.
    Posted in: General Chat
  • 0

    posted a message on Hello
    Thank you.

    Also, I can't get my signature to show for some reason. There's no box to check that says include signature or anything like that.
    Posted in: General Chat
  • 0

    posted a message on Hello
    Thank you for the reply.

    That was going to be my next question...

    Is there a compiled list of API codes and functions for the WoW database, or is the only way by reading already created AddOn's. I have no problem with writing the code myself, I've been doing that for awhile. But the only way I can learn a new language is by writing in it so I would need the API functions.

    My first project I want to create myself is an altered UI and maybe later on (if possible) make it 'editable' in-game by the user. So they can make the custom interface they want altered to their needs.

    But as I said before I need the API. Thank's for any information given.
    Posted in: General Chat
  • 0

    posted a message on Hello
    Hello everyone. My name is shadde or wwwDot :)

    I've spent some time with JavaScript but thats really all.

    I took some time last night to look at the .lua files for blizzards AddOn's and the language looks pretty simular.

    I also downloaded AddOn Studio last night, to try to use it to base the AddOn around, but it just isn't doing it for me, it's very buggy, and annoying. Is there another program to build a base AddOn like that or do we have to code like in the old days?

    This is my official hello, and i look forward to seeing you all around, and getting to know you.

    Regards,

    wwwDot
    Posted in: General Chat
  • To post a comment, please or register a new account.