Repository navigation
Expand file tree
/
Copy pathHacks.cpp
More file actions
56 lines (46 loc) · 1.64 KB
/
Copy pathHacks.cpp
File metadata and controls
56 lines (46 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "pch.h"
#include "Hacks.h"
#include "Hook.h"
bool CastNoTarget(CDOTABaseAbility* Ability) {
if (!Ability)
return false;
if (Ability->Level() < 1)
return false;
if (Ability->Cooldown() > 0.0f)
return false;
if (!Ability->HaveEnoughMana(g_GameData.LocalHero->Mana()))
return false;
int AbilityIndex = ((CBaseEntity*)Ability)->EntHandle();
Vector Pos = { 0, 0, 0 };
shit.origPrepareUnitOrders(g_GameData.LocalPlayer, DOTA_UNIT_ORDER_CAST_NO_TARGET, 0, &Pos, AbilityIndex, DOTA_ORDER_ISSUER_SELECTED_UNITS, 0, 0, 1);
return true;
};
bool CastPosition(CDOTABaseAbility* Ability, Vector* Position) {
if (!Ability)
return false;
if (Ability->Level() < 1)
return false;
if (Ability->Cooldown() > 0.0f)
return false;
if (!Ability->HaveEnoughMana(g_GameData.LocalHero->Mana()))
return false;
int AbilityIndex = ((CBaseEntity*)Ability)->EntHandle();
shit.origPrepareUnitOrders(g_GameData.LocalPlayer, DOTA_UNIT_ORDER_CAST_POSITION, 0, Position, AbilityIndex, DOTA_ORDER_ISSUER_PASSED_UNIT_ONLY, g_GameData.LocalHero, 0, 1);
return true;
};
bool CastTarget(CDOTABaseAbility* Ability, CBaseEntity* Target) {
if (!Ability)
return false;
if (Ability->Level() < 1)
return false;
if (Ability->Cooldown() > 0.0f)
return false;
if (!Ability->HaveEnoughMana(g_GameData.LocalHero->Mana()))
return false;
if(!Target->IsTargetable())
return false;
Vector Pos = { 0, 0, 0 };
int AbilityIndex = ((CBaseEntity*)Ability)->EntHandle();
shit.origPrepareUnitOrders(g_GameData.LocalPlayer, DOTA_UNIT_ORDER_CAST_TARGET, Target->EntHandle(), &Pos, AbilityIndex, DOTA_ORDER_ISSUER_SELECTED_UNITS, g_GameData.LocalHero, 0, 1);
return true;
};