Tomorrow evening I will be doing some tests on server load and aliens. Everyone who wants to come is welcome. Saturday I will add the link to the main thread so you can come and help me testing.
The test will begin at 10:00 PM GMT+2
public static void Handle(byte[] bytes, Client client)
{
var read = new ByteParser(bytes);
switch (read.CMD_ID)
{
case 666:
Out.WriteLine("Received", "666");
var userId = read.Int();
var sid = read.UTF();
Console.WriteLine("UserID " + userId);
Console.WriteLine("Session-ID " + sid);
new handlers.ShipInitalizationHandler(client, userId, sid);
break;
case LegacyModule.ID:
// This will dump all the old packets.
Dumper.Dump(read.UTF());
break;
default:
// This will dump all the commands that aren't defined
// You can define a command by adding 'case CMDID:'
new Dumper(read);
break;
}
}
You should create a real handler.
PoC:
Code:
Dictionary<int, Function> CommandHandler = new Dictionary<int, Function>();
CommandHandler.Add(666, HandleVersionRequest);
if(CommandHandler.KeyExists(packet.Id))
CommandHandler[packet.Id](); //or .Invoke(); not sure
else
DumpCommand(packet);
Netty Emulator: Shock[DEV]
Edited and Updated: ΉΛDΣS_PЯO[DΣV]
NOTE: This emulator (NeetyBase) created by Shock and edited by ΉΛDΣS_PЯO[DΣV].
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NettyBase.Net.netty.commands
{
class DroneFormationCommand
{
public static byte[] CMD(List<int> availableFormations)
{
ByteArray enc = new ByteArray(4479);
enc.Integer(availableFormations.Count);
foreach(int f in availableFormations)
{
enc.Integer(f);
}
return enc.ToByteArray();
}
}
}
Netty Emulator: Shock[DEV]
Edited and Updated: ΉΛDΣS_PЯO[DΣV]
NOTE: This emulator (NeetyBase) created by Shock and edited by ΉΛDΣS_PЯO[DΣV].
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NettyBase.Net.netty.commands
{
class DroneFormationCommand
{
public static byte[] CMD(List<int> availableFormations)
{
ByteArray enc = new ByteArray(4479);
enc.Integer(availableFormations.Count);
foreach(int f in availableFormations)
{
enc.Integer(f);
}
return enc.ToByteArray();
}
}
}
Well done! You converted the command exactly as it was meant to be =)
Quote:
Originally Posted by LEJYONER(DS)
don't work?
Changing hosts so it will be buggy in the next few hours.
emu for testing offline?
seems to be a good job will wait so that I can test.
Actually is made for localhost testing but if you want to test with me new features I do message me on skype. I will do a testing session tonight so you're free to come :3
Hello, I'm looking for a card based game botting tutorial. 04/02/2014 - AutoIt - 4 Replies Hello epvpers, I just registered and would like first of all to thank you for the opportunity to learn some coding.
Secondly, I'd like to apologize in advance if I'm breaking any forum rules that I might have not seen.
And thirdly, here is my request: I would like to know if there is any tutorials on how to make a game bot.
The particulars are that its a card based game and from what I read so far a pixel search approach its recommended. I'd like to know if there are other approaches...
server based on taiwan server files (give me your opinion) Fast ^_^ 12/09/2013 - SRO PServer Advertising - 4 Replies I got a TW Server files and i launched it , and fixed all bugs and problems its now 100% working
So what do u think i have to open it (PvP Or PvE) & The Cap ! But remember that there's no any bot works with it except Kbot i think btw give us your opinion !
Thanks :)
[C#] DarkOrbit Encoding/Decoding from Netty 05/18/2013 - DarkOrbit - 5 Replies Hello, today i bring you how to encode and decode the packets of the new darkorbit(which uses netty).
Dictionary:
Short - 2 bytes
Int - 4 bytes
Bool - 1 byte
Str or UTF - Short Length of String + String
The structure of the packets are:
1 - Short Length of all packet
Ecsro Based Server 90SKILL And 90 Cap first realy oldschool server + Beginner Event 08/14/2012 - SRO PServer Advertising - 375 Replies hey guys,
After a long downtime we are now back online would be finde to see You again
Stall Is Disabled In Gameserver so Dupe Unable To Use
Events for beginning :
20.08.2012 Have fun :)
First account Gets 200free silk
Normal Events :