BUG..

All Helbreath Server Source Discussion here.
Dshaked
<3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

Hello I have little problem... when I get majestetic point, and change map, and kill 1 any enemy I get another majestetic point. Looking fix for this.
Thx
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Sentinel
Loyal fan
Posts: 462
Joined: Thu Jan 11, 2007 4:16 pm

Post by Sentinel »

Dshaked wrote: Hello I have little problem... when I get majestetic point, and change map, and kill 1 any enemy I get another majestetic point. Looking fix for this.
Thx
What files are you using/running?
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->charlie says:<br>i may own outpost but im not a nerd<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->(locobans @ Mar 12 2007, 10:48 PM) <br>"Remember while peeing, If you shake it more than twice you playing with it..." <br><!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

Based from 2.24 long time ago... never detected this problem, how do I fix it?
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
marleythe9
Loyal fan
Posts: 391
Joined: Sat Mar 26, 2005 12:41 am

Post by marleythe9 »

wierd.. never herd of problem like this.
<img src='http://freewebs.com/trickro/70s.png' border='0' alt='user posted image' /><img src='http://freewebs.com/trickro/70s2.jpg' border='0' alt='user posted image' />
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

Yeah thats why im looking help :-)
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Dax
&lt;3 bd long time
Posts: 785
Joined: Mon Apr 18, 2005 3:19 pm

Post by Dax »

Try looking up my level function then check the gizon var through your source after adding it. My function is really simple and commented nicely, it should be the only thing adjusting gizon on players. This SHOULD fix the bug.

[EDIT]
Heres the check level function I'm using atm, it's more up-to-date to what I released before. Same deal; replace bCheckLevelUp with this void function and remove the old level up gold methods. HBU is also using this(With an admin fix on gizon). I never considered GMs when coding this.

Code: Select all

/*****************************************************************
**---------------------------FUNCTION---------------------------**
**             void Game::CheckLevelUp(int iClientH)            **
**-------------------------DESCRIPTION--------------------------**
** Level-Up                                                     **
**  - Level +1                                                  **
**  - +3 Level Up Points                                        **
**  - Level 5 and under receive +100 Bonus Gold                 **
**  - Level 20 and under receive +300 Bonus Gold                **
**  - Reset Next Level EXP                                      **
**  - Civilian Level Limit                                      **
**      Player mode switches to Combatant                       **
**      when the limit is reached                               **
** Max Level                                                    **
**  - Majestic Points +1                                        **
**  - EXP Reset to the previous Level (Rollover is carried)     **
**------------------------CREATION DATE-------------------------**
**                January 30, 2007; Dax                **
*****************************************************************/
void CGame::CheckLevelUp(int iClientH)
{
	class CItem * pItem = NULL;
	int iLUGold = NULL;

	if (m_pClientList[iClientH] == NULL) return;
	// If the player is a GM the function will return
	if (m_pClientList[iClientH]->m_iAdminUserLevel > 0) return;
	// If the player has not gained a level the function will return
	if (m_pClientList[iClientH]->m_iExp < m_pClientList[iClientH]->m_iNextLevelExp) return;
	// Level Up Loop 
	while (m_pClientList[iClientH]->m_iExp >= m_pClientList[iClientH]->m_iNextLevelExp)
	{
  // Max Level
  if (m_pClientList[iClientH]->m_iLevel >= DEF_PLAYERMAXLEVEL) 
  {
  	// Reset EXP to the previous Level (Returns any additional EXP)
  	m_pClientList[iClientH]->m_iExp -= (m_pClientList[iClientH]->m_iNextLevelExp - m_iLevelExpTable[m_iPlayerMaxLevel]);
  	// +1 Majestic Points
  	if (m_pClientList[iClientH]->m_iGizonItemUpgradeLeft < DEF_MAXGIZONPOINT )
    m_pClientList[iClientH]->m_iGizonItemUpgradeLeft++;
  	// Notify Player -> Update Client Majestic Points
  	SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_GIZONITEMUPGRADELEFT, m_pClientList[iClientH]->m_iGizonItemUpgradeLeft, 1, NULL, NULL);
  }
  // Level Up
  else
  {
  	// +1 Level
  	m_pClientList[iClientH]->m_iLevel++;
  	// Level 5 and under receive +100 Bonus Gold
  	if (m_pClientList[iClientH]->m_iLevel <= 5) iLUGold += 100;
  	// Level 20 and under receive +300 Bonus Gold
  	else if (m_pClientList[iClientH]->m_iLevel <= 20) iLUGold += 300;
  	// +3 Level Up Points
  	m_pClientList[iClientH]->m_iLU_Pool += 3;
  	// Reset Next Level EXP
  	m_pClientList[iClientH]->m_iNextLevelExp = m_iLevelExpTable[m_pClientList[iClientH]->m_iLevel + 1];
  	// Notify Player -> Update Client Level
  	SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_LEVELUP, NULL, NULL, NULL, NULL);
  	// Reset Item Effects (Update stats for higher level)
  	CalcTotalItemEffect(iClientH, -1, FALSE);
  	// Civilian Level Limit
  	if ((m_pClientList[iClientH]->m_iLevel >= DEF_CIVILIANLIMIT) && (m_pClientList[iClientH]->m_bIsHunter == TRUE ) ) 
    SetNoHunterMode(iClientH,TRUE);
  }
	}
	// Notify Player -> Updated Client EXP
	SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_EXP, NULL, NULL, NULL, NULL);
	// Give Level Up Gold Bonus
	if(iLUGold != NULL) 
	{
  pItem = new class CItem;
  if (_bInitItemAttr(pItem, "Gold") == FALSE) { delete pItem; return; }
  else { pItem->m_dwCount = (DWORD)iLUGold; bAddItem(iClientH, pItem, NULL); }
	}
	return;
}
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

