Jump to content

antisnake

Members
  • Posts

    37
  • Joined

  • Last visited

Posts posted by antisnake

  1. 4 minutes ago, The Smokie. said:
    
    if (ObjectManager.Pet.IsDead && !ObjectManager.Me.IsMounted && !ObjectManager.Me.IsDead && CallPet.KnownSpell && CallPet.IsSpellUsable)
            {
                CallPet.Launch();
                Thread.Sleep(Usefuls.Latency + 500);
    		}

    I've edited you're C# with a few code problems. There is a lot of conditions you can use. like i said via discord message. watch @Marsbar Amazing guide on how to make fightclasses. he taught me everything i know from that single video and a lot of trial and error.

    Try disabling all you're wow addons , this might case you to dismount.

    0 addons, it still dismounts me tho ?

  2. 6 hours ago, Marsbar said:

    Ah sorry, I assumed because I saw that massive thread sleep in there. Doing a thread sleep for 14 seconds means your whole fightclass does nothing for that duration!
    I guess just double check the buff the pet receives when you mend it, that !havebuff should stop it from being spammed (it also can't spam it if theres a 14 sec sleep lol).

    Where do you write your code? The call pet you posted ends in { instead of }. Pet.IsValid should work.

    I assume you meant to say you don't understand. Paste your current feed pet function and I'll show you.

    thanks for the help! ran into an issue with the aggro snippet

    [E] 20:47:56 - Compilator Error :
    c:\Users\nickl\AppData\Local\Temp\1rmclwrz\1rmclwrz.0.cs(171,59) : error CS1061: System.Collections.Generic.List<wManager.Wow.ObjectManager.WoWUnit> innehåller inte en definition för Where och det gick inte att hitta någon Where-tilläggsmetod som accepterar ett första argument av typen System.Collections.Generic.List<wManager.Wow.ObjectManager.WoWUnit> (saknas ett using-direktiv eller en sammansättningsreferens?)

    And the feeding macro is below

        public void Feed()	
    	{
    		if (FeedPet.KnownSpell && !Fight.InFight )
    			{
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 1)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 2)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 3)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 4)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 5)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 6)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 7)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 8)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 9)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 10)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 11)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 12)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 13)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 14)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 15)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    						 if (ObjectManager.Pet.IsAlive && !ObjectManager.Me.IsCast && !ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
           					 {
           					     	Lua.LuaDoString("if GetPetHappiness() < 3 then\r\n  CastSpellByName(\"Feed Pet\")\r\n  PickupContainerItem(0, 16)\r\nend  ");
    									Thread.Sleep(400);
           					 }
    			}
    	}

    thanks again for all the help!  

    Also is there a way to call a function to be used only when out of combat? and another when im combat? eg aspects?

  3. 7 hours ago, Marsbar said:

    Lets throw some misconceptions out of the window:

    Yes. It may slow your rotation very slightly(as it says in that post maybe 80ms) but nothing you really want to worry about. Go ahead with your LUA.

    This doesn't make a difference, space or no space, the code does the same thing.

    That code snippet wont work (FoodList & FruitList? also the method FeedByType() isn't even in the snippet) and doesn't have the solution to his problem (using the food after picking it up).

    Also wont make a difference in this case.

    In terms of answers to your questions:
    Mend pet spam - you'll want to add a condition to check if you're currently channeling (mend pet is a channel not a cast), the Usefuls.WaitIsCasting() should also do the trick though.
    Pet feeding - From the looks of it you're using eenys vanilla FC, the lua api changed a bit since vanilla, thats why it doesn't work on wotlk
    Use the UseItem method and it should work eg:

    Serpent & hunters - looks fine to me, should work.
    Pet management - you could do something like the below and add it into the main rotation (untested):
     

    
    internal void PetCombat()
    {
        var aggroUnits = ObjectManager.GetUnitAttackPlayer().Where(x => x.TargetObject == ObjectManager.Me);
        if (aggroUnits.Count() >0)
        {
            ObjectManager.Me.FocusGuid = aggroUnits.First().Guid;
            Lua.RunMacroText("/petattack [@focus]");
        }
    }

     

    Thanks! regarding mend pet, only in vanilla its a channel, in tbc/wrath its a buff you apply to your pet (like renew) so it does not work?

    will report back after testing your suggestions! thanks! 

    edit: i just realised that my call pet is not working and i was wondering if you could help me with that? 

     

            // Call Pet
            if (!ObjectManager.Pet.IsValid && CallPet.KnownSpell)
            {
                CallPet.Launch();
                Thread.Sleep(Usefuls.Latency + 1000);
            {

    it does not seem to work & it gets stuck trying to revive pet, almost as if Pet.IsValid & Pet.IsDead & Pet.IsAlive is broken? i tried out other fightclasses from the forum and same thing. also i fully understand how to add the feeding code ?

    ps also your petcombat snippet returns an error
    [E] 20:47:56 - Compilator Error :
    c:\Users\nickl\AppData\Local\Temp\1rmclwrz\1rmclwrz.0.cs(171,59) : error CS1061: System.Collections.Generic.List<wManager.Wow.ObjectManager.WoWUnit> innehåller inte en definition för Where och det gick inte att hitta någon Where-tilläggsmetod som accepterar ett första argument av typen System.Collections.Generic.List<wManager.Wow.ObjectManager.WoWUnit> (saknas ett using-direktiv eller en sammansättningsreferens?)

  4. 38 minutes ago, The Smokie. said:

    Hello,

    First off using this "Lua.LuaDoString(@"WrathCS.text:SetText(""Buffing Hunter's Mark"")");" is slowing you're rotation down. Reason can be found Here

    2nd with you're mend problem, you need to add a space inbetween <= Here 60 (should fix the problem

    3rd you do not really need to keep using Thread.Sleep(Usefuls.Latency + 14000);, you can use "Usefuls.WaitIsCasting();" its a lot better in my option.

    4th : for feeding you can use code like this

    
    // food list, it will choost whats best food inside you're bags.
    private List<string> FoodList()
      {
        return new List<string>()
        {
          "Tough Jerky",
        };
      }
     
    // choost from the food list
    private void FeedPet()
     {
    if (PetFoodType().Contains("Food type"))
          FeedByType(FruitList());
     }
    
    // feed from list
    FeedPet();
    Thread.Sleep(600);

    5th id try adding "Usefuls.WaitIsCasting();" to mark and sting. 

    make sure to check if you're spelling is correct.

    if you need anymore help join my discord server and id be more then happy to help. Link : ttps://discord.gg/ppm8Ufc

    Thanks for the help with code snippets and finding my missing space! ?

    i was just wondering if you have any templates/ideas of how i can make my pet tank all the mobs so i dont end up dying if my mend pet gains aggro, or is there a way to feign death if x mobs attacking me?

    also regarding the pet feed, it looks like ill need to add all the food manualy right? and can i add it like this?

     

        public void Feed()	
    // food list, it will choost whats best food inside you're bags.
    private List<string> FoodList()
      {
        return new List<string>()
        {
          "Tough Jerky",
        };
      }
     
    // choost from the food list
    private void FeedPet()
     {
    if (PetFoodType().Contains("Food type"))
          FeedByType(FruitList());
     }
    
    // feed from list
    FeedPet();
    Thread.Sleep(600);

     

  5. Hello, im having 4 small issues running 3.3.5 fightclass ive been mixing with on free time.

    it wont stop "spamming" mend pet once the pet drops under 60% hp. and the second issue is the feed pet code does not seem to actually "feed" it to my pet, it does however pick it up from invenentory  but does not actually use the feed pet on it? 

    the third & fourth issue is that my hunters mark & serpent sting wont go off on the target but i cant find an issue, it was working before ?

     

            {
    
            // Call Pet
            if (!ObjectManager.Pet.IsValid && CallPet.KnownSpell)
            {
                CallPet.Launch();
                Thread.Sleep(Usefuls.Latency + 1000);
            {
            // Revive Pet
            if (!ObjectManager.Pet.IsValid || ObjectManager.Pet.IsDead && RevivePet.KnownSpell)
                RevivePet.Launch();
                Thread.Sleep(Usefuls.Latency + 1400);
    
    		if (ObjectManager.Pet.IsAlive && ObjectManager.Pet.IsValid && ObjectManager.Me.IsAlive &&  MendPet.KnownSpell && !ObjectManager.Pet.HaveBuff("Mend Pet") && MendPet.IsDistanceGood && ObjectManager.Pet.HealthPercent <=60)
            {
                MendPet.Launch();
    			Thread.Sleep(Usefuls.Latency + 14000);
                return;
            }
    		
            // Hunters Mark
    		if (HuntersMark.KnownSpell && HuntersMark.IsSpellUsable && HuntersMark.IsDistanceGood && !ObjectManager.Target.HaveBuff("Hunter's Mark"))
            {
                Lua.LuaDoString(@"WrathCS.text:SetText(""Buffing Hunter's Mark"")");
                HuntersMark.Launch();
                return;
            }
            // Serpent Sting
            if (SerpentSting.KnownSpell && SerpentSting.IsSpellUsable && SerpentSting.IsDistanceGood && !ObjectManager.Target.HaveBuff("Serpent Sting"))
            {
                Lua.LuaDoString(@"WrathCSFrame.text:SetText(""Casting Serpent Sting"")");
                SerpentSting.Launch();
                return;
            }
    		

    hopefully anyone can help me out here ? thanks!

    also is there any way to get my pet to attack the units that have aggro on me?

×
×
  • Create New...