Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 18:58

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Removing Skill Book Delaying With GM Code Very Simple... (Without DIFF + C++ Code.)

Discussion on Removing Skill Book Delaying With GM Code Very Simple... (Without DIFF + C++ Code.) within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
-TÜRK-'s Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 328
Received Thanks: 434
Removing Skill Book Delaying With GM Code Very Simple... (Without DIFF + C++ Code.)

How2 Enable:

Very simple, login with GM char and write this code:

/e no_read_delay 1

---------

e = change event flag

no_read_delay = removing skill book delay code (in game file)

1 = active event flag

---------

How2 Disable:

Again login with GM char and write this code:

/e no_read_delay 0

Are event flag codes not affected by reboot and other things. Dont worry.

Here is the C++ Code:

PHP Code:
signed int __cdecl CHARACTER__LearnSkillByBook(int a1unsigned int a2unsigned __int8 a3)
{
  
int v3// eax@1
  
signed int result// eax@2
  
int v5// edi@2
  
char *v6// eax@5
  
__int32 v7// ebx@11
  
int v8// edx@13
  
int v9// ecx@14
  
int v10// ebx@14
  
int v11// eax@14
  
char *v19// eax@17
  
char *v20// eax@30
  
char *v21// eax@30
  
int v22// eax@31
  
int v23// ebx@31
  
int v24// edi@31
  
int v25// esi@31
  
char *v26// eax@31
  
int v27// edx@32
  
const char *v28// ecx@32
  
char *v29// eax@36
  
char *v30// eax@36
  
int v31// ebx@43
  
int v32// eax@43
  
int v33// eax@43
  
int v34// ebx@45
  
int v35// edx@52
  
int v36// ecx@54
  
int v44// ecx@58
  
int v52// ecx@60
  
unsigned __int32 v60// eax@61
  
char *v61// eax@65
  
char *v62// eax@65
  
int v63// ebx@72
  
__int32 v64// eax@72
  
const char *v65// [sp+0h] [bp-108h]@4
  
const char *v66// [sp+0h] [bp-108h]@64
  
unsigned int v67// [sp+4h] [bp-104h]@27
  
char v68// [sp+8h] [bp-100h]@27
  
int v69// [sp+Ch] [bp-FCh]@5
  
int v70// [sp+Ch] [bp-FCh]@25
  
signed int v71// [sp+24h] [bp-E4h]@55
  
int v72// [sp+28h] [bp-E0h]@54
  
int v73// [sp+2Ch] [bp-DCh]@53
  
int v74// [sp+30h] [bp-D8h]@52
  
unsigned __int8 v75// [sp+37h] [bp-D1h]@23
  
signed int v76// [sp+38h] [bp-D0h]@8
  
char v77// [sp+3Fh] [bp-C9h]@1
  
char s// [sp+40h] [bp-C8h]@54
  
char v79// [sp+C0h] [bp-48h]@54
  
char v80// [sp+D0h] [bp-38h]@13
  
int v81// [sp+E0h] [bp-28h]@13

  
v77 a3;
  
v3 singleton_CSkillManager___ms_singleton;
  if ( !
singleton_CSkillManager___ms_singleton )
  {
    
v69 = (int)"ms_singleton";
    
__assert("instance""../../common/singleton.h"26);
    
v3 singleton_CSkillManager___ms_singleton;
  }
  
v5 CSkillManager__Get(v3a2);
  
result 0;
  if ( 
v5 )
  {
    if ( !
CHARACTER__IsLearnableSkill(a1a2) )
    {
      
v65 "¼";
LABEL_5:
      
v6 locale_find(v65g_iUseLocale);
      
CHARACTER__ChatPacket(a11v6v69);
      return 
0;
    }
    
v76 0;
    if ( !
LC_IsYMIR() )
    {
      if ( !
LC_IsCIBN() )
      {
        
v76 20000;
        if ( *(
_DWORD *)(a1 1284) <= 0x4E1Fu )
        {
          
v65 = (const char *)&unk_81F90A0;
          goto 
LABEL_5;
        }
      }
    }
    
v7 get_global_time();
    if ( 
v7 CHARACTER__GetSkillNextReadTime(a1a2) )
    {
      if ( !
test_server )
        goto 
LABEL_79;
      
std__string__string(&v81"no_read_delay", &v80);
      
v8 singleton_quest__CQuestManager___ms_singleton;
      if ( !
singleton_quest__CQuestManager___ms_singleton )
      {
        
v69 = (int)"ms_singleton";
        
__assert("instance""../../common/singleton.h"26);
        
v8 singleton_quest__CQuestManager___ms_singleton;
      }
      
v11 quest__CQuestManager__GetEventFlag(v8, (int)&v81);
      
_EDX v81;
      
v10 v11;
      
_EAX = -1;
      
v9 v81 12;
      
__asm lock xadd [edx-4], eax }
      if ( 
_EAX <= )
        
std__string___Rep___M_destroy(v9, &v79);
      if ( !
v10 )
      {
LABEL_79:
        if ( !
CHARACTER__FindAffect(a15130) )
        {
          
v63 CHARACTER__GetSkillNextReadTime(a1a2);
          
v64 get_global_time();
          
CHARACTER__SkillLearnWaitMoreTimeMessage(a1v63 v64);
          return 
0;
        }
        
CHARACTER__RemoveAffect(a1513);
        
v19 locale_find("Á־ȼ"g_iUseLocale);
        
CHARACTER__ChatPacket(a11v19v69);
      }
    }
    if ( *(
_DWORD *)(v5 68) && CHARACTER__GetSkillMasterType(a1a2) != )
    {
      if ( 
CHARACTER__GetSkillMasterType(a1a2) <= )
        
v65 = (const char *)&unk_81F8E80;
      else
        
v65 = (const char *)&unk_81F8E40;
      goto 
LABEL_5;
    }
    
v75 CHARACTER__GetSkillLevel(a1a2);
    if ( 
a3 )
    {
      if ( 
CHARACTER__FindAffect(a15120) )
      {
        
v77 = (a3 >> 1) + a3;
        
CHARACTER__RemoveAffect(a1512);
      }
      
sys_log(0"LearnSkillByBook Pct %d", (unsigned __int8)v77v69);
      if ( (
signed int)number_ex(1100, (int)"char_skill.cpp"381) > (unsigned __int8)v77 )
      {
        if ( 
test_server )
          
sys_log(0"LearnSkillByBook %s""FAIL");
        goto 
LABEL_29;
      }
      if ( 
test_server )
        
sys_log(0"LearnSkillByBook %s""SUCC");
      
v68 1;
      
v67 a2;
    }
    else
    {
      
v32 CHARACTER__GetSkillLevel(a1a2);
      
v31 MIN(9v32 20);
      
v33 CHARACTER__GetName(a1);
      
sys_log(0"LearnSkillByBook %s table idx %d value %d"v33v31, *(&aiSkillBookCountForLevelUp v31));
      if ( !
LC_IsYMIR() && !LC_IsCIBN() )
      {
        
v74 CHARACTER__GetSkillLevel(a1a2) - 20;
        
CHARACTER__PointChange(a13u, -v7600);
        
v35 singleton_quest__CQuestManager___ms_singleton;
        if ( !
singleton_quest__CQuestManager___ms_singleton )
        {
          
v70 = (int)"ms_singleton";
          
__assert("instance""../../common/singleton.h"26);
          
v35 singleton_quest__CQuestManager___ms_singleton;
        }
        
v73 quest__CQuestManager__GetPC(v35, *(_DWORD *)(a1 240));
        if ( 
v73 )
        {
          
memset(&s00x80u);
          
snprintf(&s0x80u"traning_master_skill.%lu.read_count"a2);
          
std__string__string(&v81, &s, &v79);
          
v72 quest__PC__GetFlag(v73, (int)&v81);
          
_EDX = -1;
          
_EAX v81;
          
v36 v81 12;
          
__asm lock xadd [eax-4], edx }
          if ( 
_EDX <= )
            
std__string___Rep___M_destroy(v36, &v80);
          
v71 65;
          if ( 
CHARACTER__FindAffect(a15120) )
          {
            
v71 0;
            
CHARACTER__RemoveAffect(a1512);
          }
          if ( (
signed int)number_ex(1100, (int)"char_skill.cpp"424) > v71 )
          {
            if ( 
v72 v74 )
            {
              
std__string__string(&v81, &s, &v79);
              
quest__PC__SetFlag(v73, (int)&v81v72 10);
              
_EAX v81;
              
_EDX = -1;
              
v52 v81 12;
              
__asm lock xadd [eax-4], edx }
              if ( 
_EDX <= )
                
std__string___Rep___M_destroy(v52, &v80);
              
v60 number_ex(13, (int)"char_skill.cpp"440);
              if ( 
v60 == )
              {
                
v66 = (const char *)&unk_81F9060;
              }
              else
              {
                if ( (
signed int)v60 <= && v60 == )
                  
v66 = (const char *)&unk_81F9020;
                else
                  
v66 "¿*½ÉÈ";
              }
              
v61 locale_find(v66g_iUseLocale);
              
CHARACTER__ChatPacket(a10v61);
              
v62 locale_find("%d ±ÇÀ» ´"g_iUseLocale);
              
CHARACTER__ChatPacket(a11v62v74 v72);
              return 
1;
            }
            
CHARACTER__SkillLevelUp(a1a21);
            
std__string__string(&v81, &s, &v79);
            
quest__PC__SetFlag(v73, (int)&v8100);
            
_EAX v81;
            
_EDX = -1;
            
v44 v81 12;
            
__asm lock xadd [eax-4], edx }
            if ( 
_EDX <= )
              
std__string___Rep___M_destroy(v44, &v80);
            goto 
LABEL_31;
          }
        }
