Page 3 of 6

Re: Warden pet class

Posted: Thu Jan 05, 2012 12:36 am
by lisa
rock5 wrote:BTW it dismounts me to cast the water fairy skill.
Bah I'll have to find some time to do more testing =(

Re: Warden pet class

Posted: Thu Jan 05, 2012 1:00 am
by lisa
Just had a quick look while riding on mount, after riding for a bit, approx 20 seconds, the pet icon completely disappears, at this point the pet pawn has no info at all, 1-2 seconds later the icon reappears and pet is by your side and pet pawn has all info again. Mine didn't try to summon water fairy while mounted though.

Maybe there is some info at the player address that says you have a pet summoned?

I'll see what I can find out.

Re: Warden pet class

Posted: Thu Jan 05, 2012 2:32 am
by kuripot
this is my profile that i use in my warden/scout

Code: Select all

	<skills_warden>
		<skill name="WARDEN_VALIANT_SHOT"		hotkey="MACRO" priority="140" />
		<skill name="WARDEN_CENTAURS_ARROW"		hotkey="MACRO" priority="130" />
		<skill name="WARDEN_CHARGED_CHOP"		hotkey="MACRO" priority="50" />
		<skill name="WARDEN_ENERGY_ABSORB"		hotkey="MACRO" priority="30" inbattle="true" hpper="75" />
		<skill name="SCOUT_VAMPIRE_ARROWS"		hotkey="MACRO" priority="70" />
		<skill name="SCOUT_SHOT"			hotkey="MACRO" priority="60" />
	   	<skill name="WARDEN_MOVEMENT_RESTRICTION"	hotkey="MACRO" priority="80" />
	  	<skill name="WARDEN_ANTI-MAGIC_ARROW"		hotkey="MACRO" priority="100" />
		<skill name="WARDEN_BRIAR_SHIELD"	 	hotkey="MACRO" priority="120" inbattle="false" />
		<skill name="WARDEN_SUMMON_CHIRON_THE_CENTAUR"	hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_PROTECTION_OF_NATURE"	hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_SAVAGE_POWER"		hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_ELVEN_PRAYER"		hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_MORALE_BOOST"		hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_ELVEN_GUIDANCE"		hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_EXPLOSION_OF_POWER"		hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_SUMMON_NATURE_CRYSTAL"	hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_THORNY_VINES"		hotkey="MACRO" priority="40" />
		<skill name="WARDEN_FRANTIC_BRIAR"		hotkey="MACRO" priority="90" />
	</skills_warden>

	<skills_druid>
		<skill name="DRUID_RECOVER"        modifier="" hotkey="VK_2" priority="90" hpper="30" />
		<skill name="DRUID_EARTH_ARROW"    modifier="" hotkey="VK_3" priority="80" />
	</skills_druid>

	<onLoad><![CDATA[
		runicthorn()
		startGMDetect()
	if player.Class1 == 7 and player.Class2 == 2 then
		registerTimer("summon", minutesToTimer(15), 
		function () player:cast("WARDEN_SUMMON_NATURE_CRYSTAL") end);
		end
	]]></onLoad>

	<onDeath><![CDATA[
		-- Additional Lua code to execute on death
		-- pauseOnDeath(); -- Stop the script
		-- player:logout();	-- logout
	]]></onDeath>

	<onLeaveCombat>
		runicthorn2()
		if 25 > (player.Pet.HP/player.Pet.MaxHP * 100) then
			player:target( player.Pet )
			player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR")
			yrest(1000)
		end

	
		if not player:hasBuff("Protection of Nature") then
		   player:cast("WARDEN_SUMMON_NATURE_CRYSTAL");
		   player:cast("WARDEN_PROTECTION_OF_NATURE");
		   player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR");
		end

	   	if player:findNearestNameOrId(102102) then
        	 local Evelyn = player:findNearestNameOrId(102102)
        	 player:target(Evelyn)
        	 player:fight()
     		 end
	</onLeaveCombat>

	<onSkillCast><![CDATA[
	if( arg1.Name == "WARDEN_SUMMON_NATURE_CRYSTAL" ) then
  			player:cast("WARDEN_PROTECTION_OF_NATURE");
  			player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR");
		end
	if player.Class1 == 7 and player.Class2 == 2 then
			player:cast("WARDEN_SAVAGE_POWER")
			player:cast("WARDEN_ELVEN_PRAYER")
			player:cast("WARDEN_MORALE_BOOST")
			player:cast("WARDEN_ELVEN_GUIDANCE")
			player:cast("WARDEN_EXPLOSION_OF_POWER");
		end
	]]></onSkillCast>

   <onPreSkillCast>
		target = player:getTarget();
	if player.Class1 == 7 and target.Type == 2 and (not player.Battling) then
		RoMScript("UsePetAction(6)")
		yrest(1000) -- pause to let pet attack before bot
		end
	if( arg1.Name == "WARDEN_SUMMON_NATURE_CRYSTAL" ) then
  			player:cast("WARDEN_PROTECTION_OF_NATURE");
  			player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR");
		end
   </onPreSkillCast>
