Jump to content

Recommended Posts

Hi, i have the problem in the quest:

when kill begin

 syschat("test") -- this say x2

end

 

i saw in epvp

6e5095b39d4cfe6b585d980288a149c2.png

 

and i put like this:

 

b264b3c44bd27c656457574342979849.png

but doesnt work, anyone know how solve it?

 

Thanks.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/5379-problem-with-double-kill-in-quest/
Share on other sites

  • Premium

If I understood well the source ( I didn't tested yet ), the solution you tried is quite stupid.

if (npc != QUEST_NO_NPC)
	m_mapNPC[QUEST_NO_NPC].OnKill(*pPC);

This extra function will also do a extra call, so more triggers.

 

Try this - not tested and if it works let us know:

Find this ( SAME function you posted ):

if (m_mapNPC[QUEST_NO_NPC].OnKill(*pPC))
	return;

if (leader)
{
	m_pCurrentPartyMember = ch;
	m_mapNPC[QUEST_NO_NPC].OnPartyKill(*GetPC(leader->GetPlayerID()));
}

And comment it. Try to test if it's still bugged. This also may cause another bug: the function may not trigger at all! So test it in all ways possible. Kill a player and then a mob.

  • Love 1

If I understood well the source ( I didn't tested yet ), the solution you tried is quite stupid.

if (npc != QUEST_NO_NPC)
	m_mapNPC[QUEST_NO_NPC].OnKill(*pPC);

This extra function will also do a extra call, so more triggers.

 

Try this - not tested and if it works let us know:

Find this ( SAME function you posted ):

if (m_mapNPC[QUEST_NO_NPC].OnKill(*pPC))
	return;

if (leader)
{
	m_pCurrentPartyMember = ch;
	m_mapNPC[QUEST_NO_NPC].OnPartyKill(*GetPC(leader->GetPlayerID()));
}

And comment it. Try to test if it's still bugged. This also may cause another bug: the function may not trigger at all! So test it in all ways possible. Kill a player and then a mob.

ok i go to try it, thanks for reply :)

  • Active+ Member

Open your questmanager.cpp;
 
Search:

m_mapNPC[npc].OnKill(*pPC);

Change with this:

if (npc > MAIN_RACE_MAX_NUM)
	m_mapNPC[npc].OnKill(*pPC);
m_mapNPC[QUEST_NO_NPC].OnKill(*pPC);

----

 

Search:

m_pCurrentPartyMember = ch;

if (m_mapNPC[npc].OnPartyKill(*GetPC(leader->GetPlayerID())))
	return;

pPC = GetPC(pc);

Change with this:

m_pCurrentPartyMember = ch;

if (npc > MAIN_RACE_MAX_NUM)
	m_mapNPC[npc].OnPartyKill(*GetPC(leader->GetPlayerID()));
m_mapNPC[QUEST_NO_NPC].OnPartyKill(*GetPC(leader->GetPlayerID()));

//pPC = GetPC(pc);
  • Love 1

In game/src/questmanager.cpp in void CQuestManager::Kill(unsigned int pc, unsigned int npc)

Change:

m_mapNPC[npc].OnKill(*pPC);
with:

if(npc > 0)
{
m_mapNPC[npc].OnKill(*pPC);
}

ok, thanks i go to try it.

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.