Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-03-2003, 02:41 PM
froglok20
Sarnak
 
Join Date: Jan 2003
Posts: 30
Default New Functions in wesquest.cpp

hey iv added 2 new functions to wesquest.cpp thry are

HAVE_ITEM (will check if you have a Item, on, in inventory or in the bank)

and

HAVE_ITEM_ON (will check if you have the item on your person )

examples:

HAVE_ITEM_ON 26776

HAVE_ITEM 1000

hope ya enjoy them

Code:

else if (strstr(command,"HAVE_ITEM_ON") != NULL) // Have a item on them, in their inventory
{
int8 hio = 0;

for (int inum=0; inum<80; inum++) {

if (inum < 10 && this->pp.cursorbaginventory[inum] == atoi(sep.arg[1]))
hio = 1;

if (inum < 30 && this->pp.inventory[inum] == atoi(sep.arg[1]) )
inum = 1;

if (inum < 80 && this->pp.containerinv[inum] == atoi(sep.arg[1]) )
hio = 1;
}
if(!hio)
{
entity_list.NPCMessage(other,true,200,0,"%s says, 'I will have nothing to do with such as you. Begone.'",other->GetName());
break;
}
ps = true;
}

else if (strstr(command,"HAVE_ITEM") != NULL) // Have a item on them, in their inventory or in the bank
{
int8 hiob = 0;

for (int inumb=0; inumb<80; inumb++) {

if (inumb < 80 && this->pp.bank_inv[inumb] == atoi(sep.arg[1]) )

if (inumb < 10 && this->pp.cursorbaginventory[inumb] == atoi(sep.arg[1]))
hiob = 1;

if (inumb < 30 && this->pp.inventory[inumb] == atoi(sep.arg[1]) )
hiob = 1;

if (inumb < 80 && this->pp.containerinv[inumb] == atoi(sep.arg[1]) )
hiob = 1;
}
if(!hiob)
{
entity_list.NPCMessage(other,true,200,0,"%s says, 'I will have nothing to do with such as you. Begone.'",other->GetName());
break;
}
ps = true;
}
__________________
Froglokkkkkkkkkkkkkkk
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:31 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3