Jump to content

iMod

Elite user
  • Posts

    581
  • Joined

  • Last visited

Posts posted by iMod

  1. 24 minutes ago, CocoChanel said:

    If someone could make a 100% working profile converter from Honorbuddy to WRobot, it would be nice aswell.

    Would take more time to convert them than creating them new. Those profiles are a mess. They'r using different xml notes for the same action/thing.

  2. ! negates the actually state of the boolean.

    bool variable = true;

    "!variable" = false
    "variable == !variable" will set allways the opposit of the current state.

    MSDN Sample:

    class MainClass4
    {
        static void Main()
        {
            Console.WriteLine(!true);
            Console.WriteLine(!false);
        }
    }
    /*
    Output:
    False
    True
    */


    I highly recommend to read some C# basics and you will see it makes a lot more fun to work with.

  3. 29 minutes ago, Retardo101 said:

    I have another question maybe you could help with.

    I have thise c sharp code for detecting buffs on myself : wManager.Wow.ObjectManager.ObjectManager.Me.HaveBuff (206476)

    How would that string look if i want to detect an enemy debuff?

    Are you talking about your current target?

    ObjectManager.Me.TargetObject.HaveBuff(1234);

    or targets around you?

    ObjectManager.GetObjectWoWUnit().Any(u => u.HaveBuff(1234));

     

  4. 1 hour ago, christopher.o.harvey said:

    I downloaded the file but have no idea how to implement it into the battle profiles can you give a simple explanation on how to plug the said so code into a class profile

    It is a plugin that you have to copy in the plugin folder. After that you just need to activate the plugin and you can use it with anything.

  5. 49 minutes ago, nikolion said:

    Do you have any actual guide to link me how to convert grinding profiles?
    Thanks for your time

    Kinda easy, just get an existing profile and take a look at it to understand the struncture. Do the same with HB one and now you are able convert the HB profile to a WRobot one. At the end its just XML without any magic as far i remember.

    EDIT: There is also a search button that can help you:wub:

  6. On 30.10.2017 at 9:51 PM, Galvanar said:

    Hallo alle zusammen,

    ich bin neu bei euch und versuche mich gerade in den Bot einzuarbeiten.

    Ich hätte einige Fragen bezüglich meiner Projekte und deren Kompatibilität mit der Bot Logik von WRobot. 

    Falls ein Programmierer von euch Zeit hätte, kann er mir gerne eine PN schreiben und meine Skype Adresse bekommen.

    Ich könnte mit meinen Projekten hier einige nützliche Profile beisteuern, wenn Ihr mich auf WRobot nur etwas einschulen könntet.

    Kenntnisse (LUA) - Fortgeschritten

     

    Liebe Grüße

     

    Galvanar

     

    Versuchen wir es mal anders ;) Schreib mir einfach mal ein paar Fragen und ich schaue ob ich sie dir beantworten kann. Realisieren kannst du eigentlich alles nur ob es sich lohnt die alten Sachen zu benutzen oder etwas neues zu machen ist dann die andere Frage.

  7. On 30.10.2017 at 9:44 PM, Galvanar said:

    Hello everybody,

    im new here and im trying to convert my LUA Fightclasses in the right way to make it work with the Bot Core.

    
    function isFrencyStack5()
        luacode = "francymax = 0; for i=1,40 do local _,_,_,c,_,_,_,_,_,_,s = UnitAura('player',i); if s==19615 and c==5 then francymax = 1 break end end" 
       if  tonumber(WowLuaDoLocalizedString(luacode, 'francymax'))==1 then
           return true
       else
           return false
       end
    end

    How do you guys inject that string code and get a retval to get that function to work?

     

    Greez  Galvanar

    tonumber(WowLuaDoLocalizedString(luacode, 'francymax'))==1 then
    To
    Lua.DoString<int>(luacode, "francymax") == 1 then

    Since you are just looking for a boolean you also could make it like this

    function isFrencyStack5()
        luacode = "francymax = 0; for i=1,40 do local _,_,_,c,_,_,_,_,_,_,s = UnitAura('player',i); if s==19615 and c==5 then francymax = 1 break end end" 
        return Lua.DoString<int>(luacode, "francymax") == 1;
        // Or as bool since its 0 or 1
        return Lua.DoString<bool>(luacode, "francymax");
    end


     

  8. 31 minutes ago, Zephrym said:

     

    3 Year necro but this ever get done? I can't seem to find the API documentation anywhere. All forum posts are temp solutions using ILSpy

    There is no documentation available and wont be i guess.

  9. Abuse the focus as target. Set your focus target by your self and cast the spell at it.

     

            /// <summary>
            /// Sets the target as focus target and executes the given method
            /// </summary>
            /// <param name="action">The method we want to execute</param>
            public static void SetAsFocusTarget(WoWUnit target, Action action)
            {
                if (ObjectManager.Me.FocusGuid != target.Guid)
                {
                    // Hold old target
                    ulong oldFocusTarget = ObjectManager.Me.FocusGuid;
    
                    // Set focus target
                    ObjectManager.Me.FocusGuid = target.Guid;
    
                    // Call action
                    action.Invoke();
    
                    // Set old focus
                    ObjectManager.Me.FocusGuid = oldFocusTarget;
                }
                else
                {
                    // Call action
                    action.Invoke();
                }
            }
                // Dummy unit
                WoWUnit unit = new WoWUnit(1);
                SetAsFocusTarget(unit, () => new Spell("SpellName").Launch(true, true, false, "focus"));

     

  10. 14 minutes ago, Seminko said:

    I tried using StopMoveTo before casting my spell but does not have any effect. As I was saying, once the bot is in combat mode and stops to prepare for fight then it creates the HS but otherwise my log shows it tried creating it but didn't stop.

    
    public bool CreateHealthstone()
            {
                if (ItemsManager.GetItemCountByIdLUA(5512) == 0 && ItemsManager.GetItemCountByIdLUA(19004) == 0 && ItemsManager.GetItemCountByIdLUA(19005) == 0 && !ObjectManager.Me.InCombat)
                {
    				MovementManager.StopMoveTo(false, 500);
    				Logging.WriteDebug("Creating Healthstone");
    				SpellManager.CastSpellByNameLUA("Create Healthstone (Minor)()");
    				Thread.Sleep(Usefuls.Latency + 3500);
    				return false;
                }
                return true;
            }

     

    Give MovementManager.StopMove() a try and double check your return value, false if he was casting looks kinda strange.

  11. 5 hours ago, Apexx said:

    Is there a way to check using C#, if the hunter player even has a pet? I would like to include pet mending, reviving, and calling inside my fight class, but
    if the hunter does not even own a pet yet, how can I bypass the abilities inside the fight class if there is no pet?
     


    I was wondering if I could just check if GUID != 0?

    ObjectManager.Pet.IsValid

    May that helps.

  12. 34 minutes ago, trkman said:

    Hi!

    Loving this bot so far but I have some issues:

    Still dont get how it works with frost nova?

    I tried to add conditions: "Me in Comber" = True & Target Distance SmallerOrEquals = 12

    And its higher up then frost or fireball.

     

    frost nova is a spell that you need to click right? if yes make sure that you set in the setting on terrain or something like this i actually don't know the correct name of the setting

  13. 3 hours ago, sowelu said:

    Can I somehow receive some data from another instance of bot like value of variable in plugin? It would be cool to send a message to another instance.

    Not as far i know. I would create a small tcp/ip server and client to communicate to each other.
    Just take a look at google and search for "C# client server" or "C# chat application" this should bring you up some ideas.

  14. 12 hours ago, sowelu said:

    Found solution

    
    Interact.InteractGameObject(chest.GetBaseAddress);

     

    You should not using the index because if there is no chest you will get a out of range exception.

    // Search for a chest
    List<WoWGameObject> chest = ObjectManager.GetWoWGameObjectByyId(123456).FirstOrDefault();
    
    // Found?
    if(chest != null)
    {
      // Open
      Interact.InteractGameObject(chest.GetBaseAddress);
    }

     

×
×
  • Create New...