|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
06-03-2014, 07:53 PM
|
|
Sarnak
|
|
Join Date: Dec 2013
Posts: 46
|
|
$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!
|
06-03-2014, 08:29 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Try this:
Code:
if ($npc->GetItemStat(ID, "reqlevel") >= 65) {
$npc->AddItem(ID, -1, 1);
}
|
06-04-2014, 12:13 PM
|
|
Sarnak
|
|
Join Date: Dec 2013
Posts: 46
|
|
Quote:
Originally Posted by Kingly_Krab
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.
|
06-04-2014, 12:49 PM
|
|
Demi-God
|
|
Join Date: Mar 2003
Location: USA
Posts: 1,067
|
|
Quote:
Originally Posted by Kingly_Krab
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...
|
06-04-2014, 12:52 PM
|
|
Sarnak
|
|
Join Date: Dec 2013
Posts: 46
|
|
Quote:
Originally Posted by Scorpious2k
Ummmm.... didn't vithmiris ask for <= 65 not >= 65?
*pokes the Krab.
|
Hahah, I noticed that, but of course no biggie
|
06-04-2014, 03:25 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
My bad, I was doing some other stuff and I thought I could help, so I wrote that. :P
|
06-04-2014, 04:02 PM
|
|
Demi-God
|
|
Join Date: Mar 2003
Location: USA
Posts: 1,067
|
|
Quote:
Originally Posted by Kingly_Krab
Try this:
Code:
if ($npc->GetItemStat(ID, "reqlevel") >= 65) {
$npc->AddItem(ID, -1, 1);
}
|
Quote:
Originally Posted by Kingly_Krab
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...
|
06-04-2014, 06:55 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Quote:
Originally Posted by Scorpious2k
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!
|
06-04-2014, 09:04 PM
|
|
Sarnak
|
|
Join Date: Dec 2013
Posts: 46
|
|
That did the trick, thanks again Kingly!
|
06-04-2014, 11:08 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
Quote:
Originally Posted by vithmiris
That did the trick, thanks again Kingly!
|
You're welcome. By the way, is your server public? If so, what's the name?
|
06-05-2014, 10:00 AM
|
|
Sarnak
|
|
Join Date: Dec 2013
Posts: 46
|
|
Quote:
Originally Posted by Kingly_Krab
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.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 07:57 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|