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?
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
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.
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)
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
## 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
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.
0
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
0
0
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
how do i let this work?
0
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.
0
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.
0
0
ps addon studio won't let me rename the frame so i m definitly using other software now
0
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
0
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
0
xml
0
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
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.
0
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.