ZeNu Channel changer - Ports Configuration

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
danhakhavro
Nou Venit

Nou Venit
Mesaje: 5
Membru din: 12 Apr 2021, 14:26
Aprecieri: 6  
Mulţumiri: 0
Medalii

Hello,

I am 3 days looking for a solution to this problem, unfortunately so far without success.

Last hope is here in this forum 😅

I'm using the ZeNu In-Game Channel Changer, I installed everything and I have no errors in the sysser but when i changing the channel, the game returns to the login page after 3 seconds.

For what I've been researching, this is a port problem in char.cpp.

Cod: Selectaţi tot

#ifdef ENABLE_CHANGE_CHANNEL
void CHARACTER::ChangeChannel(DWORD channelId){
	long lAddr;
	long lMapIndex;
	WORD wPort;
	long x = this->GetX();
	long y = this->GetY();

	if (!CMapLocation::instance().Get(x, y, lMapIndex, lAddr, wPort))
	{
		sys_err("cannot find map location index %d x %d y %d name %s", lMapIndex, x, y, GetName());
		return;
	}

	if(lMapIndex >= 10000){
		this->ChatPacket(CHAT_TYPE_INFO, ("You can't change channel in private map."));
		return;
	}

	//this->ChatPacket(CHAT_TYPE_COMMAND, "RefreshChannel %d", channelId);

	Stop();
	Save();

	if(GetSectree()){
	    GetSectree()->RemoveEntity(this);
	    ViewCleanup();
	    EncodeRemovePacket(this);
	}

	TPacketGCWarp p;

	p.bHeader	= HEADER_GC_WARP;
	p.lX	= x;
	p.lY	= y;
	p.lAddr	= lAddr;
	
	p.wPort	= (wPort - 4*(g_bChannel-1) + 4*(channelId-1));
	
	GetDesc()->Packet(&p, sizeof(TPacketGCWarp));
}
#endif


Logically I came to the conclusion that I should put " p.wPort = (wPort - 4 *(....) +4* (....) since these are my doors.



Channel 1 Core 1 [30003] = 1;
Channel 1 Core 2[30005] = 1;

Channel 2 Core 1[30007] = 2;
Channel 2 Core 2[30009] = 2;



But the game continues to return to the login page. Can any good soul help me? What is the logic? What should i put at wPort -X ? Does the problem is not there?

Thanks you.
Avatar utilizator
Marius Dragomir
Membru Club

Membru Club
Mesaje: 1020
Membru din: 13 Noi 2017, 21:32
Server: HellHound
Regat: Jinno
Aprecieri: 499  
Mulţumiri: 1211  
Discord: Copiază ID
Medalii

You can try this. Is what i have in my source and works without any problem
#ifdef ENABLE_CHANGE_CHANNEL
void CHARACTER::ChangeChannel(DWORD channelId)
{
	long lAddr;
	long lMapIndex;
	WORD wPort;
	long x = this->GetX();
	long y = this->GetY();


	if (!CMapLocation::instance().Get(x, y, lMapIndex, lAddr, wPort))
	{
		sys_err("cannot find map location index %d x %d y %d name %s", lMapIndex, x, y, GetName());
		return;
	}
	
	if(lMapIndex >= 10000)
	{
		this->ChatPacket(CHAT_TYPE_INFO, ("You can't change channel in private map."));
		return;
	}

	if (GetMyShopTime())
	{
		this->ChatPacket(CHAT_TYPE_INFO, ("Mataaaaaaa."));
		return;
	}


	//this->ChatPacket(CHAT_TYPE_COMMAND, "RefreshChannel %d", channelId);

	Stop();
	Save();

	if(GetSectree()){
		GetSectree()->RemoveEntity(this);
		ViewCleanup();
		EncodeRemovePacket(this);
	}
	TPacketGCWarp p;

	p.bHeader	= HEADER_GC_WARP;
	p.lX	= x;
	p.lY	= y;
	p.lAddr	= lAddr;
	
	p.wPort	= (wPort - 100*(g_bChannel-1) + 100*(channelId-1));
	
	GetDesc()->Packet(&p, sizeof(TPacketGCWarp));
}
#endif
Pentru acest mesaj, Marius Dragomir for the post:
danhakhavro
Continut: Ascuns
Trebuie sa multumesti autorului pentru a putea vedea mesajul.
Afișează semnătura
Avatar utilizator
danhakhavro
Nou Venit

Nou Venit
Mesaje: 5
Membru din: 12 Apr 2021, 14:26
Aprecieri: 6  
Mulţumiri: 0
Medalii

Thanks you for your reply.
How does the system know my ports? I set it to 10 *, 100 *, 1000 * nothing works. :(
Avatar utilizator
Ionuţ M.
Metin Master

Metin Master
Mesaje: 2680
Membru din: 28 Noi 2015, 22:02
Aprecieri: 170  
Mulţumiri: 12723  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

Inactiv, arhivat.
Imagine
Afișează semnătura
Închis
Răspunsuri
1
Vizualizări
219
Răspunsuri
10
Vizualizări
1637
Răspunsuri
6
Vizualizări
350

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 129 vizitatori