Modification: Natural movement

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
aasi888
Posts: 64
Joined: Fri May 15, 2009 5:13 am

Modification: Natural movement

#1 Post by aasi888 » Sun Jul 19, 2009 11:08 am

This needs to be optimized. There is some "Unsticking player" bugs that hopefully someone can fix.

To install it open player.lua and replace with the function i posted.
Don't use Quickturn.



The botwill start to turn before the waypoint and adjust the angle during the run.
http://img198.imageshack.us/img198/9006/wpmove.jpg

The move function now only has 1 of these:
keyboardHold( settings.hotkeys.MOVE_FORWARD.key ); with "--" infront

I added "--oma" in front of those lines I modified this should help to optimize the movement.
1. --oma
keyboardHold( settings.hotkeys.MOVE_FORWARD.key );
yrest(150);

2. REMOVED ALL:
keyboardRelease( settings.hotkeys.MOVE_FORWARD.key ); with "--" infront
keyboardHold( settings.hotkeys.MOVE_FORWARD.key ); with "--" infront

KNOWN bugs:
"Unsticking player"
-Occurs when you pause and then continue script
-Some times occurs when running through waypoints
-When you tap the forward key it will take around 3 secs to get the error message and player unstucks.

NOTE: 1.8 Patch version was not tested in combat!
Attachments
function CPlayermoveTo(waypoint, ignoreCycleTargets).lua
Works for Patch 1.8
(35.63 KiB) Downloaded 142 times
function CPlayermoveTo(waypoint, ignoreCycleTargets).txt
(5.69 KiB) Downloaded 167 times
Last edited by aasi888 on Wed Jul 29, 2009 12:10 pm, edited 3 times in total.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Modification: Natural movement

#2 Post by Administrator » Sun Jul 19, 2009 6:29 pm

It looks good, but I see one problem with it: harvesting. I'm pretty sure this will result in not being in the right place to harvest a node. Or would the waypoint scripts even be run at all?

aasi888
Posts: 64
Joined: Fri May 15, 2009 5:13 am

Re: Modification: Natural movement

#3 Post by aasi888 » Sun Jul 19, 2009 7:20 pm

Works with a small mod.
after this line: local function scan()
put

Code: Select all

			keyboardRelease( settings.hotkeys.MOVE_BACKWARD.key );
			keyboardRelease( settings.hotkeys.MOVE_FORWARD.key );
			keyboardRelease( settings.hotkeys.ROTATE_RIGHT.key );
			keyboardRelease( settings.hotkeys.ROTATE_LEFT.key );
			yrest(10);
You can't do very sharp turns with this movement type.

aasi888
Posts: 64
Joined: Fri May 15, 2009 5:13 am

Re: Modification: Natural movement

#4 Post by aasi888 » Wed Jul 29, 2009 12:10 pm

Added version for 1.8. I'm not using this myself anymore so it might be bugged.

emmanuel04
Posts: 30
Joined: Wed Jun 01, 2011 6:07 am

Re: Modification: Natural movement

#5 Post by emmanuel04 » Thu Nov 10, 2011 9:01 am

Was Natural movement ever optimized. I would love to just run and cast skills at the same time
im looking into something like this but dont know if i have the code just right.

Code: Select all

 <onPreSkillCast><![CDATA[
      if arg1.Name == "SCOUT_SHOOT"  then
 keyboardHold( settings.hotkeys.MOVE_FORWARD.key );
yrest(500);
player:cast( "SCOUT_SHOOT");
yrest(500);
keyboardRelease( settings.hotkeys.MOVE_FORWARD.key )
      end

   ]]></onPreSkillCast>

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

Re: Modification: Natural movement

#6 Post by rock5 » Thu Nov 10, 2011 9:20 am

You are not suppose to cast skills within the onpreskillcast event. That would effectively cause it to cast twice. Plus to do it properly you would have to check the distance. You wouldn't want to cast it if you are already too close.

Maybe check if shoot. If it is, press forward. Then in onSkillCast check if it's shoot again. If so release the forward key.
  • 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

emmanuel04
Posts: 30
Joined: Wed Jun 01, 2011 6:07 am

Re: Modification: Natural movement

#7 Post by emmanuel04 » Thu Nov 10, 2011 9:43 am

If there is a way to stop after your first skill cast that is what im trying to find or make work. (If i find a target i cast SHOOT before i get to the target without stopping then cast shoot) This would look more Natural in movement.

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

Re: Modification: Natural movement

#8 Post by rock5 » Thu Nov 10, 2011 1:09 pm

Try this. It sort of works. It's set to stop moving at 50% of the COMBAT_DISTANCE. If I implement it I would add an option.

So it will continue to attack from the combat distance to 50% of the combat distance then stop.

If you want to adjust the distance at which it will stop change line 804.

Code: Select all

					if distance(player.X, player.Z, target.X, target.Z) < settings.profile.options.COMBAT_DISTANCE * 0.5 then
Just change the '0.5' to what ever value you want. The smaller the number the closer it will get to the target.
Attachments
player.lua
(120.23 KiB) Downloaded 133 times
  • 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

emmanuel04
Posts: 30
Joined: Wed Jun 01, 2011 6:07 am

Re: Modification: Natural movement

#9 Post by emmanuel04 » Mon Nov 14, 2011 5:41 pm

Tryed this over and over and not cant get the program to start.

Code: Select all

MicroMacro v1.02 beta 1
SolarStrike Software
http://www.solarstrike.net
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script> rom/bot
Opening bot.lua...
Starting script execution - Press CTRL+C to exit.
Press CTRL+L to cancel execution and load a new script.
-------------------------------------------------------------------------------
5:33pm - scripts\rom/bot.lua:15: C:/Users/EmmanuelSr/Desktop/RomBot 2011/scripts
/rom/classes/player.lua:1: unexpected symbol near '∩'


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
Attachments
player.lua
(I did add this but it should still work but don't know why it don't)

-- after 1x unsuccesfull unsticks try to reach nearest waypoint
if( self.Unstick_counter == 2 ) then
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z, player.Y));
end;
(120.43 KiB) Downloaded 119 times

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

Re: Modification: Natural movement

#10 Post by rock5 » Tue Nov 15, 2011 2:08 am

I don't see that symbol anywhere in the file. It might have something to do with the program you used to edit the file. Some sort of encoding issue. I don't know much about that but does the file work as soon as you download it, before editing it?
  • 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

emmanuel04
Posts: 30
Joined: Wed Jun 01, 2011 6:07 am

Re: Modification: Natural movement

#11 Post by emmanuel04 » Tue Nov 15, 2011 3:36 am

Yes it do work as is after download. I would love to know what program would be best to edit the file. (Im using Notepad right now)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests