What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Помогите с скриптом.

dimasa

New Member
Joined
Jan 12, 2015
Messages
23
Reaction score
0
Добрый день, проблема с скриптом. Он выполняет все условия, убивает 2-3 мобов, после он выполняет все условия как и раньше, кроме Сгустков пламени, тупо их не использует. Помогите если у кого есть идеи.

using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;

namespace Follower
{
public class LazyRaider : Core
{
public static string GetPluginAuthor()
{
return "nick1988";
}

public static string GetPluginVersion()
{
return "0.4.0";
}

public static string GetPluginDescription()
{
return "LazyRaider for Demonologist";
}
public void UseSkillAndWait(string skillName, bool selfTarget = false)
{
//wait for cooldowns to finish first, before we try to cast skill
while (me.isCasting || me.isGlobalCooldown)
Thread.Sleep(50);
if (!UseSkill(skillName, true, selfTarget))
{
if (me.target != null && GetLastError() == LastError.NoLineOfSight)
{
//No line of sight, try come to target.
if (dist(me.target) <= 5)
ComeTo(me.target, 2);
else if (dist(me.target) <= 10)
ComeTo(me.target, 3);
else if (dist(me.target) < 20)
ComeTo(me.target, 8);
else
ComeTo(me.target, 8);
}
}
//wait for cooldown again, after we start cast skill
while (me.isCasting || me.isGlobalCooldown)
Thread.Sleep(50);
}

public void PluginRun()
{
while (true)
{
while (me.target == null)
// while we have no target, this loop will make the bot do nothing, and he will check back every 50ms, to see if we have a target
{
Thread.Sleep(50);
}

while (me.target != null && isAttackable(me.target))
// once we have a target, and this target is attackable (so its no NPC) the bot will jump into this loop.
// this loops contains the "combat routine"
{
if (angle(me.target, me) > 45 && angle(me.target, me) < 315)
// making sure we are faceing the target. If not, we will turn towards it
{
TurnDirectly(me.target);
}
if (dist(me.target) >= 21)
{
ComeTo(me.target, 19);
}
if (skillCooldown("Имитация смерти") == 0 && hpp(me) <= 15)
// Casting "insulating lens", if its not on cooldown
{
UseSkillAndWait("Имитация смерти");
Log("Used: Имитация смерти - That was close...");
CancelTarget();
Thread.Sleep(6000);
}
if (skillCooldown("Магический щит") == 0)
// Casting "insulating lens", if its not on cooldown
{
UseSkillAndWait("Магический щит", true);
Log("Used: Магический щит - Now immunte to damage for a while");
Thread.Sleep(100);
}
if (skillCooldown("Магический круг") == 0 && dist(me.target) <= 20)
//casting "magic circle", if its not on cooldown and if we are within 20m of the target.
//this way we make sure, that we are in range of the target and won't leave the magic circle and loose the buff.
{
UseSkillAndWait("Магический круг");
Log("Used: Магический круг - Damage boost activated");
Thread.Sleep(100);
}

if (skillCooldown("Ледяная стрела") == 0)
// casting "freezing arrow" if not on cd
{
UseSkillAndWait("Ледяная стрела");
Log("Used: Ледяная стрела");
Thread.Sleep(100);
}
if (skillCooldown("Ледяная стрела") != 0 && hpp(me) > 60)
// if "freezing arrow" is on CD and our HP is above 60%, we use flamebolt
{
for (int i = 0; i < 2; i++)
UseSkillAndWait("Сгустки пламени");
Log("Used: Сгустки пламени - PewPewPew");
}
if (skillCooldown("Ледяная стрела") != 0 && hpp(me) <= 75 && skillCooldown("Сокрушение разума") == 0)
// if "freezing arrow" is on CD and our hp is below 75% we look for the cd of "enervate" if its available we will cast it.
// since eneverate will give us an "+xxx life" on a hit of "Earthen Grip" we will us it as well, to regain some life.
{
UseSkillAndWait("Сокрушение разума");
Thread.Sleep(100);
UseSkillAndWait("Хватка земли");
Thread.Sleep(100);
Log("Used: Сокрушение разума + Хватка земли (Combo) - SelfHeal activated");
}


while (me.target != null && !isAlive(me.target) && me.target.dropAvailable && isAlive())
// we check if we have a target, then check if this target is NOT alive. Then we look if its lootable and finaly whether we are alive or not.
// if all this is true, we will move towards the target and get our loot.
{
if (me.dist(me.target) > 3)
ComeTo(me.target, 1);
PickupAllDrop(me.target);
}

// once we looted the target, and made sure its dead we will clear our target.
if (me.target != null && !isAlive(me.target) && !me.target.dropAvailable)
{
CancelTarget();
}
}
}
}
}
}
}
 
Last edited:
Up! Может кто подсказать, что не так в скрипте? Почему он тупит?
 
попробуй заменить UseSkillAndWait("Сгустки пламени"); на обычное UseSkill("Сгустки пламени");
 
Ответьте на простой вопрос и будет вам счастье.
Что он будет делать когда ХП меньше 60%?
 
Ответьте на простой вопрос и будет вам счастье.
Что он будет делать когда ХП меньше 60%?
Если замораживающая стрела на СД-каст и наш уровень здоровья выше 60%, мы юзаем огненный шар
 
попробуй проверить заходит ли внутрь условия.
if (skillCooldown("Ледяная стрела") != 0 && hpp(me) > 60)
// if "freezing arrow" is on CD and our HP is above 60%, we use flamebolt
{
Log("PewPewPew?? or NO PewPewPew??");
}
и вот это
for (int i = 0; i < 2; i++)
UseSkillAndWait("Сгустки пламени");
выглядит стремно нафиг цикл для 2х итераций? проще уж написать два раза UseSkillAndWait("Сгустки пламени");
 
попробуй проверить заходит ли внутрь условия.
if (skillCooldown("Ледяная стрела") != 0 && hpp(me) > 60)
// if "freezing arrow" is on CD and our HP is above 60%, we use flamebolt
{
Log("PewPewPew?? or NO PewPewPew??");
}
и вот это
for (int i = 0; i < 2; i++)
UseSkillAndWait("Сгустки пламени");
выглядит стремно нафиг цикл для 2х итераций? проще уж написать два раза UseSkillAndWait("Сгустки пламени");


Спасибо, решил проблему! Ток у меня еще проблема появилась, он убивает 10-15 мобо. И перестает брать в таргет и тупо стоит(
 
имхо самый клевый вариант это сбацать 2 плагина: 1й тупо таргетит мобов и следит чтобы не помереть, 2ой скрипт тупо юзает скилы(отхил/атака скилами/бафы и т.п.) причем 2ой скрипт на форуме уже гдето проскакивал в готовом плагине - asist fight или что-то типа того.
 
Гениально. Хорошо, попробую задать вопрос по другому.
Что будет, если уровень здоровья ниже 60, и Сокрушение разума, и Ледяная стрела на кд?

P.s. Я так понимаю, вы вручную мобов выбираете?
 
Last edited:
Гениально. Хорошо, попробую задать вопрос по другому.
Что будет, если уровень здоровья ниже 60, и Сокрушение разума, и Ледяная стрела на кд?

P.s. Я так понимаю, вы вручную мобов выбираете?

не,я уже разобрался))
 
Back
Top