Photogenic 24 Posted July 7, 2017 Share Posted July 7, 2017 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. Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/ Share on other sites More sharing options...
Matenia 630 Posted July 7, 2017 Share Posted July 7, 2017 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") stweily 1 Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-28946 Share on other sites More sharing options...
Photogenic 24 Posted July 7, 2017 Author Share Posted July 7, 2017 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. Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-28958 Share on other sites More sharing options...
Matenia 630 Posted July 7, 2017 Share Posted July 7, 2017 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 Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-28959 Share on other sites More sharing options...
Photogenic 24 Posted July 8, 2017 Author Share Posted July 8, 2017 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 Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-28994 Share on other sites More sharing options...
Photogenic 24 Posted July 9, 2017 Author Share Posted July 9, 2017 I figured it out finally! Thank you @Matenia This is super awesome and it works like a charm! Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-29051 Share on other sites More sharing options...
mael 1 Posted October 11, 2017 Share Posted October 11, 2017 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 Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-33433 Share on other sites More sharing options...
Hatmud 7 Posted November 7, 2017 Share Posted November 7, 2017 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 Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-34646 Share on other sites More sharing options...
mael 1 Posted November 7, 2017 Share Posted November 7, 2017 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 Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-34670 Share on other sites More sharing options...
Hatmud 7 Posted November 8, 2017 Share Posted November 8, 2017 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 Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-34697 Share on other sites More sharing options...
mael 1 Posted November 8, 2017 Share Posted November 8, 2017 upload the fightclass Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-34700 Share on other sites More sharing options...
Hatmud 7 Posted November 8, 2017 Share Posted November 8, 2017 Mael. You upload the fightclass ? Link to comment https://wrobot.eu/forums/topic/6397-solved-need-pet-happiness-macro/#findComment-34713 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now