Thread Tools Display Modes
01-31-09, 04:44 PM   #1
darkhunter2
A Defias Bandit
Join Date: Jan 2009
Posts: 2
ITEMID and count

Hello all

I am trying to use ItemID in a script to replace "Though wolf meat" in this:

completion={{questgoal={"*","Tough Wolf Meat",8}}},

Can someone help me?

Thanks
  Reply With Quote
01-31-09, 05:13 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by darkhunter2 View Post
Hello all

I am trying to use ItemID in a script to replace "Though wolf meat" in this:

completion={{questgoal={"*","Tough Wolf Meat",8}}},

Can someone help me?

Thanks
Code:
GetItemInfo(750)
  Reply With Quote
01-31-09, 06:30 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Whenever looking for an item, spell, or quest id, go to somewhere like wowhead and look in the address bar. As p3lim already pointed out, the id is 750. See the link here: http://www.wowhead.com/?item=750
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-01-09, 04:30 AM   #4
darkhunter2
A Defias Bandit
Join Date: Jan 2009
Posts: 2
Thanks for your answer.

In deed i don't need to know the Id of an item, i know how to find it. I have already try the GetItemInfo(Itemid) but it return me an error cause the fonction use to count is like format (n,s).

After reading the lua file i fnd this who seems to be the function which count the item:
if goal.questgoal then
local quest,qgoal,count = goal.questgoal[1],goal.questgoal[2],goal.questgoal[3]
if not count then error("Step "..self.CurrentStepNum.." section "..self.CurrentSectionNum.." has bad questgoal.") end
if quest=="*" then
quest = self:ImproviseQuestTitle(qgoal)
end
local questIndex
local questF = self:FindData(self.quests,"title",quest)
if questF then questIndex=questF.index end
if questIndex and questIndex>0 then
local goals,goalsNamed = self:GetQuestLeaderBoards(questIndex)
local questGoal = goalsNamed[qgoal]
if questGoal then
desc = L["stepgoal_questgoal"]:format(questGoal.leaderboard)
else
desc = qgoal .. ": ?"
end
else
desc = qgoal .. ": 0"
end
end
Is there someone who could explain it to me like if i was child of three years old?

thanks

Last edited by darkhunter2 : 02-01-09 at 10:00 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » ITEMID and count

Thread Tools
Display Modes

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