Arkadasım Bot Yazmak Kolay Değil Bende Bu Konu Ustunde Ugrasıyorum Yazınıda Görunce Bir Bakayım Dedim Ama Acemi Biri Hemen Yapamaz Onu Ben Bu Konu Ustunde Asagı yukarı 1 senedir araştırma yapıyorum ve elimde bayagı veri var bunları birleştirerek kendin bir bot yazabilirsin ben sana kucuk bir orenek vereyim
Programlarda OpCode Denilen Bir Sistemler Clien => Server Veya Server => Clien Arasında Veri Alışverisi olur Sen Burda O verileri ele gecirip geri sen yolluyorssun
Bunlar Zszc Nın OpCodeleri
Kod:
Char Update Opcode
-----
3013
-----
Walk Opcode
-----
7021
-----
Target Opcode
-----
7045
-----
Normal Attack Opcode
-----
7074
-----
Being Attacked Opcode
-----
3057
-----
Mob Spawn Opcode
-----
3013
-----
Mob Died Opcode
-----
30BF
-----
chat opcode
-----
3026
-----
Gold Update
-----
304E
-----
HP/MP Update
-----
3057
-----
Storage Info opcode
-----
B046
-----
char Info Opcode
-----
303D
-----
Object Action
-----
B070
-----
Group Spawn Opcode
-----
30D0
-----
Talk to Storage Opcode
-----
7045 (3F010000)
-----
Open Storage Opcode
-----
7046 (3F01000004000000)
Kücük Bir C# Örnegi Daha Bendede Üzerinde Ugrasıyorum
Normal Atak
(7074)01010101[sMonsterID]
Skill Atak
(7074)0104[SkillID]0101[sMonsterID]
Buff/Imbue
(7074)0104[SkillID]00
Pick
(7074)01020101[ItemID]
Bunları Yapıp Şifreleyip Servera Yolluyorsun Ve Hallloluyor
bu şifreleme önce StringToByteArray sonrada StringToHex Yapman lazım Birtane Kücük Bi Örnek Daha Vereyim Mesela Sroda Notice Gecebilirsin
Program.cs
Kod:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
private static bool exit = false;
private static ConnectedSocket Socket = new ConnectedSocket();
static void Main(string[] args)
{
Socket.Connect("127.0.0.1", 9000);
Console.WriteLine("Connection established!");
while (exit == false)
ConsoleRead(Console.ReadLine());
}
private static void ConsoleRead(string msg)
{
string cmd = msg.Substring(0, 1);
switch (cmd)
{
case "~":
SendNotice(msg.Substring(1));
break;
}
}
private static void SendNotice(string notice)
{
byte[] msg = Functions.StringToByteArray(Functions.StringToHex(notice));
PacketWriter writer = new PacketWriter();
writer.AppendOpCode(0x3026);
writer.AppendSecurity(1);
writer.AppendByte(7);
writer.AppendWord((ushort)notice.Length);
writer.AppendByteArray(msg);
Socket.Send(writer.GetPacket());
}
}
}
ConnectedSocket.cs
Kod:
using System;
using System.Net;
using System.Net.Sockets;
namespace ConsoleApplication1
{
class ConnectedSocket
{
private Socket winSock;
public void Connect(string IP, int Port)
{
winSock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPAddress IPA = IPAddress.Parse(IP);
IPEndPoint IPEP = new IPEndPoint(IPA, Port);
try
{
winSock.Connect(IPEP);
}
catch (SocketException se)
{
Console.WriteLine(se.Message);
}
}
public void Send(byte[] data)
{
if (winSock.Connected)
{
winSock.Send(data);
}
}
}
}
Functions.cs
Kod:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Functions
{
public static byte[] StringToByteArray(string hex)
{
int NumberChars = hex.Length;
byte[] bytes = new byte[NumberChars / 2];
for (int i = 0; i < NumberChars; i += 2)
bytes[i / 2] = Convert.ToByte(hex.Substring(i, 2), 16);
return bytes;
}
public static string StringToHex(string Hexstring)
{
string ausgabe = string.Empty;
StringBuilder SB = new StringBuilder();
for (int i = 0; i < Hexstring.Length; i++)
SB.Append(Convert.ToInt32(Hexstring[i]).ToString("x") + "");
return SB.ToString();
}
private byte[] StringToByte(string Komut)
{
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
return encoding.GetBytes(Komut);
}
private String ByteToString(byte[] Veri)
{
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
return enc.GetString(Veri);
}
}
}
PacketWriter.cs
Kod:
/* <Silkroad Notice Tool written in C#.Net>
Copyright (C) <2010> <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class PacketWriter
{
private ArrayList Data = new ArrayList();
private ArrayList Packet = new ArrayList();
private int Size = 0;
public byte[] GetPacket()
{
Packet.AddRange(BitConverter.GetBytes((ushort)Size));
Packet.AddRange(Data);
return (byte[])Packet.ToArray(typeof(byte));
}
public void AppendOpCode(ushort value)
{
Data.AddRange(BitConverter.GetBytes(value));
}
public void AppendSecurity(byte value)
{
Data.Add((byte)value);
Data.Add((byte)0);
}
public void AppendByte(byte value)
{
Data.Add((byte)value);
Size += 1;
}
public void AppendWord(ushort value)
{
Data.AddRange(BitConverter.GetBytes(value));
Size += 2;
}
public void AppendByteArray(byte[] value)
{
Data.AddRange(value);
Size += value.Length;
}
}
}
Artık Benden Bukadar Arkadasım Bilgiler İnsallah İşine Yaramıstır :)