02 Feb, 2010, deathrow35 wrote in the 1st comment:
Votes: 0
Ok, so I am trying to add to Vassago's quest code. Anyways, I want the item not to be found on a char. I want the char to have to deliver something to a mob but i am writing a code so that the check to see if quest is completed is just not finding the obj on the char. I know not the best way but I have a code in that doesn't let them character get rid of obj unless is questmob or time runs out.
but anyways, here it is

else if (ch->questbox < 1 && ch->countdown > 0)
{

bool obj_found = FALSE;

for (obj = ch->carrying; obj != NULL; obj= obj_next)
{
obj_next = obj->next_content;

if (obj != NULL && obj->pIndexData->vnum != ch->questbox)
{
obj_found = FALSE;
break;
}
}
if (obj_found == FALSE)
{
Then of course it rewards.
The only problem I seem to be having is not completing the quest. I am pretty sure the error is in this. Fixed everything else but can't seem to get it to recognize that the item to be deliverd isnt being carried anymore. I ahave messed with about everything in here to get it to work but can't
02 Feb, 2010, Crelin wrote in the 2nd comment:
Votes: 0
Try not to double post, this topic is already being commented on in another thread…I posted a solution in that thread and the problem with this particular code is that obj_found is always going to equal false if it's defined as false and the only thing that changes it before you check for it being false…would change it to false. Also, try to use code tags when posting bits of code on the forums…makes everything a bit more tidy.
0.0/2