</profile>


in all waypoint i use my warden in botting but because my warden is below lvl 60 and my scout is above lvl 60 its better to use the scout in treasure hunt for now.. to prevent agro... but my problem is even my character is in scout mode he try to summon the pet that why it make my bot stop...

i dont know how to apply

Code: Select all

if player.Class1 == 7 and player.Class2 == 2
in summoning pet to prevent summoning when my character is in scout mode

Re: Warden pet class

Posted: Thu Jan 05, 2012 2:45 am
by lisa
Only real issue I see in your profile that might cause that is this part as it doesn't do any class checks.

Code: Select all

     if not player:hasBuff("Protection of Nature") then
         player:cast("WARDEN_SUMMON_NATURE_CRYSTAL");
         player:cast("WARDEN_PROTECTION_OF_NATURE");
         player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR");
      end

Since the scout side will never have the buff it will constantly try to cast the skill to summon nature crystal.

You can remove this part of your profile by the way, just have the skill WARDEN_PROTECTION_OF_NATURE in your warden profile skills and make sure it isn't set autouse false.


try this

Code: Select all


  <skills_warden>
		<skill name="WARDEN_CHARGED_CHOP"      		hotkey="MACRO" priority="50" />
		<skill name="WARDEN_ENERGY_ABSORB"      	hotkey="MACRO" priority="30" inbattle="true" hpper="75" />
		<skill name="SCOUT_VAMPIRE_ARROWS"      	hotkey="MACRO" priority="70" />
		<skill name="SCOUT_SHOT"         			hotkey="MACRO" priority="60" />
		<skill name="WARDEN_MOVEMENT_RESTRICTION"   hotkey="MACRO" priority="80" />
		<skill name="WARDEN_ANTI-MAGIC_ARROW"      	hotkey="MACRO" priority="100" />
		<skill name="WARDEN_BRIAR_SHIELD"       	hotkey="MACRO" priority="120" inbattle="false" />
		<skill name="WARDEN_SUMMON_CHIRON_THE_CENTAUR"   hotkey="MACRO" priority="90" />
		<skill name="WARDEN_PROTECTION_OF_NATURE"   hotkey="MACRO" priority="100"  />
		<skill name="WARDEN_SAVAGE_POWER"      		hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_ELVEN_PRAYER"      		hotkey="MACRO" priority="90" />
		<skill name="WARDEN_MORALE_BOOST"      		hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_ELVEN_GUIDANCE"      	hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_EXPLOSION_OF_POWER"     hotkey="MACRO" priority="1" autouse="false" />
		<skill name="WARDEN_THORNY_VINES"      		hotkey="MACRO" priority="40" />
		<skill name="WARDEN_FRANTIC_BRIAR"      	hotkey="MACRO" priority="90" />
   </skills_warden>
  <onLoad><![CDATA[
      runicthorn()
      startGMDetect()
   ]]></onLoad>

   <onDeath><![CDATA[
      -- Additional Lua code to execute on death
      -- pauseOnDeath(); -- Stop the script
      -- player:logout();   -- logout
   ]]></onDeath>

   <onLeaveCombat>
      runicthorn2()

	if player:findNearestNameOrId(102102) then
		local Evelyn = player:findNearestNameOrId(102102)
		player:target(Evelyn)
		player:fight()
	end
   </onLeaveCombat>

   <onSkillCast><![CDATA[

	if player.Class1 == 7 and player.Class2 == 2 then
		player:cast("WARDEN_SAVAGE_POWER")
		player:cast("WARDEN_ELVEN_PRAYER")
		player:cast("WARDEN_MORALE_BOOST")
		player:cast("WARDEN_ELVEN_GUIDANCE")
		player:cast("WARDEN_EXPLOSION_OF_POWER");
	end
   ]]></onSkillCast>

   <onPreSkillCast>
	target = player:getTarget();
	if player.Class1 == 7 and target.Type == 2 and (not player.Battling) then
		RoMScript("UsePetAction(6)")
		yrest(1000) -- pause to let pet attack before bot
	end
   </onPreSkillCast>
