Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "PluginSDK.h"
- #include <string>
- #include "Extention.h"
- PluginSetup("HelalsDarius")
- IMenu* MainMenu;
- IMenu* ComboMenu;
- IMenu* ComboQset;
- IMenuOption* ComboQ;
- IMenuOption* ComboQAA;
- IMenuOption* ComboQLock;
- IMenuOption* ComboEAA;
- IMenuOption* ComboW;
- IMenuOption* ComboWAA;
- IMenuOption* ComboE;
- IMenu* Rset;
- IMenuOption* ComboR;
- IMenuOption* ComboRcheck;
- IMenu* HarassMenu;
- IMenuOption* HarassQ;
- IMenuOption* HarassW;
- IMenuOption* HarassE;
- IMenuOption* HarassMana;
- IMenu* DrawingMenu;
- IMenuOption* DrawQRange;
- IMenuOption* DrawERange;
- IMenuOption* DrawRRange;
- IMenuOption* DrawDamage;
- IMenuOption* DrawStacks;
- IMenu* FarmMenu;
- IMenuOption* FarmQ;
- IMenuOption* FarmQL;
- IMenuOption* FarmW;
- IMenuOption* FarmMana;
- IMenu* KillstealMenu;
- IMenuOption* KSQ;
- IMenuOption* KSR;
- IMenuOption* KSRCheck;
- IMenu* LastMenu;
- IMenuOption* LastQ;
- IMenuOption* LastW;
- IMenu* MiscMenu;
- IMenuOption* InterruptE;
- IMenuOption* AntiGapE;
- ISpell2* Q;
- ISpell2* W;
- ISpell2* E;
- ISpell2* R;
- ISpell* Flash;
- IUnit* Qring;
- IUnit* Player;
- int xOffset = 10;
- int yOffset = 20;
- int Width = 103;
- int Height = 8;
- Vec4 Color = Vec4(105, 198, 5, 255);
- Vec4 FillColor = Vec4(198, 176, 5, 255);
- Vec4 Color2 = Vec4(25, 255, 0, 200);
- void LoadSpells()
- {
- Q = GPluginSDK->CreateSpell2(kSlotQ, kCircleCast, false, false, (kCollidesWithNothing));
- Q->SetSkillshot(0.f, 425.f, 1000.f, 440.f);
- W = GPluginSDK->CreateSpell2(kSlotW, kTargetCast, false, false, (kCollidesWithNothing));
- W->SetOverrideRange(300);
- E = GPluginSDK->CreateSpell2(kSlotE, kConeCast, false, false, (kCollidesWithNothing));
- E->SetSkillshot(0.25f, 80.f, 1000.f, 520.f);
- R = GPluginSDK->CreateSpell2(kSlotR, kTargetCast, false, false, (kCollidesWithNothing));
- }
- void Menu()
- {
- MainMenu = GPluginSDK->AddMenu("Helalsmoney x Kornis Darius");
- ComboMenu = MainMenu->AddMenu("Combo");
- {
- ComboQset = ComboMenu->AddMenu("Q Settings");
- ComboQ = ComboQset->CheckBox("Use Q", true);
- ComboQLock = ComboQset->CheckBox("Use Q Outside Lock", false);
- ComboQAA = ComboQset->CheckBox("Dont Q if in AA Range", false);
- ComboW = ComboMenu->CheckBox("Use W", true);
- ComboWAA = ComboMenu->CheckBox("^- Only for AA Reset", true);
- ComboE = ComboMenu->CheckBox("Use E", true);
- ComboEAA = ComboMenu->CheckBox("^- Only if out of AA Range", true);
- Rset = ComboMenu->AddMenu("R Settings");
- ComboR = Rset->CheckBox("Use R", true);
- ComboRcheck = Rset->AddFloat("Dont waste R if Enemy HP lower than", 0, 500, 50);
- }
- HarassMenu = MainMenu->AddMenu("Harass");
- {
- HarassMana = HarassMenu->AddInteger("Mana Percent for Harass", 10, 100, 50);
- HarassQ = HarassMenu->CheckBox("Use Q", true);
- HarassW = HarassMenu->CheckBox("Use W", true);
- HarassE = HarassMenu->CheckBox("Use E", true);
- }
- DrawingMenu = MainMenu->AddMenu("Drawings");
- {
- DrawQRange = DrawingMenu->CheckBox("Draw Q Range", true);
- DrawERange = DrawingMenu->CheckBox("Draw E Range", true);
- DrawRRange = DrawingMenu->CheckBox("Draw R Range", true);
- DrawDamage = DrawingMenu->CheckBox("Draw R Damage", true);
- DrawStacks = DrawingMenu->CheckBox("Draw Stack Count", true);
- }
- KillstealMenu = MainMenu->AddMenu("Killsteal");
- {
- KSQ = KillstealMenu->CheckBox("Killsteal with Q", true);
- KSR = KillstealMenu->CheckBox("Killsteal with R", true);
- KSRCheck = KillstealMenu->AddFloat("^- Dont waste R if Enemy HP lower than", 0, 500, 100);
- }
- FarmMenu = MainMenu->AddMenu("Farming");
- {
- FarmMana = FarmMenu->AddInteger("Mana Percent for LaneClear", 10, 100, 50);
- FarmQ = FarmMenu->CheckBox("Clear with Q", true);
- FarmQL = FarmMenu->AddFloat("^- if Hits", 1, 6, 3);
- FarmW = FarmMenu->CheckBox("Clear with W", true);
- }
- MiscMenu = MainMenu->AddMenu("Misc.");
- {
- InterruptE = MiscMenu->CheckBox("Interrupt with E", true);
- AntiGapE = MiscMenu->CheckBox("AntiGap with E", true);
- }
- LastMenu = MainMenu->AddMenu("Last Hit");
- {
- LastW = LastMenu->CheckBox("Last hit W", true);
- }
- }
- static double RDamage(IUnit* target)
- {
- if (target == nullptr || !R->IsReady() || target->IsDead() || !target->IsValidTarget() || target->HasBuffOfType(BUFF_SpellShield) || target->HasBuffOfType(BUFF_SpellImmunity))
- return 0;
- int stuff = 0;
- int stuff1 = 0;
- if (GEntityList->Player()->GetSpellLevel(kSlotR) == 1)
- {
- stuff1 = (100 + GEntityList->Player()->BonusDamage() * 0.75);
- for (auto Source : GEntityList->GetAllUnits())
- {
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_01.troy"))
- {
- stuff = (100 + GEntityList->Player()->BonusDamage() * 0.75) * 0.2;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_02.troy"))
- {
- stuff = (100 + GEntityList->Player()->BonusDamage() * 0.75) * 0.4;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_03.troy"))
- {
- stuff = (100 + GEntityList->Player()->BonusDamage() * 0.75) * 0.6;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_04.troy"))
- {
- stuff = (100 + GEntityList->Player()->BonusDamage() * 0.75) * 0.8;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_05.troy"))
- {
- stuff = (100 + GEntityList->Player()->BonusDamage() * 0.75);
- }
- }
- }
- if (GEntityList->Player()->GetSpellLevel(kSlotR) == 2)
- {
- stuff1 = (200 + GEntityList->Player()->BonusDamage() * 0.75);
- for (auto Source : GEntityList->GetAllUnits())
- {
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_01.troy"))
- {
- stuff = (200 + GEntityList->Player()->BonusDamage() * 0.75) * 0.2;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_02.troy"))
- {
- stuff = (200 + GEntityList->Player()->BonusDamage() * 0.75) * 0.4;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_03.troy"))
- {
- stuff = (200 + GEntityList->Player()->BonusDamage() * 0.75) * 0.6;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_04.troy"))
- {
- stuff = (200 + GEntityList->Player()->BonusDamage() * 0.75) * 0.8;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_05.troy"))
- {
- stuff = (200 + GEntityList->Player()->BonusDamage() * 0.75);
- }
- }
- }
- if (GEntityList->Player()->GetSpellLevel(kSlotR) == 3)
- {
- stuff1 = (300 + GEntityList->Player()->BonusDamage() * 0.75);
- for (auto Source : GEntityList->GetAllUnits())
- {
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_01.troy"))
- {
- stuff = (300 + GEntityList->Player()->BonusDamage() * 0.75) * 0.2;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_02.troy"))
- {
- stuff = (300 + GEntityList->Player()->BonusDamage() * 0.75) * 0.4 ;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_03.troy"))
- {
- stuff = (300 + GEntityList->Player()->BonusDamage() * 0.75) * 0.6 ;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_04.troy"))
- {
- stuff = (300 + GEntityList->Player()->BonusDamage() * 0.75) * 0.8;
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_05.troy"))
- {
- stuff = (300 + GEntityList->Player()->BonusDamage() * 0.75);
- }
- }
- }
- auto calc = stuff + stuff1;
- auto damage = GDamage->CalcPhysicalDamage(GEntityList->Player(), target, calc);
- return calc;
- }
- static double QDamage(IUnit* target)
- {
- if ((GEntityList->Player()->GetPosition() - target->GetPosition()).Length2D() > 300 && (GEntityList->Player()->GetPosition() - target->GetPosition()).Length2D() < Q->Range())
- {
- int helal = 0;
- if (GEntityList->Player()->GetSpellLevel(kSlotQ) == 1)
- {
- helal = 40 + GEntityList->Player()->TotalPhysicalDamage() * 1;
- }
- if (GEntityList->Player()->GetSpellLevel(kSlotQ) == 2)
- {
- helal = 70 + GEntityList->Player()->TotalPhysicalDamage() * 1.10;
- }
- if (GEntityList->Player()->GetSpellLevel(kSlotQ) == 3)
- {
- helal = 100 + GEntityList->Player()->TotalPhysicalDamage() * 1.20;
- }
- if (GEntityList->Player()->GetSpellLevel(kSlotQ) == 4)
- {
- helal = 130 + GEntityList->Player()->TotalPhysicalDamage() * 1.30;
- }
- if (GEntityList->Player()->GetSpellLevel(kSlotQ) == 5)
- {
- helal = 160 + GEntityList->Player()->TotalPhysicalDamage() * 1.40;
- }
- auto calc = helal;
- auto damage = GDamage->CalcPhysicalDamage(GEntityList->Player(), target, calc);
- return damage;
- }
- if ((GEntityList->Player()->GetPosition() - target->GetPosition()).Length2D() < 300)
- {
- int helal = 0;
- if (GEntityList->Player()->GetSpellLevel(kSlotQ) == 1)
- {
- helal = 40 + GEntityList->Player()->TotalPhysicalDamage() * 1;
- }
- if (GEntityList->Player()->GetSpellLevel(kSlotQ) == 2)
- {
- helal = 70 + GEntityList->Player()->TotalPhysicalDamage() * 1.10;
- }
- if (GEntityList->Player()->GetSpellLevel(kSlotQ) == 3)
- {
- helal = 100 + GEntityList->Player()->TotalPhysicalDamage() * 1.20;
- }
- if (GEntityList->Player()->GetSpellLevel(kSlotQ) == 4)
- {
- helal = 130 + GEntityList->Player()->TotalPhysicalDamage() * 1.30;
- }
- if (GEntityList->Player()->GetSpellLevel(kSlotQ) == 5)
- {
- helal = 160 + GEntityList->Player()->TotalPhysicalDamage() * 1.40;
- }
- auto calc = helal * 0.35;
- auto damage = GDamage->CalcPhysicalDamage(GEntityList->Player(), target, calc);
- return damage;
- }
- }
- void dmgdraw()
- {
- for (auto hero : GEntityList->GetAllHeros(false, true))
- {
- Vec2 barPos = Vec2();
- if (hero->GetHPBarPosition(barPos) && !hero->IsDead())
- {
- auto RDamages = 0;
- if (GEntityList->Player()->GetSpellBook()->GetLevel(kSlotR) > 0)
- {
- RDamages = RDamage(hero);
- }
- auto damage = RDamages;
- float percentHealthAfterDamage = max(0, hero->GetHealth() - float(damage)) / hero->GetMaxHealth();
- float yPos = barPos.y + yOffset;
- float xPosDamage = (barPos.x + xOffset) + Width * percentHealthAfterDamage;
- float xPosCurrentHp = barPos.x + xOffset + Width * (hero->GetHealth() / hero->GetMaxHealth());
- if (!hero->IsDead() && hero->IsValidTarget())
- {
- float differenceInHP = xPosCurrentHp - xPosDamage;
- float pos1 = barPos.x + 9 + (107 * percentHealthAfterDamage);
- for (int i = 0; i < differenceInHP; i++)
- {
- if (damage < hero->GetHealth())
- {
- GRender->DrawLine(Vec2(pos1 + i, yPos), Vec2(pos1 + i, yPos + Height), FillColor);
- }
- if (damage > hero->GetHealth())
- {
- GRender->DrawLine(Vec2(pos1 + i, yPos), Vec2(pos1 + i, yPos + Height), Color2);
- }
- }
- if (!hero->IsVisible())
- {
- }
- }
- }
- }
- }
- static void OnCreateObject(IUnit* Source)
- {
- if (strstr(Source->GetObjectName(), "Darius_Base_Q_Ring.troy"))
- {
- Qring = Source;
- }
- }
- static void OnDeleteObject(IUnit* Source)
- {
- if (strstr(Source->GetObjectName(), "Darius_Base_Q_Ring_Windup.troy"))
- {
- Qring = nullptr;
- }
- }
- void Qaa()
- {
- if (GEntityList->Player()->HasBuff("dariusqcast"))
- {
- GOrbwalking->SetAttacksAllowed(false);
- }
- else GOrbwalking->SetAttacksAllowed(true);
- }
- void QLock()
- {
- if (ComboQLock->Enabled())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, Q->Range());
- if (target != nullptr && target->IsValidTarget(GEntityList->Player(), Q->Range()) && target->IsHero() && !target->IsDead())
- {
- if ((target->GetPosition() - GEntityList->Player()->GetPosition()).Length2D() < 300)
- {
- if (Qring != nullptr)
- {
- GOrbwalking->SetOverridePosition(target->GetPosition().Extend(GEntityList->Player()->GetPosition(), 350.f));
- }
- }
- else GOrbwalking->SetOverridePosition(Vec3(0, 0, 0));
- }
- }
- if (Qring == nullptr)
- {
- GOrbwalking->SetOverridePosition(Vec3(0, 0, 0));
- }
- }
- void Combo()
- {
- {
- if (ComboW->Enabled() && W->IsReady() && !ComboWAA->Enabled())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, W->Range());
- if (target != nullptr && target->IsValidTarget() && !target->IsDead())
- {
- W->CastOnPlayer();
- }
- }
- if (ComboQ->Enabled() && Q->IsReady())
- {
- if (ComboQAA->Enabled())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, Q->Range());
- if (target != nullptr && target->IsValidTarget() && !target->IsDead())
- {
- if ((target->GetPosition() - GEntityList->Player()->GetPosition()).Length2D() > 300)
- {
- Q->CastOnPlayer();
- }
- }
- }
- if (!ComboQAA->Enabled())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, Q->Range());
- if (target != nullptr && target->IsValidTarget() && !target->IsDead())
- {
- Q->CastOnPlayer();
- }
- }
- }
- if (ComboE->Enabled() && E->IsReady())
- {
- if (ComboEAA->Enabled())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, E->Range());
- if (target != nullptr && target->IsValidTarget() && !target->IsDead())
- {
- if ((target->GetPosition() - GEntityList->Player()->GetPosition()).Length2D() > 300)
- {
- E->CastOnTarget(target);
- }
- }
- }
- if (!ComboEAA->Enabled())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, E->Range());
- if (target != nullptr && target->IsValidTarget() && !target->IsDead())
- {
- E->CastOnTarget(target);
- }
- }
- }
- if (ComboR->Enabled() && R->IsReady())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, R->Range());
- if (target != nullptr && target->IsValidTarget() && !target->IsDead())
- {
- if ((RDamage(target) >= target->GetHealth() && target->GetHealth() > ComboRcheck->GetFloat()))
- {
- R->CastOnTarget(target);
- }
- }
- }
- }
- }
- void LastHit()
- {
- for (auto Minion : GEntityList->GetAllMinions(false, true, true))
- {
- if (!Minion->IsDead() && Minion != nullptr)
- {
- auto wdmg = GEntityList->Player()->TotalPhysicalDamage() + GEntityList->Player()->TotalPhysicalDamage() * 0.4;
- auto calc = GDamage->CalcPhysicalDamage(GEntityList->Player(), Minion, wdmg);
- if (LastW->Enabled() && W->IsReady() && Minion->IsValidTarget(GEntityList->Player(), W->Range()) && calc >= Minion->GetHealth())
- {
- if (W->CastOnPlayer())
- {
- GOrbwalking->SetOverrideTarget(Minion);
- }
- }
- }
- }
- }
- void Killsteal()
- {
- for (auto Enemy : GEntityList->GetAllHeros(false, true))
- {
- if (Enemy != nullptr && !Enemy->IsDead())
- {
- if (KSQ->Enabled() && Q->IsReady() && QDamage(Enemy) > Enemy->GetHealth() && Enemy->IsValidTarget(GEntityList->Player(), Q->Range()))
- {
- Q->CastOnTarget(Enemy);
- }
- if (KSR->Enabled() && R->IsReady() && Enemy->IsValidTarget(GEntityList->Player(), R->Range()) && RDamage(Enemy) > Enemy->GetHealth())
- {
- if (Enemy->GetHealth() > KSRCheck->GetFloat())
- {
- R->CastOnTarget(Enemy);
- }
- }
- }
- }
- }
- PLUGIN_EVENT(void) OnInterruptible(InterruptibleSpell const& Args)
- {
- if (Args.Source != nullptr && InterruptE->Enabled() && (Args.Source->GetPosition() - GEntityList->Player()->GetPosition()).Length() < E->Range() && E->IsReady() && Args.Source->IsValidTarget())
- {
- E->CastOnTarget(Args.Source);
- }
- }
- PLUGIN_EVENT(void) OnGapCloser(GapCloserSpell const& Args)
- {
- if (Args.Source != nullptr && Args.Source != GEntityList->Player()
- && Args.Source->IsEnemy(GEntityList->Player())
- && AntiGapE->Enabled() && E->IsReady())
- {
- if ((Args.EndPosition - GEntityList->Player()->GetPosition()).Length() < E->Range())
- {
- E->CastOnTarget(Args.Source);
- }
- }
- }
- void Mixed()
- {
- if (Player->ManaPercent() > HarassMana->GetInteger())
- {
- if (HarassQ->Enabled() && Q->IsReady())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, Q->Range());
- if (target != nullptr && target->IsValidTarget() && !target->IsDead())
- {
- Q->CastOnTarget(target);
- }
- }
- if (HarassW->Enabled() && W->IsReady())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, W->Range());
- if (target != nullptr && target->IsValidTarget() && !target->IsDead())
- {
- W->CastOnPlayer();
- }
- }
- if (HarassE->Enabled() && E->IsReady())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, E->Range());
- if (target != nullptr && target->IsValidTarget() && !target->IsDead())
- {
- E->CastOnTarget(target);
- }
- }
- }
- }
- static int GetMinionsQ(float range)
- {
- auto minions = GEntityList->GetAllMinions(false, true, false);
- auto minionsInRange = 0;
- for (auto minion : minions)
- {
- if (minion != nullptr && minion->IsValidTarget() && minion->IsEnemy(GEntityList->Player()) && !minion->IsDead())
- {
- auto minionDistance = (minion->GetPosition() - GEntityList->Player()->GetPosition()).Length2D();
- if (minionDistance < range)
- {
- minionsInRange++;
- }
- }
- }
- return minionsInRange;
- }
- void Farm()
- {
- if (Player->ManaPercent() > FarmMana->GetInteger())
- {
- for (auto Minion : GEntityList->GetAllMinions(false, true, true))
- {
- if (Minion->IsEnemy(GEntityList->Player()) && !Minion->IsDead() && Minion->IsValidTarget() && (Minion->IsCreep() || Minion->IsJungleCreep()))
- {
- if (GetMinionsQ(Q->Range()) >= FarmQL->GetFloat())
- {
- if (FarmQ->Enabled() && Q->IsReady() && Minion->IsValidTarget(GEntityList->Player(), Q->Range()))
- {
- Q->CastOnTarget(Minion);
- }
- }
- if (FarmW->Enabled() && W->IsReady() && Minion->IsValidTarget(GEntityList->Player(), W->Range()))
- {
- W->CastOnPlayer();
- }
- }
- }
- }
- }
- PLUGIN_EVENT(void) OnAfterAttack(IUnit* source, IUnit* target)
- {
- if (source != Player || target == nullptr || !target->IsHero())
- return;
- switch (GOrbwalking->GetOrbwalkingMode())
- {
- case kModeCombo:
- for (auto hero : GEntityList->GetAllHeros(false, true)) {
- if (ComboWAA->Enabled() && W->IsReady() && (hero->GetPosition() - GEntityList->Player()->GetPosition()).Length() < 300)
- {
- W->CastOnPlayer();
- }
- }
- break;
- }
- }
- PLUGIN_EVENT(void) OnGameUpdate()
- {
- Qaa();
- if (GOrbwalking->GetOrbwalkingMode() == kModeCombo)
- {
- Combo();
- QLock();
- }
- if (GOrbwalking->GetOrbwalkingMode() == kModeLaneClear)
- {
- Farm();
- }
- if (GOrbwalking->GetOrbwalkingMode() == kModeLastHit)
- {
- LastHit();
- }
- if (GOrbwalking->GetOrbwalkingMode() == kModeMixed)
- {
- Mixed();
- }
- Killsteal();
- }
- PLUGIN_EVENT(void) OnRender()
- {
- if (DrawQRange->Enabled()) { GPluginSDK->GetRenderer()->DrawOutlinedCircle(GEntityList->Player()->GetPosition(), Vec4(145, 255, 255, 255), Q->Range()); }
- if (DrawRRange->Enabled()) { GPluginSDK->GetRenderer()->DrawOutlinedCircle(GEntityList->Player()->GetPosition(), Vec4(255, 255, 0, 255), R->Range()); }
- if (DrawERange->Enabled()) { GPluginSDK->GetRenderer()->DrawOutlinedCircle(GEntityList->Player()->GetPosition(), Vec4(255, 255, 0, 255), E->Range()); }
- if (DrawDamage->Enabled())
- {
- dmgdraw();
- }
- if (DrawStacks->Enabled())
- {
- auto target = GTargetSelector->FindTarget(QuickestKill, PhysicalDamage, 1000);
- for (auto Source : GEntityList->GetAllUnits())
- {
- if (target != nullptr && target->IsValidTarget() && !target->IsDead())
- {
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_01.troy"))
- {
- static IFont* pFont = nullptr;
- if (pFont == nullptr)
- {
- pFont = GRender->CreateFont("Arial", 20.f, kFontWeightBold);
- pFont->SetOutline(true);
- pFont->SetLocationFlags(kFontLocationCenter);
- }
- Vec2 pos;
- if (GGame->Projection(target->GetPosition(), &pos))
- {
- std::string text = std::string("Stacks: 1");
- Vec4 clr = Vec4(188, 255, 50, 255);
- pFont->SetColor(clr);
- pFont->Render(pos.x + 10, pos.y - 100, text.c_str());
- }
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_02.troy"))
- {
- static IFont* pFont = nullptr;
- if (pFont == nullptr)
- {
- pFont = GRender->CreateFont("Arial", 20.f, kFontWeightBold);
- pFont->SetOutline(true);
- pFont->SetLocationFlags(kFontLocationCenter);
- }
- Vec2 pos;
- if (GGame->Projection(target->GetPosition(), &pos))
- {
- std::string text = std::string("Stacks: 2");
- Vec4 clr = Vec4(188, 255, 50, 255);
- pFont->SetColor(clr);
- pFont->Render(pos.x + 10, pos.y - 100, text.c_str());
- }
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_03.troy"))
- {
- static IFont* pFont = nullptr;
- if (pFont == nullptr)
- {
- pFont = GRender->CreateFont("Arial", 20.f, kFontWeightBold);
- pFont->SetOutline(true);
- pFont->SetLocationFlags(kFontLocationCenter);
- }
- Vec2 pos;
- if (GGame->Projection(target->GetPosition(), &pos))
- {
- std::string text = std::string("Stacks: 3");
- Vec4 clr = Vec4(188, 255, 50, 255);
- pFont->SetColor(clr);
- pFont->Render(pos.x + 10, pos.y - 100, text.c_str());
- }
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_04.troy"))
- {
- static IFont* pFont = nullptr;
- if (pFont == nullptr)
- {
- pFont = GRender->CreateFont("Arial", 20.f, kFontWeightBold);
- pFont->SetOutline(true);
- pFont->SetLocationFlags(kFontLocationCenter);
- }
- Vec2 pos;
- if (GGame->Projection(target->GetPosition(), &pos))
- {
- std::string text = std::string("Stacks: 4");
- Vec4 clr = Vec4(188, 255, 50, 255);
- pFont->SetColor(clr);
- pFont->Render(pos.x + 10, pos.y - 100, text.c_str());
- }
- }
- if (Distance(Source->GetPosition(), target->GetPosition()) <= 10 && Equals(Source->GetObjectName(), "darius_Base_hemo_counter_05.troy"))
- {
- static IFont* pFont = nullptr;
- if (pFont == nullptr)
- {
- pFont = GRender->CreateFont("Arial", 20.f, kFontWeightBold);
- pFont->SetOutline(true);
- pFont->SetLocationFlags(kFontLocationCenter);
- }
- Vec2 pos;
- if (GGame->Projection(target->GetPosition(), &pos))
- {
- std::string text = std::string("Stacks: 5");
- Vec4 clr = Vec4(188, 255, 50, 255);
- pFont->SetColor(clr);
- pFont->Render(pos.x + 10, pos.y - 100, text.c_str());
- }
- }
- }
- }
- }
- }
- PLUGIN_API void OnLoad(IPluginSDK* PluginSDK)
- {
- PluginSDKSetup(PluginSDK);
- Menu();
- LoadSpells();
- Player = GEntityList->Player();
- GEventManager->AddEventHandler(kEventOnGameUpdate, OnGameUpdate);
- GEventManager->AddEventHandler(kEventOnRender, OnRender);
- GEventManager->AddEventHandler(kEventOrbwalkAfterAttack, OnAfterAttack);
- GEventManager->AddEventHandler(kEventOnInterruptible, OnInterruptible);
- GEventManager->AddEventHandler(kEventOnGapCloser, OnGapCloser);
- GEventManager->AddEventHandler(kEventOnCreateObject, OnCreateObject);
- GEventManager->AddEventHandler(kEventOnDestroyObject, OnDeleteObject);
- if (strcmp(Player->ChampionName(), "Darius") == 0) {
- GGame->PrintChat("<b><font color=\"#FFFFFF\">Darius v1.1<b><font color=\"#f8a101\"> by</font></b> Helalmoney x Kornis<font color=\"#01DF01\"> - Loaded</font></b>");
- }
- else {
- GRender->NotificationEx(Vec4(255, 0, 0, 200), 2, true, true, "Darius unloaded. You dont play the Champion!");
- }
- }
- PLUGIN_API void OnUnload()
- {
- MainMenu->Remove();
- GEventManager->RemoveEventHandler(kEventOnGameUpdate, OnGameUpdate);
- GEventManager->RemoveEventHandler(kEventOnRender, OnRender);
- GEventManager->RemoveEventHandler(kEventOrbwalkAfterAttack, OnAfterAttack);
- GEventManager->RemoveEventHandler(kEventOnInterruptible, OnInterruptible);
- GEventManager->RemoveEventHandler(kEventOnGapCloser, OnGapCloser);
- GEventManager->RemoveEventHandler(kEventOnCreateObject, OnCreateObject);
- GEventManager->RemoveEventHandler(kEventOnDestroyObject, OnDeleteObject);
- GGame->PrintChat("<b><font color=\"#FFFFFF\">Darius<b> <font color=\"#FF0000\"> - Unloaded</font></b>");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement