• 0

    posted a message on A noobie need some help making addon
    Thanks for the tip to debug it. I printed out the variables arg1,2,3 and arg3 had to be "Rank 4" instead of just 4
    Posted in: AddOn HELP!
  • 0

    posted a message on A noobie need some help making addon
    <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="Frame.lua" />
    	<Font name="Font2" />
    	<GameTooltip name="GameTooltip1" inherits="GameTooltipTemplate" />
    	<Frame name="Frame1" hidden="true" movable="true">
    		<Size>
    			<AbsDimension x="250" y="189" />
    		</Size>
    		<Anchors>
    			<Anchor point="TOPLEFT">
    				<Offset x="740" y="-287" />
    			</Anchor>
    		</Anchors>
    		<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>
    		</Backdrop>
    		<Scripts>
    			<OnLoad>Frame1_OnLoad();</OnLoad>
    			<OnDragStart>self:StartMoving();</OnDragStart>
    			<OnDragStop>self:StopMovingOrSizing();</OnDragStop>
    			<OnEvent>Frame1_OnEvent();</OnEvent>
    		</Scripts>
    	</Frame>
    </Ui>


    function Frame1_OnLoad()
    	this:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED"); 
    	--this:RegisterEvent("COMBAT_LOG_EVENT");
    end
    
    function Frame1_OnEvent()
    	if((event == "UNIT_SPELLCAST_SUCCEEDED") and (arg1 == "player") and (arg2 == "Frostbolt") and (arg3 == "16") ) then
    	--if(event == "UNIT_SPELLCAST_SUCCEEDED")then
    		print("Hello world!");
    	end
    	
    
    end
    


    Im using addon studio to make this. This will automatic generate the xml where i can dus drag a frame on the UI. The lua part is what i noobed out :P
    Posted in: AddOn HELP!
  • 0

    posted a message on A noobie need some help making addon
    I just tried

    if((event == "UNIT_SPELLCAST_SUCCEEDED") and (arg1 == "player") and (arg2 == "Frostbolt") and (arg3 == "16") )

    and it gave me no error, but when i cast this skill "hello world" isnt showing. What could be the problem?
    Posted in: AddOn HELP!
  • 0

    posted a message on A noobie need some help making addon
    Thanks for pointing out to use combat events, ill try to use that instead. But i would still like to know how i can use the arguments in my piece of code. Could anyone help me with that?
    Posted in: AddOn HELP!
  • 0

    posted a message on A noobie need some help making addon
    i want to keep track on how many times, for instance polymorph rank 4 has been casted, so i can let the addon post warning to my arena partner

    so i would like to use the arguments ("unitID", "spell", "rank") -> ("self", "Polymorph", "4")

    But i dont know where and how i can implement and use these arguments
    Posted in: AddOn HELP!
  • 0

    posted a message on A noobie need some help making addon
    Hey all, im new to add-on programming and im trying to make an add-on to help me and my arena partner. The currently problem i have is, i want to use UNIT_SPELLCAST_SUCCEEDED event which can have 3 arguments:

    Signature: ("unitID", "spell", "rank")

    Arguments: unitID - The unit that's casting. (string) spell - The name of the spell that's being casted. (string) rank - The rank of the spell that's being casted. (string)

    I tried this as a test which works for every completed cast:

    function Frame1_OnLoad()
    this:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");
    end

    function Frame1_OnEvent()
    if(event == "UNIT_SPELLCAST_SUCCEEDED") then
    print("Hello world!");
    end
    end
    But now i want to use the arguments to pick the correct spell, how could i implement this?
    Posted in: AddOn HELP!
  • 0

    posted a message on Can't Login to the Forums
    Quote from Allara
    I had the same problem. Log out on wowace.com (not the forums), then log in on wowace.com (not the forums), then log in on the forums. Same effect as clearing your cookies.


    Thanks that helped out :)
    Posted in: General Chat
  • To post a comment, please or register a new account.