Page 1 of 2

Enhanced Functionality!

Posted: Wed Nov 03, 2010 10:56 pm
by jduartedj
As of my usage of rom-bot i found that a few extra features would greatly increase our bot experience (mine at least), as so I' posting a set of features I think would enhance bot createpath and bot lua scripts.
Also I am available to help with coding/testing these features if any developer is willing to pursue their programming.

createpath.lua
[Approved r534] allow to restart without saving! (trash waypoint)
allow adding a WP/HP w/ comment.
in-game waypoint editing (create a specific editpath.lua file maybe?)
--adding points
--changing points
--deleting points

bot.lua
[SLOPPY WORKAROUND - NOT submitted]allow to change path w/o restarting
Speed up backpack item logging by backgrounding it (is it really needed to be done b4 choosing the waypoint?)
[Solved r517] RBAssist will stick my WASD operation keyboard keys, any solution for that?


this is what i got so far! any more will b posted here!

EDIT:
I got another 2 issue to improve functionality:
1 - The first is to make the script recognize when we run a return path so when you load it it doesn't look for "_return_return" and instead looks for the main path, so if you load a return path it will run it and then continue in the main path.
2 - The second is a the making of 3-D waypoints! Yes i know it sounds silly but I've have some issues specially in the Kal Turok Ant Hive, specifically when i load the path it finds a return waypoint that is close yet it is WAY above the bot, so in 3D the waypoint would be further!

EDIT2:
1 - [Solved]Title bar information "X min till level up" not working.
2 -

Code: Select all

[/b]Include the Waypoint path file in the title bar!
EDIT3:
3- make "2 -" optional.
(Include the bot name in title bar as an option,  already exists but not as an option so it's dropped)

Re: Enhanced Functionality!

Posted: Wed Nov 03, 2010 11:26 pm
by uelkfr
jduartedj wrote:createpath.lua
allow to restart without saving! (trash waypoint)
CTRL-L, UP, ENTER - solution found :)

Re: Enhanced Functionality!

Posted: Thu Nov 04, 2010 12:26 am
by rock5
jduartedj wrote:createpath.lua
To make it really really versatile and easy to use, it needs a GUI. Micromacro doesn't have GUI capability. If it did I would probably make it.
jduartedj wrote:bot.lua
Speed up backpack item logging by backgrounding it (is it really needed to be done b4 choosing the waypoint?)
I'm not sure if micromacro can multithread or not but if it can, that would be a good idea. Probably, though, it would have to finish before starting the waypoint script anyway.
jduartedj wrote:RBAssist will stick my WASD operation keyboard keys, any solution for that?
I haven't looked at RBAssist for quite awhile now. It did occasionally interfere with WASD. There is no helping that. If you are having excessive interference I'll look into it once the servers come back up.

Re: Enhanced Functionality!

Posted: Thu Nov 04, 2010 2:28 am
by botje
well... seeying im a programmer too, i could provide you with a gui...

if ya give me a list of commands used in createpath, i could proberly whip something up xd

Botje

Re: Enhanced Functionality!

Posted: Thu Nov 04, 2010 8:28 am
by jduartedj
Thx for all the replies :D

@uelkfr: That isnt really a solution... I was thinking somthing like press NUM8 and it asks for waypoint 1 again simply discarding changes.
This comes in the same thread as being able to chose a different path in bot.luw w/o stopping the script because the main idea would indeed be not stopping the script until you have what you want done!

@rock5 & botje: A GUI occured to my also and like Rock5 said (i though so also) MM doesn't support GUI, not directly anyway!
There a 2 ways of doing a solution to this but non is straightforward : a) use a in-game GUI b)create a windows GUI that then links to the MM window

@rock5: about Multi-thread, I did pose that parenthesis question in my post because I don't know if by backgrounding it we're gaining time with all the steps up to the actual script or it is not worth it because it would make us wait almost the same time when we started the script. In this matter I'm convinced that I'm right and would reduce the waiting time to half at least, plus if one would be 'browsing' the Waypoint list that would definitively give time for the bag to load. In my opinion its a matter of MM supporting multi-thread and if it does i think there would be more applications for it in rom-bot. ;)
The RBAssist script does interefere a LOT with my WASD operation and I simply don't use it because of that, I can't move properly anywhere. I guess it would have a number of factors into account that may or may not depend on the user's PC speed and so.


Just to be sure there ain't nothing yet that does this?:
allow to change path w/o restarting
(the script)

Re: Enhanced Functionality!

Posted: Thu Nov 04, 2010 8:51 am
by swietlowka
those changes would nice to see really

Re: Enhanced Functionality!

Posted: Thu Nov 04, 2010 11:51 am
by botje
actually, creating a program to write waypoints is fairly simple.

just have to follow same structure as MM.

ps. only thing that could be challenging would be the retrieval of targetted NPC's etc.

botje

Re: Enhanced Functionality!

Posted: Thu Nov 04, 2010 10:24 pm
by rock5
jduartedj wrote: Just to be sure there ain't nothing yet that does this?:
allow to change path w/o restarting
(the script)
Do you mean like 'loadPaths()'?

Re: Enhanced Functionality!

Posted: Thu Nov 04, 2010 11:34 pm
by jduartedj
rock5 wrote:
jduartedj wrote: Just to be sure there ain't nothing yet that does this?:
allow to change path w/o restarting
(the script)
Do you mean like 'loadPaths()'?

NOT at all! Like while rom/bot.lua is still running, manually switch form Waypoint path file 1 to waypoint path file 2!
instead of pressing CTRL+L, UP, ENTER, DEL(Wait for script loading), and path nr again, just pressing 1 key(exit current path key) + path nr!


it should be fairly easy to return to the waypoint files menu without restarting the bot.lua script right?

Re: Enhanced Functionality!

Posted: Fri Nov 05, 2010 1:00 am
by rock5
In what situation would you use it?

Re: Enhanced Functionality!

Posted: Fri Nov 05, 2010 1:32 am
by rock5
jduartedj wrote:The RBAssist script does interefere a LOT with my WASD operation and I simply don't use it because of that, I can't move properly anywhere. I guess it would have a number of factors into account that may or may not depend on the user's PC speed and so.
It is whenever RoMScript is used that it can interfere with the keyboard. I can change the trigger to a keypress instead of a macro but unfortunately player:checkSkills() also uses RoMScript when getting buff data. If you don't use any skills that have buff or debuff requirements you can edit out the "self:updateBuffs()" line in player.lua.

Code: Select all

	if( deltaTime(getTime(), self.LastBuffUpdateTime) > 500 ) then
		-- self:updateBuffs();
	end;
Actually I could probably disable player:updateBuffs() from the RBAssist script.

I'll change the trigger to a keypress. Any preference as to what key to use as the trigger?

With the above 2 changes there should be 0 keyboard interruptions.

Re: Enhanced Functionality!

Posted: Fri Nov 05, 2010 5:30 pm
by jduartedj
rock5 wrote: I'll change the trigger to a keypress. Any preference as to what key to use as the trigger?

With the above 2 changes there should be 0 keyboard interruptions.

Not personally, no. Just think of a logic key that everyone can sue correctly!

Re: Enhanced Functionality!

Posted: Fri Nov 05, 2010 9:33 pm
by rock5
Updated RBAssist in revision 517.

No more annoying interruptions unless you have skills with player buff requirements.

And it uses a keypress (default SHIFT) instead of a macro

Re: Enhanced Functionality!

Posted: Fri Nov 05, 2010 11:08 pm
by jduartedj
rock5 wrote:Updated RBAssist in revision 517.

No more annoying interruptions unless you have skills with player buff requirements.

And it uses a keypress (default SHIFT) instead of a macro

Thank you very much! I will test it ASAP. ;)

EDIT: I tested it and it works much much better now! Thanks!

Re: Enhanced Functionality!

