• 1
  • 2
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mirage Bot Script Nearing Completion
#1
hey guys if you read before i was working on a script i have a screen shot of it check the top screen to see the servers im on and check the times that i sent the messages

[Image: o58k9rhdfnc0w6nbl1k5.png]


ive added server to server chat

working on adding so it sends emotes and has join leave messages all features will be toggle able



for fun here is the code i am using

Early Beta v0.0.1:
Code:
Dim Channel, Server, bot, sStuff, myFSO, WriteStuff, dateStamp
   Dim fso, f

Sub Script(Name, Major, Minor, Build, Author, Commands, Description)
    Name = "test"
    Major = 0
    Minor = 0
    Build = 1
    Author = "Jeremy"
    Commands = "Setup"
    Description = "Allows You To Talk Between Servers/Channels"
End Sub

Sub Event_Load()
    
    CreateCommand "Setup", "test", "Command_Setup", "", "", "Setup", 0, True
    CreateCommand "save", "test", "Command_Save", "", "", "save", 0, True
    CreateCommand "load", "test", "Command_load", "", "", "load", 0, True
    AddTimer "test", "MessageReciver_Timer", 10, True
   StartTimer "test", "MessageReciver_Timer"
end sub

Sub Command_Setup(CS)

MyString = CS.message
MyArray = Split(MyString, ",", -1, 1)
Channel = MyArray(0)
Server = MyArray(1)
bot = MyArray(2)

End Sub

Sub Event_UserTalk(CE)
if bot = 1 then
dateStamp = Date()

'Write information to Text File
sStuff = dateStamp

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot1.txt", 8, True)
WriteStuff.Writeline("[" & Channel & "@" & Server & "] < " & CE.Username & " > : " & CE.Message)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
SET myFSO = NOTHING
end if

if bot = 2 then

dateStamp = Date()

'Write information to Text File
sStuff = dateStamp

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot2.txt", 8, True)
WriteStuff.Writeline("[" & Channel & "@" & Server & "] < " & CE.Username & " > : " & CE.Message)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
end if
SET myFSO = NOTHING

End Sub


Sub MessageReciver_Timer()
On Error resume next
Const ForWriting = 2
if bot = 1 then
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("C:\Users\Jeremy\Desktop\Bot2.txt")
If objFile.Size > 0 Then
    Set objReadFile = objFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot2.txt", 1)
    strContents = objReadFile.ReadAll
    send strContents
    objReadFile.Close
End If

   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile("C:\Users\Jeremy\Desktop\Bot2.txt", ForWriting,true)
   'f.write("Text Cleared")
'msgBox ""C:\Users\Jeremy\Desktop\Bot1.txt",64,"Text Cleared"
F.close
end if

if bot = 2 then
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("C:\Users\Jeremy\Desktop\Bot1.txt")
If objFile.Size > 0 Then
    Set objReadFile = objFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot1.txt", 1)
    strContents = objReadFile.ReadAll
    send strContents
    objReadFile.Close
End If

   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile("C:\Users\Jeremy\Desktop\Bot1.txt", ForWriting,true)
   'f.write("Text Cleared")
'msgBox ""C:\Users\Jeremy\Desktop\Bot1.txt",64,"Text Cleared"
F.close
end if
End Sub

Not As Early Beta v0.0.5:
Code:
Dim Channel, Server, bot, sStuff, myFSO, WriteStuff, dateStamp, tests, ignore
   Dim fso, f

Sub Script(Name, Major, Minor, Build, Author, Commands, Description)
    Name = "test"
    Major = 0
    Minor = 0
    Build = 5
    Author = "Jeremy"
    Commands = "IAdd, Setup, on, off"
    Description = "Allows you to talk between servers and/or channels"
End Sub

Sub Event_Load()
    CreateCommand "Iadd", "test", "Command_Iadd", "", "", "Iadd", 0, True
    CreateCommand "Setup", "test", "Command_Setup", "", "", "Setup", 0, True
    CreateCommand "save", "test", "Command_Save", "", "", "save", 0, True
    CreateCommand "load", "test", "Command_load", "", "", "load", 0, True
    CreateCommand "on", "test", "Command_on", "", "", "tton", 0, True
    CreateCommand "off", "test", "Command_off", "", "", "ttoff", 0, True
    AddTimer "test", "MessageReciver_Timer", 10, True
   StartTimer "test", "MessageReciver_Timer"
