A SET COMMAND
 

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

A SET COMMAND

Started by DorianG, 16 February, 2004, 12:17:37

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DorianG

I'm working to a Bot and is me found in a situation too complex for me: D
I want to create a comand "! set" to set what levels of users could use a certain comand.     !set .

Ovviamente if I set that the order could use the user of level 3, it means that all the user of level 3, more, the user of a superior level, could use the comand.

Please help me :(

nErBoS

Hi,

It?s possible to do but you have to do a lot of code, for example you have to define what profile matches with level 3, unless you are using the number of the profile.dat, second you have to creat a file where the command set will send the level to the commands, then in all commands that can been changed by set you have to put some code to get from the file where do you have all levels set to commands to when is called to check if the user that is trying to access is accept or not..

Good luck on that..

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

DorianG

Also I had thought about behavior a similar thing. But my problem is that I don't know the string that allows me to read a precise line into a file.

For example i doesn't succeed this:

file setting.ini if you open it you find this list:

flood = 4
sethubname = 1
setmaxslot = 1
ban = 4
kick = 5
....
..

file Bot.lua.... What must I write inside in this file to read a precise line to file setting.ini??

To read i use this code:

function ReadLine(user)
	readfrom("files/setting.ini")
	while 1 do
		local line = read()
		if line == nil then
			break
		else
			SendData(Bot, line)
		end
	end
	readfrom()
end

But to read a line in this file, what code must i use?

SMF spam blocked by CleanTalk