own command script
 

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

own command script

Started by Madman, 20 February, 2004, 04:20:38

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Madman

Hi, i am a total n00b at this. Just got my hub up today.
I was wondering if there is or if some one could make a script there you could  simplie ad a own command.

Ex if i want +kicks (user) hard as in the ass to be a command then i just ad it in the file....

so when a user writes +kicks (user) in main following will be shown in main

(user) kicks (user) hard in the ass

If possible i dont want the +kicks (user) line to be seen in main...

I hope anyone gets what i want. sorry for any spelling misstakes. I am swedish and not so good at english
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

nErBoS

#1
Hi,

You want a command to every user use ???
You want the command to kick and don't send any messange in main, to where would you like to send the message ??

Best regards, nErBoS
--## nErBoS Spot ##--

Madman

hi

Yes commads that everybody in the hub kan use.
And i want to show it in the main...

+slap (Username) <-- The user writes that.
But in the main everybody see
(Username) slaps (username) hard!
Or something like that...

Kind of the !me command.
I hope you understand =)
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

nErBoS

Hi,

Hope it helps...

--Requested by madman 
--Made by nErBoS

Bot = "Fight-Bot"

function DataArrival(user, data)
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
	data=strsub(data,1,strlen(data)-1)
	s,e,cmd = strfind(data,"%b<>%s+(%S+)")
	if (cmd=="+slap") then
		s,e,cmd,usr = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s*")
		SendToAll(Bot, "User "..user.sName.." slaps "..usr.." hard.")
		return 1
	end
end
end

Best regards, nErBoS
--## nErBoS Spot ##--

Madman

Thanks.

I have  tried it and it works great!
And i even figured out how to add an own command.

Thanks alot  nErBoS

It is just what i wanted :)
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

SMF spam blocked by CleanTalk