Morphe 159 Posted April 1, 2015 Share Posted April 1, 2015 (edited) Hi dev's ! I know this is a sh*t but... 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 April 4, 2015 by Morphe 2 Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted April 1, 2015 Former Staff Share Posted April 1, 2015 nice but you have to change the "ch" to "tch" Link to comment Share on other sites More sharing options...
iRemain 17 Posted April 1, 2015 Share Posted April 1, 2015 it will be good a command for race ^.^ Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted April 1, 2015 Former Staff Share Posted April 1, 2015 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 1 Link to comment Share on other sites More sharing options...
Management Karbust 4885 Posted April 1, 2015 Management Share Posted April 1, 2015 Thanks Morphe e flygun, both works perfectly 1 Link to comment Share on other sites More sharing options...
Morphe 159 Posted April 2, 2015 Author Share Posted April 2, 2015 nice but you have to change the "ch" to "tch" I rushed , thanks. Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted April 2, 2015 Former Staff Share Posted April 2, 2015 no problem Link to comment Share on other sites More sharing options...
Morphe 159 Posted April 4, 2015 Author Share Posted April 4, 2015 (edited) I made a big mistake case 2: // sex { switch (arg3[0]) { case 'morphe': // /set Name sex morphe { tch->ChangeSex(); tch->SetPolymorph(101); tch->SetPolymorph(0); } break; } } break; Edited April 4, 2015 by Morphe Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted April 6, 2015 Former Staff Share Posted April 6, 2015 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 More sharing options...
Recommended Posts