-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 98742fc
Showing
9 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Muddle | ||
uses: demonnic/[email protected] | ||
|
||
- name: Upload MPackage | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: run-lua-code | ||
path: build/tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.vscode/ | ||
build/ | ||
sub-projects/ | ||
doc/ | ||
.output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Echo Package | ||
|
||
The echo package provides a means of testing triggers via the command line with four command aliases; | ||
`` `echo, `cecho, `decho, `hecho``. | ||
|
||
All act as if the given text came from the game itself and will fire any matching triggers. | ||
|
||
See [Triggers](https://wiki.mudlet.org/w/Manual:Introduction#Triggers) for further information on matching text. | ||
|
||
## `echo Alias | ||
|
||
Displays text on the screen and tells all matching triggers to fire. For coloring use one | ||
of the other functions mentioned below. | ||
|
||
```txt | ||
-- examples | ||
> `echo text - displays text on the main screen and tells all matching triggers to fire | ||
> `echo This is a sample line from the game$$And this is a new line. | ||
``` | ||
|
||
See [echo](https://wiki.mudlet.org/w/Manual:Lua_Functions#echo), [feedTriggers](https://wiki.mudlet.org/w/Manual:Lua_Functions#feedTriggers), | ||
|
||
## `cecho Alias | ||
|
||
Like echo, but you can add color information using color names and ANSI values. | ||
|
||
```txt | ||
-- example: color format is <foreground:background> | ||
> `cecho <green:red>green on red<r> reset$$<124:100>foreground of ANSI124 and background of ANSI100<r> | ||
``` | ||
|
||
See [cecho](https://wiki.mudlet.org/w/Manual:Lua_Functions#cecho), [cfeedTriggers](https://wiki.mudlet.org/w/Manual:Lua_Functions#cfeedTriggers). | ||
|
||
## `decho Alias | ||
|
||
Like cecho, but you can add color information using <r,g,b> format. | ||
|
||
```txt | ||
-- example | ||
> `decho <0,128,0:128,0,0>green on red<r> reset | ||
``` | ||
|
||
See [decho](https://wiki.mudlet.org/w/Manual:Lua_Functions#decho), [dfeedTriggers](https://wiki.mudlet.org/w/Manual:Lua_Functions#dfeedTriggers). | ||
|
||
## `hecho Alias | ||
|
||
Like cecho, but you can add color information using hex #RRGGBB format. | ||
|
||
```txt | ||
-- example | ||
> `hecho #008000,800000green on red#r reset | ||
``` | ||
|
||
See [hecho](https://wiki.mudlet.org/w/Manual:Lua_Functions#hecho), [hfeedTriggers](https://wiki.mudlet.org/w/Manual:Lua_Functions#hfeedTriggers). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"package": "echo", | ||
"version": "1.0", | ||
"author": "Mudlet", | ||
"title": "A set of aliases to test triggers on the command line." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
local s = matches[2] | ||
|
||
s = string.gsub(s, "%$", "\n") | ||
cfeedTriggers("\n" .. s .. "\n") | ||
echo("\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
local s = matches[2] | ||
|
||
s = string.gsub(s, "%$", "\n") | ||
dfeedTriggers("\n" .. s .. "\n") | ||
echo("\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
local s = matches[2] | ||
|
||
s = string.gsub(s, "%$", "\n") | ||
feedTriggers("\n" .. s .. "\n") | ||
echo("\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
local s = matches[2] | ||
|
||
s = string.gsub(s, "%$", "\n") | ||
hfeedTriggers("\n" .. s .. "\n") | ||
echo("\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"name": "`echo", | ||
"regex": "`echo (.+)" | ||
}, | ||
{ | ||
"name": "`cecho", | ||
"regex": "`cecho (.+)" | ||
}, | ||
{ | ||
"name": "`decho", | ||
"regex": "`decho (.+)" | ||
}, | ||
{ | ||
"name": "`hecho", | ||
"regex": "`hecho (.+)" | ||
} | ||
] |