Noobs Guide - Part 1

All Helbreath Server Source Discussion here.
Post Reply
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

In this first part of the guide, i'll show you the basics : Characters related vars

First of all, open the Client.h files, i'm gonna explain you what are the vars in it. It'll be easier for you to find something when you want to do small editions in your sources. Here are all the vars you'll need to know (there are many more but we don't care about it for now) :
char m_cCharName[11];<span style='color:blue'> ---> Name of your character</span>
char m_cAccountName[11];<span style='color:blue'> ---> Name of owner of the character</span>
char m_cAccountPassword[11];<span style='color:blue'> ---> Password of the account</span>
BOOL  m_bIsInitComplete;<span style='color:blue'> ---> If loading this char is OK, it will be set to "TRUE"</span>
char  m_cMapName[11];<span style='color:blue'> ---> Name of the map where the character is</span>
short m_sX, m_sY;<span style='color:blue'> ---> X and Y coordinates on the current map</span>
char  m_cGuildName[21];<span style='color:blue'> ---> Character's Guild (if there is any)</span>
char  m_cLocation[11];<span style='color:blue'> ---> Elvine or Aresden if civilian, Elvcomb or Arecomb if combattant, NONE if traveller</span>
int  m_iGuildRank;<span style='color:blue'> ---> Rank in the guild</span>
short m_sType;<span style='color:blue'> ---> Monster ID (used for polymorph magic)</span>
short m_sOriginalType;<span style='color:blue'> ---> Original Type, before polymorph</span>
int  m_iStatus;<span style='color:blue'> ---> Special / Magic Status (Amp...)</span>
char m_cSex, m_cSkin, m_cHairStyle, m_cHairColor, m_cUnderwear;<span style='color:blue'> ---> Appearance</span>
int  m_iHP;<span style='color:blue'> ---> Hit Points</span>
int  m_iMP;<span style='color:blue'> ---> Mana Points</span>
int  m_iSP;<span style='color:blue'> ---> Stamina Points</span>
int  m_iExp;<span style='color:blue'> ---> Current Exp</span>
int m_iNextLevelExp;<span style='color:blue'> ---> Exp for Next Level</span>
BOOL m_bIsKilled;<span style='color:blue'> ---> TRUE if you're dead, else FALSE</span>
int  m_iDefenseRatio;<span style='color:blue'> ---> Defense Ratio</span>
int  m_iHitRatio;<span style='color:blue'> ---> Hit Ratio</span>
int  m_iLevel;<span style='color:blue'> ---> Current Level</span>
int  m_iStr, m_iInt, m_iVit, m_iDex, m_iMag, m_iCharisma;<span style='color:blue'> ---> Stats</span>
int  m_iLuck;<span style='color:blue'> ---> Luck</span>
int  m_iLU_Pool;<span style='color:blue'> ---> Level Up points : ((Lvl - 1) * 3) + 70</span>
int m_iGizonItemUpgradeLeft;<span style='color:blue'> ---> Majesty Points</span>
int  m_iEnemyKillCount, m_iPKCount, m_iRewardGold;<span style='color:blue'> ---> EK, PK, gold amount in reward for killing Criminals</span>
int  m_iCurWeightLoad;<span style='color:blue'> ---> Current load</span>
char m_cSide;<span style='color:blue'> ---> 1 for Aresden, 2 for Elvine</span>
int  m_iHungerStatus;<span style='color:blue'> ---> 100 = OK, 0 = starving</span>
int  m_iAdminUserLevel;<span style='color:blue'> ---> Admin Level</span>
int  m_iRating;<span style='color:blue'> ---> Reps</span>
int  m_iTimeLeft_ShutUp;<span style='color:blue'> ---> Time remaining before you can talk</span>
int  m_iTimeLeft_Rating;<span style='color:blue'> ---> Time remaining before you can rep somebody</span>
int  m_iTimeLeft_ForceRecall;<span style='color:blue'> ---> Time left before you get forced to recall</span>
int  m_iSuperAttackLeft;<span style='color:blue'> ---> Remaining Crits</span>
int  m_iSuperAttackCount;<span style='color:blue'> ---> Total Crits</span>
int  m_iManaSaveRatio;<span style='color:blue'> ---> Total MS Ratio</span>
short m_sCharIDnum1, m_sCharIDnum2, m_sCharIDnum3;<span style='color:blue'> ---> Character's unique IDs (for binding items)</span>
Now an example. I want to change the amount of crits a player can have... Formula is Level / 10. I want to have more Crits for each 10 levels like level 100 = 20 crits. Let's look for the code in game.cpp : It must have "m_iLevel / 10" in it.

We found 6 occurences related to MaxSuperAttack, and 2 more used for magic level. Let's change it for "m_iLevel / 5" and we're done! Easy, isn't it ? And this way you wouldn't always request codes that are so easy to do by your own...
<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 !
soul40k
Regular
Posts: 36
Joined: Thu Mar 11, 2004 2:04 am

Post by soul40k »

I like this. It is a good start to understanding it more.
Windy
Member
Posts: 157
Joined: Tue Nov 18, 2003 8:31 am
Location: wishing I was somewhere else

Post by Windy »

noobs guide is right its like the basic basics but I guess its a start for some people to learn....technically I think an explination of functions variables and everything is a better start to learning C++ instead of just editing numbers in the source....but I guess if thats all that people want to do in it then I guess it would save alot of requests if they could do it themselves....but yea anyways I saw something in there that made me laugh...


int m_iCurWeightLoad; ---> Current load

that reminds me I need to go dump a load

anyways nice tut for noobies atleast somebody is teachin them somethin
<span style='color:blue'>Coding with Evil Intentions....Evil at its Best....</span>
Post Reply