Jump to content
  • 0

Max Refine, Homunculus Level and 1 char gm account


BuLaLaKaW

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  125
  • Reputation:   7
  • Joined:  11/19/11
  • Last Seen:  

Hi.

Anyone has the instruction on :

How to edit max refine ?

I would like reach max refine of +20, currently it is saying +10

How to edit max level for homunculus ?

I already updated the exp table for homunculus but it is still saying 99. I want it to be 255.

How to limit max char for GM accounts ?

I would like to limit any GM accounts to only have 1 char.

Sad to say but I am unable to reach the other forum.

HELP!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  967
  • Reputation:   53
  • Joined:  11/13/11
  • Last Seen:  

1.

svn/src/map/config/Core.h


/**
* Max Refine available to your server
* Raising this limit requires edits to /db/refine_db.txt
**/
#define MAX_REFINE 20

EDIT:

2.

Try this Link: http://rathena.org/board/topic/53426-guide-modification-faq/

Edited by KeiKun
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

How to limit max char for GM accounts ?

I would like to limit any GM accounts to only have 1 char.

If you don't mind using a script for it, someone requested one before so I wrote it.

- script GMLimiter -1,{
OnPCLoginEvent:
if ( getcharid(3) == AccountIDHere && strcharinfo(0) != "GM Name Here" ) { atcommand "@kick "+strcharinfo(0); }
end;
} 

Just duplicate this line for each account/character

if ( getcharid(3) == AccountIDHere && strcharinfo(0) != "GM Name Here" ) { atcommand "@kick "+strcharinfo(0); }

And don't forget to put the proper tabs in the first line.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  52
  • Reputation:   6
  • Joined:  01/06/12
  • Last Seen:  

For the max characters on a GM account, the script method would work, but I think (I can't test it right now), that if you do this it should work:

Going into srccharchar.c

Find the function:

int make_new_char(struct char_session_data* sd, char* name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style)

Within it (below it) you should see:

if( char_per_account != 0 ) {
ARR_FIND( 0, MAX_CHARS, i, sd->found_char[i] == -1 );

if( i >= char_per_account )
return -2; // character account limit exceeded
}

Change that to:

if( char_per_account != 0 || sd->gmlevel ) { //Even if there are unlimited characters per account, if the character has a GM level...
  ARR_FIND( 0, MAX_CHARS, i, sd->found_char[i] == -1 );
  if((i >= char_per_account && char_per_account != 0) || (sd->gmlevel && i)) //...and a character, deny them!
return -2; // character account limit exceeded
}

Right, SQL too.

So in srcchar_sqlchar.c, find:

if( char_per_account != 0 ) {
 if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` WHERE `account_id` = '%d'", char_db, sd->account_id) )
  Sql_ShowDebug(sql_handle);
 if( Sql_NumRows(sql_handle) >= char_per_account )
  return -2; // character account limit exceeded
}

Change that to...

if( char_per_account != 0 || sd->gmlevel ) {
 if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` WHERE `account_id` = '%d'", char_db, sd->account_id) )
  Sql_ShowDebug(sql_handle);
 if( (Sql_NumRows(sql_handle)  >= char_per_account && char_per_account != 0)  || (sd->gmlevel && Sql_NumRows(sql_handle)) ) //If it returns one or more, deny them!
  return -2; // character account limit exceeded
}

Hopefully my logic is correct. I was able to compile and make sure they didn't give any warnings (rAthena rev. 15399), but I can't really test them in game, so please please make a backup! (though I only changed like 2 lines in each file), oh and if you want to change it to a certain level, just find wherever I put sd->gmlevel and change it to sd->gmlevel >= XX, where XX is whatever GM level you want to use.

Edit:

Forgot to account for when char_per_account == 0 and the person is a GM, preventing them from ever making a character, haha, woops. Fixed.

Edited by Variant
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...