PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: NemeziS on 24 September, 2004, 16:02:56

Title: Not show !comannds in main...
Post by: NemeziS on 24 September, 2004, 16:02:56
Hi!
Another request. I wanted a bot that will not show "!" cmds in main.
Who can help me?
Title:
Post by: Herodes on 24 September, 2004, 18:32:15
function DataArrival(user, data)
if strsub(data, 1,1) == "<" then
data = strsub(data, 1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if strsub(cmd ,1,1) == "!" then
return 1
end
end
end

Warning u though ... this will disable the processing of anything starting with a ' ! ' so I wouldnt expect to have my !cmds working using this ...

try to understand the way this works and then use it in the bot of which cmds u are referring to ..
Title:
Post by: NemeziS on 24 September, 2004, 18:38:54
I wanted all !cmds work, but not be displayed in main and PM. Is it possible?
Title:
Post by: Seiya on 24 September, 2004, 19:08:41
change the Herodes'scripts line by :

Quoteif (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
Title:
Post by: NemeziS on 24 September, 2004, 23:19:04
You didn't understand me. I wanted a script for !cmds not be shown (but they must work!) Herodes's script disables !cmds at all. I want only that not be shownin main\PM:

[00:59] !records
or other !commands

Understand me? :)