Trigger command without argument.

  • cry1004
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
3 weeks 3 days ago - 3 weeks 3 days ago #9270 by cry1004
Trigger command without argument. was created by cry1004
I became interested again in making mud.
I'm localizing Tbamud and adding the necessary code.

I'm sorry for asking questions often. :)

I couldn't study the c language separately.
I'm studying C language these days, but I forget what I've studied since I'm over 50.
Still, I enjoy making mud game because of your kind answer. Thank you.

So, I prepared a question again today.
I have to move to a specific room when a specific command is entered.

I looked for a trigger to refer to.
But there were too many triggers to find what I was looking for.

Something similar I found required an argument with a specific command.

I only want to enter commands with no arguments.

I need commands that are only used in certain rooms.
For example, if I enter the blue command in room 7, I moved to room 74.

I created a command because I couldn't find a trigger command that didn't require an argument.

It moves well, but is it correct to make it like this?


For information, 7 commands are required, and each command moves to the corresponding room.

Blue, cyan, yellow, white, purple, green, red

command --- room move
blud --- 74
cyan --- 75
yellow -- 76 etc..

ACMD(do_goto_blue), ACMD(do_goto_cyan), ACMD(do_goto_yellow) etc..
By the way, we made 7 similar commands, and will one trigger solve them?

ACMD(do_goto_blue)
{
  char buf[MAX_STRING_LENGTH];
  room_rnum location;
  
  if ((location = find_target_room(ch, GET_NAME(ch))) == NOWHERE)
   return;  

  if (location != 7) {
    send_to_char(ch, "%s", CONFIG_HUH);
    return;
  }

  snprintf(buf, sizeof(buf), "$n 파랑으로 갔다.");
  act(buf, TRUE, ch, 0, 0, TO_ROOM);

  char_from_room(ch);
  char_to_room(ch, 73);

  snprintf(buf, sizeof(buf), "$n$Hn0 왔다.");
  act(buf, TRUE, ch, 0, 0, TO_ROOM);

  look_at_room(ch, 0);
  enter_wtrigger(&world[IN_ROOM(ch)], ch, -1);
}


char_to_room(ch, 73);
And, I have to go to number 74, but I had to enter 73.
Last edit: 3 weeks 3 days ago by cry1004.

Please Log in or Create an account to join the conversation.

More
3 weeks 2 days ago #9307 by thomas
Replied by thomas on topic Trigger command without argument.
Please login to view the answers
The following user(s) said Thank You: cry1004

Please Log in or Create an account to join the conversation.

  • cry1004
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
3 weeks 2 days ago #9310 by cry1004
Replied by cry1004 on topic Trigger command without argument.
Please login to view the answers

Please Log in or Create an account to join the conversation.

More
3 weeks 2 days ago #9318 by Parnassus
Replied by Parnassus on topic Trigger command without argument.
Please login to view the answers
The following user(s) said Thank You: cry1004

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #9364 by thomas
Replied by thomas on topic Trigger command without argument.
Please login to view the answers
The following user(s) said Thank You: cry1004

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #9365 by thomas
Replied by thomas on topic Trigger command without argument.
Please login to view the answers
The following user(s) said Thank You: cry1004

Please Log in or Create an account to join the conversation.

  • cry1004
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
1 week 3 days ago - 1 week 3 days ago #9743 by cry1004
Replied by cry1004 on topic Trigger command without argument.
Please login to view the answers
Last edit: 1 week 3 days ago by cry1004.

Please Log in or Create an account to join the conversation.

More
1 week 2 days ago #9746 by Parnassus
Replied by Parnassus on topic Trigger command without argument.
Please login to view the answers
The following user(s) said Thank You: cry1004

Please Log in or Create an account to join the conversation.

Time to create page: 0.168 seconds