Party bot - Revolution?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Party bot - Revolution?

#21 Post by kuripot » Wed Nov 16, 2011 5:52 pm

JackBlonder wrote: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)


how i can apply this in butterfly daily quest... i mean i doing daily quest with my alt.. as of now i doing butterfly quest with my alts and open micromacro each... but my problem is my main just doing his quest.. dont help my alt in killing when my main is out of range.... it is possible my main and my alts keep in the range.. if my main is a head he suddenly pause and wait for my alt to keep my alts and main in the range?/

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

Re: Party bot - Revolution?

#22 Post by lisa » Wed Nov 16, 2011 9:13 pm

This topic is almost a year old.
Have a look at the topic for DoD or KS, pretty sure people have discussed party botting and keeping within X distance of each bot.
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

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Party bot - Revolution?

#23 Post by kuripot » Thu Nov 17, 2011 1:53 am

lisa wrote:This topic is almost a year old.
Have a look at the topic for DoD or KS, pretty sure people have discussed party botting and keeping within X distance of each bot.


i try to check the the dod and ks topic. but i cant find any related in "keeping within X distance of each bot" or i only overlook??

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests