Warden pet class

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Warden pet class

#81 Post by rock5 » Thu Mar 08, 2012 11:05 pm

lisa wrote:Seems an ID changed in one of the little tiny patches we have been having because it used to work as I tested all of the buffs myself.
I avoided this problem with regular skills by getting the names of the ids and comparing the names. That way if the id changes, as long as the name remains the same, it will still work. You should probably do the same with the pet skills. Wouldn't be too difficult.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Warden pet class

#82 Post by lisa » Fri Mar 09, 2012 1:10 am

but wouldn't the name be different for each language?

I'll have to have a look at your code to see how you did it. Might have some time next week.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

abron1
Posts: 162
Joined: Wed Feb 22, 2012 12:43 am

Re: Warden pet class

#83 Post by abron1 » Fri Mar 09, 2012 2:56 am

ok thanks ill try that...

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Warden pet class

#84 Post by rock5 » Fri Mar 09, 2012 3:58 am

lisa wrote:but wouldn't the name be different for each language?
You still save ids but compare their names instead of the ids.

Eg. instead of

Code: Select all

	if pet.Id ~= fairy.PetId then -- Fairy
you could use

Code: Select all

	if pet.Name ~= fairy.Name then -- Fairy
instead of

Code: Select all

	if buffid == HavePetBuff then
you could use

Code: Select all

	if GetIdName(buffid) == GetIdName(HavePetBuff) then
The only problem I see is you are using english strings "spirit", "heart", "nature" and "walker".
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Warden pet class

#85 Post by lisa » Fri Mar 09, 2012 9:30 am

hmmm I don't see how doing that will allow for Id changes.

In this example the skill went from Id 493346 to 491668

The part of the code that is failing is in classes/skill.lua

Code: Select all

if player.Class1 == CLASS_WARDEN then
		local skillName = GetIdName(self.Id)
		if self.Type == STYPE_BUFF then
			if not player.Battling then
				--=== sacrifice pet buffs
				if self.Id == 493346 then -- heart of the oak
					wardenbuff(503946) 	-- code in classes/pet.lua
					return
				end
So if the Id has changed from 493346 to 491668 doing a check for GetIdName(493346) won't get the name we want anyway. Unless they duplicated the skill to another ID and they still kept all the old skill info for the previous ID.

Actually when I was testing it earlier today it worked with the old skill Id, so they must duplicate it for what ever reason. So doing that would work for now I guess.
The only problem I see is you are using english strings "spirit", "heart", "nature" and "walker".
That is only if you call for the buff skill yourself, the code in default bot uses the ID's.

So if you had in profile onleavecombat
wardenbuff("heart")
it would make sure you have the buff heart of the oak.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Warden pet class

#86 Post by lisa » Fri Mar 09, 2012 9:44 am

give these a test for me if you have the time.
both in
micromacro/rom/classes/
folder
Attachments
pet.lua
(6.35 KiB) Downloaded 153 times
skill.lua
(19.33 KiB) Downloaded 133 times
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

abron1
Posts: 162
Joined: Wed Feb 22, 2012 12:43 am

Re: Warden pet class

#87 Post by abron1 » Sat Mar 10, 2012 3:37 am

the skills one works now from what i have tested thanks

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Warden pet class

#88 Post by rock5 » Sat Mar 10, 2012 5:58 am

lisa wrote:hmmm I don't see how doing that will allow for Id changes.
...
So if the Id has changed from 493346 to 491668 doing a check for GetIdName(493346) won't get the name we want anyway. Unless they duplicated the skill to another ID and they still kept all the old skill info for the previous ID.
Usually, when skill or buff ids change, it's some minor change but the name remains the same. Like the ids you said, both are "Heart of the Oak".
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Warden pet class

#89 Post by lisa » Sat Mar 10, 2012 9:05 pm

fixed in rev 699
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

emmanuel04
Posts: 30
Joined: Wed Jun 01, 2011 6:07 am

Re: Warden pet class