end sub



sub command_on(CS)
Const ForWriting = 2
tests = "on"
send "tests Script Is Now " & tests
if bot = 1 then

   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile("C:\Users\Jeremy\Desktop\Bot2.txt", ForWriting,true)
   'f.write("Text Cleared")
'msgBox ""C:\Users\Jeremy\Desktop\Bot2.txt",64,"Text Cleared"
F.close
end if

if bot = 2 then
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile("C:\Users\Jeremy\Desktop\Bot1.txt", ForWriting,true)
   'f.write("Text Cleared")
'msgBox ""C:\Users\Jeremy\Desktop\Bot1.txt",64,"Text Cleared"
F.close
end if
end sub

Sub Command_off(CS)
tests = "off"
send "tests Script Is Now " & tests

end Sub

sub command_Iadd(CS)
Const ForWriting = 2

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Ignore.txt", 8, True)
WriteStuff.Writeline(CS.Message)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
SET myFSO = NOTHING
msgbox CE.Message
end sub









Sub Command_Setup(CS)
if tests = "on" Then
MyString = CS.message
MyArray = Split(MyString, ", ", -1, 1)
Channel = MyArray(0)
Server = MyArray(1)
bot = MyArray(2)
Send "Channel : " & Channel & " | Server : " & Server & " | Bot File : " & Bot
end if
End Sub




Sub Bob()
end Sub

sub Rob()


end sub

Sub Event_UserTalk(CE)
'Option Explicit
Const ForReading = 1
Dim sFilename
sFilename = "C:\Users\Jeremy\Desktop\Ignore.txt"

'Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(sFilename, ForReading)

Dim sAllLines, arrAllLines, sLine
sAllLines = f.ReadAll
arrAllLines = Split(sAllLines, vbCrLf)
For Each sLine in arrAllLines
   If sLine = CE.Username Then
  ignore = "yes"
end if
next

 
'msgbox "Got Past Ignore"
if ignore = "no" then
if tests = "on" then
if bot = 1 then
dateStamp = Date()

'Write information to Text File
sStuff = dateStamp

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot1.txt", 8, True)
WriteStuff.Writeline("[" & Channel & "@" & Server & "] < " & CE.Username & " > : " & CE.Message)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
SET myFSO = NOTHING
end if

if bot = 2 then

dateStamp = Date()

'Write information to Text File
sStuff = dateStamp

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot2.txt", 8, True)
WriteStuff.Writeline("[" & Channel & "@" & Server & "] < " & CE.Username & " > : " & CE.Message)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
end if
SET myFSO = NOTHING
end if
end if
ignore = "no"
End Sub











Sub MessageReciver_Timer()
if tests = "on" then
On Error resume next
Const ForWriting = 2
if bot = 1 then
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("C:\Users\Jeremy\Desktop\Bot2.txt")
If objFile.Size > 0 Then
    Set objReadFile = objFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot2.txt", 1)
    strContents = objReadFile.ReadAll
    send strContents
    objReadFile.Close
End If

   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile("C:\Users\Jeremy\Desktop\Bot2.txt", ForWriting,true)
   'f.write("Text Cleared")
'msgBox ""C:\Users\Jeremy\Desktop\Bot1.txt",64,"Text Cleared"
F.close
end if

if bot = 2 then
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("C:\Users\Jeremy\Desktop\Bot1.txt")
If objFile.Size > 0 Then
    Set objReadFile = objFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot1.txt", 1)
    strContents = objReadFile.ReadAll
    send strContents
    objReadFile.Close
End If

   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile("C:\Users\Jeremy\Desktop\Bot1.txt", ForWriting,true)
   'f.write("Text Cleared")
'msgBox ""C:\Users\Jeremy\Desktop\Bot1.txt",64,"Text Cleared"
F.close
end if
end if

End Sub











Sub Event_userJoin(CE)
Const ForWriting = 2
if tests = "on" then
if bot = 1 then
dateStamp = Date()

