Warden pet class
Warden pet class
Ok I have started doing some things to make wardens much more useful for botting.
Currently the things pets can do is very limited.
So I am asking for help/information from people who use wardens to play/bot.
Currently I have code set up to do.
1. Change the autoattacks depending on the pet summoned.
2. Cast the buff spells you get like Heart of the Oak.
3. Tell bot to make pet attack first, so pet does the initial attack.
4. set up an update pet info function and pawn usage.
To do list.
1. Add in check for if target has been tagged by another player after initiating attack and then canceling attack. Bot currently jumps to stop any casting if target is tagged first.
2. What ever else people come up with lol
So yeah I would love to hear from people who play a warden and what I am missing.
Currently the things pets can do is very limited.
So I am asking for help/information from people who use wardens to play/bot.
Currently I have code set up to do.
1. Change the autoattacks depending on the pet summoned.
2. Cast the buff spells you get like Heart of the Oak.
3. Tell bot to make pet attack first, so pet does the initial attack.
4. set up an update pet info function and pawn usage.
To do list.
1. Add in check for if target has been tagged by another player after initiating attack and then canceling attack. Bot currently jumps to stop any casting if target is tagged first.
2. What ever else people come up with lol
So yeah I would love to hear from people who play a warden and what I am missing.
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
Does this include level 50 fairies that some class combos get? I have a water fairy I use that I had to tweak to get working.
- 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
forgot about them, I'll look into them aswell lol
Shouldn't be hard to add them in aswell.
--=== Added ===--
ok had a look at the water fairy.
You don't want it to attack, you want it to just use the buff skills when needed.
The pet pawn works perfectly with it aswell.
I noticed that the player doesn't always get the buff from water fairy, so maybe only check player buffs for the Frost Halo instead of checking the pet buff for it?
Issues I see, when fairy is out of range because of riding a horse or just walking fast then the buff drops from player and so in thise case you wouldn't want to constantly try casting the fairy buff until you actually get the buff.
So you probably want a times usage of the fairy skill.
If character doesn't have Frost Halo buff and Water Fairy is out then try using skill once, check again 60 seconds later and if still no buff then try again?
Also the buff drops off after a period of time, even though it has no timer, and so it needs to be recast then aswell.
Conceal is easy as it is just a pet buff, so if it doesn't have the buff then cast the skill.
Shouldn't be hard to add them in aswell.
--=== Added ===--
ok had a look at the water fairy.
You don't want it to attack, you want it to just use the buff skills when needed.
The pet pawn works perfectly with it aswell.
I noticed that the player doesn't always get the buff from water fairy, so maybe only check player buffs for the Frost Halo instead of checking the pet buff for it?
Issues I see, when fairy is out of range because of riding a horse or just walking fast then the buff drops from player and so in thise case you wouldn't want to constantly try casting the fairy buff until you actually get the buff.
So you probably want a times usage of the fairy skill.
If character doesn't have Frost Halo buff and Water Fairy is out then try using skill once, check again 60 seconds later and if still no buff then try again?
Also the buff drops off after a period of time, even though it has no timer, and so it needs to be recast then aswell.
Conceal is easy as it is just a pet buff, so if it doesn't have the buff then cast the skill.
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
Just so you know, to get it to work properly, i use the following in my onSkillCast.
One disables counterattack that was always collecting agro in survival and the other is the buff.
Code: Select all
if arg1.Name == "PRIEST_WATER_FAIRY" then
repeat yrest(500) player:update() until not player.Casting
RoMScript("UsePetAction(5)")
yrest(500)
RoMScript("UsePetAction(7)")
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
I use this for the counterattack (5)
That is to cancel the counterattack skill, for Nature Crystal since it doesn't actually attack at all.
As for conceal that would be like this once my pet pawn has been added.
Code: Select all
local icon,active,autoCastAllowed = RoMScript("GetPetActionInfo(5)")
if active == true then
RoMScript("UsePetAction(5)")
end
As for conceal that would be like this once my pet pawn has been added.
Code: Select all
petupdate()
local hasbuffconceal = false
for k,v in pairs(pet.Buffs) do
if v.Name == "Conceal" then
hasbuffconceal = true
end
end
if hasbuffconceal == false then
RoMScript("UsePetAction(7)")
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
Ok I have this for water fairy
Doesn't require any added skills to database or profile.
Could probably just call the function in onleavecombat.
waterfairy()
Code: Select all
function waterfairy()
if player.Class1 == CLASS_PRIEST and player.Class2 == CLASS_SCOUT then
else
return -- can't have a water fairy if class is wrong
end
petupdate()
if pet.Name ~= "Water Fairy" then
RoMScript("CastSpellByName('Water Fairy')")
yrest(7000)
end
player:update()
if not player:hasBuff(503736) then
RoMScript("UsePetAction(6)")
end
petupdate()
local hasbuffconceal = false
for k,v in pairs(pet.Buffs) do
if v.Name == "Conceal" then
hasbuffconceal = true
end
end
if hasbuffconceal == false then
RoMScript("UsePetAction(7)")
end
local icon,active,autoCastAllowed = RoMScript("GetPetActionInfo(5)")
if active == true then
RoMScript("UsePetAction(5)")
end
end
Could probably just call the function in onleavecombat.
waterfairy()
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 need some thoughts on something very very very important
What name should i look for when doing the warden pet buffs.
they are called
"Heart of the Oak" -- pet spirit of the oak
"Protection of Nature" -- pet nature crystal
"Power of the Oak" -- pet oak walker
At the moment I am using
spirit
nature
walker
as the keywords respectively.
Looks like this
So you would use
wardenbuff("spirit of the oak")
or simply
wardenbuff("spirit")
to get the Heart of the oak buff.
What name should i look for when doing the warden pet buffs.
they are called
"Heart of the Oak" -- pet spirit of the oak
"Protection of Nature" -- pet nature crystal
"Power of the Oak" -- pet oak walker
At the moment I am using
spirit
nature
walker
as the keywords respectively.
Looks like this
Code: Select all
function wardenbuff(_nameorid)
petupdate()
local buffid
if string.find(string.lower(_nameorid), "spirit" ) or
string.find(string.lower(_nameorid), "heart" ) then
buffid = 503946
elseif string.find(string.lower(_nameorid), "nature") then
buffid = 503581
elseif string.find(string.lower(_nameorid), "walker") then
buffid = 503580
else
error("Unrecognized name for warden pet buff.")
end
more stuff blah blah blah
end
wardenbuff("spirit of the oak")
or simply
wardenbuff("spirit")
to get the Heart of the oak buff.
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
Cool. Looks like you have it under control.
Should there be class level check or check to see if you actually have the skill? Hm... Shouldn't the skill be cast per normal like the other skills? Doesn't it already do this? It's only controling/setting them up that needs to be done separately.
Having trouble reversing it? I've been getting a bit of practice at this lately. This should be the samelisa wrote:Code: Select all
if player.Class1 == CLASS_PRIEST and player.Class2 == CLASS_SCOUT then else return -- can't have a water fairy if class is wrong end
Code: Select all
if player.Class1 ~= CLASS_PRIEST or player.Class2 ~= CLASS_SCOUT then
return -- can't have a water fairy if class is wrong
end
You can't use ids? Is there a language issue here? Otherwise longer name would help avoid false positives.lisa wrote:Ok need some thoughts on something very very very important
What name should i look for when doing the warden pet buffs.
- 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
Actually it was deliberate, I have been trying to make code easier to read and understand for others, just simply saying therock5 wrote:Having trouble reversing it? I've been getting a bit of practice at this lately. This should be the same
Code: Select all
== "this" and == "then" else blah blah end
is actually a lot easier for other people to understand then
Code: Select all
~= "this" or ~= "that" then blah blah end
Still not sure which way to go with this.rock5 wrote:Should there be class level check or check to see if you actually have the skill? Hm... Shouldn't the skill be cast per normal like the other skills? Doesn't it already do this? It's only controling/setting them up that needs to be done separately.
Make it all part of the skills.lua code and call it when the bot wants to use the skill "WARDEN_HEART_OF_THE_OAK" or have is simply called by people in profile onleavecombat.
So you just have
Code: Select all
wardenbuff("heart")
Then just a matter of resummoning the pet you do want.
Currently the bot does have the skills in the database but doesn't deal with usage requirements (pet summoned). So we can either add that all into the skill.lua or maybe add into skill.lua
Code: Select all
if v.Id == 493346 then wardenbuff(503946) end
Just noticed the buffid for heart of the oak in skills database doesn't match what I get as the buff id, maybe it changed in a recent patch??
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
Hm... to me sayinglisa wrote:Actually it was deliberate, I have been trying to make code easier to read and understand for others
Code: Select all
if == "this" and == "that" then else blah blah end
Code: Select all
if class 1 is not priest or class 2 is not mage then exit because it's wrong classes end
Code: Select all
If class 1 is priest and class 2 is mage then do nothing else exit because they're the wrong classes end
Well people are used to putting skills in the skills section. That seems neater. Also that saves you the trouble of checking if you have the skill. Do any pets have buffs that have to be reapplied, therefore checked?lisa wrote:Still not sure which way to go with this.
Make it all part of the skills.lua code and call it when the bot wants to use the skill "WARDEN_HEART_OF_THE_OAK" or have is simply called by people in profile onleavecombat.
Of course there is also the "ordering pets to attack" feature to do. How are you going to do that? Because you're not actually casting the skills yourself I don't think they should be included in skills. It should be done differently. Hm... but they should be part of the attack sequence.
- 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
Untested at this stage but I was looking at something like this at the start of player:fight()
It should work in theory, it doesn't deal with kill stealing though if someone else attacks mob before pet does.
water fairy in skills databas
so will only use skill out of combat, similar to having in profile onleavecombat.
in CSkill:use()
probably need to exit the function after waterfairy(), wouodn't want skill:use to also try to summon the fairy.
I'll see if I can do some testing later today, have pretty much everything in my list done and ready for testing.
Code: Select all
if player.Class1 == CLASS_WARDEN then -- if warden let pet start fight.
petupdate()
if pet.Name == "Spirit of the Oak" or
pet.Name == "Oak Walker" or
pet.Name == "Chiron the Centaur"
then
petstartcombat()
yrest(2000) -- give pet a chance to attack
end
end
water fairy in skills databas
Code: Select all
<skill name="PRIEST_WATER_FAIRY" id="493268" mana="250" casttime="6" inbattle="false" type="summon" />
in CSkill:use()
Code: Select all
if player.Class1 == CLASS_PRIEST and player.Class2 == CLASS_SCOUT then
if self.Id == 493268 then
waterfairy()
end
end
I'll see if I can do some testing later today, have pretty much everything in my list done and ready for testing.
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
Not everyone will want their pet to start the attack. There might have to be an option. Or maybe with those pets they would. I'm not sure. Don't have much experience with them. I'm unsure about the 2 second wait. Maybe there should be an option on how long to wait so if users want the pet and player to attack together they set it to 0. If the user wants the pet to do most of the killing they can put it to a higher value. You will probably have to keep an eye on the mob while waiting so if it dies or something you can act accordingly instead of waiting the whole time.lisa wrote:Untested at this stage but I was looking at something like this at the start of player:fight()
Like what I have but I also have target="self".lisa wrote:Code: Select all
<skill name="PRIEST_WATER_FAIRY" id="493268" mana="250" casttime="6" inbattle="false" type="summon" />
- 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
Yeah after much testing I worked out if you don't have target as self it defaults range to 20 and so never uses the skill, ever lolrock5 wrote:Like what I have but I also have target="self".
After testing I have decided to go on a different path.
in skill:canuse()
Code: Select all
-- Water fairy usage
if self.Id == 493268 then
waterfairy()
return false;
end
I'll start testing the warden side of things now.
Yeah I was thinking of using a profile option, for pet to inititate combat.rock5 wrote:Not everyone will want their pet to start the attack.
For now I am mainly working on getting the code and skills to work without issues, all the profile options and time delay options can be added in later very easily.
I am going to comment out this part of canuse()
Code: Select all
-- Already have a pet out
--[[if( self.Type == STYPE_SUMMON and player.PetPtr ~= 0 ) then
debug_skilluse("PETALREAYDOUT");
return false;
end]]
I am going along these lines, needs testing still but checks if that pet is out already.
Code: Select all
--=== warden usage
if player.Class1 == CLASS_WARDEN then
if self.Type == STYPE_BUFF then
--=== sacrifice pet buffs
if self.Id == 493346 then -- heart of the oak
wardenbuff(503946)
return false
end
if self.Id == 493348 then -- protection of nature
wardenbuff(503581)
return false
end
if self.Id == 493347 then -- power of the oak
wardenbuff(503580)
return false
end
end
if self.Type == STYPE_SUMMON then
petupdate()
-- dont summon warden pet if already summoned.
if self.Id == 493333 and pet.Name == "Spirit of the Oak" then
return false
end
if self.Id == 493344 and pet.Name == "Nature Crystal" then
return false
end
if self.Id == 493343 and pet.Name == "Oak Walker" then
return false
end
if self.Id == 494212 and pet.Name == "Chiron the Centaur" then
return false
end
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
Isn't canUse used before the skills is actually cast? Isn't waterfairy supposed to run after it's summoned? It might be working but canUse isn't supposed to do anything but return true or false. Couldn't you add that to skill:use so that when the fairy is summoned it does the apropriate action?lisa wrote:After testing I have decided to go on a different path.
in skill:canuse()
Code: Select all
-- Water fairy usage if self.Id == 493268 then waterfairy() return false; end
True, it was probably just an easy solution at the time.lisa wrote:It is assuming that if there is a pet out then you don't want to summon another pet, bad assumption.
Looks good. What does wardenbuffs do again? Does it check to see if you have the right pet out for the buff you are trying to cast?lisa wrote:I am going along these lines, needs testing still but checks if that pet is out already.
- 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
I was just thinking, with all the different types of pets and different things to check, it might be better to have a separate table that can be edited and added to. Maybe similar to the skills database. It might take more coding but then will be easier to maintain, I think.
- 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
Yeah agreed, been looking in to it =)rock5 wrote: Couldn't you add that to skill:use so that when the fairy is summoned it does the apropriate action?
yeah it checks all the things needed to be able to get the buff. looks like this at the moment.rock5 wrote:What does wardenbuffs do again? Does it check to see if you have the right pet out for the buff you are trying to cast?
Code: Select all
function wardenbuff(_nameorid)
petupdate()
local buffid
if type(_nameorid) == "number" then
buffid = _nameorid
else
if string.find(string.lower(_nameorid), "spirit" ) or
string.find(string.lower(_nameorid), "heart" ) then
buffid = 503946
elseif string.find(string.lower(_nameorid), "nature") then
buffid = 503581
elseif string.find(string.lower(_nameorid), "walker") then
buffid = 503580
else
error("Unrecognized name for warden pet buff.")
end
end
petupdate()
local function summonbuff()
if buffid == 503946 and not player:hasBuff(503946) then
RoMScript("CastSpellByName('Summon Spirit of the Oak');");
repeat
yrest(1000)
petupdate()
until pet.Level ~= 1
yrest(1000)
RoMScript("CastSpellByName('Heart of the Oak')")
yrest(1000)
end
if buffid == 503581 and not player:hasBuff(503581) then
RoMScript("CastSpellByName('Summon Nature Crystal');");
repeat
yrest(1000)
petupdate()
until pet.Level ~= 1
yrest(1000)
RoMScript("CastSpellByName('Protection of Nature')")
yrest(1000)
end
if buffid == 503580 and not player:hasBuff(503580) then
RoMScript("CastSpellByName('Summon Oak Walker');");
repeat
yrest(1000)
petupdate()
until pet.Level ~= 1
yrest(1000)
RoMScript("CastSpellByName('Power of the Oak')")
yrest(1000)
end
end
if pet.Level ~= 1 then -- pet summoned
if pet.Name == "Spirit of the Oak" and buffid == 503946 then
RoMScript("CastSpellByName('Heart of the Oak')")
elseif pet.Name == "Nature Crystal" and buffid == 503581 then
RoMScript("CastSpellByName('Protection of Nature')")
elseif pet.Name == "Oak Walker" and buffid == 503580 then
RoMScript("CastSpellByName('Power of the Oak')")
else
RoMScript("CastSpellByName('Recall Pet')")
yrest(1500)
summonbuff()
end
else
summonbuff()
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
Well that was a headache lol
I was trying to use player:cast() in the skill:use() and it was a pain lol
In the end I just used the in game function to use the skills, much easier.
I was trying to use player:cast() in the skill:use() and it was a pain lol
In the end I just used the in game function to use the skills, much easier.
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
So no one has any interest in if we make pets work better with bot or not?
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
Not many comments, huh? I think once it's available people will slowly try it, and take it up. People have mostly managed without and there are a lot of people this just doesn't apply to. Mostly wardens and the odd elite fairy that people don't really need. It's of most use to players that like playing wardens manually but haven't had the opportunity to use the pet to their full potential when botting.
- 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
LOL after all that I have just had a thought pop into my head.
Are the pets on different languages called the same or do they have different names in different language clients??
So far I have gone with the assumption the names are the same, silly me should have found out before hand.
Just came across a major flaw with making pet attack when you start your attack. Pet will travel along a cliff edge for miles and miles to try to get to mob.
So we really need to make pet only attack once in combat or it could get messy.
Are the pets on different languages called the same or do they have different names in different language clients??
So far I have gone with the assumption the names are the same, silly me should have found out before hand.
Just came across a major flaw with making pet attack when you start your attack. Pet will travel along a cliff edge for miles and miles to try to get to mob.
So we really need to make pet only attack once in combat or it could get messy.
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
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests