|
You last visited: Today at 16:49
Advertisement
Guild War walls jump [server side check]
Discussion on Guild War walls jump [server side check] within the CO2 Programming forum part of the Conquer Online 2 category.
12/05/2014, 11:24
|
#1
|
elite*gold: 0
Join Date: Jan 2007
Posts: 485
Received Thanks: 272
|
Guild War walls jump [server side check]
Add in your Jump handler, before assigning the new coordinates:
Code:
#region Guild War walls jump
if (client.Map.MapID == 1038)
{
Rectangle GuildWarWallsRectange = new Rectangle(0, 0, 223, 211);
Point LeftGateEntranceLeft = new Point(164, 212);
Point LeftGateEntranceRight = new Point(168, 212);
Point LeftGateExitLeft = new Point(149, 201);
Point LeftGateExitRight = new Point(168, 201);
Point RightGateEntranceDown = new Point(224, 182);
Point RightGateEntranceUp = new Point(224, 177);
Point RightGateExitDown = new Point(214, 178);
Point RightGateExitUp = new Point(214, 166);
if ((GuildWarWallsRectange.Contains(new Point(JumpX,JumpY)) && !GuildWarWallsRectange.Contains(new Point(client.X, client.Y))) ||
(!GuildWarWallsRectange.Contains(new Point(JumpX, JumpY)) && (GuildWarWallsRectange.Contains(new Point(client.X, client.Y)) && client.X != 216 && client.Y != 203)))
{
#region jump from one side to the other of the walls
Point startJump = new Point(client.X, client.Y);
Point endJump = new Point(JumpX, JumpY);
bool jumpThroughLeftGate = false;
bool jumpThroughRightGate = false;
if (Tournaments.GuildWars.GW.LeftGateOpen)
{
jumpThroughLeftGate = DoLinesIntersect(startJump, endJump, LeftGateEntranceLeft, LeftGateEntranceRight) || DoLinesIntersect(startJump, endJump, LeftGateExitLeft, LeftGateExitRight);
}
if (Tournaments.GuildWars.GW.RightGateOpen)
{
jumpThroughRightGate = DoLinesIntersect(startJump, endJump, RightGateEntranceDown, RightGateEntranceUp) || DoLinesIntersect(startJump, endJump, RightGateExitDown, RightGateEntranceUp);
}
if (!jumpThroughRightGate && !jumpThroughLeftGate)
{
client.Pullback(false);
return;
}
#endregion
}
}
#endregion
The intersection methods used (taken from  ):
Code:
/// <summary>
/// Tests if two line segments intersect or not.
public static bool DoLinesIntersect(Point p1, Point p2, Point p3, Point p4)
{
// Get the segments' parameters.
float dx12 = p2.X - p1.X;
float dy12 = p2.Y - p1.Y;
float dx34 = p4.X - p3.X;
float dy34 = p4.Y - p3.Y;
// Solve for t1 and t2
float denominator = (dy12 * dx34 - dx12 * dy34);
float t1 =
((p1.X - p3.X) * dy34 + (p3.Y - p1.Y) * dx34)
/ denominator;
if (float.IsInfinity(t1))
{
// The lines are parallel (or close enough to it).
return false;
}
float t2 =
((p3.X - p1.X) * dy12 + (p1.Y - p3.Y) * dx12)
/ -denominator;
// The segments intersect if t1 and t2 are between 0 and 1.
return
((t1 >= 0) && (t1 <= 1) &&
(t2 >= 0) && (t2 <= 1));
}
Of course, you need to use your own methods for checking if the guild gates were opened, and your own client pullback method, don't post things like "not work".
|
|
|
12/05/2014, 14:09
|
#2
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
here how I used to do it on Impulse source , it works quit well and fast no need for points or algorithms
Code:
public static void IsBreaking(GameClient client, ushort oldX, ushort oldY)
{
if (RightGate.Mesh == (270 + RightGate.Mesh % 10) && oldX >= RightGate.X && client.Entity.X <= RightGate.X && client.Entity.Y < LeftGate.Y)
{
client.Entity.X = oldX;
client.Entity.Y = oldY;
client.Disconnect();
return;
}
if (LeftGate.Mesh == (240 + LeftGate.Mesh % 10) && oldY >= LeftGate.Y && client.Entity.Y <= LeftGate.Y && client.Entity.X < RightGate.X)
{
client.Entity.X = oldX;
client.Entity.Y = oldY;
client.Disconnect();
return;
}
}
//inside your JumpPacket handler you wanna only call IsBreaking if it's already war time and inside war map
if (client.Map.BaseID == 1038 && GuildWar.IsWar)
{
Calculations.IsBreaking(client, oldX, oldY);
}
and that's about it
|
|
|
12/05/2014, 14:24
|
#3
|
elite*gold: 0
Join Date: Jan 2007
Posts: 485
Received Thanks: 272
|
Well, almost. With that method, you're solving only those jumping in from outide the walls. But the jump can be made both ways. I know that those from inside can jump legit from the top of the walls, so my method deals with that too.
Hacks shouldn't be allowed from any side, that's why I did a more complex implementation.
Also, I wanted to have a method for segment intersection, I will need it for other things too.
|
|
|
12/05/2014, 17:52
|
#4
|
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
|
Nice work Gabi!
|
|
|
12/05/2014, 21:04
|
#5
|
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
|
Quote:
Originally Posted by donn
Well, almost. With that method, you're solving only those jumping in from outide the walls. But the jump can be made both ways. I know that those from inside can jump legit from the top of the walls, so my method deals with that too.
Hacks shouldn't be allowed from any side, that's why I did a more complex implementation.
Also, I wanted to have a method for segment intersection, I will need it for other things too.
|
you can edit it to make it check the jump from inside too , I just didn't need that
|
|
|
12/05/2014, 23:17
|
#6
|
elite*gold: 0
Join Date: Jan 2007
Posts: 485
Received Thanks: 272
|
Quote:
Originally Posted by Mr_PoP
you can edit it to make it check the jump from inside too , I just didn't need that 
|
It's still allowing a wall jump, when the gate on a specific side it's opened.
TLDR: I'm not going to argue that the simple method (that I've seen implemented in several other sources) it's not working. To some extent, it does and prevents some exploits. But, using only that simple check, once the gate on a side is opened, one can jump the wall on that side. That will allow some hacks, and will hinder the efforts of the defenders (instead of guarding a small open gate, they're exposed on the entire flank, and anyone can ambush them from behind). My method is allowing the ones outside the walls to enter only through the gates. And since on my server, defenders really need to focus on defending the gates, because I'm not allowing the guild controlling the pole to attack the gates or the pole, this was a must-have requirement.
|
|
|
06/29/2015, 13:39
|
#7
|
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
|
A better way to do this, while keeping it simple, would be to use the dmap heights that TQ already use. Using that you can check if someone is doing an invalid jump. Adding Pop's code on top of that will solve all exploits.
EDIT: Unless you manually set the height for the insde of the GuildWar walls, the DMap heights wont help that much.
|
|
|
 |
