Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kolonelkadat
committed
May 4, 2016
0 parents
commit 1fca2d5
Showing
7 changed files
with
256 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bin | ||
obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using UnityEngine; | ||
|
||
namespace sslAimAssist | ||
{ | ||
public class Class1 | ||
{ | ||
public static GameObject load_obj; | ||
|
||
public static void Load() | ||
{ | ||
load_obj = new GameObject(); | ||
load_obj.AddComponent<Hack>(); | ||
UnityEngine.Object.DontDestroyOnLoad(load_obj); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using UnityEngine; | ||
|
||
namespace sslAimAssist | ||
{ | ||
class Hack : MonoBehaviour | ||
{ | ||
private const string NOT_FOUND = "Aimer not Found"; | ||
private const string INIT_MESSAGE = "FPX aim assist loaded"; | ||
|
||
private string OverlayString = INIT_MESSAGE; | ||
|
||
private int _lastPower = 0; | ||
private int _lastAngle = 0; | ||
private float lastTime = Time.time; | ||
|
||
private double g = 9.812; | ||
private float powerSalt = 10.75f; | ||
|
||
void Start() | ||
{ | ||
|
||
} | ||
|
||
void Update() | ||
{ | ||
if (Input.GetKeyDown(KeyCode.Keypad0)) | ||
{ | ||
powerSalt -= 0.25f; | ||
} | ||
if (Input.GetKeyDown(KeyCode.Keypad1)) | ||
{ | ||
powerSalt += 0.25f; | ||
} | ||
|
||
if (Game.round.me.mc != null) | ||
{ | ||
OverlayString = Aimer.instance.power + " " + Aimer.instance.angle + " " + powerSalt; | ||
OverlayString += Environment.NewLine + string.Format("ME:: X={0:0.0###} Y={1}", Game.round.me.x, Game.round.me.y); | ||
|
||
|
||
foreach (Tank t in Game.round.tanks) | ||
{ | ||
OverlayString += Environment.NewLine + string.Format("X={0:0.0###} Y={1}", t.x, t.y); | ||
} | ||
|
||
if ((Time.time > lastTime + 0.75) && (Aimer.instance.power != _lastPower || Aimer.instance.angle != _lastAngle)) | ||
{ | ||
lastTime = Time.time; | ||
_lastAngle = Aimer.instance.angle; | ||
_lastPower = Aimer.instance.power; | ||
|
||
Tank tPlayer = Game.round.me; | ||
projectileMotion(tPlayer.x, tPlayer.y); | ||
} | ||
} | ||
else | ||
{ | ||
OverlayString = NOT_FOUND; | ||
} | ||
} | ||
|
||
private void projectileMotion(float p1, int p2) | ||
{ | ||
float angle = (float)getAngle(Aimer.instance.angle); | ||
int count = 0; | ||
if (Aimer.instance.angle <= 180) | ||
{ | ||
for (int i = 1; i <= 1000; i += 10) | ||
{ | ||
float t = i / ((Aimer.instance.power + powerSalt) * Mathf.Cos(angle)); | ||
float Y = (float)(((Aimer.instance.power + powerSalt) * Mathf.Sin(angle)) * t - (0.5 * g * t * t)); | ||
Spawn.GO(Scene_Game.instance.tracerDotPrefab, null, Map.toWorldX((float)i + Game.round.me.x), Map.toWorldY(Game.round.me.y + Y), 0f, null).GetComponent<TracerDot>().Init(count); | ||
count++; | ||
} | ||
} | ||
else | ||
{ | ||
for (int i = 1; i > -1000; i -= 10) | ||
{ | ||
float t = i / ((Aimer.instance.power + powerSalt) * Mathf.Cos(angle)); | ||
float Y = (float)(((Aimer.instance.power + powerSalt) * Mathf.Sin(angle)) * t - (0.5 * g * t * t)); | ||
Spawn.GO(Scene_Game.instance.tracerDotPrefab, null, Map.toWorldX((float)i + Game.round.me.x), Map.toWorldY(Game.round.me.y + Y), 0f, null).GetComponent<TracerDot>().Init(count); | ||
count++; | ||
} | ||
} | ||
} | ||
|
||
private float getAngle(int angle) | ||
{ | ||
float ret = 0; | ||
if (angle <= 90) | ||
{ | ||
ret = 90 - angle; | ||
} | ||
else if (angle > 90 && angle <= 180) | ||
{ | ||
ret = (angle - 90) * -1; | ||
} | ||
else if (angle > 180 && angle <= 270) | ||
{ | ||
ret = (angle - 270) * -1; | ||
} | ||
else if (angle > 270) | ||
{ | ||
ret = (angle - 270) * -1; | ||
} | ||
ret = (float)((ret * Mathf.PI) / 180.0); | ||
return ret; | ||
} | ||
|
||
void OnGUI() | ||
{ | ||
GUI.Label(new Rect(10, 25, 300, 300), OverlayString ); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("sslAimAssist")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("sslAimAssist")] | ||
[assembly: AssemblyCopyright("Copyright © 2016")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("51069413-acfc-4519-850a-1778667cb7fa")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{55D98C53-E9A1-4C47-A6C7-4D0751C5D693}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>sslAimAssist</RootNamespace> | ||
<AssemblyName>sslAimAssist</AssemblyName> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Assembly-CSharp"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\SteamApps\common\ShellShock Live\ShellShockLive_Data\Managed\Assembly-CSharp.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="UnityEngine"> | ||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\SteamApps\common\ShellShock Live\ShellShockLive_Data\Managed\UnityEngine.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Class1.cs" /> | ||
<Compile Include="Hack.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2013 | ||
VisualStudioVersion = 12.0.30723.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sslAimAssist", "sslAimAssist.csproj", "{55D98C53-E9A1-4C47-A6C7-4D0751C5D693}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{55D98C53-E9A1-4C47-A6C7-4D0751C5D693}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{55D98C53-E9A1-4C47-A6C7-4D0751C5D693}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{55D98C53-E9A1-4C47-A6C7-4D0751C5D693}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{55D98C53-E9A1-4C47-A6C7-4D0751C5D693}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Binary file not shown.