LABEL_29:
        if ( 
v75 == CHARACTER__GetSkillLevel(a1a2) )
        {
          
v29 locale_find("Å©À¹, ±â°¡ ¿ª·"g_iUseLocale);
          
CHARACTER__ChatPacket(a10v29v70);
          
v30 locale_find("¼"g_iUseLocale);
          
CHARACTER__ChatPacket(a11v30);
          
v22 singleton_LogManager___ms_singleton;
          
v23 = *(_DWORD *)(a1 40);
          
v24 = *(_DWORD *)(a1 36);
          
v25 = *(_DWORD *)(a1 240);
          if ( !
singleton_LogManager___ms_singleton )
          {
            
__assert("instance""../../common/singleton.h"26);
            
v22 singleton_LogManager___ms_singleton;
          }
          
v28 = &byte_81F5C80;
          
v27 136289016;
          goto 
LABEL_33;
        }
        
v20 locale_find("¸"g_iUseLocale);
        
CHARACTER__ChatPacket(a10v20v70);
        
v21 locale_find("¶ß°Å¿î ¹«¾"g_iUseLocale);
        
CHARACTER__ChatPacket(a10v21);
LABEL_31:
        
v26 locale_find("Ã¥À¸·Î ´"g_iUseLocale);
        
CHARACTER__ChatPacket(a11v26);
        
