First of all, the command in the original English code is as follows:
Command <argument> or Command <argument> <argument>
However, in Korean, the command comes after:
<argument> Command or <argument> <argument> Command
This problem was solved by creating a reverse_order function in the command_interpreter function.
Code:
void reverse_order(char *argument) {
char hanparse[MAX_INPUT_LENGTH];
char hancommand[MAX_INPUT_LENGTH];
sprintf(hanparse, "%s", argument);
if (strrchr(hanparse, ' ')) {
char *last_space = strrchr(hanparse, ' ');
strcpy(hancommand, last_space + 1);
strcat(hancommand, " ");
*last_space = '\0';
strcat(hancommand, hanparse);
strcpy(argument, hancommand);
} else {
strcpy(argument, hanparse);
}
}
I'm trying to modify the trg file to make the teleport trigger work.
Code:
#65401
Obj Command 65401 - East Gate Midgen~
1 c 7
en~
if %cmd.mudcommand% == enter && gate /= %arg%
%send% %actor% You enter the gate.
%echoaround% %actor% %actor.name% enters the gate.
%teleport% %actor% 65442
%force% %actor% look
%echoaround% %actor% %actor.name% just stepped through the gate.
else
%send% %actor% %cmd% what?!
end
~
en~ appears to be the enter command.
The enter command has been localized into Korean as "입장".
The localization command for look is "봐".
The localization of the teleport command is "텔레포트".
The full code for the localized #65401 trigger is as follows:
Code:
#65401
Obj Command 65401 - 미드젠 동문~
1 c 7
입장~
if %cmd.mudcommand% == 입장 && 문 /= %arg%
%send% %actor% 당신은 문으로 들어간다.
%echoaround% %actor% %actor.name% 문으로 들어간다.
%teleport% %actor% 65442
%force% %actor% 봐
%echoaround% %actor% %actor.name% 방금 문으로 걸어 들어갔다.
else
%send% %actor% %cmd% 뭐라구요?!
end
~
I entered a trigger command in a room with an object that has this trigger applied, but it is not working.
English is entered as follows:
enter gate
Korean is entered as follows:
문 입장
Do I need to modify a specific function to input the commands in a different order?
I think if the command and arguments were passed,
Code:
%send% %actor% 당신은 문으로 들어간다.
The sentence should be printed to the screen, but it is not.
I think the arg and command are not being passed.