Thx very much. Now I test it :->
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

Hehe... I fixed some errors.

I added to netmessages.h:
#define DEF_MAXGIZONPOINT 0x0EA03209
#define DEF_CIVILIANLIMIT 0x0EA03208

Game.h:
void CGame::CheckLevelUp(int iClientH);

Client.h:
BOOL m_bIsInsideOwnTown;
BOOL m_bIsHunter;

1 error left and it looks like this:
Game.cpp(62030) : error C2065: 'SetNoHunterMode' : undeclared identifier
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Dax
&lt;3 bd long time
Posts: 785
Joined: Mon Apr 18, 2005 3:19 pm

Post by Dax »

Dshaked wrote: Hehe... I fixed some errors.

I added to netmessages.h:
#define DEF_MAXGIZONPOINT                  0x0EA03209
#define DEF_CIVILIANLIMIT                  0x0EA03208

Game.h:
void CGame::CheckLevelUp(int iClientH);

Client.h:
BOOL m_bIsInsideOwnTown;
BOOL m_bIsHunter;

1 error left and it looks like this:
Game.cpp(62030) : error C2065: 'SetNoHunterMode' : undeclared identifier
Oops forgot about the 2.20 factor.

[EDIT]
I just saw your defines. They're wrong. Those are just defines you can use to give a label to values in your files, change the value of the label and everywhere you use it changes. But yeah point is those arent for messages, they are for configuration.

#define DEF_MAXGIZONPOINT 1000 // Feel free to play around
#define DEF_CIVILIANLIMIT 100
[/EDIT]

This is all that function is:

Code: Select all

