- Joined
- Jun 19, 2009
- Messages
- 1,491
- Reaction score
- 460
Hi,
Since my server died I tought I do release it here. None of the players actually used to quest .
what does it do?
It reads contant.inc and then loads the quest rates / other rates.
Why load rates using constant.inc?
Because doing rates via event.lua is just wrong event.lua is for events.
Add the quest rates in event.lua yourself it won't be hard ^^
Bugs: Penya and exp won't be shown correctly if I'm right. You can fix this easily in the source.(Not Sure)
First define __QUGETQUESTFACTOR in versionCommon.h
WorldServer
VerisonCommon.h
Open DPCoreClient.cpp
Look for
And add this below it
Now open up DPDatabaseClient.cpp
Look for
And add this below
Open User.cpp and look for
And add this below
Open MsgHdr.h and look for
And add this under it
Now open up Project.cpp
Look for
And add this under it
In the same file look for
and this below
In the same file look for
And add
Still in the same file hehe xD
Look for
And REPLACE it with
Now look for
REPLACE it with
Now look for
REPLACE it with
yay we are done with project.cpp.
Now open up project.h
Look for
And ADD under it
Neuz
VerisonCommon.h
Now check this for 4 seconds
You are all done but wait! there is more
open your Project.cpp
find
replace it with
Now look for
and add this under it
Now you are done with the source
Now open up Constant.inc from your resource folder
and add this at the bottom
FAQ
-Q what visual bugs occur?
-A penya and exp you get won't be shown right.
-
-
-
-
Credits
Quget aka Me 95% for making this and release it.
Rose 5% for daring me to make this.
Since my server died I tought I do release it here. None of the players actually used to quest .
what does it do?
It reads contant.inc and then loads the quest rates / other rates.
Why load rates using constant.inc?
Because doing rates via event.lua is just wrong event.lua is for events.
Add the quest rates in event.lua yourself it won't be hard ^^
Bugs: Penya and exp won't be shown correctly if I'm right. You can fix this easily in the source.(Not Sure)
First define __QUGETQUESTFACTOR in versionCommon.h
WorldServer
VerisonCommon.h
Code:
//Epic Quest factor
#define __QUGETQUESTFACTOR
Open DPCoreClient.cpp
Look for
Code:
void CDPCoreClient::OnGameRate( CAr & ar, DPID, DPID, OBJID )
{
FLOAT fRate;
BYTE nFlag;
ar >> fRate;
ar >> nFlag;
switch( nFlag )
{
case GAME_RATE_SHOPCOST:
{
prj.m_fShopCost = fRate;
}
break;
Code:
#ifdef __QUGETQUESTFACTOR
case GAME_RATE_QUEST_EXP:
{
prj.m_fQuestExpRate = fRate;
}
break;
case GAME_RATE_QUEST_PEN:
{
prj.m_fQuestPenRate = fRate;
}
break;
#endif
Now open up DPDatabaseClient.cpp
Look for
Code:
g_UserMng.AddGameRate( prj.m_fMonsterExpRate, GAME_RATE_MONSTEREXP );
g_UserMng.AddGameRate( prj.m_fGoldDropRate, GAME_RATE_GOLDDROP );
g_UserMng.AddGameRate( prj.m_fItemDropRate, GAME_RATE_ITEMDROP );
g_UserMng.AddGameRate( prj.m_fMonsterHitRate, GAME_RATE_MONSTERHIT );
Code:
#ifdef __QUGETQUESTFACTOR
g_UserMng.AddGameRate( prj.m_fQuestExpRate, GAME_RATE_QUEST_EXP );
g_UserMng.AddGameRate( prj.m_fQuestPenRate, GAME_RATE_QUEST_PEN );
#endif
Open User.cpp and look for
Code:
if( ((CMover*)this)->IsAuthHigher( AUTH_GAMEMASTER ) )
{
AddGameRate( prj.m_fItemDropRate, GAME_RATE_ITEMDROP );
AddGameRate( prj.m_fGoldDropRate, GAME_RATE_GOLDDROP );
AddGameRate( prj.m_fMonsterExpRate, GAME_RATE_MONSTEREXP );
AddGameRate( prj.m_fMonsterHitRate, GAME_RATE_MONSTERHIT );
Code:
#ifdef __QUGETQUESTFACTOR
AddGameRate( prj.m_fQuestExpRate, GAME_RATE_QUEST_EXP );
AddGameRate( prj.m_fQuestPenRate, GAME_RATE_QUEST_PEN );
#endif
Open MsgHdr.h and look for
Code:
#define GAME_SKILL_EXPERTSP (BYTE)0x11
#define GAME_SKILL_PROSP (BYTE)0x12
#define GAME_RATE_SHOP_BUY (BYTE)0x13
#define GAME_RATE_SHOP_SELL (BYTE)0x14
Code:
//#ifdef __QUGETQUESTFACTOR//IT might be better not to do a #if here ?:S
#define GAME_RATE_QUEST_EXP (BYTE)0x15
#define GAME_RATE_QUEST_PEN (BYTE)0x16
//#endif
Now open up Project.cpp
Look for
Code:
FLOAT CProject::m_fItemDropRate = 1.0f; // ¸ó½ºÅÍ ¾ÆÀÌÅÛ µå·Ó·ü
FLOAT CProject::m_fGoldDropRate = 1.0f; // ¸ó½ºÅÍ Æä³Ä µå·Ó·ü
FLOAT CProject::m_fMonsterExpRate = 1.0f; // ¸ó½ºÅÍ °æÇèÄ¡·ê
FLOAT CProject::m_fMonsterHitRate = 1.0f; // ¸ó½ºÅÍ °ø°Ý·ü
And add this under it
Code:
#ifdef __QUGETQUESTFACTOR
FLOAT CProject::m_fQuestExpRate = 1.0f;
FLOAT CProject::m_fQuestPenRate = 1.0f;
#endif
In the same file look for
Code:
#ifdef __WORLDSERVER
void CProject::SetGlobal( UINT type, float fValue )
{
if( fValue < 0.1f )
fValue = 0.1f;
switch( type )
{
and this below
Code:
#ifdef __QUGETQUESTFACTOR
case GAME_RATE_QUEST_EXP:
m_fQuestExpRate = fValue;
printf("QuestPen:[%f]",m_fQuestExpRate);
break;
case GAME_RATE_QUEST_PEN:
m_fQuestPenRate = fValue;
printf("QuestPen:[%f]",m_fQuestPenRate);
break;
#endif
In the same file look for
Code:
void CProject::ReadConstant( CScript& script )
{
do
{
script.GetToken();
if( script.Token == "itemDropRate" )
{
script.GetToken();// bypass '='
SetGlobal( GAME_RATE_ITEMDROP, script.GetFloat() );
}
else if( script.Token == "monsterExpRate" )
{
script.GetToken();// bypass '='
SetGlobal( GAME_RATE_MONSTEREXP, script.GetFloat() );
}
else if( script.Token == "monsterHitRate" )
{
script.GetToken();// bypass '='
SetGlobal( GAME_RATE_MONSTERHIT, script.GetFloat() );
}
Code:
#ifdef __QUGETQUESTFACTOR
else if ( script.Token == "questExpRate" )
{
script.GetToken();// bypass '='
SetGlobal( GAME_RATE_QUEST_EXP, script.GetFloat() );
}
else if( script.Token == "questPenRate" )
{
script.GetToken();// bypass '='
SetGlobal( GAME_RATE_QUEST_PEN, script.GetFloat() );
}
#endif
Still in the same file hehe xD
Look for
Code:
script.GetToken(); // (
propQuest.m_nEndRewardGoldMin = script.GetNumber();
script.GetToken(); // ,
propQuest.m_nEndRewardGoldMax = script.GetNumber();
Code:
#ifdef __QUGETQUESTFACTOR
script.GetToken(); // (
propQuest.m_nEndRewardGoldMin = script.GetNumber() * prj.m_fQuestPenRate;
if(propQuest.m_nEndRewardGoldMin > 1000000000 || propQuest.m_nEndRewardGoldMin < 0)
{
propQuest.m_nEndRewardGoldMin = 1000000000;
}
script.GetToken(); // (
propQuest.m_nEndRewardGoldMax = script.GetNumber() * prj.m_fQuestPenRate;
if(propQuest.m_nEndRewardGoldMax > 1000000000 || propQuest.m_nEndRewardGoldMax < 0)
{
propQuest.m_nEndRewardGoldMax = 1000000000;
}
#else
script.GetToken(); // (
propQuest.m_nEndRewardGoldMin = script.GetNumber();
script.GetToken(); // ,
propQuest.m_nEndRewardGoldMax = script.GetNumber();
#endif
Now look for
Code:
script.GetToken(); // (
propQuest.m_nEndRewardExpMin = script.GetNumber();
script.GetToken(); // ,
propQuest.m_nEndRewardExpMax = script.GetNumber();
REPLACE it with
Code:
#ifdef __QUGETQUESTFACTOR
script.GetToken(); // (
propQuest.m_nEndRewardExpMin = script.GetNumber() * prj.m_fQuestExpRate;
if(propQuest.m_nEndRewardExpMin < 0)
{
propQuest.m_nEndRewardExpMin = 2000000000;//Change if you like
}
script.GetToken();// ,
propQuest.m_nEndRewardExpMax = script.GetNumber() * prj.m_fQuestExpRate;
if(propQuest.m_nEndRewardExpMax < 0)
{
propQuest.m_nEndRewardExpMax = 2000000000;//Change if you like
}
#else
script.GetToken(); // (
propQuest.m_nEndRewardExpMin = script.GetNumber();
script.GetToken(); // ,
propQuest.m_nEndRewardExpMax = script.GetNumber();
#endif
Now look for
Code:
script.GetToken(); // (
propQuest.m_nEndRemoveGold = script.GetNumber();
REPLACE it with
Code:
#ifdef __QUGETQUESTFACTOR
script.GetToken(); // (
propQuest.m_nEndRemoveGold = script.GetNumber() * prj.m_fQuestPenRate;
if(propQuest.m_nEndRemoveGold > 1000000000 || propQuest.m_nEndRemoveGold < 0)
{
propQuest.m_nEndRemoveGold = 1000000000;// Max
}
#else
script.GetToken(); // (
propQuest.m_nEndRemoveGold = script.GetNumber();
#endif
yay we are done with project.cpp.
Now open up project.h
Look for
Code:
public:
static FLOAT m_fItemDropRate; // ¸ó½ºÅÍ ¾ÆÀÌÅÛ µå·Ó·ü
static FLOAT m_fGoldDropRate; // ¸ó½ºÅÍ Æä³Ä µå·Ó·ü
static FLOAT m_fMonsterExpRate; // ¸ó½ºÅÍ °æÇèÄ¡·ê
static FLOAT m_fMonsterHitRate; // ¸ó½ºÅÍ °ø°Ý·ü
Code:
#ifdef __QUGETQUESTFACTOR
static FLOAT m_fQuestExpRate;
static FLOAT m_fQuestPenRate;
#endif
Neuz
VerisonCommon.h
Code:
//Epic Quest factor
#define __QUGETQUESTFACTOR
You are all done but wait! there is more
open your Project.cpp
find
Code:
LoadConstant( "Constant.inc" );
Code:
#ifndef __QUGETQUESTFACTOR
LoadConstant( "Constant.inc" );
#endif
Code:
BOOL CProject::OpenProject( LPCTSTR lpszFileName )
{
CScanner scanner;
if(scanner.Load( lpszFileName )==FALSE)
return FALSE;
#if !defined(__CLIENT)
LoadPreFiles();
#endif
Code:
#ifdef __QUGETQUESTFACTOR
#ifdef __WORLDSERVER
LoadConstant( "Constant.inc" );
#endif
#endif
Now you are done with the source
Now open up Constant.inc from your resource folder
and add this at the bottom
Code:
lang LANG_USA// YOUR COMPILED LANGUAGE!
{
formula
{
itemDropRate = 1//Item drop rate
goldDropRate = 1 //Gold drop rate
monsterExpRate = 1// Exp rate
questExpRate = 100//quest exp rate
questPenRate = 100//Quest penya rate
monsterHitRate = 1.0//Monster hit rate(How hard monsters hit)
dwVagSP = 1//Vagrant skill cost
dwExpertSP = 2//Expert job skill cost
dwProSP = 3//Pro job skill cost
}
}
FAQ
-Q what visual bugs occur?
-A penya and exp you get won't be shown right.
-
-
-
-
Credits
Quget aka Me 95% for making this and release it.
Rose 5% for daring me to make this.
Last edited: