Jan 13 2012, 12:37 AM
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
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:
Not As Early Beta v0.0.5:
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
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