void CGame::SetNoHunterMode(int iClientH,BOOL bSendMsg)  // v2.20 2002-12-31 ¹Î°£ÀÎ ¸ðµå ·¹º§ Á¦ÇÑ °ú À̵¿Áö¿ª Á¦ÇÑ Ãß°¡ 
{
#ifndef DEF_V219
	return;
#endif

	if (m_pClientList[iClientH] == NULL) return;

	if( memcmp(m_pClientList[iClientH]->m_cLocation, "arehunter", 9) == 0 )
	{
  strcpy( m_pClientList[iClientH]->m_cLocation, "aresden" );
	}	
	else if( memcmp(m_pClientList[iClientH]->m_cLocation, "elvhunter", 9) == 0 )
	{
  strcpy( m_pClientList[iClientH]->m_cLocation, "elvine" );
	}

	if (m_pClientList[iClientH]->m_bIsHunter == TRUE)
  m_pClientList[iClientH]->m_bIsHunter = FALSE;

	if (bSendMsg == TRUE)
	{
  SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_RESPONSE_HUNTMODE, NULL, NULL, NULL, m_pClientList[iClientH]->m_cLocation);

  // Ư¼ºÀÌ ¹Ù²î¹Ç·Î ¿Ü¾çÀ» »õ·Î º¸³½´Ù. 
  SendEventToNearClient_TypeA((short)iClientH, DEF_OWNERTYPE_PLAYER, MSGID_EVENT_MOTION, DEF_OBJECTNULLACTION, NULL, NULL, NULL);

	}

}
If you just replace the call to SetNoHunterMode with the following code then you can avoid adding any new functions which will only get used once.

Code: Select all

{
	if( memcmp(m_pClientList[iClientH]->m_cLocation, "arehunter", 9) == 0 )
  strcpy( m_pClientList[iClientH]->m_cLocation, "aresden" );	
	else if( memcmp(m_pClientList[iClientH]->m_cLocation, "elvhunter", 9) == 0 )
  strcpy( m_pClientList[iClientH]->m_cLocation, "elvine" );
	if (m_pClientList[iClientH]->m_bIsHunter == TRUE)
  m_pClientList[iClientH]->m_bIsHunter = FALSE;
	SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_RESPONSE_HUNTMODE, NULL, NULL, NULL, m_pClientList[iClientH]->m_cLocation);
	SendEventToNearClient_TypeA((short)iClientH, DEF_OWNERTYPE_PLAYER, MSGID_EVENT_MOTION, DEF_OBJECTNULLACTION, NULL, NULL, NULL);
}
Anyway hope the end result fixes your original bug. Good luck.
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

yeah I replaced bchecklevelup functio with that... and it looks now:
void CGame::CheckLevelUp(int iClientH)
{
class CItem * pItem = NULL;
int iLUGold = NULL;

if (m_pClientList[iClientH] == NULL) return;
// If the player is a GM the function will return
if (m_pClientList[iClientH]->m_iAdminUserLevel > 0) return;
// If the player has not gained a level the function will return
if (m_pClientList[iClientH]->m_iExp < m_pClientList[iClientH]->m_iNextLevelExp) return;
// Level Up Loop
while (m_pClientList[iClientH]->m_iExp >= m_pClientList[iClientH]->m_iNextLevelExp)
{
// Max Level
if (m_pClientList[iClientH]->m_iLevel >= DEF_PLAYERMAXLEVEL)
{
  // Reset EXP to the previous Level (Returns any additional EXP)
  m_pClientList[iClientH]->m_iExp -= (m_pClientList[iClientH]->m_iNextLevelExp - m_iLevelExpTable[m_iPlayerMaxLevel]);
  // +1 Majestic Points
  if (m_pClientList[iClientH]->m_iGizonItemUpgradeLeft < DEF_MAXGIZONPOINT )
   m_pClientList[iClientH]->m_iGizonItemUpgradeLeft++;
  // Notify Player -> Update Client Majestic Points
  SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_GIZONITEMUPGRADELEFT, m_pClientList[iClientH]->m_iGizonItemUpgradeLeft, 1, NULL, NULL);
}
// Level Up
else
{
  // +1 Level
  m_pClientList[iClientH]->m_iLevel++;
  // Level 5 and under receive +100 Bonus Gold
  if (m_pClientList[iClientH]->m_iLevel <= 5) iLUGold += 100;
  // Level 20 and under receive +300 Bonus Gold
  else if (m_pClientList[iClientH]->m_iLevel <= 20) iLUGold += 300;
  // +3 Level Up Points
  m_pClientList[iClientH]->m_iLU_Pool += 3;
  // Reset Next Level EXP
  m_pClientList[iClientH]->m_iNextLevelExp = m_iLevelExpTable[m_pClientList[iClientH]->m_iLevel + 1];
  // Notify Player -> Update Client Level
  SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_LEVELUP, NULL, NULL, NULL, NULL);
  // Reset Item Effects (Update stats for higher level)
  CalcTotalItemEffect(iClientH, -1, FALSE);
  // Civilian Level Limit
  if ((m_pClientList[iClientH]->m_iLevel >= DEF_CIVILIANLIMIT) && (m_pClientList[iClientH]->m_bIsHunter == TRUE ) )
   {
if( memcmp(m_pClientList[iClientH]->m_cLocation, "arehunter", 9) == 0 )
{
strcpy( m_pClientList[iClientH]->m_cLocation, "aresden" );
}
else if( memcmp(m_pClientList[iClientH]->m_cLocation, "elvhunter", 9) == 0 )
{
strcpy( m_pClientList[iClientH]->m_cLocation, "elvine" );
}
if (m_pClientList[iClientH]->m_bIsHunter == TRUE)
m_pClientList[iClientH]->m_bIsHunter = FALSE;
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_RESPONSE_HUNTMODE, NULL, NULL, NULL, m_pClientList[iClientH]->m_cLocation);
SendEventToNearClient_TypeA((short)iClientH, DEF_OWNERTYPE_PLAYER, MSGID_EVENT_MOTION, DEF_OBJECTNULLACTION, NULL, NULL, NULL);
}
}
}
// Notify Player -> Updated Client EXP
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_EXP, NULL, NULL, NULL, NULL);
// Give Level Up Gold Bonus
if(iLUGold != NULL)
{
pItem = new class CItem;
if (_bInitItemAttr(pItem, "Gold") == FALSE) { delete pItem; return; }
else { pItem->m_dwCount = (DWORD)iLUGold; bAddItem(iClientH, pItem, NULL); }
}
return;
}
Added to netmessages.h
#define DEF_NOTIFY_RESPONSE_HUNTMODE               0x0EA03206
And deleted BOOL bCheckLevelUp(int iClientH); from game.h

