Thread Tools Display Modes
01-01-09, 09:01 AM   #1
aussiexile
A Deviate Faerie Dragon
Join Date: Dec 2008
Posts: 14
need help retrieving player Lvl

hey im looking for a function that will retrieve a players lvl for outputing to a chat channel.

UnitLevel("unit") only returns my lvl....if usd in a filter anyone else's lvl shows up as 0

any help muchly appreciated
  Reply With Quote
01-01-09, 09:15 AM   #2
Ravendwyr
A Flamescale Wyrmkin
 
Ravendwyr's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 139
UnitLevel("player") returns your own level.
UnitLevel("target") returns the level of your target, or -1 if your target is unfriendly and a higher level than your own.
UnitLevel("mouseover") is the same as the above, except it works for players you have highlighted with the cursor.
UnitLevel("focus") works for those you did /focus on.

You can also add an extra "target" to the argument (e.g. "mouseovertarget")

You will most likely need a /who query to find the level of anything else.

Sorry if that's not much help to you.
__________________
Twitter | GitHub
  Reply With Quote
01-01-09, 09:46 AM   #3
Bangerz
A Fallenroot Satyr
 
Bangerz's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 27
This is for the gratz mod yeah?

http://www.wowwiki.com/API_SendWho

charname, guildname, level, race, class, zone, classFileName = GetWhoInfo(index)


Since this is for the users guild, you can search using the guild name plus the player name.

Last edited by Bangerz : 01-01-09 at 09:59 AM.
  Reply With Quote
01-01-09, 12:31 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
why not use the guild roster?
__________________
"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
01-01-09, 05:18 PM   #5
Bangerz
A Fallenroot Satyr
 
Bangerz's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 27
Actually that plus a handler for people around you using the levelling event would be easier.
  Reply With Quote
01-01-09, 10:36 PM   #6
aussiexile
A Deviate Faerie Dragon
Join Date: Dec 2008
Posts: 14
Originally Posted by Bangerz View Post
This is for the gratz mod yeah?

http://www.wowwiki.com/API_SendWho

charname, guildname, level, race, class, zone, classFileName = GetWhoInfo(index)


Since this is for the users guild, you can search using the guild name plus the player name.
Yes this is for the gratz mod. How do i get the lvl from the GetWhoInfo()??
and Send Who sends a system messages doesnt it??? is there a way to stop that?

Originally Posted by Seerah View Post
why not use the guild roster?
Can u access the Guild Roster from a mod to retrieve a user level? if so can u please tell me how?

Originally Posted by Bangerz View Post
Actually that plus a handler for people around you using the leveling event would be easier.
and last but not least....please explain lol

i apologize to all for the seemingly inane questions but there seems to be no info available to complete noobs to modding, all info makes sense after i know what im doing lol
  Reply With Quote
01-01-09, 11:10 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
http://www.wowwiki.com/API_GetGuildRosterInfo or http://wowprogramming.com/docs/api/GetGuildRosterInfo

For a beginning coder, I suggest going through wowwiki, there's the wowprogramming site (you should also pick up a copy of the book), and to learn lua, there's http://www.lua.org/pil/
__________________
"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
01-01-09, 11:13 PM   #8
aussiexile
A Deviate Faerie Dragon
Join Date: Dec 2008
Posts: 14
Originally Posted by Seerah View Post
http://www.wowwiki.com/API_GetGuildRosterInfo or http://wowprogramming.com/docs/api/GetGuildRosterInfo

For a beginning coder, I suggest going through wowwiki, there's the wowprogramming site (you should also pick up a copy of the book), and to learn lua, there's http://www.lua.org/pil/
lol....i have the wowwiki site permantly open lol....6 pages atm lol....am getting the book when i can afford it to....and thanx
  Reply With Quote
01-02-09, 12:03 AM   #9
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by aussiexile View Post
lol....i have the wowwiki site permantly open lol....6 pages atm lol....am getting the book when i can afford it to....and thanx
The book is online.
  Reply With Quote
01-02-09, 12:06 AM   #10
aussiexile
A Deviate Faerie Dragon
Join Date: Dec 2008
Posts: 14
address....ive only seen the supplement online not the actual book itself
  Reply With Quote
01-02-09, 12:08 AM   #11
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Yes, the book is only available for purchase. The website is its supplement.
__________________
"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
01-02-09, 12:10 AM   #12
aussiexile
A Deviate Faerie Dragon
Join Date: Dec 2008
Posts: 14
Originally Posted by Seerah View Post
Yes, the book is only available for purchase. The website is its supplement.
thats what i thought lol

with GetGuildRosterInfo(index) is there a way to use the players name???
or a function to get the players index??
  Reply With Quote
01-02-09, 12:13 AM   #13
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Ow, i though you were talking about PIL, not WOWP
  Reply With Quote
01-03-09, 02:04 PM   #14
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by aussiexile View Post
with GetGuildRosterInfo(index) is there a way to use the players name???
or a function to get the players index??
Code:
for i = 1, GetNumGuildMembers() do
     local name, rank, rankIndex, level, class, zone, note, officernote, online, status, classFileName = GetGuildRosterInfo(i)
     if name == "NameOfPlayerYouWant" then
          -- do your thing here
          break
     end
end
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » need help retrieving player Lvl


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