Jump to content

Jasabi

Members
  • Posts

    126
  • Joined

  • Last visited

Posts posted by Jasabi

  1. On 28.5.2017 at 9:01 AM, dirtyjobs said:

     

    the problem is the item id for 5350 is rank 1 conjured water. https://tbc-twinhead.twinstar.cz/?item=5350
     
    the spell 29975 is rank 8 conjured water https://tbc-twinhead.twinstar.cz/?spell=29975

    the correct spell id is 5504 for rank 1 conjured water https://tbc-twinhead.twinstar.cz/?spell=5504

    The below snippet of code will work for rank 1 conjured water. 

     

    
    local count = GetItemCount(5350);
    if (count <= 1)
    {
    	local name = GetSpellInfo(5504);
    	RunMacroText("/cast " .. name) 
    }
    
    
    
    after repeated attempts I couldnt get this code to work either. i ended up using the code Twineye posted above this post.

    Pretty sure GetItemCount isnt in the vanilla api

  2. On 27.6.2017 at 10:19 PM, reapler said:

    @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.

    For private servers you can also go most of the data out of the sql database files. CMangos has them for Vanilla and TBC, Trinity for WotLK etc.

    You would just need to include the correct files and read from them.

  3. 46 minutes ago, karap1234 said:

    wrobot fight is crap in vanilla anyway zzuk v3 with quester will be far superior 

    Anything that can be done in v1/v3 of zzukbot can be done in wRobot. I have developed stuff on zzukbot back in the day and v3 of zuukbot is nothing more than WRobot without any botbases.

    The fight has nothing to do with the engine, it has to do with what you code and how cleverly you manage to set up your fightclass. The only restriction on WRobot is your own creativeness.

  4. Hi,

    I was wondering if there is a way to edit the way the battlegrounder fights?

    Currently it looks seriously botty. It follows the same enemy target FOREVER, until death, even if there are other enemies nearby. It doesnt change targets at all, unless the target dies or you die. 

    Would it be possible to hook an event and change the fight and follow behaviour? Or is there another way?

    thanks

  5. On 25.2.2017 at 11:01 AM, scripterx said:

    There's one thing that triggers me, specially when I bot with melee classes. They pick up a target, sometimes near, sometimes the far-est possible and they are hooked to that target until he dies or you die. This has a "sense" ok, but sometimes I was watching my warrior slowed by mages + rogues + warriors (and massacrated meanwhile) but his priority was catching the warlock 40 yards away, instead of changing target with all the enemies he had in his melee zone. I tried with mouse to force TAB and give him a new target, nothing to do, he re-targets last target and keeps running to him ignoring everything else. Is there an option to make the bot a little bit smarter?

    Did you figure something out for this?

  6. Pathfinding in booty bay is fine, but once in the water the bot cant get out and continues to try to make a path upwards. Even with an offmesh connection on the ramp up it doesnt work. Sometimes it bugs so much the pathfinding starts going with the bot up the coast and then dies infinitely to the pirate mobs that are 40+.

    Anyone know a solution?

  7. 9 hours ago, reapler said:

    ah forget the complicated code, i've found a better way to do it

    for e.g:

    
        public void Initialize()
        {
    	Logging.Write("Plugin started.");
            Thread.Sleep(7000);
            SwitchProduct("Grinder");
        }
    
    
    
        public void Dispose()
        {
        	Logging.Write("Disposed");
        }
    
    
    
        public void Settings()
        {
    	
        }
    
    
    
        public void SwitchProduct(string name)
        {
            if (Products.ProductName != name && Products.IsStarted)
            {
                var t = Task.Run(async delegate
                {
                    await Task.Delay(500);
                    Logging.Write("Switch to " + name);
                    Products.ProductStop();
                    Products.LoadProducts(name);
                    Logging.Write("stop & load product");
                    Thread.Sleep(200);
                    Products.ProductStart();
                    Logging.Write("product start");
                    Thread.Sleep(1500);
                });
                t.Wait();
            }
        }

    I think it's better ;)

    Edit: using System.Threading.Tasks; is also needed

    @reaperl

    as a novice at this, would you say its best to run most plugins as async or on other threads?

×
×
  • Create New...