Now it says:
Game.cpp(17824) : error C2065: 'bCheckLevelUp' : undeclared identifier
And that line look in game.cpp:
    bCheckLevelUp(sOwnerH);
Do I need rename all bCheckLevelUp with CheckLevelUp?
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Dax
&lt;3 bd long time
Posts: 785
Joined: Mon Apr 18, 2005 3:19 pm

Post by Dax »

Dshaked wrote: Do I need rename all bCheckLevelUp with CheckLevelUp?
Yes and change DEF_NOTIFY_RESPONSE_HUNTMODE to 0x0BA9

Also in game.h the function needs to be void not bool.

PS. Did you notice my edit about your other defines in my prev post?
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

Doing that define thing just now :D

Where do I add these:?

#define DEF_MAXGIZONPOINT 1000 // Feel free to play around
#define DEF_CIVILIANLIMIT 100
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Dax
&lt;3 bd long time
Posts: 785
Joined: Mon Apr 18, 2005 3:19 pm

Post by Dax »

Dshaked wrote: Doing that define thing just now :D

Where do I add these:?

#define DEF_MAXGIZONPOINT 1000 // Feel free to play around
#define DEF_CIVILIANLIMIT 100
game.h or globaldef.h, both will work.
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

Okay.
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Dshaked
&lt;3 bd long time
Posts: 747
Joined: Tue Oct 11, 2005 6:40 pm

Post by Dshaked »

