client checker
 

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

client checker

Started by b_w_johan, 12 March, 2005, 22:32:17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

b_w_johan

--1) create bot discription ed                  --working
--2) send botname and discription to userlist            --working
--3.1) start timer1                     --working
--3.2) start timer2                     --making it work
--4) check connected user for TAG               --
--5) check if this TAG is in a file called clients.txt if not add.   --
--6) check if this TAG is already in the userlist.         --
--7) if its in already send PM                  --
--8) and disconnect.                     --
--9) if timer1 reaches 0 then send prefix            --
--10) if timer2 reaches 0 send clients.txt            --
--11) if command !client send clients.txt            --
--12) if command !prefix send prefix.txt            --
--13) if command !addtag then add this tag to the clients.txt   --
-- Maded by b_w_johan, TTB, Psvoo7
-- Maded for SCRIP']['ERS ELI']['E

BOTName = "[LUA4]Guard"
BOTDiscription = "LUA4 Scripted"
BOTVersion = "A1"
BOTTag = "<++v:"..BOTVersion.." "..BOTName..",M;A.H:0/0/3,S:0>"
BOTConnection = "2fst4u"
BOTMail = "dc.client@gmail.com"
BOTInfo = "$MyINFO $ALL "..BOTName.." "..BOTDiscription.." "..BOTTag.."$ $"..BOTConnection.." "..strchar(1).."$"..BOTMail.."$"

tag = "<[LUA4]Bot>"
info = "$MyINFO $ALL "..BOTName.." "..BOTDiscription.." "..tag.."$ $"..BOTConnection.." "..strchar(1).."$"..BOTMail.."$"

sec  = 1000
min  = sec*60
hour = min*60
days = hour*24

clientlist = 1*days
--prefix = 5*hours



function Main()
   frmHub:RegBot(BOTName)
   SendToAll("This hub is protected by [LUA5]Guard BOT")
   SetTimer(clientlist)
   StartTimer()
--   SetTimers(prefix)
--   StartTimer("1")
end

function OpConnected(user)
user:SendData(BOTInfo)
end
function NewUserConnected(user)
user:SendData(info)
end

function OnTimer()
   Sendclientlist()
end

--function OnTimer("1")
--   Sendprefix()
--end

function Sendclientlist()
SendToAll("test")
end

function Sendprefix()
SendToAll("\r\nList of User Discription\r\n\r\n[DCD]   =   DC Destroyer\r\n[XRZ]   =   Nothing Special yust Special Option for our webhost/Lua scripter/JAVA programmer =-p\r\n[LUA]   =   Lua Bot writer good in both 4&5\r\n[LUA4]   =   Lua4 Bot writer\r\n[LUA5]   =   Lua5 Bot writer\r\n[HTM]   =   Web(HTML)Scripter\r\n[JAS]   =   Web(java)Scripter\r\n[php]   =   Web(PHP)Scripter\r\n[JAV]   =   JAVA Programmer\r\n[VB]   =   Visual Basic Programmer\r\n[CPP]   =   C++ Programmer\r\n")
end

making samescript in both LUA 4 and 5 ....
but also the problem that i don't know how to add a second timer....

please help me with the timer rest of script ill try to make myself (maybe with some help from you all here =-p )=-p

greetings Johan
checkout http://wwhublist.com/index.php for my World Wide HubList project!

b_w_johan

is it impossible or something to have 2 timers in 1 script ??


if its possible can someone help me with it then ???

greetings Johan
checkout http://wwhublist.com/index.php for my World Wide HubList project!

Pothead

#2
Just use the same timer, just reference it at the times you want. :)

**Edit for example

--Initilize shit
prefixcount = 0;
clientcount = 0;
prefixtime = 100000;
clienttime = 200000;

-- On Timer
function OnTimer ()
   prefixcount ++; clientcount++;
   if prefixcount > prefixtime then
        Send Prefix;
        prefixcount = 0;
   end
   if clientcount > clienttime then
        Send Client;
        clientcount = 0;
   end
end

[UK]Madman

An example in Lua 4 is phattys multitimer

>> Click  <<

b_w_johan

#4
Thx for the reply's,

Syntax error: `=' expected;
  last token read: `+' at line 50 in file `...tings\Administrator.SERVER.000\Bureaublad\ptokax\scripts\test.lua'

this error i get while using potheads scrip=-p


--1create bot discription ed
	
	
	
	
	
	
--
working
--2send botname and discription to userlist
	
	
	
	
--
working
--3.1start timer1
	
	
	
	
	
	
	
--
working
--3.2start timer2
	
	
	
	
	
	
	
--
making it work
--4check connected user for TAG
	
	
	
	
	
--
--
5check if this TAG is in a file called clients.txt if not add.
	
--
--
6check if this TAG is already in the userlist.
	
	
	
--
--
7) if its in already send PM
	
	
	
	
	
	
--
--
8) and disconnect.
	
	
	
	
	
	
	