Similar Threads
|
HackShield Plus/Pro .. server side check?
10/29/2009 - General Coding - 18 Replies
Hihow hab nochmal ne frage .. diesmal zu HackShield ..
man bekommt leider 0 info zu dem wie HS überhaupt funktioniert .. und die wenigen dlls von HS die man in olly laden kann sind auch nicht gerade aufschlussreich ..
mich würde mal interessieren was in der EHSvc.dll so steht und ob es evtl eine möglichkeit gibt die sog. "Server-side Crack Protection" zu umgehen die es in der Plus und Pro version von HackShield gibt?
also HackShield selbst nicht laden zu lassen habe ich hinbekommen,...
|
Multi client with date/jump walls for guild war
04/05/2009 - CO2 Exploits, Hacks & Tools - 7 Replies
does anyone knows who usually updates multi client that have the timestamp on them? or anyone knows where I can get jump wall (for guild war)? thanks.
|
ss/fb server side check 5006
12/18/2007 - Conquer Online 2 - 4 Replies
xD nvm i got the problem fixed
was a stupid mistake #00
|
How do you jump lab walls?
10/12/2007 - Conquer Online 2 - 2 Replies
how i want to get to secluded areas of the lab no one else can get to.
|
All times are GMT +1. The time now is 16:50.
|
|