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.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.
Warden pet class
Re: Warden pet class
- 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
Re: Warden pet class
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.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Warden pet class
ok thanks ill try that...
Re: Warden pet class
You still save ids but compare their names instead of the ids.lisa wrote:but wouldn't the name be different for each language?
Eg. instead of
Code: Select all
if pet.Id ~= fairy.PetId then -- Fairy
Code: Select all
if pet.Name ~= fairy.Name then -- Fairy
Code: Select all
if buffid == HavePetBuff then
Code: Select all
if GetIdName(buffid) == GetIdName(HavePetBuff) then
- 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
Re: Warden pet class
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
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.
So if you had in profile onleavecombat
wardenbuff("heart")
it would make sure you have the buff heart of the oak.
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
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.
That is only if you call for the buff skill yourself, the code in default bot uses the ID's.The only problem I see is you are using english strings "spirit", "heart", "nature" and "walker".
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Warden pet class
give these a test for me if you have the time.
both in
micromacro/rom/classes/
folder
both in
micromacro/rom/classes/
folder
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Warden pet class
the skills one works now from what i have tested thanks
Re: Warden pet class
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".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.
- 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
Re: Warden pet class
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
-
- Posts: 30
- Joined: Wed Jun 01, 2011 6:07 am
Re: Warden pet class
Did a change happen with the warden pet buffs?
I cant seem to get it to work anymore.
And my profile skills for my warden
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>
Re: Warden pet class
I was just coming on to ask the same. I am seeing Here's the onLeaveCombat code that I had been using but is now failing for some reason.
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
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 wardenCode: 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>
Re: Warden pet class
I might get a chance today to do some testing on this.
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.Here's the onLeaveCombat code that I had been using but is now failing for some reason.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Warden pet class
Ok finally found the issue, it was the way it was checking if it already had the buff.
Test drive this for me please.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Warden pet class
No more errors. Issue resolved with updated pet.lua. Thanks much.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.
Re: Warden pet class
when the warden goes inside a instance the pet skills are off how do i turn them back on? i have tried
...in my waypoint but it didn't work...
Code: Select all
RoMScript("UsePetAction(6,true)")
yrest(800);
RoMScript("UsePetAction(7,true)")
yrest(800);
end
Re: Warden pet class
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
Re: Warden pet class
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
Re: Warden pet class
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 findThis is the part that detects address changes. Just stick the function in there, something like this.
I may even leave that in as I don't see it causing any issues seeing as it runs only when the address changes.
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;
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;
- 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
Re: Warden pet class
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Warden pet class
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
Who is online
Users browsing this forum: Google [Bot] and 0 guests