[req] Working Over Level Fix

Submit your code requests, and if you are good at coding come help others with their requests.
Post Reply
Tafka12
<3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Who has working over level fix???
the one from omar_omiez don't seem to work well.
some of them don't fix over level and ppl still get max level +1 :(
so who got it?

EDIT: Ahh sorry i looked Request, cliecked here and fast new topic.
sry admins, move it to Req source thread
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

So noone has it fixed?? :(
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Lemon-Warez
noob
Posts: 13
Joined: Fri Nov 11, 2005 6:23 am
Location: Behind you
Contact:

Post by Lemon-Warez »

you probably mean the the LBL jumb from 315 to 418 or so...
i will code it for you. Dont worry :)
Lemon-Warez admin<br><a href='http://lemon-warez.be' target='_blank'>http://lemon-warez.be</a><br>Over 150 working Warez download them with full speed!
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Yes that too
but in my server many people get to level 301 somewhy. :/ that must be fixed!
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Lemon-Warez
noob
Posts: 13
Joined: Fri Nov 11, 2005 6:23 am
Location: Behind you
Contact:

Post by Lemon-Warez »

than just set the max lvl to 299 :/
Lemon-Warez admin<br><a href='http://lemon-warez.be' target='_blank'>http://lemon-warez.be</a><br>Over 150 working Warez download them with full speed!
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

hum... i don't remember where exactly but you have to add the mj points code with anti over level code...

Maybe in a func called something like CheckLevelUp...

add something like this :

Code: Select all

if(m_pClientList[iClientH]->m_iLevel > 300){
m_pClientList[iClientH]->m_iLevel = 300;
m_pClientList[iClientH]->m_iExp = GetLevelExp(300);
m_pClientList[iClientH]->m_iGizonItemUpgradeLeft += 1;
}
<span style='color:red'>Note : This code is just an exemple and i don't know if the vars and func names are correct...

You'll maybe have to add this in the func that checks the over level limit hack too...</span>

I hope it will show you the way to fix it ;)
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Maybe something like:

Code: Select all

