|
You last visited: Today at 11:31
Advertisement
[HOW-TO] Update BoxyBot
Discussion on [HOW-TO] Update BoxyBot within the Seafight forum part of the Browsergames category.
07/20/2017, 02:13
|
#1
|
elite*gold: 98
Join Date: Nov 2011
Posts: 1,267
Received Thanks: 1,019
|
[HOW-TO] Update BoxyBot
-
|
|
|
07/20/2017, 03:12
|
#2
|
elite*gold: 0
Join Date: Dec 2014
Posts: 20
Received Thanks: 0
|
Quote:
Originally Posted by Raymond*
Hello,
As the source got out, and theres people making points of some sort, might aswell just force BP to patch this shit as it will create a immense amount of bots for basically free, meaning once it's patched I dont have to worry about botters in my map anymore, win-win right?
U'll need - A brain.
 - Download the most recent SeafightMain.swf (
)
- And with that a little .bat script;
Code:
cd C:\Program Files (x86)\FFDec\
java -jar ffdec.jar -config autoDeobfuscate=1,parallelSpeedUp=1,autoRenameIdentifiers=1 -export script H:\Misc\SFPROTO\src H:\Misc\SFPROTO\SeafightMain.swf
pause
To clarify this script needs adjustments for where u wanna store the scripts of the swf change "H:\Misc\SFPROTO\" to anything on ur pc.. And place the SeafightMain.swf in the same directory as the .bat script.
Now what this does is decompile, deobfuscate & export the SeafightMain.swf to a directory called "src", once the script is done, and u open that directory u'll see stuff like "package_89" etc.
Now open the BoxyBot solution and go to Seafight => Messages, click on a random .cs file, and u'll see for example in UserInitMessage.cs:
Code:
public class UserInitMessage : Message //package_7.class_15
{
See the commented out part? open the directory of "package_7" then open the "class_15.as" file, scroll down until u see "method_16()", the packet ID is always the return of "method_16()".
Code:
public function method_16() : int
{
return -5067;
}
Now u'll notice some scripts aren't in the right package dirs, e.g. CannonAttackMessage.cs says "package_89.class_783" but it actually is "package_90.class_779", why I hear u think? Because Bigpoint.. It is no rocket science how to find the "new" class that has the desired packet ID, just compare the read functions of that with the one in the .cs file. Usually it just shoves up/down 1 package, and 783 turned into 779, they're always close to one another. Now one with OCD will realise some shorts and doubles may seem out of order, that is very true, ur job is to figure out what vars were shifted, and place them in the right order to have a proper functioning bot..
There is proper parsers that poop out .cs files for every message individual incl. the correct write/read order's, I'll not publish these, as they're not mine, and I respect my fellow comrad @
Have fun as this will be dead real soon.
Some chill music while ur trying to wrap ur brain around all this:

|
|
|
|
07/20/2017, 03:15
|
#3
|
elite*gold: 98
Join Date: Nov 2011
Posts: 1,267
Received Thanks: 1,019
|
Quote:
Originally Posted by jeffyn22
|
Run the .bat as administrator, will mention this in the topic too.
|
|
|
07/20/2017, 03:28
|
#4
|
elite*gold: 0
Join Date: Dec 2014
Posts: 20
Received Thanks: 0
|
Quote:
Originally Posted by Raymond*
Run the .bat as administrator, will mention this in the topic too.
|
okay okay..
 this part, i understand.
|
|
|
07/20/2017, 03:32
|
#5
|
elite*gold: 98
Join Date: Nov 2011
Posts: 1,267
Received Thanks: 1,019
|
Quote:
Originally Posted by jeffyn22
okay okay..
 this part, i understand.
|
Well there u go, public const int ID = -24776;
|
|
|
07/20/2017, 03:42
|
#6
|
elite*gold: 0
Join Date: Dec 2014
Posts: 20
Received Thanks: 0
|
Quote:
Originally Posted by Raymond*
Well there u go, public const int ID = -24776; 
|
okay, and now...?
|
|
|
07/20/2017, 03:52
|
#7
|
elite*gold: 0
Join Date: Oct 2010
Posts: 790
Received Thanks: 128
|
you need to compile with visual studio
|
|
|
07/20/2017, 03:54
|
#8
|
elite*gold: 0
Join Date: Dec 2014
Posts: 20
Received Thanks: 0
|
Quote:
Originally Posted by jonmikeltxu
you need to compile with visual studio
|
Does not have the corresponding class, what do I do?
|
|
|
07/20/2017, 05:07
|
#9
|
elite*gold: 0
Join Date: Jun 2012
Posts: 23
Received Thanks: 8
|
I have this problem. Do you know how to proceed?
|
|
|
07/20/2017, 10:16
|
#10
|
elite*gold: 0
Join Date: Dec 2014
Posts: 20
Received Thanks: 0
|
Quote:
Originally Posted by Raymond*
Well there u go, public const int ID = -24776; 
|
What do you do when you do not have the correct class? How do I find the new class?
|
|
|
07/20/2017, 10:23
|
#11
|
elite*gold: 0
Join Date: Dec 2012
Posts: 128
Received Thanks: 73
|
Check the classes that are close to each other. For class 768 I'd check class 783, and so on.
EDIT: Oh, and by the way, you need something to compile that. Simply hitting save on a notepad won't cut it. Visual Studio 2015+ would be best.
|
|
|
07/20/2017, 14:02
|
#12
|
elite*gold: 10
Join Date: Aug 2011
Posts: 71
Received Thanks: 44
|
So, basically we have to check if there's some codes changed every update.
We have to pick the method_16() as ID for every file?
|
|
|
07/20/2017, 14:12
|
#13
|
elite*gold: 0
Join Date: Jul 2013
Posts: 4
Received Thanks: 0
|
Ran the script as admin, got something out of it, but no "Package" files. Got the src folder which contains the "Scripts" folder which then has 6 "Class_x.as" files aswell as the "flashx" and "mx" directory.
In other words:
How do I get the package folder(s) and more class_x files?
|
|
|
07/20/2017, 14:29
|
#14
|
elite*gold: 300
Join Date: Dec 2013
Posts: 105
Received Thanks: 21
|
And now the smart people only have to update 1 packet id and they have a free Seabot
|
|
|
07/20/2017, 16:16
|
#15
|
elite*gold: 0
Join Date: Dec 2014
Posts: 20
Received Thanks: 0
|
Quote:
Originally Posted by AnonymousCoder™
Check the classes that are close to each other. For class 768 I'd check class 783, and so on.
EDIT: Oh, and by the way, you need something to compile that. Simply hitting save on a notepad won't cut it. Visual Studio 2015+ would be best.
|
i understand, but when i do not have the class in the directory, how do i know the other is the sure?
|
|
|
All times are GMT +1. The time now is 11:31.
|
|