--
--
9) if timer1 reaches 0 then send prefix
	
	
	
	
--
--
10) if timer2 reaches 0 send clients.txt
	
	
	
	
--
--
11) if command !client send clients.txt
	
	
	
	
--
--
12) if command !prefix send prefix.txt
	
	
	
	
--
--
13) if command !addtag <tagthen add this tag to the clients.txt
	
--
-- 
Maded by b_w_johanTTBPsvoo7Tejo
-- Maded for SCRIP']['ERS ELI']['E

BOTName 
"[LUA4]Guard"
BOTDiscription "LUA4 Scripted"
BOTVersion "A1"
BOTTag "<++v:"..BOTVersion.." "..BOTName..",M;A.H:0/0/3,S:0>"
BOTConnection "2fst4u"
BOTMail "dc.client@gmail.com"
BOTInfo "$MyINFO $ALL "..BOTName.." "..BOTDiscription.." "..BOTTag.."$ $"..BOTConnection.." "..strchar(1).."$"..BOTMail.."$"

tag "<[LUA4]Bot>"
info "$MyINFO $ALL "..BOTName.." "..BOTDiscription.." "..tag.."$ $"..BOTConnection.." "..strchar(1).."$"..BOTMail.."$"

sec  1000
min  
sec*60
hour 
min*60
days 
hour*24

prefixcount 
0;
clientcount 0;
prefixtime 6*hour;
clienttime 5*hour;

function 
Main()
	
frmHub:RegBot(BOTName)
	
SendToAll("This hub is protected by [LUA4]Guard BOT")
	
SetTimer()
	
StartTimer()

end

-- On Timer
function OnTimer ()
   
prefixcount++; clientcount++;
   if 
prefixcount prefixtime then
        SendPrefix
;
        
prefixcount 0;
   
end
   
if clientcount clienttime then
        SendClient
;
        
clientcount 0;
   
end
end




function OpConnected(user
user:SendData(BOTInfo
end 
function NewUserConnected(user
user:SendData(info
end


function Sendclient()
SendToAll("test")
end

function Sendprefix()
SendToAll("\r\nList of User Discription\r\n\r\n[DCD]
	
=
	
DC Destroyer\r\n[XRZ]
	
=
	
Nothing Special yust Special Option for our webhost/Lua scripter/JAVA programmer =-p\r\n[LUA]
	
=
	
Lua Bot writer good in both 4&5\r\n[LUA4]
	
=
	
Lua4 Bot writer\r\n[LUA5]
	
=
	
Lua5 Bot writer\r\n[HTM]
	
=
	
Web(HTML)Scripter\r\n[JAS]
	
=
	
Web(java)Scripter\r\n[php]
	
=
	
Web(PHP)Scripter\r\n[JAV]
	
=
	
JAVA Programmer\r\n[VB]
	
=
	
Visual Basic Programmer\r\n[CPP]
	
=
	
C++ Programmer\r\n"
)
end



maybe im yust forgetting something =-p but ill try phattys multitmimer now lets see if i can get that working =-p

greetings Johan
checkout http://wwhublist.com/index.php for my World Wide HubList project!

Pothead

lol, i not suprised, i only wrote it as an example.  I dunno if  
++ works in in LUA.  You might have to try e.g. prefixcount = prefixcount + 1;

Same for the other counter.  Also in timer it's calling SendPrefix and SendClient , which don't exist.  Have a closer look at the capital letters. :)

b_w_johan

ok i take a look at phatys timer so its something like this:

-- On Timer
function OnTimer ()
   if prefixcount = 1 then
     prefixcount = prefixcount + 1
   clientcount = clientcount + 1
        Sendprefix()
        prefixcount = 0
   end
   if clientcount = 2 then
        Sendclient()
        clientcount = 0
   end
end

(but its still not working ....)

can someone help me???

greetings Johan
checkout http://wwhublist.com/index.php for my World Wide HubList project!

Pothead

#7
You are missing somthing in
SetTimer()
;)


**Edit
And you screwed up the ontimer() part.  Just the code i gave you and make the corrections i said in the previous post. ?(

b_w_johan

ok maybe you can explain som more ......

you said i had to change the --on Timer part .... cause it didn't work so i used a bit of Madmans/phatty's post ... what is missing by SetTimer() ??
or do you meen i have to let it the way it was in my first post (clientlist) in here ????
checkout http://wwhublist.com/index.php for my World Wide HubList project!

Pothead

#9
SetTimer() sets the timer to 0.
SetTimer(1) sets the timer to 1ms.
SetTimer(1000) sets the timer to 1 second.  
(well that's what i think the values represent in time)

--Initilize shit
prefixcount = 0;
clientcount = 0;
prefixtime = 100000;
clienttime = 200000;

-- On Timer
function OnTimer ()
   prefixcount = prefixcount + 1
   clientcount = clientcount + 1

   if prefixcount > prefixtime then
        Sendprefix();
        prefixcount = 0;
   end
   if clientcount > clienttime then
        Sendclient();
        clientcount = 0;
   end
end

SMF spam blocked by CleanTalk