if(m_pClientList[iClientH]->m_iLevel > 300
m_pClientList[iClientH]->m_iLevel -= 1;
m_pClientList[iClientH]->m_iLU_Pool -= 3;
m_pClientList[iClientH]->m_iExp -= 2500000;
m_pClientList[iClientH]->m_iGizonItemUpgradeLeft += 1;
else if if(m_pClientList[iClientH]->m_iLevel < 301
return TRUE;
break;
}
and maybe add it to somewhere like this place:

Code: Select all

 case 61:
   if (_bGetIsStringIsNumber(token) == FALSE) {
    wsprintf(cTxt, "(!!!) Player(%s) data file error! wrong Data format - Connection closed. ", m_pClientList[iClientH]->m_cCharName);
    PutLogList(cTxt);
    delete pContents;
    delete pStrTok;
    return FALSE;
   }
Then it changes it right automaticaly.

lol the uper code, idk much about coding so i put it how i thought it might be :P :ph34r:
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

Hold on a sec, i'm gonna check it out with my wonderfull notepad...

I'll pay all money i have to have VC++ back !!!
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

first of all, go to this func :

_bCheckCharacterData(int iClientH)

Find this :

Code: Select all

	if ((m_pClientList[iClientH]->m_iLevel > m_sMaxPlayerLevel) && (m_pClientList[iClientH]->m_iAdminUserLevel == 0)) {
  wsprintf(G_cTxt, "Packet Editing: (%s) Player: (%s) level above max server level.", m_pClientList[iClientH]->m_cIPaddress, m_pClientList[iClientH]->m_cCharName);
  PutHackLogFileList(G_cTxt);
  return FALSE;
	}
Replace it with :

Code: Select all

	if ((m_pClientList[iClientH]->m_iLevel > 300) && (m_pClientList[iClientH]->m_iAdminUserLevel == 0)) {
  m_pClientList[iClientH]->m_iLevel = 300;
  m_pClientList[iClientH]->m_iExp = iGetLevelExp(300) + 1;
  m_pClientList[iClientH]->m_iGizonItemUpgradeLeft += 1;
  return FALSE;
	}
	if ((m_pClientList[iClientH]->m_iLevel > 301) && (m_pClientList[iClientH]->m_iAdminUserLevel == 0)) {
  wsprintf(G_cTxt, "Packet Editing: (%s) Player: (%s) level above max server level.", m_pClientList[iClientH]->m_cIPaddress, m_pClientList[iClientH]->m_cCharName);
  PutHackLogFileList(G_cTxt);
  return FALSE;
	}

And replace the existing bCheckLevelUp func with this one :

Code: Select all

BOOL CGame::bCheckLevelUp(int iClientH)
{
 BOOL bStr, bVit, bDex, bInt, bMag, bChr;
 char cLoopCnt;
 int bobdole;

	if (m_pClientList[iClientH] == NULL) return FALSE;
	if (m_pClientList[iClientH]->m_iLevel >= m_iPlayerMaxLevel) return FALSE;
	if (m_pClientList[iClientH]->m_iExp < m_pClientList[iClientH]->m_iNextLevelExp) return FALSE;
	
	bStr = bVit = bDex = bInt = bMag = bChr = FALSE;
	cLoopCnt = 0;
	while (1) {
  if (cLoopCnt++ > 100) return FALSE;
  if (m_pClientList[iClientH]->m_iExp >= m_pClientList[iClientH]->m_iNextLevelExp) {

  	if ((m_pClientList[iClientH]->m_iLevel > 300) && (m_pClientList[iClientH]->m_iAdminUserLevel == 0)) {
    m_pClientList[iClientH]->m_iLevel = 300;
    m_pClientList[iClientH]->m_iExp = iGetLevelExp(300) + 1;
    m_pClientList[iClientH]->m_iGizonItemUpgradeLeft += 1;
    wsprintf(G_cTxt, "!!---- Gizon up: Player %s ----!!", m_pClientList[iClientH]->m_cCharName);
    PutLogFileList(G_cTxt);
  	}
  	else{
    m_pClientList[iClientH]->m_iLevel++;
    m_pClientList[iClientH]->m_iLU_Pool += 3;
    
    if (m_pClientList[iClientH]->m_iStr > DEF_CHARPOINTLIMIT)      m_pClientList[iClientH]->m_iStr = DEF_CHARPOINTLIMIT;
    if (m_pClientList[iClientH]->m_iDex > DEF_CHARPOINTLIMIT)      m_pClientList[iClientH]->m_iDex = DEF_CHARPOINTLIMIT;
    if (m_pClientList[iClientH]->m_iVit > DEF_CHARPOINTLIMIT)      m_pClientList[iClientH]->m_iVit = DEF_CHARPOINTLIMIT;
    if (m_pClientList[iClientH]->m_iInt > DEF_CHARPOINTLIMIT)      m_pClientList[iClientH]->m_iInt = DEF_CHARPOINTLIMIT;
    if (m_pClientList[iClientH]->m_iMag > DEF_CHARPOINTLIMIT)      m_pClientList[iClientH]->m_iMag = DEF_CHARPOINTLIMIT;
    if (m_pClientList[iClientH]->m_iCharisma > DEF_CHARPOINTLIMIT) m_pClientList[iClientH]->m_iCharisma = DEF_CHARPOINTLIMIT;

    if (m_pClientList[iClientH]->m_iLevel > 100)
    	if (m_pClientList[iClientH]->m_bIsPlayerCivil == TRUE)
      ForceChangePlayMode(iClientH, TRUE);

    SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_LEVELUP, NULL, NULL, NULL, NULL);

    m_pClientList[iClientH]->m_iNextLevelExp = m_iLevelExpTable[m_pClientList[iClientH]->m_iLevel + 1];
  	
    CalcTotalItemEffect(iClientH, -1, FALSE);

    wsprintf(G_cTxt, "(!) Level up: Player (%s) Level (%d) Experience(%d) Next Level Experience(%d)", m_pClientList[iClientH]->m_cCharName,m_pClientList[iClientH]->m_iLevel, m_pClientList[iClientH]->m_iExp, m_pClientList[iClientH]->m_iNextLevelExp);
    PutLogFileList(G_cTxt);
  	}
  }
  else { return TRUE; }
	}
	bobdole = 3;
	return FALSE;
}

Now it should work...
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

Thank you Thank you.
You told replace with this:
m_pClientList[iClientH]->m_iExp = iGetLevelExp(300) + 1;
i must put there level300 exp or let it be?
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

the func iGetLevelExp calculate the exp for level 300... and then we add 1exp :). Keep it as it is
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Tafka12
&lt;3 bd long time
Posts: 772
Joined: Wed Dec 28, 2005 6:32 pm

Post by Tafka12 »

ok :P
go submit it too

EDIT:
Maybe you can find way to fix this one:
if (m_pClientList[iClientH]->m_iExp < 0) {
  wsprintf(G_cTxt, "Packet Editing: (%s) Player: (%s) experience is below 0 - (Exp:%d).", m_pClientList[iClientH]->m_cIPaddress, m_pClientList[iClientH]->m_cCharName, m_pClientList[iClientH]->m_iExp);
  PutHackLogFileList(G_cTxt);
  return FALSE;
}
too?
I don't have this problem but many over level 317 servers have

maybe:
m_pClientList[iClientH]->m_iExp < 1;

Ahh sry no idea how to do it
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
laizkloom
Regular
Posts: 78
Joined: Sun Feb 27, 2005 8:41 am

Post by laizkloom »

Well I have 1 question, if i put this code into my source and make max level 300 and then I use levelstones(my idea for getting bigger level) and get level 301 do I got dc or smtg?

PS:Stones can only give level ups until 350.

I hope you understand me.
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

you cant... atleast if you use this code you cant
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Post Reply