Jump to content
  • 0

Scripting quest progression from gameobject


Corsol

Question

Hi!

I'm scripting a quest progression that need interaction of some things, but basically i need to increment gameobject counter of quest to set his progression.

The quest is Evaquate the Merchant Square

What i've done is to script the interacion between player and door. So the door now spawn required creature but i can't increment quest progression (that need a gameobject)

Here is my code, where i use pPlayer->SendQuestUpdateAddCreatureOrGo(...) method to "do the magic".... but it doesn't work.....

Server log say

WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL
WORLD: Received opcode CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY
SESSION: received not handled opcode UNKNOWN (0x7302)

That mean method called correctly but response from client was not coded?

Anyone has scripted something similar and can help me?

/*######
## go_merchant_square_door
######*/

enum {
CREATURE_FRIGHTENED_CITYZEN			= 34981,
CREATURE_RAMPAGING_WORGEN			= 35660,

//QUEST_EVAQUATE_THE_MERCHANT_SQUARE 	= 14098,
QUEST_CREATURE_OR_GO 				= 35830
};

bool GOUse_go_merchant_square_door(Player* pPlayer, GameObject* pGo)
{
pGo->SummonCreature(CREATURE_FRIGHTENED_CITYZEN, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 10000, false);
int worgenProb = urand(0, 9);
if (worgenProb <= 7)
	pGo->SummonCreature(CREATURE_RAMPAGING_WORGEN, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000, false);
const Quest* pQuest = sObjectMgr.GetQuestTemplate(QUEST_EVAQUATE_THE_MERCHANT_SQUARE);

pPlayer->SendQuestUpdateAddCreatureOrGo(pQuest, pPlayer->GetObjectGuid(), QUEST_CREATURE_OR_GO, currCreatureOrGO+1);

   return true;
}

Thanks!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use