-
checkii
- Posts: 50
- Joined: Sat Oct 09, 2010 8:50 pm
#1
Post
by checkii » Thu Nov 18, 2010 8:00 pm
I am trying to get the bot to recall and get a return path way point once he gets stuck. Looking at bot.lua the current setting shows.
Code: Select all
-- Too many tries, logout
if( settings.profile.options.MAX_UNSTICK_TRIALS > 0 and
player.Unstick_counter > settings.profile.options.MAX_UNSTICK_TRIALS ) then
cprintf(cli.yellow, language[55],
player.Unstick_counter,
settings.profile.options.MAX_UNSTICK_TRIALS ); -- max unstick reached
if( settings.profile.options.LOGOUT_WHEN_STUCK ) then
player:logout();
else
-- pause or stop ?
player.Sleeping = true; -- go to sleep
--stopPE(); -- pause the bot
-- we should play a sound !
player.Unstick_counter = 0;
end
end;
We will add two more settings and one spell to our profiles. May have to add recall to skill.xml or use RoMScript to cast the spell, but since everyone has recall it shouldn't be a problem. RECALL_WHEN_STUCK = true and PATH_AFTER_RECALL = back_to_work
Code: Select all
-- Too many tries, logout
if( settings.profile.options.MAX_UNSTICK_TRIALS > 0 and
player.Unstick_counter > settings.profile.options.MAX_UNSTICK_TRIALS ) then
cprintf(cli.yellow, language[55],
player.Unstick_counter,
settings.profile.options.MAX_UNSTICK_TRIALS ); -- max unstick reached
if( settings.profile.options.LOGOUT_WHEN_STUCK ) then
player:logout();
end
if( settings.profile.options.RECALL_WHEN_STUCK ) then
player:cast("RECALL:); -- may need yrest for loading or waitload function
loadPaths("settings.profile.options.PATH_AFTER_RECALL);
end
-- pause or stop ?
player.Sleeping = true; -- go to sleep
--stopPE(); -- pause the bot
-- we should play a sound !
player.Unstick_counter = 0;
end;
Is this a good idea? would this work?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#2
Post
by rock5 » Thu Nov 18, 2010 11:03 pm
The major problem with this is recall may still be on cooldown. What will it do then?
Also it only seems useful for people who only ever run 1 waypoint file, although there is probably a few people out there like that.
Still... doesn't seem like it would be too difficult to add. Why don't you try it and see how well it works and how useful it seems.
- 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.”
-
checkii
- Posts: 50
- Joined: Sat Oct 09, 2010 8:50 pm
#3
Post
by checkii » Sun Nov 21, 2010 2:47 pm
Yeah i was thinking about that, is there no way to check for CD on a spell?
-
jduartedj
- Posts: 599
- Joined: Sat Dec 19, 2009 12:18 am
- Location: Lisbon
-
Contact:
#4
Post
by jduartedj » Sun Nov 21, 2010 3:48 pm
checkii wrote:Yeah i was thinking about that, is there no way to check for CD on a spell?
You can include it on the SKILLS file and make it have a Cooldown, Then when you use it use as a skill!
-
Alkaiser
- Posts: 222
- Joined: Sat Sep 25, 2010 2:03 pm
#5
Post
by Alkaiser » Tue Nov 23, 2010 8:39 pm
Shouldn't the cooldown be stored in client memory somewhere? Is it just a matter of finding the pointer for it? Or was it deemed unreliable?
-
jduartedj
- Posts: 599
- Joined: Sat Dec 19, 2009 12:18 am
- Location: Lisbon
-
Contact:
#6
Post
by jduartedj » Tue Nov 23, 2010 9:14 pm
Alkaiser wrote:Shouldn't the cooldown be stored in client memory somewhere? Is it just a matter of finding the pointer for it? Or was it deemed unreliable?
It's not like it makes a big diff for the bot to count the cooldown him self...
-
Alkaiser
- Posts: 222
- Joined: Sat Sep 25, 2010 2:03 pm
#7
Post
by Alkaiser » Tue Nov 23, 2010 10:29 pm
jduartedj wrote:It's not like it makes a big diff for the bot to count the cooldown him self...
Sometimes a skill won't fire properly and the bot doesn't consider this. As a result, it won't use the skill again until it thinks it is cooled down, even though the skill was ready to use the whole time due to miscast. I've seen this happen specifically with Enhanced Armor and Holy Seal. To resolve this problem I added code to the <onSkillCast> block to always use those skills if the respective buff isn't already active.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#8
Post
by rock5 » Wed Nov 24, 2010 7:37 am
Alkaiser wrote:Shouldn't the cooldown be stored in client memory somewhere? Is it just a matter of finding the pointer for it? Or was it deemed unreliable?
Well yes. Voidmain was working on using the memory for skills but he never finished it. It would have been cool.
- 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.”
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot], Semrush [Bot] and 0 guests