Party Bot (questions/answers)

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party Bot (questions/answers)

#201 Post by lisa » Mon Mar 18, 2013 6:08 pm

kenzu38 wrote:What I want really is what I have stated so far.
Trouble is that what you have stated doesn't add up.

You say you want to always check the raid leader's target but that means your main would need to always be the raid leader. So you join the butterfly raid and then say "Hey I have a handful of bots here, make me leader so I can use them" but if you don't get the raid lead then it will make any code you do useless because you are basing it on the fact you would be raid leader.
kenzu38 wrote:Problem is, I don't know where to start. How do I make the bot evaluate a party leader's target?
I mentioned the code needed to post in party chat order to make the party bots do things with a characters target, you just need to look in classes/party.lua and you will see it.
It is actually very simple.

Code: Select all

			local target = getTarget(charname)
			if target then
			      -- do some fancy stuff here
target will be the Pawn of the target, so it will have all the usual information in it that a pawn has.
target.Name
target.Type
target.X
......
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

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: Party Bot (questions/answers)

#202 Post by kenzu38 » Tue Mar 19, 2013 1:50 am

lisa wrote: Trouble is that what you have stated doesn't add up.

You say you want to always check the raid leader's target but that means your main would need to always be the raid leader. So you join the butterfly raid and then say "Hey I have a handful of bots here, make me leader so I can use them" but if you don't get the raid lead then it will make any code you do useless because you are basing it on the fact you would be raid leader.
Yes, I just mentioned party leader target as an example coz that's the ideal and basic setup I had in mind. So in a normal setup where it's just me and the bots leveling, then the char I'm controlling manually will always be the party leader.

But of course when in a raid, then I will adjust the code accordingly and just specify the name of the character they will be monitoring. Not the party or raid leader. That's what I had in mind.
lisa wrote:I mentioned the code needed to post in party chat order to make the party bots do things with a characters target, you just need to look in classes/party.lua and you will see it.
It is actually very simple.

Code: Select all

			local target = getTarget(charname)
			if target then
			      -- do some fancy stuff here
target will be the Pawn of the target, so it will have all the usual information in it that a pawn has.
target.Name
target.Type
target.X
......
So if I'm understanding this right, this getTarget() function can get the target of the party leader or the target of the charname specified automatically? That's what I wanted to know from the start.

Anyway, thanks for the help. I will be looking into this right away and do some tests. Will post on an new thread about this when I get stuck on something.

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

Re: Party Bot (questions/answers)

#203 Post by lisa » Tue Mar 19, 2013 2:38 am

kenzu38 wrote: this getTarget() function can get the target of the party leader or the target of the charname specified automatically?
it will just return the target of the specified character, if you want it to do the party leader then do

Code: Select all

local leader = getPartyLeaderName()
if leader then
         local target = getTarget(leader)
         if target then
               -- do some fancy stuff here
kenzu38 wrote:Anyway, thanks for the help. I will be looking into this right away and do some tests. Will post on an new thread about this when I get stuck on something.
sounds good
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

Bubi
Posts: 57
Joined: Tue May 04, 2010 3:51 pm

Re: Party Bot (questions/answers)

#204 Post by Bubi » Wed Mar 27, 2013 5:13 pm

Hi Lisa,
if i set ICON_FIGHT = true the Party members do not attack the mobs with the I is on top of the mob.
In the function

Code: Select all

function icontarget(address) -- looks for icon I on mobs
	local pawn = CPawn.new(address);
	local icon = pawn:GetPartyIcon()
	if icon == 1 then
		return true
	end
end
The pawn:GetPartyIcon() never return 1
and in

Code: Select all

function CPawn:GetPartyIcon()
	self:updateGUID()
	local listStart = memoryReadRepeat("uintptr", getProc(), addresses.partyIconList_base, addresses.partyIconList_offset)
	for i = 0, 6 do
		local guid = memoryReadShort(getProc(), listStart + i * 12)
		if guid == self.GUID then
			return i + 1
		end
	end
end
guid never is equal to self.GUID

maybe partyIconList_offset have changed ??

please help ^^

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

Re: Party Bot (questions/answers)

#205 Post by lisa » Wed Mar 27, 2013 6:43 pm

In get party Icon it should be an int and not short read

Code: Select all

local guid = memoryReadInt(getProc(), listStart + i * 12)
Atleast the GUID would match up now.

Actually that will probably fix the party icon, but not the target(mob) icon.


--=== Added ===--

Tested and works fine.

Code: Select all

Command> local pawn = CPawn(player:findNearestNameOrId("Malatina").Address) print(pawn:GetPartyIcon())
5
I had the V icon on malatina =)


I worked it out, the pawn GUID used to be a short aswell but was changed to Int recently.
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 (questions/answers)

#206 Post by lisa » Wed Mar 27, 2013 7:20 pm

committed to 756, just SVN update and it should be fine now.
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 (questions/answers)

#207 Post by rock5 » Thu Mar 28, 2013 12:37 am

Oops, my bad. I must have missed that one.
  • 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

Bubi
Posts: 57
Joined: Tue May 04, 2010 3:51 pm

Re: Party Bot (questions/answers)

#208 Post by Bubi » Thu Mar 28, 2013 2:30 am

Thank you very very much :D Image

Image
Image
Image

Bubi
Posts: 57
Joined: Tue May 04, 2010 3:51 pm

Re: Party Bot (questions/answers)

#209 Post by Bubi » Thu Mar 28, 2013 6:31 am