omg..
\Game.cpp(17824) : error C2065: 'bCheckLevelUp' : undeclared identifier
\Game.cpp(25131) : error C2065: 'SetNoHunterMode' : undeclared identifier
That happened when funktion look like this:
/*****************************************************************
**---------------------------FUNCTION---------------------------**
**             void Game::CheckLevelUp(int iClientH)            **
**-------------------------DESCRIPTION--------------------------**
** Level-Up                                                     **
**  - Level +1                                                  **
**  - +3 Level Up Points                                        **
**  - Level 5 and under receive +100 Bonus Gold                 **
**  - Level 20 and under receive +300 Bonus Gold                **
**  - Reset Next Level EXP                                      **
**  - Civilian Level Limit                                      **
**      Player mode switches to Combatant                       **
**      when the limit is reached                               **
** Max Level                                                    **
**  - Majestic Points +1                                        **
**  - EXP Reset to the previous Level (Rollover is carried)     **
**------------------------CREATION DATE-------------------------**
**                January 30, 2007; Dax                **
*****************************************************************/
void CGame::CheckLevelUp(int iClientH)
{
class CItem * pItem = NULL;
int iLUGold = NULL;

if (m_pClientList[iClientH] == NULL) return;
// If the player is a GM the function will return
if (m_pClientList[iClientH]->m_iAdminUserLevel > 0) return;
// If the player has not gained a level the function will return
if (m_pClientList[iClientH]->m_iExp < m_pClientList[iClientH]->m_iNextLevelExp) return;
// Level Up Loop
while (m_pClientList[iClientH]->m_iExp >= m_pClientList[iClientH]->m_iNextLevelExp)
{
// Max Level
if (m_pClientList[iClientH]->m_iLevel >= DEF_PLAYERMAXLEVEL)
{
  // Reset EXP to the previous Level (Returns any additional EXP)
  m_pClientList[iClientH]->m_iExp -= (m_pClientList[iClientH]->m_iNextLevelExp - m_iLevelExpTable[m_iPlayerMaxLevel]);
  // +1 Majestic Points
  if (m_pClientList[iClientH]->m_iGizonItemUpgradeLeft < DEF_MAXGIZONPOINT )
   m_pClientList[iClientH]->m_iGizonItemUpgradeLeft++;
  // Notify Player -> Update Client Majestic Points
  SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_GIZONITEMUPGRADELEFT, m_pClientList[iClientH]->m_iGizonItemUpgradeLeft, 1, NULL, NULL);
}
// Level Up
else
{
  // +1 Level
  m_pClientList[iClientH]->m_iLevel++;
  // Level 5 and under receive +100 Bonus Gold
  if (m_pClientList[iClientH]->m_iLevel <= 5) iLUGold += 100;
  // Level 20 and under receive +300 Bonus Gold
  else if (m_pClientList[iClientH]->m_iLevel <= 20) iLUGold += 300;
  // +3 Level Up Points
  m_pClientList[iClientH]->m_iLU_Pool += 3;
  // Reset Next Level EXP
  m_pClientList[iClientH]->m_iNextLevelExp = m_iLevelExpTable[m_pClientList[iClientH]->m_iLevel + 1];
  // Notify Player -> Update Client Level
  SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_LEVELUP, NULL, NULL, NULL, NULL);
  // Reset Item Effects (Update stats for higher level)
  CalcTotalItemEffect(iClientH, -1, FALSE);
  // Civilian Level Limit
{
if( memcmp(m_pClientList[iClientH]->m_cLocation, "arehunter", 9) == 0 )
strcpy( m_pClientList[iClientH]->m_cLocation, "aresden" );
else if( memcmp(m_pClientList[iClientH]->m_cLocation, "elvhunter", 9) == 0 )
strcpy( m_pClientList[iClientH]->m_cLocation, "elvine" );
if (m_pClientList[iClientH]->m_bIsHunter == TRUE)
m_pClientList[iClientH]->m_bIsHunter = FALSE;
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_RESPONSE_HUNTMODE, NULL, NULL, NULL, m_pClientList[iClientH]->m_cLocation);
SendEventToNearClient_TypeA((short)iClientH, DEF_OWNERTYPE_PLAYER, MSGID_EVENT_MOTION, DEF_OBJECTNULLACTION, NULL, NULL, NULL);
}
}
}
// Notify Player -> Updated Client EXP
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_EXP, NULL, NULL, NULL, NULL);
// Give Level Up Gold Bonus
if(iLUGold != NULL)
{
pItem = new class CItem;
if (_bInitItemAttr(pItem, "Gold") == FALSE) { delete pItem; return; }
else { pItem->m_dwCount = (DWORD)iLUGold; bAddItem(iClientH, pItem, NULL); }
}
return;
}
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Post Reply