Page 1 of 1
Modification: Natural movement
Posted: Sun Jul 19, 2009 11:08 am
by aasi888
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!
Re: Modification: Natural movement
Posted: Sun Jul 19, 2009 6:29 pm
by Administrator
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?
Re: Modification: Natural movement
Posted: Sun Jul 19, 2009 7:20 pm
by aasi888
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.
Re: Modification: Natural movement
Posted: Wed Jul 29, 2009 12:10 pm
by aasi888
Added version for 1.8. I'm not using this myself anymore so it might be bugged.
Re: Modification: Natural movement
Posted: Thu Nov 10, 2011 9:01 am
by emmanuel04
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>
Re: Modification: Natural movement
Posted: Thu Nov 10, 2011 9:20 am
by rock5
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.
Re: Modification: Natural movement
Posted: Thu Nov 10, 2011 9:43 am
by emmanuel04
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.
Re: Modification: Natural movement
Posted: Thu Nov 10, 2011 1:09 pm
by rock5
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.
Re: Modification: Natural movement
Posted: Mon Nov 14, 2011 5:41 pm
by emmanuel04
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>
Re: Modification: Natural movement
Posted: Tue Nov 15, 2011 2:08 am
by rock5
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?
Re: Modification: Natural movement
Posted: Tue Nov 15, 2011 3:36 am
by emmanuel04
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)