Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Joe[x86] on September 05, 2005, 08:06 PM

Title: The CSB VBScript PHP Webbot, v2!
Post by: Joe[x86] on September 05, 2005, 08:06 PM
Yeah. Found a solution to the whole screen blaking problem. Use echo();! Next problem..

The browser is in charge of firing ActiveX controls events, but the server is in charge of parsing PHP. How would I go about using PHP in a ActiveX event?

http://www.javaop.com/~joe/webscb.txt
http://www.javaop.com/~joe/WebCSB.txt
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: Joe[x86] on September 09, 2005, 06:11 PM
joe@darkside:~/public_html$ rm webscb.txt CSB.php
rm: cannot remove `CSB.php': No such file or directory


RIP CSB WebBot.

I tried to rename it. =(

EDIT -
Some times I just want to hug "work offline"
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: Joe[x86] on November 11, 2005, 03:36 PM
Forget PHP. I FINALLY figured it out. JavaScript's document.write. This BETTER work, or else I think I'll just give up.
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: Spht on November 11, 2005, 03:47 PM
*Confused*
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: Yegg on November 11, 2005, 04:43 PM
Nice work, Joe.
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: MyndFyre on November 11, 2005, 05:21 PM
That still means you still have to have the bot on the client side.  The client connects to Battle.net, not the server.  And you have to have a low-security IE configuration to run that particular ActiveX control.

Why would you do this when you could just run a regular bot?
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: Yegg on November 11, 2005, 05:36 PM
Quote from: MyndFyre on November 11, 2005, 05:21 PM
That still means you still have to have the bot on the client side.  The client connects to Battle.net, not the server.  And you have to have a low-security IE configuration to run that particular ActiveX control.

Why would you do this when you could just run a regular bot?
Maybe he's simply experimenting? Just an assumption though.
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: Joe[x86] on November 11, 2005, 06:26 PM
Quote from: MyndFyre on November 11, 2005, 05:21 PM
That still means you still have to have the bot on the client side. The client connects to Battle.net, not the server. And you have to have a low-security IE configuration to run that particular ActiveX control.

Why would you do this when you could just run a regular bot?

For bragging rights. =p

EDIT -
@Spht:

Basically, I'm making a HTML project that will create a CleanSlateBot, connect it, and handle events all through a website. I'm not doing all that great of a job at it, though.
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: Warrior on November 11, 2005, 06:34 PM
who wants to brag about this =P. Kidding. :)
Uh, nice job? :p
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: dxoigmn on November 11, 2005, 06:42 PM
I could have sworn this problem was already solved. At least I remember giving a solution (http://forum.valhallalegends.com/index.php?topic=10477.msg101392#msg101392).
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: FrOzeN on November 11, 2005, 07:52 PM
Eh, Joe. If your still doing this here's my 2 cents.

Look into the JavaScript for .innerHTML so you can change the body html inside <div>'s without page reloading.

The way I would do this is have a invisible iFrame which gets reloaded to parse the info back and forth etc.. Then the data it gets parsed back into the iFrame use JavaScript .innerHTML to read it and parse it into other <div>'s.

This way you could connect your bot, parse events etc.. and the whole time it will seem as if the page never reloaded.
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: Spht on November 11, 2005, 09:03 PM
*Confused*

"Webbot"?  v2?  Where's v1??
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: Joe[x86] on November 11, 2005, 09:09 PM
I don't quite remember why I put v2. That was a long time ago =p

EDIT -
Quote from: dxoigmn on November 11, 2005, 06:42 PM
I could have sworn this problem was already solved. At least I remember giving a solution (http://forum.valhallalegends.com/index.php?topic=10477.msg101392#msg101392).

THANK YOU. I never saw that.

EDIT -
Time to upload + test the little bugger. *takes big breath, uploads, and heads upstairs*
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: FrOzeN on November 11, 2005, 09:44 PM
Just noticed that it's already using .innerHTML. :P
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: Joe[x86] on November 13, 2005, 03:38 AM
Ah, found a major problem. Arguments aren't being passed, and therefore subroutines that require arguments aren't firing. This shouldn't take long.

The bot joins the home channel, and a couple of events actually work. Its pretty sweet.

EDIT -
Ugh..
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: FrOzeN on November 13, 2005, 04:07 AM
On this (http://www.javaop.com/~joe/WebCSB/index.html) link you forgot to close the href= tags with the second quotation mark. Making the 'Use the Bot' link invisible and also screwing up the address of the 'View Source' link.

[EDIT] Also the code <link rel="stylesheet" type="text/css" href="Stylesheet.css" />, should be inside the <head> tags.
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: rabbit on November 13, 2005, 09:07 AM
Also, in the head comment, you have "* /", thus commenting the entire script.  Also, why not just use HTML comment tags (correctly)?

Later on (line 32), you have an incorrect HTML comment tag closer, it should be "//-->".
[update]  Same on line 137

Line 34 has an extra quote, making the rest of the script screwy.  DEBUG MAN!!

Lines 58 and 62 are missing PHP segment closers.

PHP uses a period for string concatenation, not an ampersand.

[edit]
You aren't in x86 anymore.
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: dxoigmn on November 13, 2005, 05:09 PM
Quote from: rabbit on November 13, 2005, 09:07 AM
Later on (line 32), you have an incorrect HTML comment tag closer, it should be "//-->".

Umm...HTML comments are in the form <!-- comment -->  Looks like someone is trying to inject c++-style comments into html.
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: rabbit on November 13, 2005, 06:01 PM
Every syntax highlighter I've used only closed off comments after //--> :\
O well.
Title: Re: The CSB VBScript PHP Webbot, v2!
Post by: MyndFyre on November 14, 2005, 01:59 AM
Quote from: rabbit on November 13, 2005, 06:01 PM
Every syntax highlighter I've used only closed off comments after //--> :\
O well.

That's for Javascript.  To support older browsers, Javascript specified that Javascript code should be contained within multiline HTML comments, and that when <!-- occured within <script> tags it should only be considered a single-line comment.  Also, so that --> wasn't tried to be parsed as Javascript, we comment it out with // first.

<script language="JavaScript">
<!-- Hide this code from older browsers
// blarg
alert("Boo!");
// End hiding and don't use the JS parser for this line -->
</script>