July 7, 20178 yr Hello, I need a macro that basically Feed my pet from certain food if it was not happy. And if the pet is happy, it doesn't feed.
July 7, 20178 yr if GetPetHappiness() < 3 then CastSpellByName("Feed Pet") UseItemByName("FoodName") end Haven't tested this. Instead of CastSpellByName and UseItemByName you can also just do RunMacroText("/cast Feed Pet") RunMacroText("/use FoodName")
July 7, 20178 yr Author 8 hours ago, Matenia said: if GetPetHappiness() < 3 then CastSpellByName("Feed Pet") UseItemByName("FoodName") end Haven't tested this. Instead of CastSpellByName and UseItemByName you can also just do RunMacroText("/cast Feed Pet") RunMacroText("/use FoodName") Hello Matenia, I am really noob with this lol. Okay so where do I enter that script? If you can direct me please. I just want to know where to put it in the Wrobot and how to run it. I have the 2nd macro you mentioned, but as level changes, food strength changes. So I want the bot to spam the macro every 2 minutes, and it only feeds when pet is not happy.
July 7, 20178 yr You don't have to spam it every 2 minutes. It will only feed your pet, if its happiness is below the highest level. You can set it anywhere in your fightclass as Lua code. Out of combat, while not moving, of course
July 8, 20178 yr Author On 7/7/2017 at 2:42 PM, Matenia said: You don't have to spam it every 2 minutes. It will only feed your pet, if its happiness is below the highest level. You can set it anywhere in your fightclass as Lua code. Out of combat, while not moving, of course Thank you! I still don't know how to put this if GetPetHappiness() < 3 then CastSpellByName("Feed Pet") UseItemByName("FoodName") end Can you give me basic instructions please? like when I open my fightclass, where do I go, where do I put it? Sorry, but I am new to all of this lol
July 9, 20178 yr Author I figured it out finally! Thank you @Matenia This is super awesome and it works like a charm!
October 11, 20178 yr Hello there, found this really useful! There is this thing ... I am working on Questing profile for hunter which will level automatically to max level and there is constant need to change the food for this character so I looked into API and LUA and made this simple modification if UnitLevel("pet") < 18 then if GetPetHappiness() < 3 then CastSpellByName("Feed Pet") UseItemByName("Tough Jerky") end elseif UnitLevel("pet") > 17 and UnitLevel("pet") < 30 then if GetPetHappiness() < 3 then CastSpellByName("Feed Pet") UseItemByName("Tough Jerky") end else end this is just little example for now... I will probably end up using elseif all the time... I want to ask you whether you could help me and think of better solution. Maybe better looking or more efficient (efficiency > looks). Thanks! I can think of making bot check the pet level only when character levels up? also maybe create functions.... This is my first time playing with LUA
November 7, 20178 yr Good. You could explain where to use the macros. As I read, they are used in fightclass, but I do not know how to put them. You could tell me how to use it or for better, you could upload a FightClass file. Thank you
November 7, 20178 yr what you see written here, coppy that into spell name and scroll down and set it up as LUA script, and thats all, u can alter some more but this is what you need to get it to work
November 8, 20178 yr I have done what you have told me and tries to feed, but it does not give to the food that I have put to it. Something is not working right or I'm doing wrong. I could send a screenshot or upload a FightClass . Thank you
Create an account or sign in to comment