Register for your free account! | Forgot your password?

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

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

Advertisement



UPDATE TITLE W/O TELEPORT HELP

Discussion on UPDATE TITLE W/O TELEPORT HELP within the SRO Coding Corner forum part of the Silkroad Online category.

Closed Thread
 
Old 10/09/2018, 21:03   #16
 
elite*gold: 0
Join Date: Mar 2016
Posts: 46
Received Thanks: 6
Quote:
Originally Posted by Zoro.Sro View Post
dude you must send the packet for all players on the same region

Packet pack = new Packet(0x30DF); // update title packet
pack.WriteUInt32(session.Character.UniqueID); // Char UniqueID
pack.WriteUInt8(TitleID); // title numb
SessionExt.BroadCastToSameRegion(session, pack); // here method thats send the packet for every player on the same region
its simple for each player send the title update packet
i use supermike source...

but i cant use this session:
--- SessionExt.BroadCastToSameRegion(session, pack);



how i can find player around chars with use SUPERMIKE ???
GhosTly93 is offline  
Old 10/09/2018, 21:29   #17
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
Quote:
Originally Posted by GhosTly93 View Post
i use supermike source...

but i cant use this session:
--- SessionExt.BroadCastToSameRegion(session, pack);



how i can find player around chars with use SUPERMIKE ???
For supermike source, use this to send S -> C packets:
Code:
m_LocalSecurity.Send(packet);
You can make your own BroadCastToSameRegion though, its not hard.
#HB is offline  
Old 10/09/2018, 22:11   #18
 
elite*gold: 0
Join Date: Mar 2016
Posts: 46
Received Thanks: 6
Quote:
Originally Posted by #HB View Post
You can make your own BroadCastToSameRegion though

I've been asking how I can do it for all days
GhosTly93 is offline  
Old 10/09/2018, 23:42   #19
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
It's very simple, make a new function at Silkroad API packet reference called BroadCastToSameRegion if you want to call it like:
Code:
packet.BroadCastToSameRegion(bool agreement);
The function will simply do this check the current region then do this:
Code:
if (agreement)
{
	if (ThisRegion == "C->S")
	{
		m_RemoteSecurity.Send(packet);
	}
	else
	{
		m_LocalSecurity.Send(packet);
	}
}
else
{
	if (ThisRegion == "C->S")
	{
		m_LocalSecurity.Send(packet);
	}
	else
	{
		m_RemoteSecurity.Send(packet);
	}
}
Or you can even edit it to send it to the region you want, which I'd prefer.
#HB is offline  
Old 10/10/2018, 07:15   #20
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
Quote:
Originally Posted by #HB View Post
Code:
if (agreement)
{
	if (ThisRegion == "C->S")
	{
		m_RemoteSecurity.Send(packet);
	}
	else
	{
		m_LocalSecurity.Send(packet);
	}
}
else
{
	if (ThisRegion == "C->S")
	{
		m_LocalSecurity.Send(packet);
	}
	else
	{
		m_RemoteSecurity.Send(packet);
	}
}
what in the actual fuck is that. PLEASE DO NOT USE THIS!

Quote:
Originally Posted by GhosTly93 View Post
I've been asking how I can do it for all days
ok here

Code:
class CSCommunication
{
	// 2 sockets here
	
	// 2 security instances 
	
	// buffer 
	
	
	// constructor 
	
	
	// methods
	private void ForwardToClient()
	{
		var packets = this.clientSecurity.TransferOutGoing();
		// loop & send 
	}
	public void SendToClient(Packet pck) // you can always use a bool / enum to switch
	{
		this.clientSecurity.Send(pck);
		this.ForwardToClient();
	}
	
	// public properties
	public ushort RegionID {get;set;} // this updates everytime the user moves (use the S->C packets for reliability) 
}


class SocketListener : Socket
{
	// this is where you initialize your server's socket and your clients list 
	public List<CSCommunication> ConnectedClients = new List<CSCommunication>();
	
	
	public void BroadCastToSameRegion(Packet pck, ushort region)
		=> ConnectedClients.Where(c=>c.RegionID==region).ToList().Foreach(c=>c.SendToClient(pck));
}
notepad++ function names may not be the same but you get the concept
B1Q is offline  
Old 10/10/2018, 12:30   #21
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
Quote:
Originally Posted by B1Q View Post
what in the actual **** is that. PLEASE DO NOT USE THIS!
.

Quote:
Originally Posted by #HB View Post
Or you can even edit it to send it to the region you want, which I'd prefer.
#HB is offline  
Old 10/10/2018, 16:29   #22
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,184
Quote:
Originally Posted by #HB View Post
.
your statement has nothing to do with the code you posted
you had the choice of posting a proper piece of code to help him but instead you just distracted him and possibly put him in the wrong direction.
B1Q is offline  
Old 10/10/2018, 17:21   #23
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
Quote:
Originally Posted by B1Q View Post
your statement has nothing to do with the code you posted
you had the choice of posting a proper piece of code to help him but instead you just distracted him and possibly put him in the wrong direction.
Okay, my bad.
#HB is offline  
Old 10/12/2018, 17:05   #24

 
SubZero**'s Avatar
 
elite*gold: 0
Join Date: Apr 2017
Posts: 987
Received Thanks: 456
request to close
SubZero** is offline  
Closed Thread


Similar Threads Similar Threads
[Selling] PGI Title Crate Code ( PGI TITLE SET SKIN )
07/25/2018 - PlayerUnknown's Battlegrounds Trading - 0 Replies
Hallo, ich verkaufe einen Key, der in PUBG im Shop aktiviert werden kann um eine PGI Title Crate freizuschalten. Diese Crate beinhaltet das gesamte Title Set. /1 Ich akzeptiere nur Paypal F&F und werde auch nicht first gehen, es sei denn ihr habt 350+/0/0 positive TBMs. Es wird nur über Epvp getraded, kein Skype, Discord usw. Zudem muss zuvor ein Trade eröffnet werden. Lest euch bitte vorher die Traderegeln von Epvp durch. Mit Abgabe eines Gebotes, stimmt ihr meinem /1 zu. Mfg
[WTS] Account including all 4 campaigns + Wisdom Title [3] + Treasure title [near 3]
09/06/2009 - Guild Wars Trading - 6 Replies
: Hi, I'm sellin an Account including all 3 campaigns & EOTN. It has no characters on it except an PvP Elementalist. There are some green items and materials on storage, and 11 golden rin relicts It's not plaync-bounded!! I'm open for offers. (ectos, zkeys, rare pets or rare items only) Contact: ..: 195759396
[tut] speed teleport (not map teleport)
08/11/2009 - 12Sky2 - 2 Replies
you need cheat eng for this find the movement speed address current: C61778 2. change to 99999 3. enable your run skill your done you will go so fast you will teleport make sure you don't click in anything bad shit will happen thank me :mofo: :mofo: :mofo:
How edit topic title? New title.
09/01/2007 - Conquer Online 2 - 2 Replies
Since forum turned vbulletin, i cant edit topic title



All times are GMT +2. The time now is 02:31.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.