Jump to content

How To Fix HP / SP when Entering Game + Startup Level


Recommended Posts

  • Former Staff

Hello guys i was working on {how to fix hp/mp when entering the game}

 

 

first:: of all the bug for those who don't know it

 

basically when you enter the game you Hp/SP are not full and some times (0)

 

so what you have to do is go to game src and open "input_login.cpp"

 

and search for

void CInputLogin::Entergame(LPDESC d, const char * data)

and search in it for this

ch->ReviveInvisible(5);

and write above it or down this

	ch->PointChange(POINT_HP, ch->GetMaxHP() - ch->GetHP());
	ch->PointChange(POINT_SP, ch->GetMaxSP() - ch->GetSP());

okay now Hp /Sp are 100% solved when entering the game or after teleporting ^^

 

 

2: (Start up level) you can it in tow ways

 

first one with (lua) i like it because of the level up effect 

but with slow computers it may kick you out of the server

 

so lua start up level

 

all you have to do is calculate how much exp you must got for a specific level then

go to give_basic_weapon.quest

 

and add  this

pc.give_exp2(66640600) -- this exp value level up you to 42 

with C++ go to "input_login.cpp" search for

NewPlayerTable2 and NewPlayerTable

search for

table->level = 0;

and change the level from 0 to anything you want

 

and if you look at the code you will see that you can change the stating gold value and lots of other thing

 

hope you enjoyed

 

sorry for bad english (still student)

 

best regard

   FlyGun <3

Edited by flygun
  • Love 2
  • Former Staff

other solution  for hpsp go to 

/usr/src/(yourline)/server/common 

open tables.h

and change 

short       hp;
short       sp;

with this

int       hp;
int       sp;
Edited by flygun
  • Love 2
  • 3 weeks later...
  • Former Staff

 

 

other solution  for hpsp go to 

/usr/src/(yourline)/server/common 

open tables.h

and change 

short       hp;
short       sp;

with this

int       hp;
int       sp;

maybe u need change also in the player db.

 

nah it's the common file after changing anything i common file you have to rebuild db& game :)

  • Former Staff

The Whole Problem Is Becous The Max of short is 32767 , when you hp/sp get higher then 32767 you get this error

 

so have to change to int

yes this is the problem but make sure that the type of HP and MP in navicat are int too

  • 11 months later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.