Two bots in same Hub

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

Locked
Rockbyter
Posts: 3
Joined: 2003-01-16 06:05

Two bots in same Hub

Post by Rockbyter » 2003-01-16 06:09

Hi, a very simple question I am sure but need clarification. Can I use 2 scripts on DC hub? Does it matter if they both have a SUB Main? or do i need to change them. Seems that when I use 2 niether do what they are supposed to and I was thinking this may be the problem. The 2 I am trying to use are Generalbot.script by Gadget and Sickobot from basement tweaked by Koder.

Thanks for any help you may be able to offer anyone.
A sober mans secret is a drunken mans speech.

ender
Posts: 224
Joined: 2003-01-03 17:47

Post by ender » 2003-01-16 06:20

You can use as many scripts as you wish, but the more scripts, the more CPU power they need.

Rockbyter
Posts: 3
Joined: 2003-01-16 06:05

Post by Rockbyter » 2003-01-16 09:23

thanks I will look further for the problem, unless, what happens is the sickobot picks up a new connection, says you are being disconnected for sharing bad files but still allows the connection. I tried it by renaming a file on my share and connecting to my own hub. Any suggestions?
A sober mans secret is a drunken mans speech.

Rockbyter
Posts: 3
Joined: 2003-01-16 06:05

Post by Rockbyter » 2003-01-17 09:20

Thanks I think I have the Jist of it. I assume the scripts are parsed constantly and not on a once only basis. Anyone suggest a good online book for learning VBscript? So many to chose from.

thanks again, Jerry
A sober mans secret is a drunken mans speech.

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-01-17 10:52

If you had installed Microsoft Office, search and open "VBSCRIP5.CHM" from your HD.

ButterflySoul
Posts: 210
Joined: 2003-01-23 17:24
Location: Nevada
Contact:

Post by ButterflySoul » 2003-01-24 13:22

The scripts for a DC Hub have a size limit (roughly 59k), and I accidently found out about it while writing Zeus. Any script larger than this will crash the hub when you try to edit it, and make crazy funny things when you try to run it (trust me, you don't want to try =).
So yes, you can (and if you're crazy like me, you actually will have to) split your scripts in several .script files. Just keep in mind that if one script disconects the user, said user won't be available to the other script anymore, etc etc. Before running 2 or more scripts, make sure they don't step on each other's feet.

The .chm file is indeed an EXCELENT resource, with a very clear tutorial about vbs, and a complete command reference. There is however an updated version of it on microsoft's website (script 56.chm) which doesn't require to have office, and describes the 5.6 scripting engine, instead of the 5.0 engine described in the office documentation. The 5.6 scripting engine is automatically installed along with IE6 (only the engine though, not the vbs reference, which you have to DL seperately)

The vbs command reference is available for download for free, on http://msdn.microsoft.com/downloads/sam ... itedoc.xml
[CoZ] Children of Zeus
-----
Shadows DC Hub - VBS and JS scripting at their best

ender
Posts: 224
Joined: 2003-01-03 17:47

Post by ender » 2003-01-24 14:02

Large scripts will work just fine - my YAMB is 150 kB, and StimBot is over 200... Just don't try to edit them in NMDC Hub.

ButterflySoul
Posts: 210
Joined: 2003-01-23 17:24
Location: Nevada
Contact:

Post by ButterflySoul » 2003-01-24 14:10

Oh, ok.. That's the trick... *blush* My bad then, sorry
[CoZ] Children of Zeus
-----
Shadows DC Hub - VBS and JS scripting at their best

Atomic Jo
Posts: 62
Joined: 2003-01-04 03:50
Location: Québec, Canada
Contact:

Post by Atomic Jo » 2003-01-24 17:06

ender wrote:Large scripts will work just fine - my YAMB is 150 kB, and StimBot is over 200... Just don't try to edit them in NMDC Hub.
Even if your script is over 64 Ko, you can edit it in the editor window to make the changes: BUT before editing, you must select all the script in notepad eg, and paste it in editor window, click stop button, do the changes, and finally reset button.

Ok this method is not simple for edition but i don't know another one.

ButterflySoul
Posts: 210
Joined: 2003-01-23 17:24
Location: Nevada
Contact:

Post by ButterflySoul » 2003-01-24 17:40

Well, it's not that I'm that found of the blue editor in the NMDC hub, I have just been using it so far because I never found a good editor that would highlight the syntax and all =/ (The editor in office does highlight, but not with .script files for a hub)
Btw, if you know of an editor that does it, let me knoooooow !!! =)

Also, the ability of being able to reset the script right away and see how things go is pretty nifty, but that's about it =p

Now that Ender told me it worked, I've been spending the whole morning pondering if I should just keep everything as is, or settle for a notepad and combine Zeus with ZeusAux1 and ZeusAux2 =p
One of the dictionaries has to be kept up to date in 2 of the scripts, and it makes it real heavy... Then again with a peak of 5 users, I'm not that sure it's really worth it =p Oh well...
[CoZ] Children of Zeus
-----
Shadows DC Hub - VBS and JS scripting at their best

DamionNH
Posts: 25
Joined: 2003-01-07 11:05

Good VB Script Highlighter and more..

Post by DamionNH » 2003-01-24 18:12

Visit http://www.kt2k.com/ for AEdiX, it does various programming languages, including VB Script hightlighting. Is great to me.

Also, another way to work Large scripts. This method makes it easy to edit and restart a bot without worring about size. This goes into the main .script file. Of course any edits to it while hub is running must be made via the hub editor. But the extra parts can be edit with text editor. All the need to be done to enable the changes is Restart the main .script

Word of warning!!! The message box is there to make sure no errors occur in the external part. If an error exists there, there is no error message and the msgbox doesn't come up.

Code: Select all

Sub Main()
   ExecuteGlobal GetFileContents(sAppPath & "BotPart2.txt")
   msgbox "Bot Loaded!"
End Sub

Function GetFileContents(sFileName)
   Dim FSO, ScriptFile
   Set FSO = CreateObject("Scripting.FileSystemObject")
   Set ScriptFile = FSO.OpenTextFile(sFilename,1)
   GetFileContents = ScriptFile.ReadAll
   Set ScriptFile = Nothing
   Set FSO = Nothing
End Function
Owner of Lurkers Lair a Phoenix Rising Hub

ButterflySoul
Posts: 210
Joined: 2003-01-23 17:24
Location: Nevada
Contact:

Post by ButterflySoul » 2003-01-25 10:56

*adopted AEdiX because it's really neat* =)

Just in case I wasn't the only one not to know about it, this is the config file AEdiXmain.amf , modified to support the same size of tabulation as the NMDC script editor, recognize and highlight the .script files in VBS/asp, and get rid of the damn grey bar =)
Nothing exceptional, but it might save you some time if you don't want want to figure it out by yourself :

Code: Select all

Program MainAEditScript;

Procedure OnInit;
begin
     Editor.SetTabWidth(3);
     Editor.SetSmartTabs(False);
     Editor.SetRightEdge(0);
end;

Procedure OnFileLoad(Name:string);
begin
     if (trim(extractfileext(uppercase(name)))='.SCRIPT') then Document.SynSelectChange(7);
end;

Begin
//do not write nothing here
end.
-----

And of course, thanks for the bot loader =)
[CoZ] Children of Zeus
-----
Shadows DC Hub - VBS and JS scripting at their best

Locked