</profile>

Re: Warden pet class

Posted: Thu Jan 05, 2012 4:41 am
by lisa
Going to set water fairy to only summon if mounted in the pet.lua, so it won't matter how the function is called it won't summon if mounted.

Something like this

Code: Select all

	if pet.Id ~= 102105 then -- Water Fairy
		if not player.Mounted() then
			keyboardRelease(settings.hotkeys.MOVE_FORWARD.key); yrest(500)
			sendMacro("CastSpellByName(\""..GetIdName(493268).."\")")
			print("Summoning "..GetIdName(102105))
		end
I'll look into warden pets aswell, if other code is calling checkskills() then it bypasses the check for if mounted.

Re: Warden pet class

Posted: Mon Jan 09, 2012 3:28 am
by rock5
What's happening with waterfairy()? I still have those changes I made. I tried reverting pet.lua but it still doesn't work properly. It doesn't stop when casting. It travels too far past waypoints for some reason and tries to unstick after summoning.

Should I commit my version that fixes these issues? I don't know If I posted it before but here is my version.

Code: Select all

function waterfairy()
	if player.Class1 ~= CLASS_PRIEST or player.Class2 ~= CLASS_SCOUT then
		return -- can't have a water fairy if class is wrong
	end
	petupdate()
	if pet.Id ~= 102105 then -- Water Fairy
		keyboardRelease(settings.hotkeys.MOVE_FORWARD.key); yrest(500)
		sendMacro("CastSpellByName(\""..GetIdName(493268).."\")")
		print("Summoning "..GetIdName(102105))

		repeat
			yrest(1000)
			player:update()
		until not player.Casting

		petupdate()
		local icon,active,autoCastAllowed = RoMScript("GetPetActionInfo(5)")
		if active == true then
			sendMacro("UsePetAction(5)")
		end
		player.LastDistImprove = os.time();	-- global, because we reset it whil skill use
	end
	if not pet:hasBuff(503736) then -- Frost Halo
		sendMacro("UsePetAction(6)")
		yrest(500)
	end
	if not pet:hasBuff(503753) then -- Conceal
		sendMacro("UsePetAction(7)")
		yrest(500)
	end
end

Re: Warden pet class

Posted: Mon Jan 09, 2012 3:46 am
by lisa
That is almost the same as what I have, I added in a check for if mounted and instead of using player.Casting I used the memoryread for it, so no need to update entire player pawn.

Code: Select all

function waterfairy()
	if player.Class1 ~= CLASS_PRIEST or player.Class2 ~= CLASS_SCOUT then
		return -- can't have a water fairy if class is wrong
	end
	petupdate()
	if pet.Id ~= 102105 then -- Water Fairy
		if not player.Mounted then
			keyboardRelease(settings.hotkeys.MOVE_FORWARD.key); yrest(500)
			sendMacro("CastSpellByName(\""..GetIdName(493268).."\")")
			print("Summoning "..GetIdName(102105))
		end
		repeat
			yrest(1000)
		until not (memoryReadRepeat("int", getProc(), player.Address + addresses.pawnCasting_offset) ~= 0);

		petupdate()
		local icon,active,autoCastAllowed = RoMScript("GetPetActionInfo(5)")
		if active == true then
			sendMacro("UsePetAction(5)")
		end
		player.LastDistImprove = os.time();   -- global, because we reset it while skill use
	end
	if not pet:hasBuff(503736) then -- Frost Halo
		sendMacro("UsePetAction(6)")
		yrest(500)
	end
	if not pet:hasBuff(503753) then -- Conceal
		sendMacro("UsePetAction(7)")
		yrest(500)
	end