Posted: Mon Nov 15, 2010 8:03 am
by jduartedj
1 - I've found out that the "XXXmin till level up" in the title bar doesn't work!! --Idk how to fix it because idk where it is!

Also

2 - A good idea would be to include the name of the waypoint file in the title bar also, I sometimes need to know which one I'm running and can't.

EDIT: Read the updates on the topic main post!

Re: Enhanced Functionality!

Posted: Mon Nov 15, 2010 10:34 am
by rock5
jduartedj wrote:1 - I've found out that the "XXXmin till level up" in the title bar doesn't work!! --Idk how to fix it because idk where it is!
I fixed that but it looks like Administrator changed it back to the wrong value with his last update. moneyPtr too.

Try it now. rev 519.

Re: Enhanced Functionality!

Posted: Mon Nov 15, 2010 12:19 pm
by jduartedj
rock5 wrote:
jduartedj wrote:1 - I've found out that the "XXXmin till level up" in the title bar doesn't work!! --Idk how to fix it because idk where it is!
I fixed that but it looks like Administrator changed it back to the wrong value with his last update. moneyPtr too.

Try it now. rev 519.
thx ill try it l8r

Re: Enhanced Functionality!

Posted: Thu Dec 02, 2010 11:54 pm
by jduartedj
rock5 wrote:In what situation would you use it?
As regarding this post I would use it yes, in many situations I find my self spend too much time while switching from 1 waypoint file to another because I have to wait for the reload, select char, press del, bag inventory... if I simply want to change paths manually using some kind of interrupt to return to the waypoints menu would be good thus preserving the player information bag inv. etc....

Re: Enhanced Functionality!

Posted: Fri Dec 03, 2010 12:27 am
by jduartedj
rock5 wrote:
jduartedj wrote:bot.lua
Speed up backpack item logging by backgrounding it (is it really needed to be done b4 choosing the waypoint?)
I'm not sure if micromacro can multithread or not but if it can, that would be a good idea. Probably, though, it would have to finish before starting the waypoint script anyway.
I've done a bit of researching and found out that MM (or lua for that matter) doesn't have Multi-Tasking (or yet it does support cooperative multi-tasking which is totally bogus and not parallel at all). Yet There are a few ways of achieving real multi-tasking: My favorite was Lua Lanes, assuming MM runs on lua engine this should also be possible to add to MM. check it out here Lua Lanes doesn't seem too difficult to implement. In case you want to explore other options here are a few more Multi-Tasking implmentation to lua: http://lua-users.org/wiki/MultiTasking

The best application to this is that it would make much simpler the development of real-time game events!By calling out a listening thread that either reads the events directly from the game's memory or using igf to monitor such events and then write them to somewhere we know it's safe and fast, so passing a macro would do, maybe using a specific memory chunk with an address that could be passed in the bot's start. idk about lua but in C it would be equivalent to doing a malloc with size X and returning the address of the pointer to the thread, then the thread would use a memory read function to check on that value. it should be safe if 1 only writes and 1 only reads such memory.
But i've aleady written a lot. I could work on this but Admin would have to be involved regarding MM issues and the thread 'patch'.

Re: Enhanced Functionality!

Posted: Fri Dec 03, 2010 5:27 am
by rock5
jduartedj wrote:
rock5 wrote:In what situation would you use it?
As regarding this post I would use it yes, in many situations I find my self spend too much time while switching from 1 waypoint file to another because I have to wait for the reload, select char, press del, bag inventory... if I simply want to change paths manually using some kind of interrupt to return to the waypoints menu would be good thus preserving the player information bag inv. etc....
I think I understand what you mean. You basically mean doing a loadPath but being able to choose the file first. Of the top of my head I think it could be done. It would just require the waypoint selection part of bot.lua to be turned into a function so we can call it before doing a loadPath. I'm not sure how the interrupt would work but I think it should be an extra option when you pause the script.
eg.

Code: Select all

Paused. (DEL) to continue, (CTRL+L) exit to shell, (CTRL+C) quit (CTRL+W) load new waypoint file