Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Solved] Need Pet happiness macro!

Featured Replies

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")

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

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

  • 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

  • 2 months later...

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

  • 4 weeks later...
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

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

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.