Recall when stuck instead of logging out

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
checkii
Posts: 50
Joined: Sat Oct 09, 2010 8:50 pm

Recall when stuck instead of logging out

#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?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Recall when stuck instead of logging out

#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.”
          • Ronald Reagan

checkii
Posts: 50
Joined: Sat Oct 09, 2010 8:50 pm

Re: Recall when stuck instead of logging out

#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?

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Recall when stuck instead of logging out

#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!
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: Recall when stuck instead of logging out

#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?

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Recall when stuck instead of logging out

#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...
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: Recall when stuck instead of logging out

#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.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Recall when stuck instead of logging out

#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.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest