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

[Plugin] Hasla Weapon Assistant

Status
Not open for further replies.
How can we set it to loot the mobs. It rolls, it kills, it doesn't loot.
 
How can we set it to loot the mobs. It rolls, it kills, it doesn't loot.

Code:
SetGroupStatus("Farm mobs ON", false);
            SetGroupStatus("Courage (Bow)", false);
            SetGroupStatus("Compassion (Heal)", false);
            SetGroupStatus("Conviction (Staff)", false);
            SetGroupStatus("Fortitude (Shield)", false);
            SetGroupStatus("Honor (1H)", false);
            SetGroupStatus("Loyalty (2H)", false);
            SetGroupStatus("Sacrifice (Lute)", false);

change from false into true for loot
 
yeah..this plugin keep crashing recently..is there we can see the log?
Also I notice that there is a "timer" somewhere in the mod... like it doesn't consistantly go from mob to mob... it like "waits" or something. Can anyone help out with this?
 
i got this error when compiling
hasla.cs(260,2) : error CS1513: } expected

my code is

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

namespace Hasla
{
public class Hasla : Core
{

const double _COMBAT_RANGE = 23;

public static string GetPluginAuthor()
{
return "Karls";
}

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

public static string GetPluginDescription()
{
return "HaslaGrinder: Assisting you for Hasla Weapon Grind";
}

List<Creature> team;
public Creature GetBestNearestMob(Zone zone)
{
try
{

foreach (var obj in getCreatures())
{
if (obj.type == BotTypes.Npc && isAttackable(obj) && (obj.firstHitter == null || obj.firstHitter == me || team.Contains(obj.firstHitter))
&& isAlive(obj) && (zone.ObjInZone(obj) || me.dist(obj) < _COMBAT_RANGE)
&& (hpp(obj) == 100 || obj.aggroTarget == me || team.Contains(obj.aggroTarget)))
{
return obj;
}
}
}
catch { }
return null;
}

public void UseSkillAndWait(string skillName, bool selfTarget = false)
{
if (getSkill(skillName) == null)
return;

while (me.isCasting || me.isGlobalCooldown)
Thread.Sleep(50);

if (skillCooldown(skillName) > 0)
return;

if (!UseSkill(skillName, true, selfTarget))
{
if (me.target != null && GetLastError() == LastError.NoLineOfSight)
{
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);
}
}

while (me.isCasting || me.isGlobalCooldown)
Thread.Sleep(50);
}

public void PlayDead()
{
while (me.isCasting || me.isGlobalCooldown)
Thread.Sleep(50);

UseSkill("Play Dead", false, true);
Thread.Sleep(2000);

while (getAggroMobs().Count == 0 && (mpp() < 95 || hpp() < 95))
Thread.Sleep(100);

MoveForward(true);
Thread.Sleep(250);
MoveForward(false);

Log("Regen done");
}

public void LootThread()
{
try
{
BlockClientDice(true);
while (true)
{
foreach (var item in me.getDiceItems())
{
bool doRoll = false;

if (item.name.EndsWith("Coinpurse") || item.name.StartsWith("Unidentified") || item.id == 29207)
doRoll = true;

else if(item.id == 26056)
doRoll = GetGroupStatus("Conviction (Staff)");

else if (item.id == 26055)
doRoll = GetGroupStatus("Courage (Bow)");

else if (item.id == 35525)
doRoll = GetGroupStatus("Compassion (Heal)");

else if (item.id == 26057)
doRoll = GetGroupStatus("Fortitude (Shield)");

else if (item.id == 26053)
doRoll = GetGroupStatus("Honor (1H)");

else if (item.id == 26054)
doRoll = GetGroupStatus("Loyalty (2H)");

else if (item.id == 26058)
doRoll = GetGroupStatus("Sacrifice (Lute)");

item.Dice(doRoll);
if(doRoll)
Log("Rolling on : " + item.name);
else
Log("Passing on : " + item.name);

Thread.Sleep(500);
}
Thread.Sleep(1000);
}
}
finally
{
BlockClientDice(false);
}
}

public void RefreshTeam()
{
team = new List<Creature>();
foreach (var t in getPartyMembers())
team.Add(t.obj);
}

public void PluginRun()
{
DelAllGroupStatus();
new Task(() => { LootThread(); }).Start();

RoundZone zone = new RoundZone(me.X, me.Y, 40);

SetGroupStatus("Farm mobs ON", false);
SetGroupStatus("Courage (Bow)", false);
SetGroupStatus("Compassion (Heal)", false);
SetGroupStatus("Conviction (Staff)", false);
SetGroupStatus("Fortitude (Shield)", false);
SetGroupStatus("Honor (1H)", false);
SetGroupStatus("Loyalty (2H)", false);
SetGroupStatus("Sacrifice (Lute)", false);

Log("Starting Hasla Assistant");

Creature bestMob = null;
RefreshTeam();

while (true)
{
if (GetGroupStatus("Farm mobs ON") && isAlive())
{
if (GetGroupStatus("Farm mobs ON"))
{
if (getAggroMobs().Count == 0)
{

if (buffTime("Double Recurve (Rank 4)") == 0 && skillCooldown("Double Recurve") == 0)
UseSkillAndWait("Double Recurve", true);

if (((mpp() > 40 && hpp() > 75) || getAggroMobs().Count > 0))
{
bestMob = GetBestNearestMob(zone);
}

if (bestMob != null)
{
try
{
while (bestMob != null && isAlive(bestMob) && isExists(bestMob) && GetGroupStatus("Farm mobs ON") && isAlive())
{
if (bestMob.firstHitter != null && bestMob.firstHitter != me && !team.Contains(bestMob.firstHitter))
{
bestMob = null;
break;
}

if (bestMob.firstHitter == null && getAggroMobs().Count > 0 && bestMob != GetBestNearestMob(zone))
bestMob = GetBestNearestMob(zone);

if (me.target != bestMob)
SetTarget(bestMob);
if (angle(bestMob, me) > 45 && angle(bestMob, me) < 315)
TurnDirectly(bestMob);

var distToMob = me.dist(bestMob);
if (isAlive(bestMob))
{
if (distToMob > _COMBAT_RANGE)
{
ComeTo(me.target, _COMBAT_RANGE - 1);
}
else
{

if (skillCooldown("Endles Arrows") == 0 && hpp(me.target) == 100)
UseSkillAndWait("Endless Arrows");

else if (distToMob <= 20 && hpp(me.target) > 30 && skillCooldown("Drop Back") == 0
&& skillCooldown("Snare") <= 1000 && hpp() < 80)
{
UseSkillAndWait("Snare");
UseSkillAndWait("Drop Back");
}

else
{
UseSkillAndWait("Endless Arrows");
UseSkillAndWait("Endless Arrows");
UseSkillAndWait("Endless Arrows");
}
}
}

Thread.Sleep(10);
}

bestMob = null;
RefreshTeam();
}
catch { }

}
}
}
Thread.Sleep(10);
}
}
}
}



