• 0

    posted a message on xml and html
    Quote from Adirelle

    And if you are going to write real addons, beyond rendering some text, you will have to use XML or its Lua counterpart.


    the only intentions i have with it is to change some UI stuff and make it look different so i won't need lua for it
    Posted in: Need Help?
  • 0

    posted a message on track npc code.
    hi... i m trying to creat an addon that trigger a soundtrack playing whenever a certain npc is near. the soundtrack part is not problem but i m having trouble writing the code to track the npc. any help with that?
    Posted in: Need Help?
  • 0

    posted a message on xml and html
    hi i m relatively new to creating addons and also new to xml

    i am trying to create some interface changes and was wondering if you could use HTML instead of xml? i noticed blizzard uses html to publish there TOU so how do i do this...

    i found that you could put a html file into a xml file and then use a css stylesheet in my html but it doesn't realy work... the example off the code i have is here

    <?xml version="1.0" encoding="utf-8"?>
    <Frame name="name" parent="UIparent" movable="false">
    	<size><RelDimension x="1" y="1"/> </size>
    	<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
    		<head>
    		<link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
    		</head>
    		<body>
    			<div id="name">
    			</div>
    		</body>
    	</html>
    </Frame>


    how do i let this work?
    Posted in: Need Help?
  • 0

    posted a message on testing addons
    Quote from Starinnia
    If you aren't adding new files or changing the TOC file you don't need to log out or quit WoW to pick up your changes.

    Simple fix the error, save the file, and type /reload in game.


    thank you for the hint.



    but then my next question would be. how do i test arena or bg addons. i know i can enter dungeons by myself but i don't feel like doing hundreds of arena's (and getting my rating dropped) just to fix some bugs.
    Posted in: General Chat
  • 0

    posted a message on testing addons
    is there a way to test your wow addons off line?

    i m debugging on the moment and i realy hate having to type in the authenticator key every time i have one line that went wrong.
    Posted in: General Chat
  • 0

    posted a message on lua file not loading
    i m more used to dreamweaver than notepad but anyway thanks for your help so far. you ve opened my eyes :) (i always have problems with case senitivity)
    Posted in: Need Help?
  • 0

    posted a message on lua file not loading
    is it possible to write the addons with Adobe Dream weaver? if appearantly the addon studio is that bad

    ps addon studio won't let me rename the frame so i m definitly using other software now
    Posted in: Need Help?
  • 0

    posted a message on lua file not loading
    Quote from egingell
    Um... yeah, your Lua file is not loading because it's jam packed with syntax errors. You should turn on Lua errors because clearly you have them disabled, or get BugSack + BugGrabber.


    i use bugsac +buggrabber but they seemed to get stuck on a nil value i couldn't find and didn't give me more bugs
    Posted in: Need Help?
  • 0

    posted a message on lua file not loading
    Quote from egingell
    Line 18: ilvlcheck:PLAYER_LOGIN();



    Edit (more): You have no frame named 'ilvlcheck' anywhere in your XML. You should be tossing errors like mad.


    Case matters.


    i use addon studio for world of warcraft so ther probably went something wrong when i changed the name from the default one i ll try to fix that
    Posted in: Need Help?
  • 0

    posted a message on lua file not loading
    toc file
    ## Title: ilvl check
    ## Version: 1.0 beta
    ## Author: Thorismud
    ## Interface: 40100
    ## Notes: brings up a screen with the average 'equiped' item level of your party members
    
    ilvlcheck.xml
    
    ilvlcheck.lua


    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="Frame.lua" />
    	<Frame name="Frame1" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
    		<Size>
    			<AbsDimension x="286" y="183" />
    		</Size>
    		<Anchors>
    			<Anchor point="CENTER">
    				<Offset x="-145" y="239" />
    			</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>
    		<Layers>
    			<Layer level="OVERLAY">
    				<FontString name="FontString1" inherits="GameFontNormal" text="Player">
    					<Size>
    						<AbsDimension x="258" y="20" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT">
    							<Offset x="14" y="-15" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    				<FontString name="FontString2" inherits="GameFontNormal" text="Party Slot empty">
    					<Size>
    						<AbsDimension x="258" y="20" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT">
    							<Offset x="14" y="-41" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    				<FontString name="FontString3" inherits="GameFontNormal" text="Party Slot Empty">
    					<Size>
    						<AbsDimension x="258" y="20" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT">
    							<Offset x="14" y="-67" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    				<FontString name="FontString4" inherits="GameFontNormal" text="Party SLot empty">
    					<Size>
    						<AbsDimension x="258" y="20" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT">
    							<Offset x="14" y="-93" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    				<FontString name="FontString5" inherits="GameFontNormal" text="Party Slot empty">
    					<Size>
    						<AbsDimension x="258" y="20" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT">
    							<Offset x="14" y="-119" />
    						</Anchor>
    					</Anchors>
    				</FontString>
    			</Layer>
    		</Layers>
    		<Frames>
    			<Button name="Button1" inherits="UIPanelButtonTemplate" text="Post">
    				<Size>
    					<AbsDimension x="75" y="23" />
    				</Size>
    				<Anchors>
    					<Anchor point="TOPLEFT">
    						<Offset x="197" y="-145" />
    					</Anchor>
    				</Anchors>
    				<Scripts>
    					<OnClick>Postbtn_OnClick();</OnClick>
    				</Scripts>
    			</Button>
    			<Button name="Button1" inherits="UIPanelButtonTemplate" text="refresh">
    				<Size>
    					<AbsDimension x="75" y="23" />
    				</Size>
    				<Anchors>
    					<Anchor point="TOPLEFT">
    						<Offset x="14" y="-144" />
    					</Anchor>
    				</Anchors>
    				<Scripts>
    					<OnClick>Refreshbtn_OnClick();</OnClick>
    				</Scripts>
    			</Button>
    		</Frames>
    		<Scripts>
    			<OnLoad>();
    self:RegisterForDrag("LeftButton");</OnLoad>
    			<OnDragStart>();
    self:StartMoving();</OnDragStart>
    			<OnDragStop>();
    self:StopMovingOrSizing();</OnDragStop>
    			<OnEvent>ilvlcheck_OnEvent();</OnEvent>
    		</Scripts>
    	</Frame>
    </Ui>
    Posted in: Need Help?
  • 0

    posted a message on lua file not loading
    i must admit my code is probably the worst code you ve ever seen.

    i have ne experience in lua. never done it before
    i am a student graphic and digital design. i usualy use html, xml ,java ,script ,css

    i started building my lua knowlege about 6 hours ago.

    here is my lua script

    -- Author      : Thorismud
    -- Create Date : 4/28/2011 3:27:04 PM
    -- Version     : 1.0 beta
    
    --Register Events
    
    ilvlcheck:RegisterEvent("PLAYER_EQUIPMENT_CHANGED");
    ilvlcheck:RegisterEvent("PARTY_MEMBER_CHANGED");
    Ilvlcheck:RegisterEvent("PLAYER_LOGIN");
    -- set some stuff right
        
        local playerName , myItemLevel;
        local partyOne , itemLevelOne , classOne;
        local partyTwo , itemLevelTwo , classTwo;
        local partyTree , itemLevelTree , classTree;
        local partyFour , itemLevelFour , classFour;
    --Event functions
    ilvlcheck:PLAYER_LOGIN();
    ilvlcheck:changeilvl;
    
    function ilvlcheck:PLAYER_EQUIPMENT_CHANGED()
        myItemLevel = ilvlcheck:getItemLvl("player");
        ilvlcheck:changeilvl;
    end
    function ilvlcheck:PLAYER_LOGIN()
        my itemLevel= ilvlcheck:getItemLvl("player");
        DEFAULT_CHAT_FRAME:AddMessage("ilvl check v1.0 beta");
        ilvlcheck:changeilvl;
    end
    function ilvlcheck:PARTY_MEMBER_CHANGED()
       for p= 1,5 do
            local party = GetLFGPartyResults(_,_,_,p);
            if(party)then
                local name,_,class = GetLFGPartyResults(party);
                if (p == 2) then
                    partyOne = name;
                    classOne = class;
                    itemLevelOne = ilvlcheck:getItemLvl(partyOne)
                end
                if (p == 3) then
                    partyTwo = name;
                    classTwo = class;
                    itemLevelTwo = ilvlcheck:getItemLvl(partyTwo)
                end
                if (p == 4) then
                    partyTree = name;
                    classTree = class;
                    itemLevelTree = ilvlcheck:getItemLvl(partyTree)
                end
                if (p == 5) then
                    partyFour = name;
                    classFour= class;
                    itemLevelFour= ilvlcheck:getItemlvl(partyFour)
                end
            end 
        end
        ilvlcheck:changeilvl;
    end
    
    
    -- calculating equiped item lvl
    -------------------------------
    function ilvlcheck:getItemLvl(unit)
        local ilvl, count= 0 , 0; 
        --check all itemslots (s) 
        --item slot 19 is the tabard so will not be added
        for s = 1, 18 do
            if(s==4) then
                --skip  shirts will not be added
            else
                link = GetInventoryItemLink(unit, s);
                if (link) then
                    local iname,_,level = GetItemInfo(link);
                    if (level) then
                        count = count +1
                        ilvl = ilvl + level
                    end
                end
            end
        end   
        local avglvl = 0;
        local emptyslot= 0;
        if (count > 0) then
            avglvl = floor((ilvl / count) + .5);
        else avglvl = 0;
        end
        --check for empty itemslots
        if (count == 16) then
            emptyslot = 0;
        else 
            emptyslot = 1;
        end
    end
    
    -- putting results on screen        
    function ilvlcheck:changeilvl
        Player:SetText(UnitName("player").. ": ilvl =" ..myItemLevel );
        if(party)then
            PartyMember1:SetText(partyOne..": ilvl = ".. itemLevelOne );
            PartyMember2:SetText(partyTwo..": ilvl = ".. itemLevelTwo );
            PartyMember3:SetText(partyTree..": ilvl = ".. itemLevelTree );
            PartyMember4:SetText(partyFour..": ilvl = ".. itemLevelFour );
       else
            PartyMember1:SetText("test" );
            PartyMember2:SetText("Party Slot Empty" );
            PartyMember3:SetText("Party Slot Empty" );
            PartyMember4:SetText("Party Slot Empty" );
    end
    --posting to party chat
    function Postbtn_OnClick()
        sendChatMessage("ilvlcheck v1.0 beta posting average Equiped itemlevel","PARTY");
        sendChatMessage(UnitName("player").. ": ilvl =".. myItemLevel,"PARTY");
        sendChatMessage(partyOne..": ilvl ="..itemLevelOne,"PARTY");
        sendChatMessage(partyTwo..": ilvl ="..itemLevelTwo,"PARTY");
        sendChatMessage(partyTree..": ilvl ="..itemLevelTree,"PARTY");
        sendChatMessage(partyFour..": ilvl ="..itemLevelFour,"PARTY");
    end
    
    

    i have a box with 5 fontstrings in it called Player , partyMember1, partyMember2, partyMember3 and partymember4

    and i ve got one button called Postbtn

    that s about it

    if you can make some notes on what is wrong and how to fix it that would be very kind.

    also the notes would help me get better in the future.
    Posted in: Need Help?
  • 0

    posted a message on lua file not loading
    hi i am new to creating addons.

    i 'am working on my fist addon using Add on studio for world of warcraft 2010

    i worked my way trough and when i was to test my addon i noticed my lua files are not loaded in the wow client.

    my xml files work. i get my interface. but nothing happens.

    u used myDebug to check on my variables but none of them seem to exist.

    i even put a variabla "a" worth "10" at the start of my lua file but it does not exist.

    i checked my toc and the lua file and xml file are in there. writen corectly.

    i don't know what can cause this problem so here i am.
    Posted in: Need Help?
  • To post a comment, please or register a new account.