Chat how-to up on wiki
Moderator: Moderator
Chat how-to up on wiki
The link for "Chats: Beyond Hack and Slash" on the wiki how-to page taunted me as I passed through yesterday, and since I had just spent some time using the Chat code for my module I decided to write a guide. Let me know if there are any issues with it, or simply edit the wiki yourself. Cheers!
<DarkGod> lets say it's intended
Re: Chat how-to up on wiki
Well done Sir Knight!
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

-
- Reaper
- Posts: 1535
- Joined: Mon Jan 22, 2007 6:31 pm
- Location: East of the sun, west of the moon
Re: Chat how-to up on wiki
hmmm, I suppose I could write up a guide on how to randomize chats too (makes the game more variable). though I dont know how much time I have to do that.
if you want to know how to do that just use
and then to call it:
notice the use of rng.table(foo) to pick a random string and the use of ".." to combine the strings.
if you want to know how to do that just use
Code: Select all
greeting = {"Hi", "Hello", "Good day", "Bonjour", "Greetings"}
hope = {"hope", "trust", "see", "perceive"}
Code: Select all
newChat{ id="hello",
text = rng.table(greeting) .. " @playername@! I " .. rng.table(hope) .. " your quest goes well.",
answers = {
{rng.table(greeting) .. "!"},
},
}
Oliphant am I, and I never lie.