v22 singleton_LogManager___ms_singleton;
        
v23 = *(_DWORD *)(a1 40);
        
v24 = *(_DWORD *)(a1 36);
        
v25 = *(_DWORD *)(a1 240);
        if ( !
singleton_LogManager___ms_singleton )
        {
          
__assert("instance""../../common/singleton.h"26);
          
v22 singleton_LogManager___ms_singleton;
        }
        
v28 = &byte_81F5C80;
        
v27 136289000;
LABEL_33:
        
LogManager__CharLog(v22v25v24v23a2v27v28);
        return 
1;
      }
      
v34 = *(&aiSkillBookCountForLevelUp v31);
      if ( 
CHARACTER__FindAffect(a15120) )
      {
        if ( 
v34 )
          
v34 v34 1;
        else
          
v34 /= 2;
        
CHARACTER__RemoveAffect(a1512);
      }
      if ( 
number_ex(1v34, (int)"char_skill.cpp"482) != )
        goto 
LABEL_29;
      
v68 1;
      
v67 a2;
    }
    
CHARACTER__SkillLevelUp(a1v67v68);
    goto 
LABEL_29;
  }
  return 
result;

Greetings from Turkey
Ah i forgot, this code is tested and %100 working.
-TÜRK- is offline  
Thanks
6 Users
Old 05/26/2012, 13:43   #2
 
elite*gold: 0
Join Date: May 2012
Posts: 13
Received Thanks: 2
Thanks a lot. It's easy and useful.
metin2sozluk is offline  
Thanks
1 User
Old 05/26/2012, 13:47   #3
 
-TÜRK-'s Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 328
Received Thanks: 434
Quote:
Originally Posted by metin2sozluk View Post
Thanks a lot. It's easy and useful.
Evet =) Sanada.
-TÜRK- is offline  
Thanks
1 User
Old 05/26/2012, 14:44   #4

 
elite*gold: 0
Join Date: Dec 2008
Posts: 2,825
Received Thanks: 1,538
nice....very useful
.Colossus. is offline  
Thanks
1 User
Old 05/26/2012, 14:57   #5
 
blackwolf96's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 60
Received Thanks: 100
Thanks a lot!
blackwolf96 is offline  
Thanks
1 User
Old 05/29/2012, 17:58   #6
 
elite*gold: 0
Join Date: Aug 2011
Posts: 14
Received Thanks: 2
Hey, I'm new in editing the gamefile... how do I apply this C code?
segiop13 is offline  
Old 05/29/2012, 18:53   #7
 
elite*gold: 0
Join Date: Mar 2010
Posts: 25
Received Thanks: 3
Quote:
Originally Posted by segiop13 View Post
Hey, I'm new in editing the gamefile... how do I apply this C code?
You don't. It's an extract of pseudo-code from the game showing that there is such a thing; all you have to do is run the command of /e no_read_delay 1
ImmiRlz is offline  
Old 05/29/2012, 19:49   #8
 
Mashkin's Avatar
 
elite*gold: 44
Join Date: May 2010
Posts: 2,053
Received Thanks: 1,747
Code:
      if ( !test_server )
        goto LABEL_79;
      std__string__string(&v81, "no_read_delay", &v80);
I would have thought that the event flag only works in test mode because else there is a jump to "LABEL_79" handling the skill wait time message.

Do you have test mode enabled? Or have you tested it in production environment?
Mashkin is offline  
Old 05/29/2012, 22:03   #9
 
-TÜRK-'s Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 328
Received Thanks: 434
Quote:
Originally Posted by M@shkin View Post
Code:
      if ( !test_server )
        goto LABEL_79;
      std__string__string(&v81, "no_read_delay", &v80);
I would have thought that the event flag only works in test mode because else there is a jump to "LABEL_79" handling the skill wait time message.

Do you have test mode enabled? Or have you tested it in production environment?
Both working... No problem. Tested.
-TÜRK- is offline  
Reply


Similar Threads Similar Threads
[TUT][Diff][1875][2019][2089]Changing time of removing items thrown on the ground
02/18/2013 - Metin2 PServer Guides & Strategies - 29 Replies
Hallo, today I want to share with you my new dif. This dif changes time of deleting items on the ground thrown by players or allows to disable it. The items will be on the ground forever then :D And i want to say to you one tip :> Locale strings there is information that items thrown on the ground will be removed after 3 minutes, but it's always 300 sec, and it's 5 minutes either! In this dif I will change it to 1 minute :> Dif - disabled removing items thrown on the ground by player (they...
[Tutorial][For who can't Code] Code Simple NPC (CoEmu)
10/15/2009 - CO2 Private Server - 13 Replies
First i will release the npc and explain you alot of good things The npc Ok .. here is the npc jail in TwinCity (Enter the jail and go out the jail) in Handlers / NpcTalk.cs Search for default: { Text("NPC " + ID + "'s dialog is not coded.", CSocket);
About Removing image Vertication Code -(Answer Poll)-
06/09/2009 - Silkroad Online - 11 Replies
Poll of Removing image vertication Code So Please Answer The Poll :D
Removing Guide Book
01/03/2009 - EO PServer Hosting - 4 Replies
How would I go about removing the Guide Book that players start with. Any and all help would be appreciated. Thanks in advance..



All times are GMT +1. The time now is 18:59.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.