Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 06-03-2014, 07:53 PM
vithmiris's Avatar
vithmiris
Sarnak
 
Join Date: Dec 2013
Posts: 46
Default $npc->AddItem IF 'reqlevel' is....

I'm using a modified version of a perl script for random loot drops in some zones (posted by Trubles).

I was wondering if it is possible to expand on this to only 'AddItem' if the random itemid was an item that had a 'reqlevel' of <= 65.

Thanks!
Reply With Quote
  #2  
Old 06-03-2014, 08:29 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Try this:
Code:
if ($npc->GetItemStat(ID, "reqlevel") >= 65) {
    $npc->AddItem(ID, -1, 1);
}
Reply With Quote
  #3  
Old 06-04-2014, 12:13 PM
vithmiris's Avatar
vithmiris
Sarnak
 
Join Date: Dec 2013
Posts: 46
Default

Quote:
Originally Posted by Kingly_Krab View Post
Try this:
Code:
if ($npc->GetItemStat(ID, "reqlevel") >= 65) {
    $npc->AddItem(ID, -1, 1);
}

Thanks Kingly, I will do so as soon as I get out of work.
Reply With Quote
  #4  
Old 06-04-2014, 12:49 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

Quote:
Originally Posted by Kingly_Krab View Post
Try this:
Code:
if ($npc->GetItemStat(ID, "reqlevel") >= 65) {
    $npc->AddItem(ID, -1, 1);
}
Ummmm.... didn't vithmiris ask for <= 65 not >= 65?

*pokes the Krab.
__________________
Maybe I should try making one of these servers...
Reply With Quote
  #5  
Old 06-04-2014, 12:52 PM
vithmiris's Avatar
vithmiris
Sarnak
 
Join Date: Dec 2013
Posts: 46
Default

Quote:
Originally Posted by Scorpious2k View Post
Ummmm.... didn't vithmiris ask for <= 65 not >= 65?

*pokes the Krab.
Hahah, I noticed that, but of course no biggie
Reply With Quote
  #6  
Old 06-04-2014, 03:25 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

My bad, I was doing some other stuff and I thought I could help, so I wrote that. :P
Reply With Quote
  #7  
Old 06-04-2014, 04:02 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

Quote:
Originally Posted by Kingly_Krab View Post
Try this:
Code:
if ($npc->GetItemStat(ID, "reqlevel") >= 65) {
    $npc->AddItem(ID, -1, 1);
}
Quote:
Originally Posted by Kingly_Krab View Post
My bad, I was doing some other stuff and I thought I could help, so I wrote that. :P
Don't take it the wrong way, I was just joking with you. Every time I look you are helping someone! We need more like you.
__________________
Maybe I should try making one of these servers...
Reply With Quote
  #8  
Old 06-04-2014, 06:55 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Quote:
Originally Posted by Scorpious2k View Post
Don't take it the wrong way, I was just joking with you. Every time I look you are helping someone! We need more like you.
I know, haha. And yeah, I know!
Reply With Quote
  #9  
Old 06-04-2014, 09:04 PM
vithmiris's Avatar
vithmiris
Sarnak
 
Join Date: Dec 2013
Posts: 46
Default

That did the trick, thanks again Kingly!
Reply With Quote
  #10  
Old 06-04-2014, 11:08 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Quote:
Originally Posted by vithmiris View Post
That did the trick, thanks again Kingly!
You're welcome. By the way, is your server public? If so, what's the name?
Reply With Quote
  #11  
Old 06-05-2014, 10:00 AM
vithmiris's Avatar
vithmiris
Sarnak
 
Join Date: Dec 2013
Posts: 46
Default

Quote:
Originally Posted by Kingly_Krab View Post
You're welcome. By the way, is your server public? If so, what's the name?
LAN based private server; at the moment anyways.
I have lots to learn, but am having a blast so far.
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 07:57 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