EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Modified WesQuests.cpp for multi item turnins and more (https://www.eqemulator.org/forums/showthread.php?t=3453)

cybert 01-30-2003 04:18 AM

Quote:

Originally Posted by Wiz
use TradeList[0-3] not just 0.

I am assuming here that in client-process.cpp you were speaking of line 3245 that says...
Code:

CheckQuests(zone->GetShortName(), "%%item%%", tmp->CastToNPC()->GetNPCTypeID(), TradeList[0], tmp);
and change the code to this...
Code:

CheckQuests(zone->GetShortName(), "%%item%%", tmp->CastToNPC()->GetNPCTypeID(), TradeList[0-3], tmp);
I've done this and now get nothing when turing in items. Still looking through the code but for now I'm dealing... :)

Trumpcard 01-30-2003 04:34 AM

Im amazed that even compiled...

I didnt think you could put an array range in..

You might want to try something more like this, but don't know 100% if it will work, im just guessing...

CheckQuests(zone->GetShortName(), "%%item%%", tmp->CastToNPC()->GetNPCTypeID(), TradeList[0], tmp);
CheckQuests(zone->GetShortName(), "%%item%%", tmp->CastToNPC()->GetNPCTypeID(), TradeList[1], tmp);
CheckQuests(zone->GetShortName(), "%%item%%", tmp->CastToNPC()->GetNPCTypeID(), TradeList[2], tmp);
CheckQuests(zone->GetShortName(), "%%item%%", tmp->CastToNPC()->GetNPCTypeID(), TradeList[3], tmp);

cybert 01-30-2003 04:40 AM

Got it working for a 4 identical item turn in. 1 in each slot. Here is the code change...

Code:

for (int inum = 0; inum<4; inum++) {
    if (TradeList[inum] != NULL)
        CheckQuests(zone->GetShortName(), "%%item%%", tmp->CastToNPC()->GetNPCTypeID(), TradeList[inum], tmp);
}

Changed the quest to have a single TRIGGER_ITEM and it is working perfectly. Now to get the charges working... :)

mByte 01-30-2003 05:00 AM

Quote:

Originally Posted by cybert
Changed the quest to have a single TRIGGER_ITEM and it is working perfectly. Now to get the charges working... :)

That would be cool to hand in a stack, i know for the longest time maybe still the case you cannot hand in stacked items on eqlive, as it treats it as 1 item.

Drawde 01-31-2003 09:22 AM

Sounds very impressive! Looks like I'd better wait for the next EQEmu version before doing any more quest work.

froglok20 01-31-2003 06:04 PM

My Little Extra for wesquest.cpp
 
after seeing the LEVEL_CHECK script command i got thinking and added CLASS_CHECK sort of the same, just checks class. its intened for single class only quests at the moment, i might update it abit. here is the code for it (to be added in wesquest.cpp)

else if (strstr(command,"CLASS_CHECK") != NULL) {
int8 classpc = this->GetClass();
int8 classreq = atoi(sep.arg[1]);
if(classpc != classreq)
{
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;
}

so enjoy it, ill proberly next work on a RANDOM_TEM_SPAWN for nobo quests you sometimes get monye, noob items or random spells soon (when im not working)

enjoy

froglok20 01-31-2003 06:13 PM

extra info i forgot about CLASS_CHECK
 
hehe forgot to explain how to use it

in ya quest file just add

LEVEL_CHECK 12 (or class number)

this will only allow wizards to do the quest. full list of classes are as followed (from ref sheet)

1 Warrior
2 Cleric
3 Paladin
4 Ranger
5 Shadow Knight
6 Druid
7 Monk
8 Bard
9 Rogue
10 Shaman
11 Necromancer
12 Wizard
13 Magician
14 Enchanter
15 Beastlord
16 Banker
17 GM Warrior
18 GM Cleric
19 GM Paladin
20 GM Ranger
21 GM ShadowKnight
22 GM Druid
23 GM Monk
24 GM Bard
25 GM Rogue
26 GM Shaman
27 GM Necromancer
28 GM Wizard
29 GM Magician
30 GM Enchanter
31 GM Beastlord
32 Shopkeeper


so if you only wanted a banker to be able to do the quest you would add

CLASS_CHECK 16

froglok20 02-03-2003 02:41 PM

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;
}


All times are GMT -4. The time now is 03:04 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.