PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: the_pest on 13 January, 2005, 19:39:12

Title: write without nick
Post by: the_pest on 13 January, 2005, 19:39:12
Hello, i would like small script which can send text without nick to chat. ( i have seen it in robocop under !talk command, but never as alone script)
Title:
Post by: Herodes on 13 January, 2005, 21:41:15
here u go .. this is very simple .. maybe some1 may be kind enough or not have anything else to do and modifiy it to smth better .. untested and timed at 36secs ... [posting includ.]

--- simple say by Herodes
allowed = {
"Herodes" = 1,
--- add more names here ... dont forget the format .. :  "nickname" = 1,    (the comma is important too)
}
function DataArrival(user, data)
if allowed[user.sName] = 1 and strsub(data, 1,1) == "<" then
local s,e, cmd, what = strfind(data , "%b<>%s+(%S+)%s*(.*)|")
if cmd == "!say" and what then
SendToAll(what)
return 1
end
end
end