Quote:
Code:
CheckQuests(zone->GetShortName(), "%%item%%", tmp->CastToNPC()->GetNPCTypeID(), TradeList[0], tmp); Code:
CheckQuests(zone->GetShortName(), "%%item%%", tmp->CastToNPC()->GetNPCTypeID(), TradeList[0-3], tmp); |
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); |
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++) { |
Quote:
|
Sounds very impressive! Looks like I'd better wait for the next EQEmu version before doing any more quest work.
|
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 |
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 |
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.