Page 4 of 6

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Tue Jan 03, 2012 5:43 am
by rubenr
My mage is using all his buffs before battle, even with priority 0, how do i change that?

PS: I've changed it, disable the fly option, added new ground waypoints, and turning it into a tank/mage duo.


Edit:
PS2: Nevermind, im droping this. My 100k hp tank and my 80k hp mage can't kill cayus in easy mode.
The mage wastes all the buffs in the elites, the tank doesn't agro (because the mage wins the agro), and cayus, after colors, make a deadly 35/40k hp jump. (Which is the life left for both at that point).

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Tue Jan 03, 2012 11:45 pm
by woah
Hey lisa, the new script doesn't stop the wait once the cooldown is ready. It is a constant 2 minute rest. Same as putting a yrest(120000). :l

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Wed Jan 04, 2012 12:59 am
by lisa
woah wrote:Hey lisa, the new script doesn't stop the wait once the cooldown is ready. It is a constant 2 minute rest. Same as putting a yrest(120000). :l
Looks like that skill.Cooldown isn't time remaining, probably have to use the in game function

Code: Select all

local cooldown, remaining = RoMScript("GetSkillCooldown(tab,number)")
yrest(remaining*1000)
So you will either need to just put the tab and number in yourself and hope they don't change or get the info from memory using similar code to what I posted for skill.Cooldown but using skillnum and skilltab.

Code: Select all

for i,v in pairs(settings.profile.skills) do
if v.Name == "ROGUE_EVASION" then
skill = CSkill( v );
tab = skill.skilltab
num = skill.skillnum
end
end
local cooldown, remaining = RoMScript("GetSkillCooldown("..tab..","..num..")")
yrest(remaining*1000)

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Thu Jan 05, 2012 6:45 pm
by woah
Hmm, how do I find out what tab and number are? The 2nd script you posted gave an error.

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Thu Jan 05, 2012 8:05 pm
by lisa
http://www.theromwiki.com/API:GetSkillCooldown

basically just look at the skill "book" in game, tab is the tab for skills, so either going to be tab 2 or 4. Number you just count starting top left and going down, then top right and going down.

Not sure why but some skills have the .skilltab and .skillnum but others don't so safer to not assume the skill you want does =(
No time to look into it at the moment so just go with the in game function.

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Thu Jan 05, 2012 11:06 pm
by rock5
Looks like CSkill() doesn't copy the skilltab and skillnum values. So skill = CSkill(v) will be missing those values. It's easy enough to fix. Give me a bit.

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Fri Jan 06, 2012 12:39 am
by rock5
woah wrote:The 2nd script you posted gave an error.
Should now work in revision 689.

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Fri Jan 06, 2012 2:41 am
by woah
Hmm I tried manually entering the tab and number. vvv

Code: Select all

local cooldown, remaining = RoMScript("GetSkillCooldown(4,20)")
yrest(remaining*1000)
And it didn't work, just waited forever. Then I tried the second code, with the same result. No error though. :l

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Fri Jan 06, 2012 3:52 am
by rock5
What skill is 4,20? How long is the cooldown?

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Fri Jan 06, 2012 5:12 am
by lisa
well remaining is in seconds, and yrest is in milliseconds. So only way I see it not working is if you have the wrong tab/num combination.

evasion is 4,20 for my rogue, so possible it is right spot.
Works fine for me, tested with commandline

Code: Select all

Command> local cooldown, remaining = RoMScript("GetSkillCooldown(4,20)") print(remaining*1000)
117300.00305176
Command> local cooldown, remaining = RoMScript("GetSkillCooldown(4,20)") print(remaining*1000)
102599.99847412
also tested the yrest exactly as posted and it sat there until skill came off cooldown and then continued.

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Fri Jan 06, 2012 5:24 am
by woah
Hmm it must be something I'm doing wrong then, ill test it with some other waypoints and see if I can get it to work.
-and rock, 4,20 is evasion which is a 2 minute cooldown

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Fri Jan 06, 2012 5:28 am
by rock5
So

Code: Select all

yrest(remaining*1000)
is supposed to just stand there for 2m?

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Fri Jan 06, 2012 5:44 am
by lisa
rock5 wrote:is supposed to just stand there for 2m?
he wants to wait until the skill is off cooldown before attacking boss.

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Fri Jan 06, 2012 6:09 am
by woah
It works perfectly now. Which is weird because I didn't change anything lol. Anyways, I think that was the last tweak we needed :D You guys have helped so much, thanks! (:

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Mon Jan 09, 2012 3:47 am
by klassik1
...


-edit-
taking out these files since we are still working on them.

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Mon Jan 09, 2012 3:58 am
by lisa
Since you are making it public though I would do a class check before doing the rogue skills.

Code: Select all

if player.Class1 == CLASS_ROGUE then

-- all your rogue skill stuff



end
Lol I went to post the code you have in there but you edited before I hit reply it seems, you get the idea anyway =)
I also noted you have the check for tab and num but don't use them, so it will do the code but with no benefit.

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Mon Jan 09, 2012 4:13 am
by klassik1

Code: Select all

for i,v in pairs(settings.profile.skills) do
        if v.Name == "ROGUE_EVASION" then
         skill = CSkill( v );
          tab = skill.skilltab
           num = skill.skillnum
        end
         end
        local cooldown, remaining = RoMScript("GetSkillCooldown(4,20)")
         yrest(remaining*1000)
Im not quite following you on that last part. What needs to be changed?

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Mon Jan 09, 2012 4:16 am
by woah
Redundant, just use

Code: Select all

local cooldown, remaining = RoMScript("GetSkillCooldown(4,20)")
         yrest(remaining*1000)
its all you need

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Mon Jan 09, 2012 4:17 am
by lisa
you can either use just

Code: Select all

local cooldown, remaining = RoMScript("GetSkillCooldown(4,20)")
yrest(remaining*1000)
Which would work for you but may not work for everyone

or

Code: Select all

for i,v in pairs(settings.profile.skills) do
        if v.Name == "ROGUE_EVASION" then
         skill = CSkill( v );
          tab = skill.skilltab
           num = skill.skillnum
        end
         end
local cooldown, remaining = RoMScript("GetSkillCooldown("..tab..","..num..")")
yrest(remaining*1000)
Which will work for any rogue.

Rock added in the skillnum and skilltab to the skill memory stuff so you can use them if you use latest bot revision.

Re: Wanting to write a waypoint for GC easy 1st boss farm

Posted: Mon Jan 09, 2012 6:22 am
by klassik1
Ok, I've updated the files.