issue-5: add teleport system command
This commit is contained in:
@@ -208,6 +208,7 @@ ACMD(do_get_mob_count);
|
||||
ACMD(do_dice);
|
||||
ACMD(do_special_item);
|
||||
ACMD(do_biolog_submit);
|
||||
ACMD(do_teleport_system);
|
||||
|
||||
ACMD(do_click_mall);
|
||||
|
||||
@@ -465,6 +466,7 @@ struct command_info cmd_info[] =
|
||||
{ "inventory", do_inventory, 0, POS_DEAD, GM_LOW_WIZARD },
|
||||
{ "cube", do_cube, 0, POS_DEAD, GM_PLAYER },
|
||||
{ "biolog_submit", do_biolog_submit, 0, POS_DEAD, GM_PLAYER },
|
||||
{ "teleport_system", do_teleport_system, 0, POS_DEAD, GM_PLAYER },
|
||||
{ "siege", do_siege, 0, POS_DEAD, GM_LOW_WIZARD },
|
||||
{ "temp", do_temp, 0, POS_DEAD, GM_IMPLEMENTOR },
|
||||
{ "frog", do_frog, 0, POS_DEAD, GM_HIGH_WIZARD },
|
||||
|
||||
@@ -1866,6 +1866,53 @@ ACMD(do_biolog_submit)
|
||||
quest::CQuestManager::instance().QuestButton(ch->GetPlayerID(), questIndex);
|
||||
}
|
||||
|
||||
ACMD(do_teleport_system)
|
||||
{
|
||||
char arg1[256];
|
||||
char arg2[256];
|
||||
two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2));
|
||||
|
||||
int action = 0;
|
||||
if (!strcmp(arg1, "save"))
|
||||
action = 1;
|
||||
else if (!strcmp(arg1, "saved"))
|
||||
action = 2;
|
||||
else if (!strcmp(arg1, "preset"))
|
||||
action = 3;
|
||||
else
|
||||
{
|
||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Unknown teleport action."));
|
||||
return;
|
||||
}
|
||||
|
||||
int arg = 0;
|
||||
str_to_number(arg, arg2);
|
||||
if (arg <= 0)
|
||||
{
|
||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Invalid teleport argument."));
|
||||
return;
|
||||
}
|
||||
|
||||
quest::PC* pPC = quest::CQuestManager::instance().GetPC(ch->GetPlayerID());
|
||||
if (!pPC)
|
||||
{
|
||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("퀘스트를 로드하는 중입니다. 잠시만 기다려 주십시오."));
|
||||
return;
|
||||
}
|
||||
|
||||
const std::string questName = "teleport_system";
|
||||
const DWORD questIndex = quest::CQuestManager::instance().GetQuestIndexByName(questName);
|
||||
if (questIndex == 0)
|
||||
{
|
||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Teleport quest could not be found."));
|
||||
return;
|
||||
}
|
||||
|
||||
pPC->SetFlag(questName + ".remote_action", action, true);
|
||||
pPC->SetFlag(questName + ".remote_arg", arg, true);
|
||||
quest::CQuestManager::instance().QuestButton(ch->GetPlayerID(), questIndex);
|
||||
}
|
||||
|
||||
ACMD(do_in_game_mall)
|
||||
{
|
||||
if (LC_IsYMIR() == true || LC_IsKorea() == true)
|
||||
|
||||
Reference in New Issue
Block a user