Help :(
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Help :(

Started by Plagued Elohim, 18 April, 2007, 17:30:09

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Plagued Elohim

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 :)

achiever

lol, please read the other help topic on  LUA & PtokaX-Scripting-Interface
i think it will help u
thks,
achiever.

Plagued Elohim

uhm... I'm not quite finding anything... could you please post the script?  :'(

achiever

#3
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
thks,
achiever.

Plagued Elohim

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  :'(

achiever

previous code updated
thks,
achiever.

Plagued Elohim

#6
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 :(

achiever

this time u will have to w8 for some scripter to help, i m unable to this
thks,
achiever.

Plagued Elohim

oky, I will wait  :) thank you  :D

Naithif

#9
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

Plagued Elohim

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

Naithif

My bad, you're right  :)

user:SendData


Instead of

SendToAll

Plagued Elohim

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 :)

Madman

Code: lua
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 [ ]
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Plagued Elohim


SMF spam blocked by CleanTalk