Load this in a new script under remote tab. Allow it to initiate.
This is designed for your 2nd request, store contents into a .txt file.
Really really crude crash course on how to add words:
/hadd <name> <item> <data>
/hadd words brb Be Right Back
<name> == words
<item> == brb
<data> == Be Right Back
The <item> can't have spaces.
This script basically replaces the <item> with <data>.
See: /help /hadd
; Syntax to add more words:
;
; /hadd words brb Be Right Back
on *:start:{
if (!$hget(words)) {
hmake words 200
}
if ($isfile(words.txt)) {
hload words words.txt
}
}
on *:unload:{
if ($hget(words)) {
; Save words..
hsave words words.txt
hfree words
}
}
on *:exit:{
; Save words..
hsave words words.txt
}
on *:input:*:{
; Don't trigger on command that begin with "/" or
; when "CTRL+ENTER" is pressed.
if ($left($1,1) != /) && (!$ctrlenter) {
var %x = 1
var %y = $numtok($1-,32)
var %temp = $1-
while (%y) {
var %a = $gettok($1-,%y,32)
if ($hfind(words,%a)) {
var %b $numtok($hget(words,%a),32) - 1
var %temp = $puttok(%temp,$hget(words,%a),%y,32)
inc %b
}
dec %y
}
msg $active %temp
halt
}
}