Item related LUA functions

Discussions on development of both the EQ2Emulator LUA Script Engine and Script specifications

Moderator: Team Members

Post Reply
User avatar
thefoof
Retired
Posts: 630
Joined: Wed Nov 07, 2012 7:36 pm
Location: Florida

Item related LUA functions

Post by thefoof » Mon Aug 12, 2013 5:21 pm

It occured to me today we had no way of retrieving item pointers through LUA, so I coded some up :D. I also fixed a bug in HasItem() where it was running a check to see if the item was in equipped slots, but it never returned the true or false from that check.

GetEquippedItemBySlot(Player, slot_id)

GetEquippedItemByID(Player, item_id)

GetItemByID(Player, item_id, count, include_bank 0 = false 1 = true)


These are used exactly how they look, just pass a player pointer for Player, and it checks that player for item pointers using the given values, the function then returns a pointer to that item.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Item related LUA functions

Post by John Adams » Tue Aug 13, 2013 1:08 pm

Not to be a pest... but... Wiki? :)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests