hi there... Could someone please help me with a script? I would like a script so that when I type wrong a command, like ' !kik ' in stead of ' !kick ' won't appear in mainchat to all the users but only to me with a reply like ' Unknown command, please try to be more careful when you type ' or something like that. Could it be possible? Thank You :)
lol, please read the other help topic on LUA & PtokaX-Scripting-Interface
i think it will help u
uhm... I'm not quite finding anything... could you please post the script? :'(
sBot = "Fusion"
Commands = {
["myip"] = 1, -- add ur commands here in the same format
["stat"] = 1,
["reloadtxt"] = 1,
["getscripts"] = 1,
["restartscripts"] = 1,
["clrrangetempbans"] = 1,
["clrtempbans"] = 1,
["clrrangepermbans"] = 1,
["clrpermbans"] = 1,
["fav"] = 1,
["getrangebans"] = 1,
["getrangepermbans"] = 1,
["getpermbans"] = 1,
["getrangetempbans"] = 1,
["gettempbans"] = 1,
["help"] = 1,
}
function ChatArrival( user, data)
local s,e,prefix,cmd = data:find("%b<>%s+(%p)(%S+)|")
if not Commands[cmd] then
if prefix and cmd then
SendToAll(sBot, "Type prefix-help for list of commands available to ur profile") -- and ur mesg here
return 1
end
end
end
give this a try or u can still w8 for scripters to post something better
uhm... when I type the wrong command the other users can see it ... could you fix that so the users won't see the wrong command? please :'(
previous code updated
one last thing :) could you make it so the 'one hand writing sees the message ' Type prefix-help for list of commands available to ur profile ' ? Thank you :) oh and... when I type another parameter the wrong command still shows up :(
this time u will have to w8 for some scripter to help, i m unable to this
oky, I will wait :) thank you :D
Quote from: Plagued Elohim on 18 April, 2007, 18:44:40
one last thing :) could you make it so the 'one hand writing sees the message ' Type prefix-help for list of commands available to ur profile ' ? Thank you :) oh and... when I type another parameter the wrong command still shows up :(
Giving a hint ;)
local s,e,prefix,cmd = data:find("%b<>%s+(%p)(%S+)|")
local s,e,prefix,cmd,everything_after_cmd = data:find("%b<>%s+(%p)(%S+)%s*(.*)%|)
Or maybe by removing the linebreak char
u forgot to pu " before ) ;) thx Naithif :D now all I need is to show that message ' Type prefix-help for list of commands available to ur profile ' to the one hand writing ... could someone help me with this one? and I promice I won't disturbe you again :P :D
My bad, you're right :)
user:SendData
Instead of
SendToAll
thank you :-* ;D :D
one small problem... can somebody remake the script so it will respond to the commands that have ' ! ' in front of them ? and not with the other like " ? @ # $ " and other. Thank you :)
local s,e,prefix,cmd,everything_after_cmd = data:find("%b<>%s+([%!])(%S+)%s*(.*)")
Done.. this only respons to cmd's with !
and if you want to add respons for + then add %+ after %! but within the [ ]
it works :D thanks :)