Jump to content
×
×
  • Create New...

Improved Set Command's


Recommended Posts

Hi dev's !

 

I know this is a sh*t but... :D

 

Open cmd_gm.cpp:

SET SEX:

Find:

case 2: // sex
break;

Replace with:

case 2: // sex
{
switch (arg3[0])
{
case 'morphe': // /set Name sex morphe
{
tch->ChangeSex();
tch->SetPolymorph(101);
tch->SetPolymorph(0);
}
break;
}
}
break;
use /set Name sex morphe or change 'morphe' with 'your_string'
 

SET RACE:

Find:

case 1: // race
break;
Replace with:
case 1: // race
{
DWORD dwRace = MAIN_RACE_MAX_NUM;


if (!*arg3)
{
ch->ChatPacket(CHAT_TYPE_INFO, "Enter race number");
return;
}


str_to_number(dwRace, arg3);
if (dwRace >= MAIN_RACE_MAX_NUM)
{
ch->ChatPacket(CHAT_TYPE_INFO, "Race max number = 9 (0-8)");
return;
}


if (dwRace == tch->GetRaceNum())
{
ch->ChatPacket(CHAT_TYPE_INFO, "He already is this race");
return;
} 


tch->SetRace(dwRace);
tch->ClearSkill();


tch->SetPolymorph(101);
tch->SetPolymorph(0);
}
break;

use /set Name race number_race

 

SET SKILL GROUP

Find:

{ "align", NUMBER },

Add under:

{ "skill_group", NUMBER },

Find:

case 8: // alignment

Add under this case a new case:

case 9: // skill_group
{
bool bIsSetSkillGroup = false;
DWORD dwSkillGroup = 0;

if (!*arg3)
{
ch->ChatPacket(CHAT_TYPE_INFO, "Enter a skill_group (1-2)");
}

if (*arg3)
{
str_to_number(dwSkillGroup, arg3);
dwSkillGroup = MINMAX(0, dwSkillGroup, 2);
bIsSetSkillGroup = true;
}

if (bIsSetSkillGroup)
{
tch->SetSkillGroup(dwSkillGroup);
}
}
break;

use /set Name race number_race

 

SET LEVEL

Find:

{ "align", NUMBER },

Add under:

{ "level", NUMBER },

Find:

case 9: // skill_group

Add under this case a new case.

case 10: // level
{
DWORD dwLevel = PLAYER_EXP_TABLE_MAX;


if (!*arg3)
{
ch->ChatPacket(CHAT_TYPE_INFO, "Enter the level");
return;
}


str_to_number(dwRace, arg3);
if (dwLevel >= PLAYER_EXP_TABLE_MAX)
{
ch->ChatPacket(CHAT_TYPE_INFO, "MAX_LEVEL is: %d", PLAYER_EXP_TABLE_MAX);
return;
}


tch->SetLevel(dwRace);
}
break;

use /set Name level number

 

 

 
Edited by Morphe
  • Love 2
Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

  • Former Staff
        case 1: // race
            {
                BYTE bRace;
                str_to_number(bRace, arg3);
                if (bRace > 8 || bRace < 0)
                {
                    tch->ChatPacket(CHAT_TYPE_INFO, "The Number must be from 0 --> 7 only");
                    tch->ChatPacket(CHAT_TYPE_INFO, "RACE_WARRIOR_M   = 0");
                    tch->ChatPacket(CHAT_TYPE_INFO, "RACE_ASSASSIN_W = 1");
                    tch->ChatPacket(CHAT_TYPE_INFO, "RACE_SURA_M = 2");
                    tch->ChatPacket(CHAT_TYPE_INFO, "RACE_SHAMAN_W = 3");
                    tch->ChatPacket(CHAT_TYPE_INFO, "RACE_WARRIOR_W = 4");
                    tch->ChatPacket(CHAT_TYPE_INFO, "RACE_ASSASSIN_M = 5");
                    tch->ChatPacket(CHAT_TYPE_INFO, "RACE_SURA_W = 6");
                    tch->ChatPacket(CHAT_TYPE_INFO, "RACE_SHAMAN_M = 7");
                    tch->ChatPacket(CHAT_TYPE_INFO, "RACE_WOLFMAN_M = 8");
                    return;
                }
                tch->SetRace(bRace);
                tch->ClearSkill();
                tch->SetSkillGroup(0);
                tch->ClearSubSkill();
            }
            break;

this for race :)

 

and this for level

 

Best regards

    Flygun :P

  • Love 1
Link to comment
Share on other sites

I made a big mistake :D

 

case 2: // sex
{
switch (arg3[0])
{
case 'morphe': // /set Name sex morphe
{
tch->ChangeSex();
tch->SetPolymorph(101);
tch->SetPolymorph(0);
}
break;
}
}
break;
Edited by Morphe
Link to comment
Share on other sites

  • Former Staff

this is so wrong dude :/ 

first of all when you saw this code you just say "OH this will be a good /set command"

tch->SetSkillGroup(0);

then you added the skill Group /set command

i'm not saying that you are takeing anything from anyone but just look at your codes ??O.o does they work fine ??

 

# you can't just set the level without resetting the status of the player this will cause so many errors

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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.