Register for your free account! | Forgot your password?

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

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

Advertisement



Auto Relog Function (Bot DC)

Discussion on Auto Relog Function (Bot DC) within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 53
Join Date: Sep 2014
Posts: 308
Received Thanks: 88
Post Auto Relog Function (Bot DC)

Hey Guys, i need to make a Auto Relog Function when the clientless (bot) *** dc automatic relog again the problem i face it about the packet i used this packet

if (current.Opcode == 0xB010 && current.ReadUInt8() == 0x01)
}
Globals.MainWindow.Log.Add("Got DC");
{

this Opcode got it from Analayzer

[IMG=expandable: 1] [/IMG]

BUT Nothin happen in My Log to recive this message "Got DC"
Mr.Awesome1337 is offline  
Old 12/12/2016, 02:56   #2
 
elite*gold: 100
Join Date: Apr 2008
Posts: 860
Received Thanks: 1,487
There is no packet that tells you reliable: you are disconnected ... consider someone unplugging network interface. how would that packet reach your client? you should consider detecting a disconnect by the socket state (e.g. timeout).
florian0 is offline  
Thanks
1 User
Old 12/13/2016, 07:53   #3
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 2,008
Received Thanks: 1,193
Code:
 bool SocketConnected(Socket sock)
    {
        bool b1 = s.Poll(1000, SelectMode.SelectRead);
        bool b2 = (s.Available == 0);
        if (b1 && b2)
            return false;
        else
            return true;
    }
execute this method every 5-10 seconds using a timer?

use it like this

Code:
if(!SocketConnected(Agent.ag_socket))
{
 // Client Disconnected
// Restart Client or Reconnect
}
B1Q is offline  
Thanks
1 User
Old 12/13/2016, 11:09   #4
 
elite*gold: 53
Join Date: Sep 2014
Posts: 308
Received Thanks: 88
Quote:
Originally Posted by B1QB0SS :3 View Post
Code:
 bool SocketConnected(Socket sock)
    {
        bool b1 = s.Poll(1000, SelectMode.SelectRead);
        bool b2 = (s.Available == 0);
        if (b1 && b2)
            return false;
        else
            return true;
    }
execute this method every 5-10 seconds using a timer?

use it like this

Code:
if(!SocketConnected(Agent.ag_socket))
{
 // Client Disconnected
// Restart Client or Reconnect
}
Thank You for help
Mr.Awesome1337 is offline  
Old 12/14/2016, 08:35   #5
 
elite*gold: 0
Join Date: Dec 2016
Posts: 72
Received Thanks: 37
Actually, all of the above could work, however, if you know what these attributes means, i would not advise you to use them as they could lead to some integrity issues.
In that case, i would simply make a simple code snippet in the ping packet loop on the client outgoing traffic, that checks whats the last time the client pinged, obviously if the value is greater then 10, then client is obviously offline.
Isoline is offline  
Reply


Similar Threads Similar Threads
auto relog?
07/08/2011 - Metin2 - 6 Replies
hey leute hab mal ne frage gibts sowas wie auto relog dh wenns mich vom server schmeißt logt er sich selber wieder ein
auto relog in
04/16/2011 - Conquer Online 2 - 1 Replies
i need a auto relog in that works :D thanks!
Ribot no Auto Relog HELP THX !!!
11/26/2010 - Silkroad Online - 3 Replies
guys i mark auto recon and auto relog and auto start bot and auto selecth CHARACTER and i write name of char... but when get DC no auto relogin why pls help me ?:confused:
Ribot Auto-relog
05/07/2010 - Silkroad Online - 4 Replies
Hey all, anyone here knows if ribot can do auto relog? Ive read the ibot-command thing but it is for isro. If it can, could someone please post a quick guide as to what to do, would be greatly appreciated :) Thanks cocobro



All times are GMT +1. The time now is 02:40.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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