'Write information to Text File
sStuff = dateStamp

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot1.txt", 8, True)
WriteStuff.Writeline(CE.Username & " Has Joined Channel " & Channel & "@" & Server)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
SET myFSO = NOTHING
end if

if bot = 2 then

dateStamp = Date()

'Write information to Text File
sStuff = dateStamp

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot2.txt", 8, True)
WriteStuff.Writeline(CE.Username & " Has Joined Channel " & Channel & "@" & Server)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
end if
SET myFSO = NOTHING
end if
End Sub


Sub Event_userLeave(CE)
Const ForWriting = 2
if tests = "on" then
if bot = 1 then
dateStamp = Date()

'Write information to Text File
sStuff = dateStamp

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot1.txt", 8, True)
WriteStuff.Writeline(CE.Username & " Has Left Channel " & Channel & "@" & Server)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
SET myFSO = NOTHING
end if

if bot = 2 then

dateStamp = Date()

'Write information to Text File
sStuff = dateStamp

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot2.txt", 8, True)
WriteStuff.Writeline(CE.Username & " Has Left Channel " & Channel & "@" & Server)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
end if
SET myFSO = NOTHING
end if
End Sub


Sub Event_UserEmote(CE)
if tests = "on" then
if bot = 1 then
dateStamp = Date()

'Write information to Text File
sStuff = dateStamp

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot1.txt", 8, True)
WriteStuff.Writeline("/me [" & Channel & "@" & Server & "] < " & CE.Username & " > : " & CE.Message)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
SET myFSO = NOTHING
end if

if bot = 2 then

dateStamp = Date()

'Write information to Text File
sStuff = dateStamp

Set myFSO = CreateObject("Scripting.FileSystemObject")
Set WriteStuff = myFSO.OpenTextFile("C:\Users\Jeremy\Desktop\Bot2.txt", 8, True)
WriteStuff.Writeline("/me [" & Channel & "@" & Server & "] < " & CE.Username & " > : " & CE.Message)
WriteStuff.Writeline("")
WriteStuff.Close
SET WriteStuff = NOTHING
end if
SET myFSO = NOTHING
end if
End Sub

i will warn you now if you try to use this code you will most likely not figure it out but if you can let me know lol plus the fact that i havent added it for public use yet and its set to save files on my desktop LOL


EDIT: added new code to the new post hope you enjoy it just change the save locations and it should work fine i just didnt feel like changing them cause i would have to change it back :/

Updates
on/off - not global
Ignore - global ignore system
#2
Wait I dont understand, is that WindowsForms app up there made by you using VB6 or what?
Because the code seems to be too short -_-
[Image: bxj6gaq99c9hyvinfkvn.jpg]
[Image: w0l5y0.png]
#3
lol the code = vbscript which is a close relative to vb6 i learned vbs before i learned vb6 lol


here ill explain what is going on in the screen shot i have 2 different bots open 1 on 1 server 1 on the other both bots are saving all messages to seprate txt files while at the same time both bots are loading the files and sending them on the opiste server from where they came from making it possible to chat between servers or channels and is actually really fast the only slow ness of it is the fact that it has a que which is good so you dont get banned lol


any ways updates

join leave - Finished
On/Off - Finished


Working on adding a ignore feature so that it will ignore peoples messages Smile
#4
Even tho I don't see any socks connection code nor any other Tcp/Ip connection methods, And I don't understand a thing lol. Good Luck!, looks good.
[Image: bxj6gaq99c9hyvinfkvn.jpg]
[Image: w0l5y0.png]
#5
lol your thourghly confused lol
#6
nerd wars
[Image: jqmd52.png][Image: Craack.gif]
#7
^ur one to talk lol
#8
People who don't know what this is OR Confused, should not even reply here
[Image: 5lv58m.gif]
му ηαмє ιѕ ¢αяℓσѕ
#9
thanks carlos


and yes carlos knows what this is because i showed him what it was lol
#10
Introduced him to the nerd world.
[Image: jqmd52.png][Image: Craack.gif]
  • 1
  • 2

Users browsing this thread: 1 Guest(s)