I was thinking... you know how you can pause and resume the bot using [End] and [Del]? What if you made a hotkey that would pause the bot and allow you to type in a lua command, similar to how you can type in a command during waypoint creation, and then when you press whatever hotkey to continue (or Enter) it would execute that command prior to continuing doing what it was doing?
I think this could come in handy. For instance, suppose my bot is running a script and I realize that he's moving slow. I could pause it, insert a useGoodie("speed") and a speed() and the bot would execute those commands and then continue on it's way.
Or another example... my bot is running around doing whatever, when I see a node I could harvest... so I hit the hotkey, enter harvest(), and the bot harvests and then continues on it's way.
That last example got me to thinking about another possibility... How about the ability to inject a command and add that command to the actual current waypoint file. That would make editing your harvest waypoints so much easier.
Thoughts?
inject commands during waypoint execution?
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: inject commands during waypoint execution?
The edit waypoints is a good idea. I have seen people make text files and were able to modify lines it seems you could load the current wp then create a new one interactively. I have even thought of making a 3d viewer to show the path of the current wp as a line drawing much like the mini map so you can see the upcoming and past wp. renumbering and inserting lines in a wp has always bothered me it seems this could be handled in the path create with a edit option. Its just to much to try to edit a complex file though.
this seems easy but it would take someone with good imagination to code.
For most wp its just as easy to make shortcuts on your desktop to create path, get object id, get player location, and pop them when needed and manually edit the paths.
your idea to put in some random lua code just does not seem to useful though. The complicated paths that use lots of functions and loop around I don't think there is a easy way to handle them.
If you want use potion just pause and click it.
this seems easy but it would take someone with good imagination to code.
For most wp its just as easy to make shortcuts on your desktop to create path, get object id, get player location, and pop them when needed and manually edit the paths.
your idea to put in some random lua code just does not seem to useful though. The complicated paths that use lots of functions and loop around I don't think there is a easy way to handle them.
If you want use potion just pause and click it.
Re: inject commands during waypoint execution?
The main problem is you can't write anything while the bot runs , you would need a second command prompt which runs in is own thread or you would simple pause the bot and what you write will simple a function which are executed per xpcall and/or loadstring.
I my framework you can later resume old waypoints which also means you can edit them more options means more choices for the menu which case heavy overload it kinda like the idea of an editor means you need either a MM with a complete different surface or another tool.
I my framework you can later resume old waypoints which also means you can edit them more options means more choices for the menu which case heavy overload it kinda like the idea of an editor means you need either a MM with a complete different surface or another tool.
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
Re: inject commands during waypoint execution?
Executing a command would be easy enough. While accepting input from the user with a prompt the bot can't run so it would have to be an option when the bot is paused. Eg.
When you press the (Ins) key then you would get an input prompt and when you press enter it executes the command.
The idea of editing the waypoint file on the fly is a good one but may not be feasible. When the waypoint file is loaded the lua code in waypoints and onload are converted to functions so they can't be edited. Also the "save waypoint file" functionality only exits in the createpaths.lua file. So you would have to change the way the bot loads the file and add save waypoint file functionality. I don't see it as feasible. A better idea might be to increase the functionality of createpaths.lua to be able to load existing waypoint files and edit existing waypoints.
Code: Select all
<Paused. (Del) to continue, (CTRL+L) exit to shell, (CTRL+C) quit (Ins) Execute command
The idea of editing the waypoint file on the fly is a good one but may not be feasible. When the waypoint file is loaded the lua code in waypoints and onload are converted to functions so they can't be edited. Also the "save waypoint file" functionality only exits in the createpaths.lua file. So you would have to change the way the bot loads the file and add save waypoint file functionality. I don't see it as feasible. A better idea might be to increase the functionality of createpaths.lua to be able to load existing waypoint files and edit existing waypoints.
- 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
Re: inject commands during waypoint execution?
for completed waypoints I agree but when first laying out a wp thru some area that has no lua yet.
It seems you could open the wp as input and parse it as you move about. Then if you hit a wp that needs moved a bit just place the new one. Could it then write the correct wp file out much like it creates the log files . there are many times i just need to move a point just a bit or insert a extra one.
This is not possible if it cannot access the wp folder ? It is not much of a problem for me now I have learned to walk the path before placing points and to place extra points near turns and doors I can use to tweak things.
It seems you could open the wp as input and parse it as you move about. Then if you hit a wp that needs moved a bit just place the new one. Could it then write the correct wp file out much like it creates the log files . there are many times i just need to move a point just a bit or insert a extra one.
This is not possible if it cannot access the wp folder ? It is not much of a problem for me now I have learned to walk the path before placing points and to place extra points near turns and doors I can use to tweak things.
Re: inject commands during waypoint execution?
rock5 wrote:Executing a command would be easy enough. While accepting input from the user with a prompt the bot can't run so it would have to be an option when the bot is paused. Eg.When you press the (Ins) key then you would get an input prompt and when you press enter it executes the command.Code: Select all
<Paused. (Del) to continue, (CTRL+L) exit to shell, (CTRL+C) quit (Ins) Execute command
The idea of editing the waypoint file on the fly is a good one but may not be feasible. When the waypoint file is loaded the lua code in waypoints and onload are converted to functions so they can't be edited. Also the "save waypoint file" functionality only exits in the createpaths.lua file. So you would have to change the way the bot loads the file and add save waypoint file functionality. I don't see it as feasible. A better idea might be to increase the functionality of createpaths.lua to be able to load existing waypoint files and edit existing waypoints.
Hm

The only thing which is might needed in addition to that is a add(waypoint,pos) functions
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
Who is online
Users browsing this forum: Bing [Bot] and 2 guests