StealthBot.net: Help! - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Help! Script

#1 User is offline   PooKie Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: May-02 11

Posted May 02, 2011 - 09:08 PM

Hey guys is there a script made for like you bot automaticlly saves users account name in a txt.file as they join? like your bot auto tracks users who joins so you can look at it later? Thanks !!

#2 User is offline   nofear-gr Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 42
  • Joined: November-14 09

Posted May 06, 2011 - 04:20 PM

I will coded for you soon :)
WWW.PVPGAMESERVER.COM

---Northrend Dota Gaming---

#3 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted May 06, 2011 - 07:17 PM

This script makes a text file of users and the time. In your bot folder, it will make a file named seen.txt. Everything is stored in there.

In the future please use better topic titles. You should also post requests in the Script Request subforum.

#4 User is offline   nofear-gr Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 42
  • Joined: November-14 09

Posted May 07, 2011 - 10:35 AM

Try this
script("Name") = "Userlogger"
script("Author") = "NoFeaR"
script("Major") = 3
script("Minor") = 0
script("Revision") = 0
script("Description") = "Track users joined your channel"

Private conn, OBJ_FileIO, DBPath
DatabasePath = BotPath&"\Database Folder"
DBPath = DatabasePath&"\Users.mdb"

 

Sub Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString, Banned)
   
if InStr(Username, "@")>0  then exit sub
	  	CheckUser(Username)
	if Tracked=False then
	    SQLEx "INSERT Into Users (Username, Date_Joined) Values ('"&Username&"', '"&Now&"')"
        End if
		
End Sub

GetObject list, "SELECT Count(*) As Total FROM Games"
                if not list.eof then numbr = list("Total") else numbr = 0
                Releaseobject list

Function CheckUser(Username)
    Tracked = True
  GetObject v, "SELECT COUNT (*) as Total FROM Users WHERE Username = '" & Username & "'"
        if not v.eof then numbr = v("Total") else numbr = 0
        Releaseobject v
        if numbr = "0" Then
	Tracked = False
        end if
End Function


Sub SQLEx(Parameters)
    Dim SQL
	Set SQL = CreateObject("ADODB.Connection")
	SQL.Provider = "Microsoft.Jet.OLEDB.4.0"
	SQL.Open DBPath
	on error resume next
	SQL.Execute Parameters
	
	if err.number><0 then
	    Addchat, "Error in "&split(parameters, " ")(0)&" query : ["&err.Number&"]  : "&Err.Description
		err.Clear
	end if	
	SQL.Close

End Sub

Sub GetObjectForUpdate(ByRef object, RString)
	if(Conn.State = adStateClosed) then Conn.Open DBName
	set object = CreateObject("ADODB.RecordSet")
  	object.CursorType = 1
   	object.LockType = 3
    object.open RString, Conn2
End Sub

Sub GetObject(object, SqlStr)
	if(Conn.State = adStateClosed) then Conn.Open DBPath
	set object = CreateObject("ADODB.RecordSet")
    object.open SqlStr, Conn
End Sub

Sub ReleaseObject(ByRef Object)
	Object.close
	Set Object = Nothing
End Sub

   
Sub CreateDB()
   Set ADOXC = CreateObject("ADOX.Catalog")
   If Not OBJ_FileIO.FolderExists(DatabasePath) Then
    OBJ_FileIO.CreateFolder(DatabasePath)
	Addchat vbOrange, DatabasePath&" folder not found. Creating..."
   end if
   ADOXC.Create "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source="&DBPath
   Addchat, "Creating a database at "&DBPath&" ...."
   
   SQLEx "CREATE Table Users (Username varchar(250), Date_Joined DateTime)"
   if err.number=0 then Addchat vbGreen, "Succesfully created :Users: Table!"

end sub

  Sub event_Load()
	AddChat VBBlue, "Userlogger Script Loaded!"
	AddChat VBBlue, "Coded By NoFeaR| Version 1.00"
        AddChat VBBlue, "www.pvpgameserver.com"
    Set OBJ_FileIO = CreateObject("Scripting.FileSystemObject")
	If Not OBJ_FileIO.FileExists(DBPath) Then
		MSGBox("The script detected this is either the first time you run the script, or you don't have a database specified. Press OK to create one")
		CreateDB
	End If	
    set Conn = CreateObject("ADODB.Connection")
    Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
    AddChat vbWhite, "Establishing database connection..."
    err.clear
    On error resume next
    Conn.open DBPath
	if (err<>0) then
		AddChat vbRED, "Could not connect to "&DBPath&"; Reason: "&err.Description
	    err.clear
	else
		AddChat vbGreen, "Database connection established"		
	end if
	

   End sub

WWW.PVPGAMESERVER.COM

---Northrend Dota Gaming---

#5 User is offline   RosieSuckedMe Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 251
  • Joined: March-17 11

Posted May 07, 2011 - 01:16 PM

Why code a complete new script where there already exists a script that does this? Also:

GetObject list, "SELECT Count(*) As Total FROM Games"
                if not list.eof then numbr = list("Total") else numbr = 0
                Releaseobject list


Isn't located in a Sub. And last but not least, all these functions (SQLEx, GetObject, ReleaseObject) is a complete copy of a script by Prince-Zero... Lol.

Even the Sub Event_Load is :-)

This post has been edited by RosieSuckedMe: May 07, 2011 - 01:17 PM


#6 User is offline   nofear-gr Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 42
  • Joined: November-14 09

Posted May 08, 2011 - 05:01 PM

Yeah a forgot to mention his name :P I am not coder and i dont have Îșnowledge like awakening or prince.zero .
WWW.PVPGAMESERVER.COM

---Northrend Dota Gaming---

#7 User is offline   PhiX Icon

  • Notice the ownage.
  • Icon
  • Group: Administrators
  • Posts: 8,388,607
  • Joined: July-31 09

Posted May 10, 2011 - 05:55 PM

I have moved this topic to the Trash Can.
If you have any questions or concerns as to why this topic was trashed, please contact me privately through the board's personal messaging service.
Recreating this thread or discussing these actions publicly is against the rules and will be grounds for a warning. Please do not do it.
PhiX

BNLS: phix.no-ip.org

Please refrain from sending me personal messages regarding technical support issues. Use the forums, that is what they are there for.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users