PDA

View Full Version : [Uscript]RedOrchestra xHair/ESPCross


alien56
20th October 2007, 06:44
Hello,

here is my CrossHair and ESPCross for RO(non Texture Import style). This way seems at times to be a little laggy with ESP part of things(maybe not caused by this, Im not sure), But I would Advise to setup the ESPCross in a Seperate Function and then Call it in your ESP. Im not 100% certain if that would have an effect on lagg, maybe somebody more knowlegeable about how the UnrealEngine functions could Clerify that. Anyways here it is.

Declares/DefaultProperties:
var config float xhairsize, espcrosssize;

defaultproperties
{
xhairsize=14; //or however big you want it
espcrosssize=3;//or .....


Now with the xhairsize and espcrosssize floats you can create a Scalling function for ingame size selection via KeyEvent, Execfunction, or MouseMenu for example. I also plan on doing a Color scale.

PostRender:
function MyPostRender (Canvas Canvas)
{
MyController = ViewportOwner.Actor;
Me = MyController.Pawn;
Canvas.Style = 3;
Canvas.bCenter = False;
Canvas.bNoSmooth = True;

//Main Cross
Canvas.SetDrawColor(0, 255, 0, 25);
//xHair Right Side
Canvas.SetPos((Canvas.SizeX / 2) + 1, (Canvas.SizeY / 2));
Canvas.DrawTile(Texture'Engine.WhiteSquareTexture' , xhairsize, 2, 0, 0, 2, 2);
//xHair Left Side
Canvas.SetPos((Canvas.SizeX / 2) - xhairsize, (Canvas.SizeY / 2));
Canvas.DrawTile(Texture'Engine.WhiteSquareTexture' , xhairsize - 0.6, 2, 0, 0, 2, 2);
//xHair Down
Canvas.SetPos((Canvas.SizeX / 2), (Canvas.SizeY / 2) + 1);
Canvas.DrawTile(Texture'Engine.WhiteSquareTexture' , 2, xhairsize, 0, 0, 2, 2);
//xHair Up
Canvas.SetPos((Canvas.SizeX / 2), (Canvas.SizeY / 2) - xhairsize);
Canvas.DrawTile(Texture'Engine.WhiteSquareTexture' , 2, xhairsize, 0, 0, 2, 2);
if (!botactive || MyController == None || Me == None || Me.PlayerReplicationInfo == None)
{
Return;
}
PawnRelated(Canvas);
}

PawnRelated:
function PawnRelated(Canvas Canvas)
{
local Pawn Target;
foreach Me.Level.AllActors(Class'Pawn', Target)
{
if (ValidTarget(Target))
{
ESPCross(Target, Canvas);
}
}
}

ValidChecks/TeamCheck:
function bool ValidTarget (Pawn Target)
{
if ((Target != None) &&
(!Target.bHidden) &&
(Target.Health > 0) &&
(!Target.IsInState('Dying')) &&
(!Target.IsA('StaticPawn')) &&
(Target.PlayerReplicationInfo != None) &&
(!Target.PlayerReplicationInfo.bIsSpectator) &&
(!Target.PlayerReplicationInfo.bWaitingPlayer) &&
(Target.PlayerReplicationInfo != Me.PlayerReplicationInfo))
{
Return True;
}
else
{
Return False;
}
}
function GetTeamColor(Pawn Target, Canvas Canvas)
{
if(Target.PlayerReplicationInfo.Team != Me.PlayerReplicationInfo.Team)
{
Canvas.SetDrawColor(255,0,0,0);
}
else
Canvas.SetDrawColor(0,255,0,0);
}

And the ESP Function:
function ESPCross(Pawn Target, Canvas Canvas)
{
local vector MyLocation;
local vector TargetLocation;
local vector DiffLocation;
local vector X,Y,Z;

local float ScreenPosX;
local float ScreenPosY;

MyLocation = Me.Location;
MyLocation.Z += Me.EyeHeight;

TargetLocation = Target.Location;
TargetLocation.Z += Target.CollisionHeight / 2;

DiffLocation = TargetLocation - MyLocation;
GetAxes(Normalize(Me.GetViewRotation()),X,Y,Z);

if (DiffLocation Dot X > 0.70)
{
ScreenPosX = (Canvas.ClipX / 2) + ( (DiffLocation Dot Y)) * ((Canvas.ClipX / 2) / Tan(MyController.FovAngle * Pi/360)) / (DiffLocation Dot X);
ScreenPosY = (Canvas.ClipY / 2) + (-(DiffLocation Dot Z)) * ((Canvas.ClipX / 2) / Tan(MyController.FovAngle * Pi/360)) / (DiffLocation Dot X);

Canvas.Style = 3;
Canvas.bCenter = False;
Canvas.bNoSmooth = True;
GetTeamColor(Target, Canvas);
//xHair Right Side
Canvas.SetPos(ScreenPosX + 1, ScreenPosY);
Canvas.DrawTile(Texture'Engine.WhiteSquareTexture' , espcrosssize, 2, 0, 0, 2, 2);
//xHair Left Side
Canvas.SetPos(ScreenPosX - espcrosssize, ScreenPosY);
Canvas.DrawTile(Texture'Engine.WhiteSquareTexture' , espcrosssize, 2, 0, 0, 2, 2);
//xHair Down
Canvas.SetPos(ScreenPosX, ScreenPosY + 1);
Canvas.DrawTile(Texture'Engine.WhiteSquareTexture' , 2, espcrosssize, 0, 0, 2, 2);
//xHair Up
Canvas.SetPos(ScreenPosX, ScreenPosY - espcrosssize);
Canvas.DrawTile(Texture'Engine.WhiteSquareTexture' , 2, espcrosssize, 0, 0, 2, 2);
}
}

Credits:
Me(I decided to start over from scratch and made this from viewing the Canvas.uc source file, Starting with the simplest and work my back up again since I deleted my Source when Reinstalling the game.)
whoever first created the ESP ScreenView Func(I just pulled it from one of Helios's UT2003 examples, and also from AAO bots)
selig who Inspired me to create it.

alien56
21st October 2007, 05:08
As Far as I know All UScript Hooks for RedOrchestra are Not Vac Detected. At least I assume so since its Not had Much Of a Hacking Backround apparently. Theres only 2 Public Hacks that ive seen For the Game In total. One is a D3D Hook, and One UScript Bot that was made for the Original Release of the Game I beleive, By someone at AgeRage. Its hard to tell however if a hack is detected because Vac dosent work Like PB with a Direct Kick from a Server if a Hook is Detected and Then a Ban Later. Vac Does it More Descretly, They Scan, Detect, and Log, And then Ban Later(weeks to months later), But you get no Kicks in the Meantime so You have no Indication that your hack is detectable. But Like I say, Since there Is Really No Hacking Community for RO AT ALL, I would say Theres no reason for anything to be detected.

alleenik
21st October 2007, 16:28
wow alien. diddnt know that. So this means i can use this hack without consirn. thnx

alien56
21st October 2007, 17:17
I cant say for sure, If you dont want to Log on a Month or so Down the Line and see that Your Steam Account is Blocked from all Vac servers then I would stick to Non Vac or Just dont hack at all.

But I beleive you should be able to get away with any of the Old Public UScript Hooking methods