In player:rest(), probably not. Once most people upgrade to MicroMacro 1.0 beta 7, we can start making changes to high-res timers which allow more control over timing things like this out. But yes, yrest() does accept milliseconds. However, be aware that attempting to yrest() for 1 millisecond does not mean exactly 1 millisecond will elapse. This is due to a number of things; code overhead, operating system timer resolution, and non-real-time-threading to name a few. You can expect up to ~15ms difference. That said, yrest() in beta 7 is much more accurate and will eliminate some wasted milliseconds.Is there a possibility to make the rest-time shorter than one second?
yrest(); is in milisecs right?
RoM bot
- Administrator
- Site Admin
- Posts: 5318
- Joined: Sat Jan 05, 2008 4:21 pm
Re: RoM bot
No, camera:setRotation() takes radians. You can just use math.rad() to convert from degrees to radians. Of course, this sets the camera's raw direction. It does not rotate it that many degrees. To rotate it left or right just takes a bit of math. Remember, there are 2PI radians in a circle, so 90 degrees would be 1/2 PI. Therefor, we can just take the player's direction and add or subtract 1/2 PI from it and set this as the camera's direction.
Re: RoM bot
ok thank you for you explanations...Administrator wrote:No, camera:setRotation() takes radians. You can just use math.rad() to convert from degrees to radians. Of course, this sets the camera's raw direction. It does not rotate it that many degrees. To rotate it left or right just takes a bit of math. Remember, there are 2PI radians in a circle, so 90 degrees would be 1/2 PI. Therefor, we can just take the player's direction and add or subtract 1/2 PI from it and set this as the camera's direction.
In player:rest(), probably not. Once most people upgrade to MicroMacro 1.0 beta 7, we can start making changes to high-res timers which allow more control over timing things like this out. But yes, yrest() does accept milliseconds. However, be aware that attempting to yrest() for 1 millisecond does not mean exactly 1 millisecond will elapse. This is due to a number of things; code overhead, operating system timer resolution, and non-real-time-threading to name a few. You can expect up to ~15ms difference. That said, yrest() in beta 7 is much more accurate and will eliminate some wasted milliseconds.Is there a possibility to make the rest-time shorter than one second?
yrest(); is in milisecs right?
This works really well!
Code: Select all
<!-- # 42 --><waypoint x="-15493" z="4887">
camera:setRotation(1,57);
yrest(300);
camera:setRotation(3,141);
yrest(300);
camera:setRotation(-1,57);
yrest(300);
</waypoint>
- Administrator
- Site Admin
- Posts: 5318
- Joined: Sat Jan 05, 2008 4:21 pm
Re: RoM bot
I assume you come from a country where ',' can be used to show a decimal place. I'll never understand the logic between that. It makes it impossible to differentiate between one thousand one (1,001) and one and one millionth, for example. And people laugh at the American standard for measurement.
Anyways, that aside, you should use the dot (.). So use 1.57 instead of 1,57. Or, use math.rad(90) to use 90 degrees. 1,57 will pass two separate values: 1 and 57. This obviously isn't what you want.
Anyways, that aside, you should use the dot (.). So use 1.57 instead of 1,57. Or, use math.rad(90) to use 90 degrees. 1,57 will pass two separate values: 1 and 57. This obviously isn't what you want.
Re: RoM bot
Hehe, yes you are right!Administrator wrote:I assume you come from a country where ',' can be used to show a decimal place. I'll never understand the logic between that. It makes it impossible to differentiate between one thousand one (1,001) and one and one millionth, for example. And people laugh at the American standard for measurement.
I'm from Germany and that's the standard here... sorry I'm going to change this for you!
I could explain you the logic between the "."- and the ","-separator (in a pm)...
Thanks for your hint!Administrator wrote:Anyways, that aside, you should use the dot (.). So use 1.57 instead of 1,57. Or, use math.rad(90) to use 90 degrees. 1,57 will pass two separate values: 1 and 57. This obviously isn't what you want.
Then I have to use
Code: Select all
<!-- # 2 --><waypoint x="-15816" z="4749">
camera:setRotation(math.rad(90));
yrest(300);
camera:setRotation(math.rad(180));
yrest(300);
camera:setRotation(math.rad(270));
yrest(300);
</waypoint>
Thanks for your help!
Re: RoM bot
lol. I understand nothing. I'm totaly confused.Administrator wrote:I assume you come from a country where ',' can be used to show a decimal place. I'll never understand the logic between that. It makes it impossible to differentiate between one thousand one (1,001) and one and one millionth, for example. And people laugh at the American standard for measurement.
And even with
Code: Select all
<!-- # 42 --><waypoint x="-15493" z="4887">
camera:setRotation(1.57);
yrest(300);
camera:setRotation(3.141);
yrest(300);
camera:setRotation(-1.57);
yrest(300);
</waypoint>
Code: Select all
camera:setRotation(math.rad(90));
if( not player.Battling) and player:findTarget() ) then -- find a new target
__WPL:setWaypointIndex( __WPL.CurrentWaypoint - 1 );
return;
end;
if( not player.Battling) and player:findTarget() ) then -- find a new target
__WPL:setWaypointIndex( __WPL.CurrentWaypoint - 1 );
return;
end;
if( not player.Battling) and player:findTarget() ) then -- find a new target
__WPL:setWaypointIndex( __WPL.CurrentWaypoint - 1 );
return;
end;
The RoM Bot Online Wiki needs your help!
Re: RoM bot
Hello
I have a huge problem with my bot. When I start it on the first time it looks like everything is allright but when it has to heal itself then the bot tries to cast the skill but he dont target itself. So the Curser changes into the casting symbol and nothing happens.
Later I recognized that the TEST MACRO thing in the chat is not there anymore. I tried to delete the but and reinstalled it via svn but nothing.. I also tried to delete the Macro and make a new one but nothing... I deleted the Macro without making a new one and the bot even does not care about that o_O. It runs like usual but without targeting himself --> without healing. Shouldn't there be a error message without a makro placed at the first macro place?
I dont know what to do. So please HEELP ME ;_;
--> I changed my System into Windows 7 (dont know if that has something to do with this issue...)
I have a huge problem with my bot. When I start it on the first time it looks like everything is allright but when it has to heal itself then the bot tries to cast the skill but he dont target itself. So the Curser changes into the casting symbol and nothing happens.
Later I recognized that the TEST MACRO thing in the chat is not there anymore. I tried to delete the but and reinstalled it via svn but nothing.. I also tried to delete the Macro and make a new one but nothing... I deleted the Macro without making a new one and the bot even does not care about that o_O. It runs like usual but without targeting himself --> without healing. Shouldn't there be a error message without a makro placed at the first macro place?
I dont know what to do. So please HEELP ME ;_;
--> I changed my System into Windows 7 (dont know if that has something to do with this issue...)
Re: RoM bot
Check if you turned on the ingame settings for 'selfcasting'. Try to delete your macro file in 'My Documents/Runde of Magic/<char_name>'.akira2102 wrote:Hello
I have a huge problem with my bot. When I start it on the first time it looks like everything is allright but when it has to heal itself then the bot tries to cast the skill but he dont target itself. So the Curser changes into the casting symbol and nothing happens.
Later I recognized that the TEST MACRO thing in the chat is not there anymore. I tried to delete the but and reinstalled it via svn but nothing.. I also tried to delete the Macro and make a new one but nothing... I deleted the Macro without making a new one and the bot even does not care about that o_O. It runs like usual but without targeting himself --> without healing. Shouldn't there be a error message without a makro placed at the first macro place?
I dont know what to do. So please HEELP ME ;_;
--> I changed my System into Windows 7 (dont know if that has something to do with this issue...)
The RoM Bot Online Wiki needs your help!
Re: RoM bot
hi,
i have a question, i want to make one waypoint file for all
i mean i want that the bot run this on startup:
etc.
So i tried it with blank waypoints, but the bot will always try to run to waypoint 0, then i saw in the profile file the <onLoad></onLoad> feature and tried to add the code in there, but i will get this error message:
is there a way to make a waypoint file to execute this lua code without going to a waypoint?
or is there a way to execute this lua code right with the onLoad feature?
i have a question, i want to make one waypoint file for all
i mean i want that the bot run this on startup:
Code: Select all
if( player.Level > 0 ) then
loadPaths("wp1.xml");
end;
if( player.Level > 4 ) then
loadPaths("wp2.xml");
end;
if( player.Level > 8 ) then
loadPaths("wp3.xml");
end;
So i tried it with blank waypoints, but the bot will always try to run to waypoint 0, then i saw in the profile file the <onLoad></onLoad> feature and tried to add the code in there, but i will get this error message:
Code: Select all
scripts\bot.lua:201: onLoad error: c:\mydir.......scripts\functions.lua:276: attempt to index global '__WPL' <a nil value>
or is there a way to execute this lua code right with the onLoad feature?
Re: RoM bot
I make some changes in SVN 365. You can now use loadPath() also in the onLoad event.raff wrote:is there a way to make a waypoint file to execute this lua code without going to a waypoint?
or is there a way to execute this lua code right with the onLoad feature?
You should change your coding to
Code: Select all
if( player.Level > 0 ) then
loadPaths("wp1.xml");
elseif( player.Level > 4 ) then
loadPaths("wp2.xml");
elseif( player.Level > 8 ) then
loadPaths("wp3.xml");
end;
But remember. If you load paths depending from your level, you also have to be at the right place to start the loaded WP file.
The RoM Bot Online Wiki needs your help!
Re: RoM bot
thanks for your fast answer and help , i will try it out
Re: RoM bot
d003232 wrote:Check if you turned on the ingame settings for 'selfcasting'. Try to delete your macro file in 'My Documents/Runde of Magic/<char_name>'.
I think this self Casting crap was it but i dont really can try it.. because of a new problem... After I changed these things the bot itself crashes. See Artachment -->
Re: RoM bot
Hmm. Not really sure about that problem. The bot reads your client language with the MACRO function an get a nil value back. So it could be something with your clients language (what is it?) or you perhaps pressed a modifier key (SHIFT/ALT/CTRL) while that command was executed. So the bot/client missed that MACRO command. Please try it again. And if it still don't work please look ingame for the content of your macro at the first macro space ( what's the content? ).akira2102 wrote:d003232 wrote: because of a new problem... After I changed these things the bot itself crashes. See Artachment -->
The RoM Bot Online Wiki needs your help!
Re: RoM bot
Instead of using loadPaths, tryraff wrote:hi,
i have a question, i want to make one waypoint file for all
i mean i want that the bot run this on startup:
Code: Select all
if( player.Level > 0 ) then loadPaths("wp1.xml"); end; if( player.Level > 4 ) then loadPaths("wp2.xml"); end; if( player.Level > 8 ) then loadPaths("wp3.xml"); end;
Code: Select all
__WPL:load(getExecutionPath() .. "/waypoints/HARVEST_logar_B.xml");
Re: RoM bot
That will not work, because the __WPL object isn't registered at the time of the <onLoad> event. So you would have to do that also. 'loadPath' will do that for you, load the fitting returnpath if you have one with the suffix '_return', will automaticly use the return path if you restart the bot at the resurrection point, will set the closest WP number of the path, ... if you don't want to do that all by hand, use loadPaths for that case.BlackGod wrote:Instead of using loadPaths, tryCode: Select all
__WPL:load(getExecutionPath() .. "/waypoints/HARVEST_logar_B.xml");
The RoM Bot Online Wiki needs your help!
Re: RoM bot
Hi,
the onLoad feature works now, thanks
but i have now another problem:
my code:
i have also wp1_return.xml and wp2_return.xml files in my waypoint dir.
i leave the waypoint option blank in my profil
i start the bot, it loads correctly wp1.xml or wp1_return.xml (which is nearer), when the bot start with the return path and he reach wp1.xml, it will switch to wp1.xml, but the bot will always go to Waypoint #0, (0, 0)
So i tried it without my code in onLoad and with:
result: the bot will correctly switch the waypoints and it works fine :/
any tipps?
the onLoad feature works now, thanks
but i have now another problem:
my code:
Code: Select all
<onLoad>
if( player.Level > 35 ) then
loadPaths("wp1.xml");
elseif( player.Level > 30 ) then
loadPaths("wp2.xml");
end;
</onLoad>
i leave the waypoint option blank in my profil
Code: Select all
<option name="WAYPOINTS" value="" />
So i tried it without my code in onLoad and with:
Code: Select all
<option name="WAYPOINTS" value="wp1.xml" />
any tipps?
Re: RoM bot
tips for what? you got it running.. o_O
Re: RoM bot
When i use this in onLoad:droppen wrote:tips for what? you got it running.. o_O
bot is level 5 so it will load wp2.xmlif( player.Level > 3 ) then
loadPaths("wp2.xml");
elseif( player.Level > 0 ) then
loadPaths("wp1.xml"");
end;
now the bot is near to wp2_return.xml so the bot will go for it
then the bot will load wp2.xml without errors, but the bot will only move to a empty waypoint, called waypoint #0 in console
when i put wp2.xml normal in the waypoint option in the profil file and without using the above code it will switch correctly from wp2_return.xml to wp2.xml without going to waypoint #0
sry for my english, hope you can understand it right
Re: RoM bot
I will check that. It's new to completly load the WP files within the <onLoad> event. So I suppose there is still some 'bug' while doing that.raff wrote:droppen wrote: then the bot will load wp2.xml without errors, but the bot will only move to a empty waypoint, called waypoint #0 in console
when i put wp2.xml normal in the waypoint option in the profil file and without using the above code it will switch correctly from wp2_return.xml to wp2.xml without going to waypoint #0
The RoM Bot Online Wiki needs your help!
Re: RoM bot
HI,
I just want to say, I love your work on the new revision. It rocks and doesnt require me to hit del all the time!
Keep up the good work and many thanks for this awesome product!
I just want to say, I love your work on the new revision. It rocks and doesnt require me to hit del all the time!
Keep up the good work and many thanks for this awesome product!
Re: RoM bot
Now it should work. Update to SVN 368.raff wrote:bot is level 5 so it will load wp2.xml
now the bot is near to wp2_return.xml so the bot will go for it
then the bot will load wp2.xml without errors, but the bot will only move to a empty waypoint, called waypoint #0 in console
when i put wp2.xml normal in the waypoint option in the profil file and without using the above code it will switch correctly from wp2_return.xml to wp2.xml without going to waypoint #0
The RoM Bot Online Wiki needs your help!
Who is online
Users browsing this forum: No registered users and 1 guest