Party bot - Revolution?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Party bot - Revolution?

#1 Post by jduartedj » Tue Jan 18, 2011 3:16 pm

Hello,

I'm lately seen loads of topic about party botting, mainly healing but other stuff as well.
My MEGA off-the-top-of-my-head super idea from space is to create a bot lua file of the likes of bot.lua but that manages all the party members t the same time!
at least 2 addicional option would have to exist party_type = tank|healer|dd and leader=true|false under CPlayer. Instead of using player we'd have to use an array of players. and probably use coroutines to be able to check all players at once.
This would make the interraction between bots much easier! and it could be used to farm DoD over and over or just any instance! also making farming a lot faster so you can have a party brute forcing just anything!

Think about it, it's ambitious, hard but awesome!
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Party bot - Revolution?

#2 Post by rock5 » Tue Jan 18, 2011 7:21 pm

At the moment the bot can handle only 1 instance of the game at once. For what you are suggesting, it would have to manage multiple instances of the game at once. It might be possible but probably not feasible. Better to have 1 script that can work together with other versions of the same script running other bots.

I was going to do a major upgrade to RBAssist to include assisting other players but I was put off because you can't get the targets target if the target is also botting.

A solution to this might be if we communication between mm windows. Then the assisting bot could get the targets target via mm to mm communication. I'm not sure if that's possible though.
  • 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

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Party bot - Revolution?

#3 Post by jduartedj » Tue Jan 18, 2011 8:20 pm

There is 1 BIG issue to INTER-MM windows comunication, LUA = NO THREADS!
How Can 1 MM windows listen to comunication if it is doing something else?
Lua is not meant for this degree of programming, it's a mere plugin language that became popular. It's meant o be used along-side C.

Maybe we can develop a Visual C++ app to gradually replace the bot?
EDIT: Keeping as much lua as possible like addons and XML dbs.....
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: Party bot - Revolution?

#4 Post by Administrator » Tue Jan 18, 2011 8:47 pm

A solution to this might be if we communication between mm windows. Then the assisting bot could get the targets target via mm to mm communication. I'm not sure if that's possible though.
No, I don't think so. The pointers change for each client, so we couldn't simply send the pointer across via IPC (which I've been meaning to document...). You could probably send some other sort of unique identifier (that is universal across clients; such as a monster ID), and have the individual clients do a search based on that, though. That would work.
There is 1 BIG issue to INTER-MM windows comunication, LUA = NO THREADS!
How Can 1 MM windows listen to comunication if it is doing something else?
Lua is not meant for this degree of programming, it's a mere plugin language that became popular. It's meant o be used along-side C.
That is half correct. Yes, Lua does not have threads, only coroutines. However, that doesn't mean threading isn't possible. That, and the functions to do this are already available in MicroMacro.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party bot - Revolution?

#5 Post by lisa » Tue Jan 18, 2011 9:17 pm

I think if you went to do a job as big as this you would need to consider that MM and RoM might be on different machines. This would mean communicating in a different manner.

I'd hate to spend so much time and effort getting it running and working as intended to then go, hmm what if we used 2 machines and then have to rethink the entire project.

I know for WoW there was a "hidden" channel for addon information to be broadcast and also received by other addons. I doubt there is anything already existing in RoM like this though.

Some have mentioned about using buffs to communicate between characters, which is fine when setting it up for your own personal use but not everyone would have the exact same setup of classes.

Food for thought.


EDIT:


I did some browsing and there is already a RoM addon called readycheck. Basically the "party leader" can type "/check run" which sends a message through party chat, the other character also needs to have same addon. It reads that a check has been initialized and you get a pop up saying yes or no. If you click yes then it sends info back to leader saying your ready and the UI gets a green box next to your name. If you click no then it gets a red box next to your name.

I think this game addon can be utilized for the purpose of party botting, might need some altering obviously.
It allows for mutli client too, just tested it.

It seems on the small side so should be able to understand it faster/easier then say groupinvite which is pretty huge.
It monitors the party channel and responds accordingly.

This doesn't really help with the targeting situation though but maybe you can utilize the chat monitoring and add in some functions to announce your target to party?

More food for thought lol
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: Party bot - Revolution?

#6 Post by JackBlonder » Wed Jan 19, 2011 2:28 am

I like the idea of a party bot.
As you may have read I tried to build my own assist waypoints but I got at the target problem Rock mentioned.
My workaraound is to search an enemy and get the distance between the leader and the enemy.
I've not much time to play with rombot code at the moment. In February it'll be better though.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Party bot - Revolution?

#7 Post by rock5 » Wed Jan 19, 2011 1:04 pm

Administrator wrote:No, I don't think so. The pointers change for each client, so we couldn't simply send the pointer across via IPC
Of course! I should have thought of that.
Administrator wrote:You could probably send some other sort of unique identifier (that is universal across clients; such as a monster ID), and have the individual clients do a search based on that, though. That would work.
If it's a generic monster I thought the only unique identifier was the address? The Id wouldn't be that useful. Maybe we could identify the mob by it's location? Or maybe not.
lisa wrote:I think if you went to do a job as big as this you would need to consider that MM and RoM might be on different machines. This would mean communicating in a different manner.
I thought of that but this would require chat communication and, as was mentioned before, it's probably not a good idea for bot to be communicating over chat.
  • 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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party bot - Revolution?

#8 Post by lisa » Wed Jan 19, 2011 6:36 pm

rock5 wrote:
lisa wrote:I think if you went to do a job as big as this you would need to consider that MM and RoM might be on different machines. This would mean communicating in a different manner.
I thought of that but this would require chat communication and, as was mentioned before, it's probably not a good idea for bot to be communicating over chat.
I was thinking along the lines of using an existing addon to do the communicating, the addon I linked is a readycheck addon, it communicates through party chat only. If we kept it along the same lines then we would blend in with anyone else using the addon. As for how many players actually use the addon I couldn't say.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

sdude13
Posts: 76
Joined: Thu Aug 19, 2010 9:36 am

Re: Party bot - Revolution?

#9 Post by sdude13 » Fri Jan 21, 2011 4:11 am

Didn't the nkMultiB addon communicate over private channels exactly for this ?
I see it's not working fully and no more updating happens, but last time i used it i could just hit the macro that
sends to every character the message, that it should follow me...

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party bot - Revolution?

#10 Post by lisa » Fri Jan 21, 2011 6:03 am

A little bit of an after thought.

While I was testing out another theory I noticed the target name being posted in MM, it's always been there just never thought of it for this. So the character knows that much atleast and can probably send more info too, possibly coords or address.

Wouldn't it be possible to use a file to save the information and then have another MM read the file? So in function CPlayer:fight from the "tank" have it write the info to a file.

I originally thought of using a table or a DB but I assumed it wouldn't work like that between MM or you guys would have thought of it already.

This would only work on the same PC of course.

So would be using file:write from the "tank" and then file:read from any other characters.

Not sure I explained myself properly, any thought??

I did some testing

Code: Select all

	cprintf(cli.green, language[22], target.Name);	-- engagin x in combat

filename = getExecutionPath() .. "/profiles/target.xml";

file, err = io.open(filename, "a+");
if( not file ) then
	error(err, 0);
end

file:write(target.Name .. " " .. os.date() .. "\n"); 
file:close();
Ok so I changed the player.lua as above.

Code: Select all

Grassland Hyena
Grassland Hyena
Grassland Hyena
Grassland Hyena
Black Boar
Grassland Hyena
Black Boar 01/21/11 21:18:07
Black Boar 01/21/11 21:18:39
Grassland Hyena 01/21/11 21:18:47
Grassland Hyena 01/21/11 21:19:30
Grassland Hyena 01/21/11 21:21:12
Grassland Hyena 01/21/11 21:21:34
Grassland Hyena 01/21/11 21:21:49
Grassland Hyena 01/21/11 21:23:24
Black Boar 01/21/11 21:23:35
Grassland Hyena 01/21/11 21:23:57
Black Boar 01/21/11 21:24:16
Grassland Hyena 01/21/11 21:24:39
Black Boar 01/21/11 21:24:58
I added in timestamp purely to show it was different mobs. I think to use it properly need to use a name + address or coords or something else to identify the target.
Simpler the better so that when it comes to using file:read it will be easier to just get info you want. I obviously used "a+" which adds the line to the bottom of file. I would suguest "w+" which replaces the existing file.
Not sure if there would be conflicts of replacing data if another MM is reading it at that exact time.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Party bot - Revolution?

#11 Post by jduartedj » Fri Jan 21, 2011 7:11 am

This comes down to the same issue rock5 and admin discussed, the same mob in 2 clients has a different address in each therefore it is not identifiable! They talked about a inter MM form o communication that is better I think than filesharing.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party bot - Revolution?

#12 Post by lisa » Fri Jan 21, 2011 7:41 am

inter MM communication would deffinately be much better, unfortunately I don't know how to do that. I just work with what i got lol

I guess what I was trying to say in all that was we do have information that can be shared even though the address might be different between MM clients, surely the name and coords would be exactly the same. Someone else even mentioned using distance from tank as a way to check.
Could add in a check of target name and coords if maxHP > hp then kill it lol Assuming the anti-KS would still take affect so as to not kill mobs other players are attacking.

What about using the mobs target as a double check aswell, surely we can get it's target.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party bot - Revolution?

#13 Post by lisa » Fri Jan 21, 2011 10:42 pm

Ok this idea might actually be a good one lol

While in party the party leader can set icons on mobs, players, npc's. not sure on the full list but the mob is the bit that interests me. I did some testing and the party leader can set the icon even with the way the bot currently works.

So if you can detect the icon from other characters, even on a different machine. then there is your communication.
icons are I II III IV upto VIII, obviously roman numerals and set by pressing the corresponding numbers on NUMPAD. I couldn't find a shortcut to set the icon to "none" but you can only have 1 of each icon in use, so if you had III on mob to kill, then placed III on another mob, the first mob no longer has III on it.

Icons also dissappear when the mob's corpse dissappears.

I really think if the icons can be detected by the bot then this is the solution to targeting mobs.

I still like the idea of using the readycheck addon for actually checking if entire party is ready before moving on.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Party bot - Revolution?

#14 Post by rock5 » Sat Jan 22, 2011 12:07 am

lisa wrote:I really think if the icons can be detected by the bot then this is the solution to targeting mobs.

I still like the idea of using the readycheck addon for actually checking if entire party is ready before moving on.
Being able to detect targets target and communicating to the party that you are ready to move on are 2 separate issues.

This is a good idea for the first problem. I hope it turns out to be viable.
  • 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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party bot - Revolution?

#15 Post by lisa » Sat Jan 22, 2011 12:36 am

here is something interesting. I put an icon on a mob as I had a small kill WP running, when the mob respawned it had the icon again.
So the icon is being attached to the mob entirely until removed in some way and death doesn't remove it.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Party bot - Revolution?

#16 Post by rock5 » Sat Jan 22, 2011 3:20 am

So far I've found a table of values in regards to the party icons but they point to values that I couldn't identify. After a bit more work, I've figured out that they are the pawns GUID. Unlike the address the GUID would be the same across all clients. We don't currently save this value but I discovered that it can be found at offset of 0x20 from the pawns address so it would be easy to add.

Then all we would have to do is search for the mob that has the same GUID as the chosen party icon. Also, if any chat type of communication is used, the GUID is the value you would send to uniquely identify the target mob.

I need to take a break but I'll keep looking into 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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party bot - Revolution?

#17 Post by lisa » Sat Jan 22, 2011 3:58 am

Sounds like this is the way to go ahead though so that's movement in the right direction atleast =)

Has admin said anymore to you about the existing functions in MM for communicating between clients? I had a look and came up empty, bit above my knowledge base. Obviously it would be better not to use a game addon for communication but I see it as an option if needed.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: Party bot - Revolution?

#18 Post by JackBlonder » Sat Feb 12, 2011 11:06 am

I'm trying to use the GUID now to get the target of the partyleader.
This works as iit should. The botted partymember has the right target know.
BUT, what drives me crazy now, it never attacks it...it just stands there.
Here's my code. Maybe someone has a good idea.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
		local maxBattleDistToLeader = 25	--Change to your needs 
		local maxDistToLeader = 100	--Change to your needs (for example if you want use lootBodies)
		local partymember={}
		local partymemberName={}
		local partymemberObj={}
		local partyleaderIndex
		local partyleader
		local partyleaderName
		local partyleaderObj
		local noofpartymembers
		local i

		settings.profile.options.AUTO_TARGET = false
		--printf("AUTO_TARGET: %s\n",settings.profile.options.AUTO_TARGET)
		settings.profile.options.DEBUG_TARGET = true
		--printf("DEBUG_TARGET: %s\n",settings.profile.options.DEBUG_TARGET)
		
		settings.profile.options.ANTI_KS = false
		
--********************************************************
--get all partymembers
--********************************************************
	if RoMScript("UnitExists('party1')") then
	
		partyleaderIndex = RoMScript("GetPartyLeaderIndex()")
		if partyleaderIndex~=nil then
			printf("Found partyleaderIndex: %d \n",partyleaderIndex)
			partyleaderName = RoMScript("UnitName('party"..partyleaderIndex.."')")
			printf("Partyleader: %s \n",partyleaderName)
			partyleaderObj = player:findNearestNameOrId(partyleaderName)
			partyleader = CPawn(partyleaderObj.Address)
		end
					
	
		table.insert(partymemberName, RoMScript("UnitName('player')"))

		i = 1
		while not(i >= 7 ) do
			if RoMScript("UnitIsPlayer('party"..i.."');") then
				table.insert(partymemberName,i+1, RoMScript("UnitName('party"..i.."')"))

			end
			i = i + 1

		end
		
		--show table
		for i,v in ipairs(partymemberName) do print(i,v) end

		noofpartymembers = #partymemberName
		--print(noofpartymembers)
		
		for i,v in ipairs(partymemberName) do
			table.insert(partymemberObj,i,player:findNearestNameOrId(partymemberName[i]))
			table.insert(partymember,i,CPawn(partymemberObj[i].Address))
		end
		
		--****DEBUGGING
		--for i,v in ipairs(partymemberObj) do print(i,v) end
		--for i,v in ipairs(partymember) do print(i,v) end

		--*************
	end

--********************************************************************	
function getTargetGUID(_target)
	local GUID_offset = 0x20
	GUID = memoryReadInt( getProc(), _target+GUID_offset);
	GUID = GUID or 0
	return GUID
end


function findEnemyByGUID(_GUID)
	
	local obj = nil;
	local objGUID;
	local objectList = CObjectList();
	objectList:update();

	for i = 0,objectList:size() do
		obj = objectList:getObject(i);

		if obj ~= nil then
					--printf("_GUID: %d\n",_GUID)
				objGUID = getTargetGUID(obj.Address)
					--printf("objGUID: %d\n",objGUID)
				
				if _GUID == objGUID then
					return obj.Address
				end
		end
	end

	return nil;
	
end
--********************************************************
--Main loop	
--********************************************************
	while(true) do
		
		local leaderTargetGUID
		local playerTargetGUID

		player:update()
		partyleader:update()
		
		if partyleader.TargetPtr~=0 then
			leaderTargetGUID = getTargetGUID(partyleader.TargetPtr)
					--printf("leaderTargetGUID: %d\n",leaderTargetGUID)
		end
		
		if player.Battling then
					--printf("Party battling\n")
		
			player:target( findEnemyByGUID(leaderTargetGUID))
			if player.TargetPtr ~= nil then
					--printf("player.TargetPtr: %d\n",player.TargetPtr)
					--printf("playerTargetGUID: %d\n",getTargetGUID(player.TargetPtr))
				
				--player:update()
				--player:getTarget()
				player:fight()
				yrest(500)
			end

		end
		
		RoMScript("FollowUnit('party"..partyleaderIndex.."');");
		yrest(1000)
	end
	


</onLoad>
</waypoints>
[Edit] got it to work now (but only if partyleader is not botted)

JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: Party bot - Revolution?

#19 Post by JackBlonder » Sat Feb 12, 2011 11:26 am

I have another question.
CPlayer:fight does use "<" and "<=". :shock:
I thought this does not work.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Party bot - Revolution?

#20 Post by rock5 » Sat Feb 12, 2011 8:30 pm

I believe player:target() does not change player.TargetPtr. You either have to change this manually or run player:update(). I recommend doing player:update().

< and <= don't work in xml files because they are seen as opening tags. They work just fine in lua files.
  • 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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests