Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::LUA

Quests::LUA Section regarding LUA scripts, help, questions, answers

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2015, 12:59 PM
Rabuk
Fire Beetle
 
Join Date: Jul 2015
Posts: 14
Default $npc->GetItemStat($itemid, "id"); in LUA?

Hello,
anyone knows the LUA function for: $npc->GetItemStat($itemid, "id");?

I have looked in the sourcecode, lua reference and lua modules but cant find any function like that.

Thanks in advance
Reply With Quote
  #2  
Old 08-04-2015, 05:11 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

I had NO idea how to do this either lol.. but at the same time I did know how to do it.. was a huge brain fart .

Here are the identifiers that can be used..
https://github.com/EQEmu/Server/blob..._item.cpp#L908


I kept trying to do..
"myitem:GetName()" -- which is wrong .. but the correct way is in the code below. Which is why I was having a brain fart .. :(

Code:
function event_say(e)
	
	local myitem = Item(1001);
	
	if(e.message:findi("hail")) then
		e.other:Message(335, "Item name is.. " .. myitem:Name());
	end

end

Last edited by NatedogEZ; 08-04-2015 at 05:22 PM..
Reply With Quote
  #3  
Old 08-04-2015, 06:11 PM
Rabuk
Fire Beetle
 
Join Date: Jul 2015
Posts: 14
Default

Quote:
Originally Posted by NatedogEZ View Post
I had NO idea how to do this either lol.. but at the same time I did know how to do it.. was a huge brain fart .

Here are the identifiers that can be used..
https://github.com/EQEmu/Server/blob..._item.cpp#L908


I kept trying to do..
"myitem:GetName()" -- which is wrong .. but the correct way is in the code below. Which is why I was having a brain fart .. :(

Code:
function event_say(e)
	
	local myitem = Item(1001);
	
	if(e.message:findi("hail")) then
		e.other:Message(335, "Item name is.. " .. myitem:Name());
	end

end
Ah cool thank you very much. Will check out this soon.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:49 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3