Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 19:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



sro_client.exe auto flag pick

Discussion on sro_client.exe auto flag pick within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2019
Posts: 8
Received Thanks: 0
sro_client.exe auto flag pick

hello, I would like to edit my sro_client.exe in a way that when it receives a certain packet (flag dropped), it sends a pick packet, I already know both of the packets and how to send and receive them but that's via phconnector but I would like to implement them inside the sro_client since it would be a lot quicker

so what I'm basically trying to do is send packets through the sro_client directly without the need for a proxy like phconnector, any tips would be appreciated



aastrothunder is offline  
Old 12/03/2019, 19:24   #2
 
elite*gold: 0
Join Date: Nov 2019
Posts: 17
Received Thanks: 5
I believe what you're looking for is dll injection.
- A hook on object spawn to trigger the pickup.
- A hook on send packet to send the pickup packet.
- Or a hook on the pickup hotkey "G" to pickup items close by.

But that won't work on clients that are protected.

You are better of using phConnector for easier time.


kepner15 is offline  
Thanks
1 User
Old 12/03/2019, 19:35   #3
 
elite*gold: 0
Join Date: Dec 2019
Posts: 8
Received Thanks: 0
the client I'm trying to edit isn't protected and I already got this running in phconnector but apparently someone coded it in their sro_client and they're faster than the one I made so I'm looking for improvements

oh also it's coded in autoit, would it be much quicker if I coded it in C instead?
aastrothunder is offline  
Old 12/03/2019, 20:19   #4
 
elite*gold: 0
Join Date: Nov 2019
Posts: 17
Received Thanks: 5
Autoit is just fine for sending pickup packet but...

Depends on how you code your pickup and the rest of your coding logics... if you send the pickup as soon as the object/item spawns then that should be the quickest way... after that it only depends now on the latency you have to the server.

If the other guy have lower latency then he would be faster than you and nothing you can do about it except physically moving closer to the server.


kepner15 is offline  
Thanks
1 User
Old 12/03/2019, 21:07   #5
 
elite*gold: 0
Join Date: Dec 2019
Posts: 8
Received Thanks: 0
well I'm sending packets like this for example

TCPStartup()
$socket = TCPConnect("127.0.0.1", 16000)
$data = "0x03007470030001045E27000000"
TCPSend($socket, $data)

would treating it like raw strings make it any slower? also if you've ever coded something in C can you show me a code example where you can send a packet like the code above? thanks
aastrothunder is offline  
Old 12/03/2019, 21:47   #6
 
elite*gold: 0
Join Date: Nov 2019
Posts: 17
Received Thanks: 5
0300 7470 03 00 01 04 5E270000 00

The sample packet doesn't seem to be a pickup packet.
0300 - data length / should be 0700
7470 - opcode for action/cast ?
03 - direction to server?
00 - not encrypted
01 - has action
04 - action type / 04 cast skill
5E270000 - skill id
00 - no target

Anyway, for pickup you would need to have the item unique id so you need to parse the object spawn packet and grab the item unique id.

For C/C++/C#, you would need to have a class/struct like...
I.E. phConnector uses StreamUtility.

StreamUtility writer;
writer.Write<uint8_t>(1); // has action
writer.Write<uint8_t>(2); // action type / 02 pickup
writer.Write<uint8_t>(1); // has target
writer.Write<uint32_t>(uniqueid); // item unique id
Joymax.Inject(0x7074, writer); // send opcode and the pickup packet
kepner15 is offline  
Thanks
1 User
Old 12/03/2019, 22:16   #7
 
elite*gold: 0
Join Date: Dec 2019
Posts: 8
Received Thanks: 0
it's a skill packet yea I don't wanna give away the pickup packet for others to use in case they stumble across this thread

thanks, but would coding it in C actually make it a lot faster? like at least 50ms faster? I feel like this really could just be an internet latency issue
aastrothunder is offline  
Old 12/03/2019, 22:32   #8
 
