This function returns the int value of an item's type. Syntax is GetItemType(Item*).
LUA:GetItemType()
LUA Function: GetItemType()
Moderator: Team Members
- thefoof
- Retired
- Posts: 630
- Joined: Wed Nov 07, 2012 7:36 pm
- Location: Florida
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: LUA Function: GetItemType()
Exxxxcellent. Thank you.
Quick question though... is this just returning the value of the enum for item_type? (Armor, Weapon, Ranged...) If so, that might not be enough since non-bows can be equipped in the Ranged slot (right?) However, for the immediate need, this will do fine.
I like Jab's idea of IsBow(), which might be the long-term solution.
Quick question though... is this just returning the value of the enum for item_type? (Armor, Weapon, Ranged...) If so, that might not be enough since non-bows can be equipped in the Ranged slot (right?) However, for the immediate need, this will do fine.
I like Jab's idea of IsBow(), which might be the long-term solution.
- thefoof
- Retired
- Posts: 630
- Joined: Wed Nov 07, 2012 7:36 pm
- Location: Florida
Re: LUA Function: GetItemType()
Hmm looking it over I don't know that we really have a way to differ thrown weapons and bows in the first place? It looks like we just have ranged but no subtype as a bow or bandolier/satchel ect.
- thefoof
- Retired
- Posts: 630
- Joined: Wed Nov 07, 2012 7:36 pm
- Location: Florida
Re: LUA Function: GetItemType()
It looks like this *might* be set by the item's skill_id_req or skill_id_req2, anybody know for sure? Either way we don't run any kind of check for this in the server when it comes to attacking with a ranged weapon currently.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: LUA Function: GetItemType()
BUG!!!thefoof wrote:Either way we don't run any kind of check for this in the server when it comes to attacking with a ranged weapon currently.
so I could equip a ranged sausage, and kill things with it?
- thefoof
- Retired
- Posts: 630
- Joined: Wed Nov 07, 2012 7:36 pm
- Location: Florida
Re: LUA Function: GetItemType()
Let me explainJohn Adams wrote:BUG!!!
so I could equip a ranged sausage, and kill things with it?
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: LUA Function: GetItemType()
BUG!!!11/
Who is online
Users browsing this forum: No registered users and 0 guests