#90 Post by emmanuel04 » Sat Mar 17, 2012 3:58 pm

Did a change happen with the warden pet buffs?
I cant seem to get it to work anymore.

Code: Select all

GM detection started
Clearing target.
Moving to waypoint #6, (2099, 2633)
Use MACRO: WARDEN_HEART_OF_THE_Did not find any crashed game clients.
4:52pm - ...ktop/RomBot 2012/scripts/rom/classes/memorytable.lua:122: attempt to
 compare number with boolean


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>


And my profile skills for my warden

Code: Select all

<skills_warden>
      <skill name="WARDEN_SUMMON_SPIRIT_OF_THE_OAK"   hotkey="MACRO" priority="90" autouse="false" />
      <skill name="WARDEN_SUMMON_NATURE_CRYSTAL"        hotkey="MACRO" priority="90" autouse="false" />
      <skill name="WARDEN_SUMMON_OAK_WALKER"           hotkey="MACRO" priority="90" autouse="false" />

      <skill name="WARDEN_POWER_OF_THE_OAK"          hotkey="MACRO" priority="90" />
      <skill name="WARDEN_SUMMON_CHIRON_THE_CENTAUR"    hotkey="MACRO" priority="90" />

      <skill name="WARDEN_BRIAR_SHIELD"              hotkey="MACRO" priority="90" />
      <skill name="SCOUT_JOINT_BLOW"	hotkey="MACRO" priority="250" />
      <skill name="WARDEN_POWER_OF_THE_WOOD_SPIRIT"	hotkey="MACRO" priority="10" />
      <skill name="WARDEN_FRANTIC_BRIAR"      hotkey="MACRO" priority="100" autouse="false"/>
		
      <skill name="SCOUT_VAMPIRE_ARROWS"      hotkey="MACRO" priority="70" autouse="false"/>
      <skill name="SCOUT_SHOT"         hotkey="MACRO" priority="330" autouse="false"/>

   
  <skill name="WARDEN_SAVAGE_POWER" modifier="" hotkey="MACRO" priority="777" autouse="false" inbattle="false" />
  <skill name="WARDEN_MORALE_BOOST" modifier="" hotkey="MACRO" priority="777" autouse="false" inbattle="false" />
  <skill name="WARDEN_EXPLOSION_OF_POWER" modifier="" hotkey="MACRO" priority="777" autouse="false" inbattle="false" />
  <skill name="WARDEN_ENERGY_ABSORB" modifier="" hotkey="MACRO" priority="777" autouse="false" inbattle="false" />
  <skill name="WARDEN_ELVEN_AMULET" modifier="" hotkey="MACRO" priority="777" autouse="false" inbattle="false" />
   </skills_warden>
	

User avatar
Edamh
Posts: 106
Joined: Tue May 24, 2011 11:56 pm

Re: Warden pet class

#91 Post by Edamh » Mon Mar 19, 2012 7:37 pm

I was just coming on to ask the same. I am seeing

Code: Select all

player.Class1 == CLASS_WARDEN
Pet.HP: 1000
Pet.MaxHP: 1000
Setting up buff.
Casting WARDEN_SUMMON_OAK_WALKER.
Use 9: WARDEN_SUMMON_OAK_WA=>   * Failed to cast *
Casting WARDEN_POWER_OF_THE_OAK.
Use 0: WARDEN_POWER_OF_THE_Did not find any crashed game clients.
7:32pm - D:/micromacro/scripts/rom/classes/player.lua:1430: Error in your profil
e: onLeaveCombat error: D:/micromacro/scripts/rom/classes/memorytable.lua:122: a
ttempt to compare number with boolean
Here's the onLeaveCombat code that I had been using but is now failing for some reason.

