Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

d_c2scmd list

Elite Diviner
Joined
Jun 26, 2013
Messages
486
Reaction score
91
Hi all, if use this command
d 10801 197646Give 10,000 skill points to spend on VIT DEX MAG
The Character will be automatic blocked, you can't login again :ROFLMAO:

Hi all, if use this command
d 10801 197646Give 10,000 skill points to spend on VIT DEX MAG
The Character will be automatic blocked, you can't login again :ROFLMAO:
You are meant to test it with a disposable character online only.
You are not meant to save that characters octets + make a backup beforehand clearly, as the hex container in octet does not support that large of a number.
You would need to rewrite part of GameDB, GS (Maybe?) and maybe some protocol structs before that will save in octets + messing with octet values outside of their normal range is no laughing matter.

Always make backup of the character you are testing commands on as a given.
 
Newbie Spellweaver
Joined
Dec 14, 2019
Messages
30
Reaction score
225
This stat check can be lifted by patching just the gs, in 1.3.6 the address is 0x81398bc

You can patch the 4 bytes at this address to
xor eax, eax
inc eax
nop

You can check what function name that is and then patch it in the newer versions, or the source itself
 
Elite Diviner
Joined
Jun 26, 2013
Messages
486
Reaction score
91
Ah that's where it is? You could probably then patch it in the
This stat check can be lifted by patching just the gs, in 1.3.6 the address is 0x81398bc

You can patch the 4 bytes at this address to
xor eax, eax
inc eax
nop

You can check what function name that is and then patch it in the newer versions, or the source itself
Can you show me the Pseudocode so I can find this in source code to inform them which part to change if they are to do this in C++ instead?
 
Newbie Spellweaver
Joined
Dec 14, 2019
Messages
30
Reaction score
225
nope, sorry, I'm done with PW development and don't have it at hand
 
Elite Diviner
Joined
Jun 26, 2013
Messages
486
Reaction score
91
Inside playertemplate.cpp:
C++:
int  
player_template::__Rollback(int cls, extend_prop & data) const
{
    if(((size_t)cls) >= USER_CLASS_COUNT) return 0; 
    int total = 0;
    int vit,eng,str,agi;
    vit = 5 - data.vitality;
    eng = 5 - data.energy;
    str = 5 - data.strength;
    agi = 5 - data.agility;
    if(str >0 ) str = 0;
    if(agi >0 ) agi = 0;
    if(vit >0 ) vit = 0;
    if(eng >0 ) eng = 0;
    UpdateBasic(cls,data,vit,eng,str,agi);
    total =-(vit + eng + str + agi);
    return total;
}

int  
player_template::__Rollback(int cls, extend_prop & data,int str, int agi ,int vit, int eng) const
{
    if(((size_t)cls) >= USER_CLASS_COUNT) return 0; 
    int total = 0;
    int vit1,eng1,str1,agi1;
    vit1 = 5 - data.vitality;    //3->5, fix bug by liuguichen, 20130721
    eng1 = 5 - data.energy;        //由于bug存在,部分玩家可能体力灵力小于5
    str1 = 5 - data.strength;
    agi1 = 5 - data.agility;
    vit = -vit; str = -str; agi = -agi; eng = -eng;
    
    if(str < str1) str = str1;
    if(agi < agi1) agi = agi1;
    if(vit < vit1) vit = vit1;
    if(eng < eng1) eng = eng1;
    if(str >0 ) str = 0;
    if(agi >0 ) agi = 0;
    if(vit >0 ) vit = 0;
    if(eng >0 ) eng = 0;
    
    UpdateBasic(cls,data,vit,eng,str,agi);
    total = -(vit + eng + str + agi);
    return total;
}


This may be what you found in Assembly? Granted I don't see an increment here

Update: found stuff that is more like it in playertemplate.cpp:
C++:
player_template::__UpdateBasic(int cls, extend_prop & data, int vit,int eng,int str,int agi) const
{
    if(((size_t)cls) >= USER_CLASS_COUNT) return false;
    data.vitality += vit;
    data.energy += eng;
    data.strength += str;
    data.agility += agi;
    
    data.max_hp += _class_list[cls].vit_hp * vit;
    data.max_mp += _class_list[cls].eng_mp * eng;
    return true;
}

and then in the header:
C++:
    static inline void UpdatePlayerBaseProp(int cls,gactive_imp * pImp)
    {
        extend_prop & base = pImp->_base_prop;
        extend_prop & dest = pImp->_cur_prop;
        dest = base;
        enhanced_param & en_point = pImp->_en_point;
        scale_enhanced_param & en_percent = pImp->_en_percent;
        player_template::UpdateBasic(cls,dest,en_point.vit,en_point.eng,en_point.str,en_point.agi);

        
        UpdatePlayerMPHPGen(pImp);

        dest.max_hp = Result(dest.max_hp,en_point.max_hp,en_percent.max_hp);
        dest.max_mp = Result(dest.max_mp,en_point.max_mp,en_percent.max_mp);
        pImp->SetRefreshState();
    }
 
Newbie Spellweaver
Joined
Dec 14, 2019
Messages
30
Reaction score
225
none of those ring a bell to me. I looked it up:
it's in do_login_check_data()
I'm essentially ignoring the return value from the __login_check_data() called there, and always setting that to 1, which should mean "okay"
 
Elite Diviner
Joined
Jun 26, 2013
Messages
486
Reaction score
91
oh alright let me see

global_userlogin.cpp at
void
LoginTask::OnGetRole(int id,const GDB::base_info * pInfo, const GDB::vecdata * data, const GNET::GRoleDetail * pRole)
we have this:
C++:
    if(!do_login_check_data(pInfo,data))
    {
        GMSV::SendLoginRe(_cs_index,_uid,_cs_sid,1,_flag);    // login failed
        //此时按照错误来处理
        GLog::log(GLOG_ERR,"用户%d数据异常,无法登录",id);
        OnFailed();
        return;
    }
and then if a player logs into an instanced map (a 2nd place you would need to patch in a pre-compiled GS of course) we have:

Inside instance_userlogin.cpp:

void
LoginTask::OnGetRole(int id,const GDB::base_info * pInfo, const GDB::vecdata * data, const GNET::GRoleDetail * pRole)

and then the same check
C++:
    if(!do_login_check_data(pInfo,data))
    {
        GMSV::SendLoginRe(_cs_index,_uid,_cs_sid,1,_flag);    // login failed
        //此时按照错误来处理
        GLog::log(GLOG_ERR,"用户%d数据异常,无法登录",id);
        OnFailed();
        return;
    }


In a source code build, one could modify or comment out this switch case to achieve the same result! Now granted in compiled binaries you'd want to do as beta11n has suggested

 
Last edited:
Newbie Spellweaver
Joined
Jun 19, 2021
Messages
78
Reaction score
3
1.5.1:

Service Related:

d 10819 [amount]Increases War
Avatar Card Leadership
d 10820Applies you for Sunset Valley (Does not work if it is not running)
d 10821Leave Sunset Valley
d 10822Reincarnate the character (Quest condition must be met)
d 10823Rewrite a entry in the Ancient Tome for reincarnation
d 10824Activate Reincarnation Tome (have to have it already, unlocks the next stages in it)
d 10825 [id]Change Player State with ID (best to avoid this unless you like wiping your DB)
d 10826Enter Nation Wars if its running (forced)
d 10827 [server id] [battle_id] [attacker] [defender] [player count]Create a Nation Wars (spoiler alert, don't try)
d 10828Enter a Nation Wars Battle naturally
d 10829Modify Instance Filter Key
d 10830Give yourself a country randomly naturally
d 10831Leave a country naturally
d 10832 [value]0 = off 1 = on, Non Penalty PVP State
d 10833 1Add new Thread Task to the thread pool for that character (Makes big lag on the character if used many times)
d 10834 [amount]Gives Morai Order Rep
d 10835Dumps Morai order Data in the chat
d 10836Increase Morai order force activity level

Character related:
d 10837 [value]Makes your character unselectable
1 = on 0 = off
d 10839Swap Positions with target
d 10841 [value]Disarm Yourself
1 = on 0 = off
d 10842 [FactionID]Show Faction Info
d 10844 [amount]Increase Faction Contribution (if u in a faction)
d 10845 [id]Change your faction base (Don't try)
d 10846Level faction base
d 10848Summon Plant on target(Only work on Mystic)
d 10849Summon Mystic Pet (Only work on mystic)
d 10857 [id] [count]
[remaining time]
Summons a fully functional NPC to your location
or to the location of what you have targeted
d 10858 [id]
[count]
[remaining time]
Same as npc summoner, but for Mines
d 10863 [id] [count]
[distance from u]
[time alive]
[die with who]
[path id]
Spawns a monster with extra parameters
d 10887 [item id]Delete item from your inventory
d 10902List CommonData Var for the map you are in
d 10905 [id]
[expiration time]
[1 or 0]
Gives player title or removes it based on if you put 1 or 0
d 10906 [TitleID]Change a title you own to another title
d 11800 [id]Give this pet ID in pet bag
d 8904Reset all skill cooldowns and forced log out
d 10801 197646Give 10,000 skill points to spend on VIT DEX MAG
Can we give skill points by tasks or items?
 
Back
Top