im sorry noob here.
 
Why does this target and attack portals if you're close to that area in Hasla? Its annoying =/
 
so i know you can check what to roll for. that works great. it tags mobs great. everything is good...but it doesnt loot mobs. it doesnt run over to the mob and loot it. it only rools for loot once someone else loots first.
 
What and where do I need to insert in... when I would like to have a small delay for decline or rolling an item?
 
I wanted to put the new version I have on the store, but I don't seem to be able to get access to it at all so I'll finish testing/coding a bit more and release it on the forums (at least a few days, maybe a week or two) if that's still the case when I have it in a good-enough state.

It will have a basic GUI to change settings (stuff the plugins rolls on, combat/grinding range, ignored mobs, ...), some no-setup-all-in-one combat (well at least specs based on Sorc/Witch and Archery/Shadow for the ones that will be tested, rest should still work fine) and combat/looting working independently of each other. I was thinking about a healer mode, but it will probably not make it in the first version.
 
I wanted to put the new version I have on the store, but I don't seem to be able to get access to it at all so I'll finish testing/coding a bit more and release it on the forums (at least a few days, maybe a week or two) if that's still the case when I have it in a good-enough state.

It will have a basic GUI to change settings (stuff the plugins rolls on, combat/grinding range, ignored mobs, ...), some no-setup-all-in-one combat (well at least specs based on Sorc/Witch and Archery/Shadow for the ones that will be tested, rest should still work fine) and combat/looting working independently of each other. I was thinking about a healer mode, but it will probably not make it in the first version.

I thought you gave up on this plugin! Really glad you decided to improve it for us that dont know shit about coding.

I wil gladly beta test it if you ever need someone.

Good luck mate!
 
I thought you gave up on this plugin! Really glad you decided to improve it for us that dont know shit about coding.

I wil gladly beta test it if you ever need someone.

Good luck mate!

It just got bit slower to progress since I pretty much stopped playing ArcheAge. But I still enjoy botting & coding (and dislike leaving unfinished work around), so that one is getting finished for sure!
 
Thanks a ton for this plugin.
I was adapting this for my archer and could not get this to run as part of the same plugin. Would it be possible to add picking items up in case they drop close by?
from IGM
public void Pulse() {
try {
foreach (var obj in getCreatures()) {
if (obj.dropAvailable && me.dist(obj) < 4) PickupAllDrop(obj);
}
} catch {}
 
Does anyone getting this when using other widget?
Mistake in the widget file in xml syntax.
 
I just want to comment, that I LOVE the ability to just have this one and manually grind mobs and at the very least it rolls on the damn tokens for you.
 
I got a problem. When I'm alone without party/raid my char is going to dead mob and loot it. If I add my box to group/raid i just kill/roll but don't loot. Any from 2 chars don't loot. Any ideas?
 
Status
Not open for further replies.
Back
Top