|
You last visited: Today at 13:13
Advertisement
The Bot - How to start?
Discussion on The Bot - How to start? within the SRO Coding Corner forum part of the Silkroad Online category.
10/18/2011, 21:15
|
#1
|
elite*gold: 0
Join Date: Mar 2009
Posts: 291
Received Thanks: 164
|
The Bot - How to start?
Hello...
Im new in coding, and heres question -> how to start coding bot ?
I know i must have a simple bot and proxy to connect with it..
But how start ? ^^
What i must know, about packets etc.
I know there is a lot of tutorials, but i need all in one ^^
Thanks
|
|
|
10/18/2011, 21:38
|
#2
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,064
Received Thanks: 539
|
I've never developed a bot, but if I were you I'd just start with the proxy(obviously) or use some existing ones
Then I'd start writing the bot by trying to login with it, then choose a char, then simple botting and after that all the other features
|
|
|
10/24/2011, 18:49
|
#3
|
elite*gold: 0
Join Date: Jul 2011
Posts: 31
Received Thanks: 5
|
Firstly you have to know the silkroad Packets form
which is
2bytes (data Length)+2 bytes(opcode)+2 bytes(security)+byte[](data)
idk if u know that or not btw the opcode(operation code )is define an action
such as
character data Opcode
Movement Opcode ...etc
then choose a proxy and connect your program with it and run the game
and start receive the packets from the proxy then start study them with opcodes
by this u will know how to send packets to client to walk ,attack ,pick or anything else
this just a small hint i'll continue after i come  g2g
|
|
|
10/27/2011, 15:51
|
#4
|
elite*gold: 0
Join Date: Mar 2009
Posts: 291
Received Thanks: 164
|
Yes, yes i know ^^
I captured a simple opcode (char sit, down)
I writed a simple tool to send packet [opcode] [destination] etc..
And it works !!! xD
But i got dc in 5 mins...
I guess it's a hackshield packet...
S->C then C->S or something and dc ;d
It's that blowfish key and handshake, etc ?
I used this code (autoit):
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <string.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("", 127, 104)
$Button1 = GUICtrlCreateButton("Connect", 24, 12, 75, 25)
$Button2 = GUICtrlCreateButton("Connect First", 24, 48, 75, 25)
GUICtrlSetState($Button2, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Local $sBuffer, $rBuffer
Local $iSize, $iIndex
TCPStartup()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$socket = TCPConnect("127.0.0.1", 9000)
If @error Then
MsgBox(16, "", "Connection to proxy failed!")
Exit
EndIf
GUICtrlSetState($Button2, $GUI_ENABLE)
GUICtrlSetData($Button2, "Send Packet")
Case $Button2
TrayTip("Sent state:", "" & _send_packet(), 1)
EndSwitch
WEnd
Func _send_packet()
NewPacket(0x704F, 2); OpCode 0x704F -> char sit, down || Security 2 (to server) 1 (to client) for SrProxy
AppendByte(04); some flag ?? for vsro files [04]
TCPSend($socket, GetPacket())
If @error Then
Return "Error"
Else
Return "Success"
EndIf
EndFunc
#region PacketWriter
Func NewPacket($sValue, $iValue)
Local $sTemp = Hex($sValue)
$sBuffer = ""
$iSize = 0
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 4);length
$sBuffer &= StringLeft(ReverseHex(Hex($iValue)), 4);security
EndFunc ;==>NewPacket
Func AppendByte($sValue)
$sBuffer &= StringRight(Hex($sValue), 2)
$iSize += 1
EndFunc ;==>AppendByte
Func AppendWord($sValue)
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 4)
$iSize += 2
EndFunc ;==>AppendWord
Func AppendDWord($sValue)
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 8)
$iSize += 4
EndFunc ;==>AppendDWord
Func AppendString($sString, $Unicode = false)
Local $iLength = StringLen($sString)
If $Unicode Then
$sBuffer &= _StringToHexExt($sString, True)
$iSize += $iLength * 4
Else
$sBuffer &= _StringToHexExt($sString)
$iSize += $iLength * 2
EndIf
EndFunc ;==>AppendString
Func GetPacket()
Local $sTemp = "0x"
$sTemp &= StringLeft(ReverseHex(Hex($iSize)), 4)
$sTemp &= $sBuffer
Return $sTemp
EndFunc ;==>GetPacket
#endregion
#region PacketReader
Func BeginParse($sString)
$iIndex = 1
$rBuffer = StringMid($sString, 13)
Return Dec(StringMid($sString, 3, 2) & StringMid($sString, 1, 2))
EndFunc ;==>BeginParse
Func ReadByte()
Local $result = Dec(StringMid($rBuffer, $iIndex, 2))
$iIndex += 2
Return $result
EndFunc ;==>ReadByte
Func ReadWord()
Local $result = Dec(ReverseHex(StringMid($rBuffer, $iIndex, 4)))
$iIndex += 4
Return $result
EndFunc ;==>ReadWord
Func ReadDWord()
Local $result = Dec(ReverseHex(StringMid($rBuffer, $iIndex, 8)))
$iIndex += 8
Return $result
EndFunc ;==>ReadDWord
Func ReadString($iLength, $Unicode = False)
Local $result, $string = ""
If $Unicode Then
For $i = 0 To $iLength - 1
$string &= StringMid($rBuffer, $iIndex + $i * 4, 2)
Next
$iIndex += $iLength * 4
Else
$string = StringMid($rBuffer, $iIndex, $iLength * 2)
$iIndex += $iLength * 2
EndIf
$result = _HexToString($string)
Return $result
EndFunc ;==>ReadString
#endregion
Func ReverseHex($sString)
Local $sTemp, $len
For $i = StringLen($sString) + 1 To 1 Step -2
$sTemp &= StringMid($sString, $i, 2)
Next
Return $sTemp
EndFunc ;==>ReverseHex
Func _StringToHexExt($sString, $Unicode = False)
Local $string
If $Unicode Then
For $i = 1 To StringLen($sString)
$string &= _StringToHex(StringMid($sString, $i, 1)) & "00"
Next
Else
For $i = 1 To StringLen($sString)
$string &= _StringToHex(StringMid($sString, $i, 1))
Next
EndIf
Return $string
EndFunc ;==>_StringToHexExt
But in Drew TuT i dont understand anything ;d
Who can send me a done C# code?
|
|
|
10/27/2011, 16:09
|
#5
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
|
I assume you're using a proxy and connect with that proxy and have the original sro client still running so if you just keep hackshield enabled it'll handle the hackshield packets for you.
Btw the hackshield has nothing to do with the handshake or blowfish  the packt is encrypted with the blowfish but a lot of client packets are encrypted that way.
|
|
|
10/27/2011, 16:59
|
#6
|
elite*gold: 0
Join Date: Mar 2009
Posts: 291
Received Thanks: 164
|
I got client with disabled hackshield ;p
I used EdxLoader5 and SrProxy...
@up
So handshake or blowfish is needed for what ?
I saw it in most bots ;p
@btw
How to start coding bot?
I got _Kbot coded in VB and Sentinel_Dev coded in VB6..
But i dont work ;p
What i must change to works it with vsro ?
Here is the download:
I preffer coding in C# ^^
And who example me a Drew Silkroad Security ?
I guess it's for a parsing packets, sending packets [?]
|
|
|
10/27/2011, 17:33
|
#7
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
|
the handshake are 2 packets from the client and 2 packets from the server which is used for the client and server to identify themself and too generate the final blowfish key which is used too encrypt and decrypt the packets well SrProxy handles this for you but if you use the SilkroadSecurityApi you can build it inside your own bot. Drew has made 2 examples for a proxy there is a really small one which is the obsolute minimum to get it working and a proxy which is almost done. You can find them somewhere in this section
Ok so how to start coding the bot you first need to read the chardata packet so you know which character you're dealing with. After that I should parse the spawn packets. that is a hell lot of work if you start from scratch and the packets are different so you can't use the isro packets since they will have something different.
So my advice too write the bot is to start reading the incoming packets so you know what's going on around you. Don't send any packets till you know everything which is required for your bot since this will make things messy and can create bugs.
so once you have all the packets correctly parsed you have to create a bot loop which can do anything you want like auto invite players or attack monsters.
Most of the packets too interact with stuff use UniqueId's a lot of these UniqueId's can be read from the spawn packets so that why they are quite important.
About the 5 min dc. There isn't a hackshield emulator (at least not that i'm aware of) so you'll keep getting the dc.
|
|
|
10/27/2011, 17:48
|
#8
|
elite*gold: 0
Join Date: Mar 2009
Posts: 291
Received Thanks: 164
|
It will help me i guess:

