Quote:
Originally Posted by Andrew.A
Could someone help me get rid of invalid Jump or Help me to increase the range I must jump before I get invalid jump? I've been looking through Jump.cs and character.cs but im not sure what I need to change.
Thanks
Andrew.A
|
Im not using 5165 but maybe i can help you using CoEmu..
Okay here we go....
Code:
public static void Jump(int X, int Y, ClientSocket CSocket)
{
//Check if jump distance is too large!
int Dis1 = 0;
if(X < CSocket.Client.X)
Dis1 = Math.Abs(X - CSocket.Client.X);
else
Dis1 = Math.Abs(CSocket.Client.X - X);
int Dis2 = 0;
if(Y < CSocket.Client.Y)
Dis2 = Math.Abs(Y - CSocket.Client.Y);
else
Dis2 = Math.Abs(CSocket.Client.Y - Y);
if (CSocket.Client.Map == Struct.Maps.faction)
{
if (Dis1 > 11 || Dis2 > 11)[COLOR="red"] <---- you can change this up to 18 to above i think..this jump is for Guild map Only...[/COLOR]
{
CSocket.Send(ConquerPacket.General(CSocket.Client.ID, 0, 0, CSocket.Client.X, CSocket.Client.Y, 0, Struct.DataType.CorrectCords));
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Jump too large!", Struct.ChatType.Top));
return;
}
}
else
{
if (Dis1 > 18 || Dis2 > 18)[COLOR="Red"] <---- you can change this..this jump is for any map..[/COLOR]
{
CSocket.Send(ConquerPacket.General(CSocket.Client.ID, 0, 0, CSocket.Client.X, CSocket.Client.Y, 0, Struct.DataType.CorrectCords));
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Jump too large!", Struct.ChatType.Top));
return;
}
}
This code is from CoEmu, I just edited it..