elite*gold: 0
Join Date: Nov 2019
Posts: 17
Received Thanks: 5
Well, autoit is mainly a scripting/interpreter language... it might be doing more stuff on the backend that causes more delays in executing the code but that won't cause major delays on what you want to achieve.

If you compare it to C++, yes it would be faster but i doubt it will have a big impact on the pickup delay.

Try pinging the server address and see whats your responds time.
Most private servers close by me have 100ms.
Other side of the world I would get around 200ms - 500ms ping.
kepner15 is offline  
Thanks
1 User
Old 12/03/2019, 22:56   #9
 
elite*gold: 0
Join Date: Sep 2018
Posts: 130
Received Thanks: 53
Quote:
Originally Posted by kepner15 View Post
If you compare it to C++, yes it would be faster but i doubt it will have a big impact on the pickup delay.
Agree. The only way to making it faster as possible it's by sending it on spawn packet, everything else is up to the latency, should be worry for the last one more than else.
JellyBitz is offline  
Thanks
1 User
Old 12/04/2019, 08:46   #10
 
elite*gold: 0
Join Date: Dec 2019
Posts: 8
Received Thanks: 0
well what if I run my phconnector and the autoit script on a remote server so that it's the server that listens to packets and then send the pick packet, how can I connect to a phconnector that's running on a remote server if it's on 127.0.0.1 port 16000 maybe

connect to remote serverIP port 16000 or do I need port forwarding or any of that sort?

[EDIT]
Actually just tested how much it takes for my script to receive and send the packet and it was 0.0563 milliseconds, I guess that's 56.3 microseconds (used TimerInit() and TimerDiff to calculate the time)

I think this is relatively fast but I have no sense of what's fast and what's not so do you think that this is actually quick enough and I should just consider the remote server idea or there's room for improvements?
aastrothunder is offline  
Old 12/04/2019, 17:10   #11
 
elite*gold: 0
Join Date: Apr 2009
Posts: 2,228
Received Thanks: 2,422
Check Singlespawn (0x3015). Since it's single and not groupspawn, you don't have to parse everything, that's really fortunate because otherwise it's very painy.

Code:
UInt32 RefObjID = p.ReadUInt32();

if (RefObjID == 23921) // if NPC_EVENT_FLAGWAR_MASTERKEY
{
	UInt32 KeyUniqueID = p.ReadUInt32();
}
Then send a pickpacket with the unique id you just got. Tada done.
You can use as a DLL base, it'll provide you everything you need. (Capturing packets - sending packets)
sarkoplata is offline  
Thanks
1 User
Old 12/04/2019, 20:33   #12
 
elite*gold: 0
Join Date: Dec 2019
Posts: 8
Received Thanks: 0
Thanks, that was actually helpful but I guess I realized there's no room for improvements here, apparently my script takes less than one millisecond to execute (I thought it was 100ms cause I thought the autoit function TimerDiff's output was in seconds) so the only improving I need to do here is ping latency

thanks for helping everyone


aastrothunder is offline  
Reply



« AutoIT TCPRecv | [Exchange Bug] on Mobs (Media edit or Program) ? »

Similar Threads
is there anyway to auto pick flag at ctf?
07/07/2019 - SRO Private Server - 2 Replies
is there anyway to auto pick flag at ctf?
[Help] can anyone create auto pick flag at ctf ?
11/30/2017 - SRO Coding Corner - 4 Replies
can anyone create auto pick flag at ctf tool?
[TOOL] AutoClient V3 - Auto call, auto pick, auto login... just everything
11/08/2015 - League of Legends Hacks, Bots, Cheats & Exploits - 30 Replies
Hello there. I am about to release version 3 of my PVP.net Client automation tool. tl;dr Download Videos FAQ Documentation Report a problem https://www.youtube.com/watch?v=7g89-K8kPGA



All times are GMT +1. The time now is 19:13.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2019 elitepvpers All Rights Reserved.