There are full descriptions for most of opcodes...
But how to start?
What i have to do?
Absolute minimum, only connect to proxy with this SilkroadSecurity...
|
|
|
 |
Similar Threads
|
[ESRO]Start client, login, select character, click start and stop...
06/23/2011 - SRO Private Server - 1 Replies
Okay, so whats up with that new thing when you get to select character screen, when you click start it does nothing?
DONT JUST SAY SAME, I know you have the same problem...
You can thank me if you have the same problem tho... :P
|
[START]Warrock Start Fehler
12/18/2010 - WarRock - 7 Replies
Joar.
Moin Com,
hab mir nach langer Zeit nochmal Warrock geholt und der Download+Installation hat einwandfrei geklappt.
Nur dann beim GameStart Fenster wo der die ganzen Dateien nochmal hochläd hat GameStart geklappt nur warrock hat nicht gestartet.
Dann hab ich es nochmal gemacht und dann hat er die Dateien erst gar nicht geladen und ich konnte nicht Game Start drücken.
Plzz helft mir :)
Mfg,
|
PC-Start = Programm Start?
08/10/2010 - AutoIt - 5 Replies
Hi!
Kann man ein AutoIt Program gleich wie den Begrüßungscenter wenn der PC
hochfährt starten?
Oder wie ICQ, das es einfach kommt?
Brauche dringend hilfe :)
|
Start Npc(also start Equiqment)und wie connectet man(Navicat)
05/02/2010 - WoW Private Server - 1 Replies
Hallo Elitepvpers,
ich hoffe ich bin hier im richtigen Forum.
Wie macht man einen Npc für start Equiqment?
und wie connectet man in Navicat(for MySQL)?
danke im vorraus:handsdown::handsdown:
|
start problem by start (win7)
02/13/2010 - Silkroad Online - 4 Replies
when i start sro than is the connection picture small and i cant see the connection window .... pls help ^^
sry for my bad english
|
All times are GMT +1. The time now is 13:15.
|
|