end
Yeah I have about 6 or 7 files that are not default at the moment so I'm not going to commit anything until I get it all running the way I want, so if you are doing a commit go for it ;)

Re: Warden pet class

Posted: Mon Jan 09, 2012 4:34 am
by rock5
The memory read is a good idea but mine isn't dismounting to cast at the moment. Some changes must have been done in the past that fixes it.

Re: Warden pet class

Posted: Mon Jan 09, 2012 5:51 am
by lisa
I think I did it because I was going to look at adding the mount check in other places instead of just bot.lua where it does potion and skills check. Since other things like rbassist and also party bot do their own skill checks, So they would dismount to summon the fairy.

Normal bot usage it shouldn't dismount though.

Re: Warden pet class

Posted: Mon Jan 09, 2012 6:43 am
by rock5
That's right, I forgot about that.

The way you did it,though, is not so good. If mounted it doesn't stop, doesn't cast and doesn't print "Summoning", which is good. But then it waits for casting to end, does another petupdate(), a RoMScript GetPetActionInfo and maybe a sendMacro UsePetAction. It should only be doing these things if it castes the summon. So it should all be in the if statement.

Code: Select all

      if not player.Mounted then
         keyboardRelease(settings.hotkeys.MOVE_FORWARD.key); yrest(500)
         sendMacro("CastSpellByName(\""..GetIdName(493268).."\")")
         print("Summoning "..GetIdName(102105))
         repeat
            yrest(1000)
         until not (memoryReadRepeat("int", getProc(), player.Address + addresses.pawnCasting_offset) ~= 0);

         petupdate()
         local icon,active,autoCastAllowed = RoMScript("GetPetActionInfo(5)")
         if active == true then
            sendMacro("UsePetAction(5)")
         end
         player.LastDistImprove = os.time();   -- global, because we reset it while skill use
      end

Re: Warden pet class

Posted: Mon Jan 09, 2012 6:50 am
by rock5
Actually even better is to use

Code: Select all

if player.Mounted then
    return
end

Re: Warden pet class

Posted: Thu Jan 12, 2012 7:19 pm
by kuripot
how can i set my warden to activate FRANTIC_BRIAR the AOE when i recieved multi damage.. example in goblin.... when evelyn appear and the other elemental mobs will come.. i want to use FRANTIC_BRIAR to kill them...

Re: Warden pet class

Posted: Thu Jan 12, 2012 7:36 pm
by lisa
easiest way would be to add a check for evelyn into your profile on skill cast and if she is there then cast the aoe. This won't be checking how many mobs are attacking you though.

Code: Select all

<onSkillCast>
evelyn = player:findNearestNameOrId("Evelyn")
if evelyn then 
player:cast("WARDEN_FRANTIC_BRIAR")
end
</onSkillCast>
That is the simplest code I can think of to do what you want. It would be better if you used the Id of the mob instead.
Would be even better if you did a check for how many mobs were attacking you at the time. There is a few posts I recall that had code for checking if being attacked by multiple mobs at once. A forum search will probably get something.

Re: Warden pet class

Posted: Fri Jan 13, 2012 10:03 pm
by rock5
I've been thinking about this issue where if the pet becomes out of range the bot recasts the summon. I was thinking that if it goes out of range it will eventually come near again or reappear next to you. So maybe we could use a timer. First time it doesn't detect the pet it starts a timer. When the timer reaches 15-30 seconds and still no pet then summon. If the pet comes back into range before the timer runs out, it resets the timer.

What do you think?

Re: Warden pet class

Posted: Fri Jan 13, 2012 10:27 pm
by lisa
That should work fine for water fairy since it is basically just a buff and not essential to the characters survival.

pretty sure warden pets don't do the same as water fairy in that respect, it would need testing.

Re: Warden pet class

Posted: Fri Jan 13, 2012 10:43 pm
by rock5
Isn't warden pets the same? Doesn't it try to resummon if it goes out of range. I'm pretty sure my wd/s resummoned it's Chiron the Centaur when it ports in cot. It will be easy enough to test. Might have to make a special case when using the pet buff so it resummons its assist pet immediately.

Re: Warden pet class

Posted: Fri Jan 13, 2012 10:58 pm
by lisa
Yeah I meant that the water fairy icon completely dissappears, pretty sure the warden pet just gets out of range but the icon stays on screen.

Re: Warden pet class

Posted: Sat Jan 14, 2012 12:18 am
by rock5
Nah it disappears too. Maybe you just didn't get far enough.

Re: Warden pet class

Posted: Sat Jan 14, 2012 12:22 am
by lisa
I probably just wasn't watching properly or just forgot lol

I very very very rarely play warden.

Summon Warden pet with Pet Buff

Posted: Tue Jan 17, 2012 3:35 pm
by emmanuel04
lisa wrote:Actually I simplified the pet usage to its bare minimum.

You don't need all those player:cast() anymore.

Just set up your profile with the pet and buff you want.

In your case you want the oak walker buff.

Code: Select all

<skill name="WARDEN_POWER_OF_THE_OAK" 			hotkey="MACRO" priority="90" />
and to summon chiron

Code: Select all

<skill name="WARDEN_SUMMON_CHIRON_THE_CENTAUR" 	hotkey="MACRO" priority="90" />
If you have those in your profile and no other summon or buff skills then it will redo the buff when needed and always have chiron summoned.

So remove the summon oak walker from profile or change it to autouse="false"

Code: Select all

		<skill name="WARDEN_SUMMON_OAK_WALKER"	  		hotkey="MACRO" priority="90" autouse="false" />
but you don't need it in your profile anymore.



Now I might be a little lost with this one.
when I start my character this is what i get when i summon oak walker

Code: Select all

Use MACRO: WARDEN_SUMMON_OAK_WADid not find any crashed game clients.
3:58pm - ...Sr/Desktop/RomBot 2011/scripts/rom/classes/skill.lua:553: attempt to
 call global 'petupdate' (a nil value)
I have this in my profile

Code: Select all

<onSkillCast><![CDATA[




target = player:getTarget();
   if target.Id == 103169 then
      if sendMacro("madman.Time") >= 1 then
         player:clearTarget();
         printf("Running\n")
         yrest(4000)
      end
   end  

player:updateBuffs()

 if( arg1.Name == "WARDEN_SUMMON_OAK_WALKER" ) then
           player:cast("WARDEN_POWER_OF_THE_OAK");
           player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR");
	 yrest(7000)
      end



if( arg1.Name == "WARDEN_SUMMON_SPIRIT_OF_THE_OAK" ) then
           player:cast("WARDEN_HEART_OF_THE_OAK");
           player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR");
	 yrest(7000)
      end



icon, auto = RoMScript("GetPetActionInfo(7)")
if not auto then
       keyboardPress( key.VK_7, key.VK_CONTROL );
   yrest(50);
end

if arg1.Name =="WARDEN_POWER_OF_THE_WOOD_SPIRIT" then
yrest(100);
player:cast("SCOUT_JOINT_BLOW");
end 

and this is in my WP

Code: Select all



<!-- #  1 --><waypoint x="1793" z="2880" y="433">

if not player:hasBuff("POWER OF THE OAK") then
         player:cast("WARDEN_SUMMON_OAK_WALKER");
yrest(100);
player:update()
          end
 

if (player.PetPtr) == 0 then
yrest(100);
player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR");
player:rest(7);end


if not player:hasBuff("Unbridled Enthusiasm") then
         inventory:useItem("UNBRIDLED_ENTHUSIASM")
          end

if (player.PetPtr) == 0 then
yrest(100);
player:cast("WARDEN_SUMMON_CHIRON_THE_CENTAUR");
yrest(7000);player:update();
end


changeProfileOption("EGGPET_ENABLE_ASSIST", false);

 
        </waypoint>
This did work befor the New Patch.
But if there is an better way to check for POWER OF THE OAK buff then summon the Centaur pet if i don't have it,
and also summon the Centaur if i have the buff but not the Centaur pet???

I would love any help I can get at this time...