Sro Chat

11/11/2015 20:57 MoQue#1
Hello
Can any one help in a simple code of auto reply of global chat ?

for example if sender name is "ABCD" used global chat like "WTB bla bla bla" .. The Tool auto replies in pm and send "ABCD" a message ..

Can any one show an example ?

Its first time to code in sro
thanks & sorry for my bad English
11/11/2015 21:18 Delirus#2
Hi MoQue,

Code:
if (packet.Opcode == 0x3026)
{
	int chat = packet.ReadUInt8();

	switch (chat)
	{
		case 6: //Global
			string name = packet.ReadAscii();
			string message = packet.ReadAscii();
			if(name == "XXX" && message.StartsWith("WTB"))
			{
				Packet pm = new Packet(0x7025);
				pm.WriteUInt16(02);
				pm.WriteAscii(name);
				pm.WriteAscii("AutoMessage");
				Send(pm);
			}
			break;
	}
}
greetz
Delirus
11/11/2015 21:26 MoQue#3
Quote:
Originally Posted by Kekskind1992 View Post
Hi MoQue,

Code:
if (packet.Opcode == 0x3026)
{
	int chat = packet.ReadUInt8();

	switch (chat)
	{
		case 6: //Global
			string name = packet.ReadAscii();
			string message = packet.ReadAscii();
			if(name == "XXX" && message.StartsWith("WTB"))
			{
				Packet pm = new Packet(0x7025);
				pm.WriteUInt16(02);
				pm.WriteAscii(name);
				pm.WriteAscii("AutoMessage");
				Send(pm);
			}
			break;
	}
}
greetz
Delirus
Thanks Kekskind1992

But As I've mentioned , I'm new to programming in sro
So i don't know how to use these codes how to send Login , how to use sro packets and know which packet used for what . etc ..
Is there any tutorials for these so that i can use your sample code ?

Thanks again ♥
11/11/2015 23:43 Devsome#4
[Only registered and activated users can see links. Click Here To Register...]

If you dunno how to modify it, please let it be :3
11/12/2015 15:52 MoQue#5
Quote:
Originally Posted by Devsome View Post
[Only registered and activated users can see links. Click Here To Register...]

If you dunno how to modify it, please let it be :3
PM doesn't shown on the listbox , even if i get some
11/13/2015 19:50 qqdev#6
Sniff the packets, debug the code.