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
|