Skip to content

Commit

Permalink
Whanake/chat window commands (#516)
Browse files Browse the repository at this point in the history
* Correct shell and chat sections to avoid confusion

* Add guide for chat window commands
  • Loading branch information
whanake-music authored Jan 6, 2025
1 parent 33e1a2d commit b2e569f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions docs/guides/new_players/chat_window_tips.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Chat Window Tips
description: "Helpful tips/commands for the chat window"
---

The in-game chat window has three built-in commands to allow for more efficient use.

### Change the default channel - ((%A%%))((%Vchannel%))

By default, messages typed in the chat window get sent to ((%V0000%)). To change this, type `%<channel>` into the chat window. For example, typing ((%A%n00bz%)) will send all future messages to the ((%Vn00bz%)) channel.

### Select a specific user - ((%A+%))((%Cuser%))

To use the chat window to ((chats.tell)) messages to a particular user, you can type `+<user>` into the chat window. For example, typing ((%A+risk%)) will send all future messages to the user ((%Crisk%)).

### Use a custom script - ((%A&%))((custom.script))

By default, typing a message into the chat window will pass it into ((chats.send)) using the ((%Nmsg%)) parameter (with the default channel passed using the ((%Nc%)) parameter), so that typing ((%AHello world!%)) into the chat window will execute ((chats.send)) \{((%Nc%)):((%V"0000"%)), ((%Nmsg%)):((%V"Hello world!"%))\}.

You can change this script to anything you like, using `%<your.script>`. For example, if the user ((%Crisk%)) wants to change the color of their chat messages to green, they can create a script like ((risk.chatcolor)) that accepts ((%Nc%)) and ((%Nmsg%)) parameters, adds ((%A\`L%)) to the start of the message and ((%A\`%)) to the end, then calls ((chats.send)) to send the color-coded message. Now, ((%Crisk%)) can type ((%A&risk.%))((%Achatcolor%)) into the chat window, and make all their future chat messages green by default.
4 changes: 2 additions & 2 deletions docs/scripting/trust_scripts/gui.chats.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ One argument is required, either ((%Nshell%)) or ((%Nchat%)). If no arguments ar

#### shell

The '((%Nshell%))' argument dictates if chat appears in the main window or not using a boolean (((%Vtrue%))/((%Vfalse%))).
The '((%Nshell%))' argument dictates if chat appears in the main terminal window or not using a boolean (((%Vtrue%))/((%Vfalse%))).

#### chat

The '((%Nchat%))' argument dictates if chat appears in the main window or not using a boolean (((%Vtrue%))/((%Vfalse%))).
The '((%Nchat%))' argument dictates if chat appears in the chat window or not using a boolean (((%Vtrue%))/((%Vfalse%))).

### Return

Expand Down

0 comments on commit b2e569f

Please sign in to comment.