This commit is contained in:
Marvin Dalheimer 2023-04-24 21:30:09 +02:00
commit 2be68f8d6e
Signed by: Rinma
GPG Key ID: 44CAD3A9F1679D8D
2 changed files with 30 additions and 0 deletions

22
HelloWorld.lua Executable file
View File

@ -0,0 +1,22 @@
HelloWorld_Text = {}
local channel = "SAY"
SLASH_HELLO_WORLD_ADD1 = "/hwadd"
SLASH_HELLO_WORLD_ADD2 = "/helloworldadd"
SlashCmdList["HELLO_WORLD_ADD"] = function(msg)
local id, text = msg:match("(%S+)%s+(.+)")
if id and text then
HelloWorld_Text[id:lower()] = text
end
end
SLASH_HELLO_WORLD_SHOW1 = "/hwshow"
SLASH_HELLO_WORLD_SHOW2 = "/helloworldshow"
SlashCmdList["HELLO_WORLD_SHOW"] = function(msg)
local text = HelloWorld_Text[msg:lower()]
if text then
print(text)
end
end

8
HelloWorld.toc Executable file
View File

@ -0,0 +1,8 @@
## Interface: 11403
## Title: HelloWorld
## Notes: Say Hello World to Chat
## Author: Rinma
## Version: 0.0.1
## SavedVariables: HelloWorld_Text
HelloWorld.lua