Hi again,
now i get a lot of client crashes ??.
Always in or after a mob fight.
There is no clear error message in MM.

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

Re: Party Bot (questions/answers)

#210 Post by lisa » Thu Mar 28, 2013 6:26 pm

Bubi wrote:Hi again,
now i get a lot of client crashes ??.
Always in or after a mob fight.
There is no clear error message in MM.
determining cause of game crashes is a bit harder, best thing to do is to try using the default profile and see if it crashes, half the crash issues are from peoples profiles or userfunctions.
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

Bubi
Posts: 57
Joined: Tue May 04, 2010 3:51 pm

Re: Party Bot (questions/answers)

#211 Post by Bubi » Fri Mar 29, 2013 5:04 am

Hi Lisa
In a party of four, the leader is manually played for questing. The 3 party mates are for support and also questing.
Only when the mob has a 1 on top, the possibility of a crit increases to 80%.
I think MM try to read the mobs address but the mob is already killed by one of the team mates or myself.
I will print out some more messages so that I can figure out in which part of the code the error occurs.

The profiles are OK. :mrgreen:

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

Re: Party Bot (questions/answers)

#212 Post by lisa » Fri Mar 29, 2013 6:09 am

Ok I can confirm this, seems to only be with using player:fight, my healer using the healfight() hasn't crashed yet.

3 DPS, 1 Heal_fight

1 dps crashed after about 10 mins
restarted
2 dps crashed same time after about 15 mins.
restarted
been going about 40 mins now with no crash.
at 45 mins 1 dps crashed.


Used the in game code"" to change it to not be ICON_FIGHT and no crashes yet, been 33 mins since then.

60 mins of not ICON_FIGHT and still no crash.
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

Bubi
Posts: 57
Joined: Tue May 04, 2010 3:51 pm

Re: Party Bot (questions/answers)

#213 Post by Bubi » Sat Mar 30, 2013 4:02 am

Played yesterday several hours with 3dps and with code"icon_fight". I avoided to put 1 on mob, so there where no crashes ^^.
Once I put an 1 on a mob and manually killed them almost instantly, all 3dps crashed before they entered fighting.

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

Re: Party Bot (questions/answers)

#214 Post by lisa » Sat Mar 30, 2013 6:35 am

k give this a try and keep the profile settings with ICON_FIGHT as true.
Attachments
party.lua
(17.98 KiB) Downloaded 166 times
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

Bubi
Posts: 57
Joined: Tue May 04, 2010 3:51 pm

Re: Party Bot (questions/answers)

#215 Post by Bubi » Sun Mar 31, 2013 11:02 am

Hi Lisa,
the issue still exists. Could it be a problem of the "player:findEnemy(nil,nil,icontarget,nil)" part?
Like the crashes in "AndorTraining", when MM try to work with a no more existing "obj" or "pawn".
So could be the issue somewhere here in player:findEnemy()?

Code: Select all

						if( evalFunc(pawn.Address, pawn) == true ) then
							pawn:updateXYZ()
							pawn:updateInParty()
							if ((pawn.TargetPtr == self.Address or pawn:targetIsFriend()) and
							aggroOnly == true) or aggroOnly == false then
								local currentScore = 0;
								pawn:updateHP()
								currentScore = currentScore + ( (settings.profile.options.MAX_TARGET_DIST - dist) / settings.profile.options.MAX_TARGET_DIST * SCORE_DISTANCE );
								currentScore = currentScore + ( (pawn.MaxHP - pawn.HP) / pawn.MaxHP * SCORE_HEALTHPERCENT );
								if( pawn.TargetPtr == self.Address or pawn:targetIsFriend() ) then currentScore = currentScore + SCORE_ATTACKING; end;
								if( pawn.Aggressive ) then
									currentScore = currentScore + SCORE_AGGRESSIVE;
								end;
								if( bestEnemy == nil ) then
									bestEnemy = obj;
									bestScore = currentScore;
								elseif( currentScore > bestScore ) then
									bestEnemy = obj;
									bestScore = currentScore;
								end
							end
						end

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

Re: Party Bot (questions/answers)

#216 Post by lisa » Sun Mar 31, 2013 7:26 pm

give this a try, still use the party.lua I posted as it is much more efficient in the icontarget.
Attachments
player.lua
(127.16 KiB) Downloaded 161 times
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 (questions/answers)

#217 Post by kuripot » Fri Aug 16, 2013 6:19 am

how can i activate and deactivate party healer in specific time and place just like userfunction to call.. example when my healer use the waypoint to the boss then when my healer is in the boss i want to activate the party healer before kill the boss by the other char then i want o deactivate after killing the boss then continue the waypoint

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

Re: Party Bot (questions/answers)

#218 Post by lisa » Fri Aug 16, 2013 6:25 pm

Before the boss fight have the leader post this in party chat

Code: Select all

code"settings.profile.options.HEAL_FIGHT = true"
and then afterwards change the true to false.
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 (questions/answers)

#219 Post by kuripot » Fri Aug 16, 2013 10:20 pm

i mean do not need the partyhealer.xml?... just use HEAL_FIGHT on and off??

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

Re: Party Bot (questions/answers)

#220 Post by lisa » Sat Aug 17, 2013 3:18 am

Hmm so you want to do party healing at one stage and then not party healing at another.

One solution comes to mind, use your waypoint until boss then do a loadpath for partyhealer in that WP, then once boss is dead it will still be using partyhealer and do a loadpath in party chat.

Code: Select all

code"loadPaths('wpname')"
So it will then do that WP.
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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 27 guests