You last visited: Today at 11:17
Advertisement
[Fix] V21 Dungeon NPC
Discussion on [Fix] V21 Dungeon NPC within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.
03/19/2022, 19:15
#1
elite*gold: 0
Join Date: Jul 2015
Posts: 11
Received Thanks: 10
[Fix] V21 Dungeon NPC
Hi everyone,
V21 WorldDialog doesn't contain the code for the NPC that teleports you into the Contamined Trails dungeon.
More infos about this dungeon and how to enter it
.
Here's the fix for this! (Note that in the server source, the define for this is SCRIPT_ENTER_INSTANCEDUNGEON).
Quote:
+ in WorldDialog/FunctionsInfo.h
Find
Code:
typedef int (WINAPI *PFAddGPPoint)( NPCDIALOG_INFO* pInfo , int nAddGPPoint );
Add right after
Code:
typedef int (WINAPI* PFEnterInstanceDungeon)(NPCDIALOG_INFO* pInfo, DWORD dwTeleWorld, int nX, int nY, int nZ);
typedef int (WINAPI* PFChkPartyLowLevel)(NPCDIALOG_INFO* pInfo, int nLv);
Find
Code:
PFAddGPPoint AddGPPoint;
Add right after
Code:
PFEnterInstanceDungeon EnterInstanceDungeon;
PFChkPartyLowLevel ChkPartyLowLevel;
+ in WorldDialog/NpcScript.cpp
Find the g_nKeys array, go at the end, you should have something like this
Code:
42,
43,
865,
866,
};
Add right after 866,
Find
Code:
if (::strcmp("AddGPPoint", szFunc) == 0)
{
/*kNPCScript.*/AddGPPoint(args.at(0));
return 0;
}
Add right after
Code:
if (::strcmp("EnterInstanceDungeon", szFunc) == 0)
{
return EnterInstanceDungeon(static_cast<DWORD>(args.at(0)), args.at(1), args.at(2), args.at(3));
}
if (::strcmp("ChkPartyLowLevel", szFunc) == 0)
{
return ChkPartyLowLevel(args.at(0));
}
+ in WorldDialog/NpcScript.h
Find
Code:
void AddGPPoint( int nAddGPPoint );
Add right after
Code:
int EnterInstanceDungeon(DWORD dwTeleWorld, int nX, int nY, int nZ);
int ChkPartyLowLevel(int nLvl);
+ in WorldDialog/NpcScriptHelper.cpp
Find
Code:
void CNpcScript::AddGPPoint( int nAddGPPoint )
{
if( m_pInfo != NULL )
{
Functions* pTable = m_pInfo->GetFunctions();
if( pTable != NULL )
{
pTable->AddGPPoint( m_pInfo , nAddGPPoint );
}
}
}
Add right after
Code:
int CNpcScript::EnterInstanceDungeon(DWORD dwTeleWorld, int nX, int nY, int nZ)
{
if (m_pInfo != NULL)
{
Functions* pTable = m_pInfo->GetFunctions();
if (pTable != NULL)
{
return pTable->EnterInstanceDungeon(m_pInfo, dwTeleWorld, nX, nY, nZ);
}
}
return 0;
}
int CNpcScript::ChkPartyLowLevel(int nLvl)
{
if (m_pInfo != NULL)
{
Functions* pTable = m_pInfo->GetFunctions();
if (pTable != NULL)
{
return pTable->ChkPartyLowLevel(m_pInfo, nLvl);
}
}
return 0;
}
Hope this kind of release will encourage you to use V21
Ssam.
03/20/2022, 17:29
#2
elite*gold: 0
Join Date: Jan 2009
Posts: 1,741
Received Thanks: 1,674
You forgot to add both functions to the Functions struct.
FunctionsInfo.h, below
Code:
PFAddGPPoint AddGPPoint;
add those
Code:
PFEnterInstanceDungeon EnterInstanceDungeon;
PFChkPartyLowLevel ChkPartyLowLevel;
03/20/2022, 20:40
#3
elite*gold: 0
Join Date: Jul 2015
Posts: 11
Received Thanks: 10
Quote:
Originally Posted by
xTwiLightx
You forgot to add both functions to the Functions struct.
FunctionsInfo.h, below
Code:
PFAddGPPoint AddGPPoint;
add those
Code:
PFEnterInstanceDungeon EnterInstanceDungeon;
PFChkPartyLowLevel ChkPartyLowLevel;
Thanks I updated the thread !
All times are GMT +2. The time now is 11:18 .