Modification: Natural movement
Modification: Natural movement
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!
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.
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Modification: Natural movement
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
Works with a small mod.
after this line: local function scan()
put
You can't do very sharp turns with this movement type.
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);
Re: Modification: Natural movement
Added version for 1.8. I'm not using this myself anymore so it might be bugged.
-
- Posts: 30
- Joined: Wed Jun 01, 2011 6:07 am
Re: Modification: Natural movement
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.
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
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.
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
-
- Posts: 30
- Joined: Wed Jun 01, 2011 6:07 am
Re: Modification: Natural movement
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
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.Just change the '0.5' to what ever value you want. The smaller the number the closer it will get to the target.
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
- 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
-
- Posts: 30
- Joined: Wed Jun 01, 2011 6:07 am
Re: Modification: Natural movement
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
Re: Modification: Natural movement
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
-
- Posts: 30
- Joined: Wed Jun 01, 2011 6:07 am
Re: Modification: Natural movement
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)
Who is online
Users browsing this forum: No registered users and 2 guests