Page 1 of 1

scout/warden fast snipe

Posted: Wed Jul 10, 2013 10:22 am
by amalia
Hey to you all

I use rombot mainly to assist myself. So partydps is my big favorite right here in my beginnings.

There where some discussions about casting a snipe if a former "hidden peril" led to the buff reducing the casttime for the skill "snipe".
As an ingame macro this works fine. But if i would call the macro from the bot i believe I will mess up my rota completly.

So I wanted to make the bot behaving in the same way.

I build in the skills.xml an additional Skill SCOUT_SNIPEFAST with a lower casttime. So I can use normal snipe still to engage the fight.

Code: Select all

<skill name="SCOUT_SNIPEFAST" id="490450" range="240" casttime="1" cooldown="15" type="damage" target="enemy" />
(I don´t know if this inflicts something having two skills doing nearly the same but probably have each it´s own cooldown.)

To use it I put the skill in the Rota, always checking the precondition of having the sufficient buff.

Code: Select all

		<skill name="SCOUT_SNIPEFAST"     hotkey="MACRO" priority="95" reqbuffname="504588" reqbufftarget="player" />
This is working!


But I have no good idea how to prevent "hidden peril" from beeing casted, when the cooldown of snype is not done yet. Since the CD from hidden Peril is 10 and the CD from snipe is 15.
Can someone hint me a smart way to do that?

thx in advance
amalia

Re: scout/warden fast snipe

Posted: Wed Jul 10, 2013 11:57 am
by rock5
After racking my brain the only idea I had was to use onPreSkillCast. If it's going to cast Hidden Peril you can have it check to see if Snipe is off cooldown. If it isn't then return false so it doesn't cast Hidden Peril. It means, though, that you can't use priority casting because if Hidden Peril is the current skill with the highest priority then it will just keep trying to cast it until Snipe comes off cooldown or another skill with a higher priority becomes available.

To use this solution, if you have the priority setting in your profile, set it to false.

Code: Select all

		<option name="PRIORITY_CASTING"		value="false" />	
Then add the onpreskillcast section in your profile.

Code: Select all

<onPreSkillCast>
	if arg1.Name == "SCOUT_HIDDEN_PERIL" then
		if snipe_skill == nil then
			for k,v in pairs(settings.profile.skills) do
				if v.Name == "SCOUT_SNIPE" then
					snipe_skill = v
					break
				end
			end
		end
		if snipe_skill and snipe_skill:getRemainingCooldown() > 0 then return false end
	end
</onPreSkillCast>
I think that should work.

Re: scout/warden fast snipe

Posted: Wed Jul 10, 2013 1:14 pm
by amalia
Thanks for your suggestion, and allow me to think on it.

I do not understand if the cooldowntime, given in the skilldefinition is something which is really used by the bot.
Is the bot calculating on its own if the skill must be available?
Or is it anyway looking what the game says about the cooldown?

If the bot is setting a cooldowntimer on its own after casting sucessfully then I would like instead of

Code: Select all

......then return false end
something like (talking in pictures)

Code: Select all

....then manuallyset cooldown_of_scout_hidden_perril := 5 
in order to make the bot think "hidden peril" is not availabale at the moment and keep work on priority based combat for the next lets say 5 seconds.

Do you think this could work in this way?

Re: scout/warden fast snipe

Posted: Wed Jul 10, 2013 3:04 pm
by rock5
No the bot doesn't use the cooldown value found in the skills database. It just uses it to see if the skill has a cooldown or not. If the skill has a cooldown then it gets the cooldown from memory. So that idea wont work.

Re: scout/warden fast snipe

Posted: Thu Jul 11, 2013 3:20 am
by amalia
As I had an issue with double casting of combo_shot (second cast fails of course) and this does not occur without priority casting - I feel very well without it. Triggering hidden_peril seems to work fine this way.
Its still quite mighty :-)

Thanks a lot.