Code: Select all

	if(player.Class1 == CLASS_WARDEN ) then
		cprintf(cli.yellow, "player.Class1 == CLASS_WARDEN \n");
		cprintf(cli.blue, "Pet.HP: %d\n", player.Pet.HP);
		cprintf(cli.blue, "Pet.MaxHP: %d\n", player.Pet.MaxHP)

	
		if not player:hasBuff("Power of the Oak") then
		   cprintf(cli.yellow, "Setting up buff.\n");
		   cprintf(cli.yellow, "Casting WARDEN_SUMMON_OAK_WALKER.\n");
		   player:cast("WARDEN_SUMMON_OAK_WALKER");
		   yrest(9500); 
		   cprintf(cli.yellow, "Casting WARDEN_POWER_OF_THE_OAK.\n");
		   player:cast("WARDEN_POWER_OF_THE_OAK");
		   yrest(1500); 
		   cprintf(cli.yellow, "Casting WARDEN_SUMMON_CHIRON_THE_CENTAUR.\n");
		   player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR");
		   yrest(9500); 
		   RoMScript("UsePetAction(6,true)")
		   yrest(800); 
		   RoMScript("UsePetAction(7,true)")
		   yrest(800); 
		end
		-- Summon pet if not present
		if( player.PetPtr == 0 or ( player.Pet.HP/player.Pet.MaxHP*100 ) < 20 ) then
			cprintf(cli.yellow, "Summoning pet. \n");
			player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR");
			yrest(9000);
			RoMScript("UsePetAction(6,true)")
		   yrest(800); 
		   RoMScript("UsePetAction(7,true)")
		   yrest(800); 
		end;
		
      -- Heal Pet
      player:update()
      if 70 > (player.Pet.HP/player.Pet.MaxHP * 100) then
	  cprintf(cli.yellow, "Healing pet. \n");
      player:target( player.Pet )
      player:cast("WARDEN_ELVEN_PRAYER")
      yrest(1000)
      end
	end;	
emmanuel04 wrote:Did a change happen with the warden pet buffs?
I cant seem to get it to work anymore.

Code: Select all

GM detection started
Clearing target.
Moving to waypoint #6, (2099, 2633)
Use MACRO: WARDEN_HEART_OF_THE_Did not find any crashed game clients.
4:52pm - ...ktop/RomBot 2012/scripts/rom/classes/memorytable.lua:122: attempt to
 compare number with boolean


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>


And my profile skills for my warden

Code: Select all

<skills_warden>
      <skill name="WARDEN_SUMMON_SPIRIT_OF_THE_OAK"   hotkey="MACRO" priority="90" autouse="false" />
      <skill name="WARDEN_SUMMON_NATURE_CRYSTAL"        hotkey="MACRO" priority="90" autouse="false" />
      <skill name="WARDEN_SUMMON_OAK_WALKER"           hotkey="MACRO" priority="90" autouse="false" />

      <skill name="WARDEN_POWER_OF_THE_OAK"          hotkey="MACRO" priority="90" />
      <skill name="WARDEN_SUMMON_CHIRON_THE_CENTAUR"    hotkey="MACRO" priority="90" />

      <skill name="WARDEN_BRIAR_SHIELD"              hotkey="MACRO" priority="90" />
      <skill name="SCOUT_JOINT_BLOW"	hotkey="MACRO" priority="250" />
      <skill name="WARDEN_POWER_OF_THE_WOOD_SPIRIT"	hotkey="MACRO" priority="10" />
      <skill name="WARDEN_FRANTIC_BRIAR"      hotkey="MACRO" priority="100" autouse="false"/>
		
      <skill name="SCOUT_VAMPIRE_ARROWS"      hotkey="MACRO" priority="70" autouse="false"/>
      <skill name="SCOUT_SHOT"         hotkey="MACRO" priority="330" autouse="false"/>

   
  <skill name="WARDEN_SAVAGE_POWER" modifier="" hotkey="MACRO" priority="777" autouse="false" inbattle="false" />
  <skill name="WARDEN_MORALE_BOOST" modifier="" hotkey="MACRO" priority="777" autouse="false" inbattle="false" />
  <skill name="WARDEN_EXPLOSION_OF_POWER" modifier="" hotkey="MACRO" priority="777" autouse="false" inbattle="false" />
  <skill name="WARDEN_ENERGY_ABSORB" modifier="" hotkey="MACRO" priority="777" autouse="false" inbattle="false" />
  <skill name="WARDEN_ELVEN_AMULET" modifier="" hotkey="MACRO" priority="777" autouse="false" inbattle="false" />
   </skills_warden>
	

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Warden pet class

#92 Post by lisa » Mon Mar 19, 2012 8:45 pm

I might get a chance today to do some testing on this.
Here's the onLeaveCombat code that I had been using but is now failing for some reason.
You shouldn't need all that code anymore, just put the skills you want used in your profile. So just the buff skill and the actual pet you want used, the bot will take care of everything else. If you have elven prayer in skills list of profile it should also heal your pet.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Warden pet class

#93 Post by lisa » Tue Mar 20, 2012 2:40 am

Ok finally found the issue, it was the way it was checking if it already had the buff.

Test drive this for me please.
Attachments
pet.lua
(6.28 KiB) Downloaded 149 times
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Edamh
Posts: 106
Joined: Tue May 24, 2011 11:56 pm

Re: Warden pet class

#94 Post by Edamh » Tue Mar 20, 2012 9:46 am

lisa wrote:Ok finally found the issue, it was the way it was checking if it already had the buff.

Test drive this for me please.
No more errors. Issue resolved with updated pet.lua. Thanks much.

abron1
Posts: 162
Joined: Wed Feb 22, 2012 12:43 am

Re: Warden pet class

#95 Post by abron1 » Fri May 04, 2012 12:29 am

when the warden goes inside a instance the pet skills are off how do i turn them back on? i have tried

Code: Select all

 RoMScript("UsePetAction(6,true)")
         yrest(800); 
         RoMScript("UsePetAction(7,true)")
         yrest(800); 
      end
...in my waypoint but it didn't work...

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Warden pet class

#96 Post by rock5 » Fri May 04, 2012 1:25 am

Try

Code: Select all

setpetautoattacks()
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

abron1
Posts: 162
Joined: Wed Feb 22, 2012 12:43 am

Re: Warden pet class

#97 Post by abron1 » Fri May 04, 2012 4:03 am

works perfect rock thanks...one question is there away to do this each time the warden and pet zone so i can use the same waypoints with other characters? i know your busy with the big update so i was just asking

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Warden pet class

#98 Post by rock5 » Fri May 04, 2012 6:37 am

Technically speaking the bot doesn't know when you zone but it does detect when your players address changes. So you could easily have it run that function when it detects the address change.

In player.lua, near the top of the update function, around line 42, you'll find

Code: Select all

	if( tmpAddress ~= self.Address and tmpAddress ~= 0 ) then
		self.Address = tmpAddress;
		cprintf(cli.green, language[40], self.Address);
		addressChanged = true
	end;
This is the part that detects address changes. Just stick the function in there, something like this.

Code: Select all

	if( tmpAddress ~= self.Address and tmpAddress ~= 0 ) then
		self.Address = tmpAddress;
		cprintf(cli.green, language[40], self.Address);
		addressChanged = true
		setpetautoattacks()
	end;
I may even leave that in as I don't see it causing any issues seeing as it runs only when the address changes.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Warden pet class

#99 Post by lisa » Fri May 04, 2012 6:55 am

Maybe check for the warden class before trying to do the function as the function itself assumes you are a warden if you call it and doesn't do a check.

Code: Select all

   if( tmpAddress ~= self.Address and tmpAddress ~= 0 ) then
      self.Address = tmpAddress;
      cprintf(cli.green, language[40], self.Address);
      addressChanged = true
if player.Class1 == CLASS_WARDEN then
      setpetautoattacks()
end
   end;
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Warden pet class

#100 Post by rock5 » Fri May 04, 2012 7:06 am

Yeah, technically that would be the right way to do it. Although I did test it with non warden classes and saw no issue. Better to be on the safe side.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests