Jump to content

reapler

Elite user
  • Posts

    288
  • Joined

  • Last visited

Posts posted by reapler

  1. 43 minutes ago, pookasmight said:

    theres two remedies I can think of. Figuring out if theres a way to create a delay when disrupting the fish cast or taking the player detection out of the bot and having the fightclass pause the fishbot so it doesn't recast. I'm totally clueless on how to do either one of these. 

    So far i understand you, you want to stealth while a player is nearby and doing nothing, til the player goes away to start fishing again?

  2. 55 minutes ago, Findeh said:

    If do understand it right, GetSpellInfo Will return SpellInfo object, that is, according to wManager/wManager.Wow.Class :

    Yes, that's right but with my snippet you get a string from your spell with lua in this case: "Shadow Word: Pain".

     

    I made a simple method:

        public Spell Spell_(string name) => new Spell(name)
        {
            Icon = 
                Lua.LuaDoString<string>(
                    "name, rank, icon, castTime, minRange, maxRange = GetSpellInfo(\"" + name + "\")", "rank")
        };

    This overrides "Icon" to spell's rank. I guess it's not added in vanilla, because it was forgotten as it was backported :)

     

    Usage:

        public void Initialize()
        {
            wManager.Wow.Class.Spell eviscerate = Spell_("Eviscerate");
            robotManager.Helpful.Logging.Write("Get information of spell: " + eviscerate.Name);
            robotManager.Helpful.Logging.Write("Spell rank: "+eviscerate.Icon);//now field ".Icon" returns the rank if you use "public Spell Spell_(string name) => new Spell(name)"
            robotManager.Helpful.Logging.Write("Spell id: "+eviscerate.Id);
        }

     

  3. Hello, @hakancamli WRobot has in in "Quester" product under "Product Settings" on the left pane a button called "Easy profiles creator".

    After you have opened it, click on Tools > Helper Tools. Now you may scroll down and click "Buddy to WRobot".

    It's not guaranteed that the profile will work correctly, since used classes, methods or bot behavior can vary.

     

     

  4. 1 hour ago, Findeh said:

    1) I was not able to find how do i get spell rank (level). For example, i want to count how many damage spell will do, depending on it's rank. To know will it kill the target, or will it not. Am i able to get spell rank somehow, or make it work any other way maybe?

    Logging.Write(Lua.LuaDoString<string>("name, rank, icon, castTime, minRange, maxRange = GetSpellInfo(\"Shadow Word: Pain\")", "rank"));

    Can be used. But i guess you could also need "desc = GetSpellDescription(spellId)" but unfortunately for me it doesn't return any string to parse the damage values.

    1 hour ago, Findeh said:

    2) This will be a wery stupid one. I don't get, how some events works. I'm decompiling wManager with ILSpy. Going to wManager/wMnager.Events/ and can't understand the order they are triggering each other at.
    For example, if i got "internal void BuffRotation()" class inside my FC, will it use it only after the fight, or only during the fight, or maybe it will use it during patrol?

    Ok let's take FightEvents. I linked a fightclass which has "internal void BuffRotation()" on a loop. Once "public void Initialize()" is called from the interface(start bot), it will loop this method till you stop the bot.

    So that means the buffrotation aswell the other methods in your fightclass having no impact / affiliation on "FightEvents".

    The "FightEvents" or the other events in WRobot are triggered from the bot behavior itself (you can imagine like a guy reporting you what he's doing).

    So this "guy" tells you:

         I attack now this npc  = "wManager.Events.FightEvents.OnFightStart"

         While fighting i also report whats going on every ~30ms = "wManager.Events.FightEvents.OnFightLoop"

         the fight is over = "wManager.Events.FightEvents.OnFightEnd"

    This is useful for plugins for example but if you are going to write a fightclass, you wouldn't really need it.

    If you want to write a plugin which uses an item or do other action after a fight end, you could subscribe it like this:

                wManager.Events.FightEvents.OnFightEnd += delegate
                {
                    wManager.Wow.Helpers.SpellManager.CastSpellByIdLUA(8690); //cast hearthstone
                };

     

    1 hour ago, Findeh said:

    But bot will not use "SpellName" anyway because there is no such event where i can place it? Right?

    If you write an plugin you could use your snippet on a loop or by subscribing it to "wManager.Events.MovementEvents.OnMoveToPulse".

    But i guess you are writing a fightclass anyway, so you can put this snippet to buffrotation or directly to while loop:

        internal void BuffRotation()
        {
            if (ObjectManager.Me.IsMounted)
                return;
            //if not mounted cast sprint
            var spelltocast = new Spell("Sprint");
            if (wManager.Wow.Bot.States.ToTown.GoToTownInProgress && spelltocast.IsSpellUsable)
            {
                spelltocast.Launch();
            }
        }

    or directly in while loop:

        internal void Rotation()
        {
    
            Logging.Write("[My fightclass] Is started.");
            while (_isLaunched)
            {
                try
                {
                    if (!Products.InPause)
                    {
                        if (!ObjectManager.Me.IsDeadMe)
                        {
                            BuffRotation();
    
                            var spelltocast = new Spell("Sprint");
                            if (wManager.Wow.Bot.States.ToTown.GoToTownInProgress && spelltocast.IsSpellUsable && !ObjectManager.Me.IsMounted)
                            {
                                spelltocast.Launch();
                            }
    
                            if (Fight.InFight && ObjectManager.Me.Target > 0)
                            {
                                Pull();
                                CombatRotation();
                            }
                        }
                    }
                }
                catch (Exception e)
                {
                    Logging.WriteError("[My fightclass] ERROR: " + e);
                }
    
                Thread.Sleep(10); // Pause 10 ms to reduce the CPU usage.
            }
            Logging.Write("[My fightclass] Is now stopped.");
        }

    So you can see in the end it doesn't really matter. It's just for a better structure & readability.

  5. Welcome @Findeh to WRobot, you can find details & templates about fightclasses here.

    To get a detailed documentation, you can decompile WRobot's libraries here explained.

     

    1 hour ago, Findeh said:

    1) Override Eat function inside the bot. I'd like to force him check an inventory and eat first available food from the list, that is hardcoded inside the FC.

    For this task you could use "wManager.Events.FightEvents.OnFightEnd"

    1 hour ago, Findeh said:

    2) While in combat, check inventory for an item, and if it's available, use it. For example, if bot hp <= 15% && bot got "Healing potion"  then bot use "Healing potion"

    A plugin already exists here

    1 hour ago, Findeh said:

    3) Check target health (not percent, but a number of health that left)

    "wManager.Wow.ObjectManager.ObjectManager.Me.TargetObject.Health" for futures requests you may search in your decompiler by looking for "health" for example

    1 hour ago, Findeh said:

    4) Use some abilityes when bot goes to the vendor (for example use blink or sprint to speed that process) and then use this abilities when bot is going back to the profile.

    Unfortunately no event exists. But you can check it on a loop: "wManager.Wow.Bot.States.ToTown.GoToTownInProgress"

     

  6. Hello @arkhan, i've re-created it:

    
    
        public void ShowConfiguration()
        {
            CustomClass_ShamanSettings.Load();
            CustomClass_ShamanSettings.CurrentSetting.ToForm();
            CustomClass_ShamanSettings.CurrentSetting.Save();
        }
    
    
    
    
    
    	public class CustomClass_ShamanSettings : Settings
        {
            public static CustomClass_ShamanSettings CurrentSetting { get; set; }
            public bool Save()
            {
                try
                {
                    return Save(AdviserFilePathAndName("CustomClass_Shaman", ObjectManager.Me.Name + "." + Usefuls.RealmName));
                }
                catch (Exception e)
                {
                    Logging.WriteError("CustomClass_ShamanSettings > Save(): " + e);
                    return false;
                }
            }
            public static bool Load()
            {
                try
                {
                    if (File.Exists(AdviserFilePathAndName("CustomClass_Shaman", ObjectManager.Me.Name + "." + Usefuls.RealmName)))
                    {
                        CurrentSetting =
                            Load<CustomClass_ShamanSettings>(AdviserFilePathAndName("CustomClass_Shaman",
                                                                         ObjectManager.Me.Name + "." + Usefuls.RealmName));
                        return true;
                    }
                    CurrentSetting = new CustomClass_ShamanSettings
                    {
                        UGW = true,
                        TGW = 4,
                        MGW = 50
                    };
                }
                catch (Exception e)
                {
                    Logging.WriteError("CustomClass_ShamanSettings > Load(): " + e);
                }
                return false;
            }
    
            [Setting]
            [Category("GHOST WOLF SETTINGS")]
            [DisplayName("Ghost Wolf")]
            [Description("Use Ghost Wolf")]
            public bool UGW { get; set; }
    
            [Setting]
            [Category("GHOST WOLF SETTINGS")]
            [DisplayName("Use after X secondes")]
            [Description("Use Ghost Wolf after X secondes out of combat")]
            public int TGW { get; set; }
    
            [Setting]
            [Category("GHOST WOLF SETTINGS")]
            [DisplayName("Mana required")]
            [Description("Use Ghost Wolf only if mana is superior or equal")]
            public int MGW { get; set; }
    
        }

     

  7. @Seminko it's "wManager.Wow.Helpers.Bag.GetContainerNumFreeSlots"  &  "wManager.Wow.ObjectManager.ObjectManager.Me.IsCast"

    If you are looking for more functions you can search in a decompiler(https://wrobot.eu/forums/topic/6103-frost-dk-rotation-help-needed/#comment-27890).

    It's easy to search something for example, searched "cast" as keyword:

    Spoiler

        wManager.Wow.ObjectManager.WoWUnit (7 items)
          BuffCastedBy(string spellName):ulong
          BuffCastedByAll(string spellName):List<ulong>
          CanInterruptCasting:bool
          CastingSpell:Spell
          CastingSpellId:int
          CastingTimeLeft:int
          IsCast:bool
     

     

    Edit: This may differ from expansion to expansion

  8. @iMod I'm glad to hear that you would like to help :)

    The sql related stuff would be very interesting since i tried it for another project to iterate merchants with its offered items, but i also lost the focus on it to figure it out ;)

  9. @Droidz may i ask you, whether it could maybe dangerous to read offset on official server?(i'm not so familiar with warden)

    I'm having offsets to read questid/questname/mouseclick position for 3.3.5a but i have my doubts if it could be detected on official server by memory reading or using cheat engine for example to get offsets.

  10. @arkhan Thank you for your response. I have thought already about this option(was also a reason why i started creating it).

    But it needs a few offsets for each expansion which couldn't be received via lua but it wouldn't be a big problem except for legion.

  11. Hello, if you bot many accounts you can avoid it with using proxy. For each account you create & log in, a seperate address should be used.

    They probably have a system which tracks your ip and looking for other accounts which are linked with it on website use & in-game to find / mark you, if you bot at scale.

    I guess Warmane does also log pretty everything which is useful for them(they have the expertise to do that).

    To trade your gold for example you can split the amount, trade back item & maybe using middleman for a specific amount of transactions in-game if you trade really much.

     

    But with for your current purposes you should be safe if you follow the mentioned tips from @Sundance.

    One thing left to say: if you get reported by players as a bot there's a little chance to not get checked & banned or blacklisted since gms can easily prove you as a bot ;)

     

  12. Hello, i'm currently working on a quest editor because the provided one doesn't fit to my imagination.

    I wanted to add some custom functions like adding transport step, specific npc using and so on.

    It looks like this so far (not fully finished):

    questeditor_gui.JPG.62209e48099c2ba89b7361ff37a453c9.JPG

     

     

    For now i have a few questions of the quests editor window:

    quests_gui.JPG.2fa053e63f77d4b723bad2b9680362b7.JPG

     

    -Is it really needed that the marked area to have more than one questid? if yes an example would be useful

    -Does the name of the quest affect the common quest product?  Here "quest1 - KillAndLoot".  So far i tested it, only the quest id influence it but i'm not sure if some other function will also need the name

     

    If you have also other ideas for the editor, please leave your suggestions here.

     

  13. Yes it also return false(Wotlk+Tbc).

            Logging.Write("ongroundmount: "+MountTask.OnGroundMount());//false
            Logging.Write("ismounted: " + wManager.Wow.ObjectManager.ObjectManager.Me.IsMounted);//true

     

    But the only thing is im confused about the checking lua item spell for the mounts. I guess the ".isMounted" property isn't enough for the task?

    Because in that method it checks whether you are on Mount, if player is mounted it goes checking for lua & i think it could return a wrong value still if the character is on mount.

    For example "SpellManager.HaveBuffLua(wManagerSetting.CurrentSetting.GroundMountName)" could still return a wrong value because Itemname is not the reveived spell from the item.

    I used item "Reins of the Swift Frostsaber" but i got a spell with "Swift Frostsaber" on tbc for example.

     

    I hope thats the bug which leads to this problem hehe

×
×
  • Create New...