Page 2 of 3

Re: Party Bot as at 7th oct 2011

Posted: Thu Oct 27, 2011 9:21 pm
by lisa
BillDoorNZ wrote:ok, a suggestion for you Lisa ;) just in case you don't already have enough on your plate :D

NPC Interaction - some way for the PartyDPS/Heals to interact with npc dialogs. e.g. talk to XYZ npc, select option 1, then option 5 etc. This is not a simple one as the main use case for it would be for quest accepting and turn-ins. i.e. Main targets the npc, either sets a raid icon to tell the bots to open a dialog (target_NPC) and then sets another icon to tell them which ChoiceOption / Speakframe option to select. I'll have to do a bit more thinking about this as theres a lot of questions and variable involved in all of that. Might even require extending ingamefunctions to do it tho as ideally you would want to be able to select the quest on your main character and have the bots just mirror what the main is doing. It would be nice to be able to get a main + 4 bots to do all 10 daileys in one sitting or to build waypoints for quest chains and run 5 characters through at once.

I remember reading a comment from Admin about some IPC functions for MM, but have never heard any more about it. If there are some there, then it would make it easier to get this sort of thing happening as you could tell the other MM instances to execute the appropriate dialog options, instead of going through the game client and therefore risking detection by gms.
The networking we were testing a while back made the cpu/memory usage spike incredibly when running multiclients which is why I went with party bot the way I did.

As for questing, partydps only looks for enemies with I icon or looks at icons on itself. Would need to add code into it to look for npc with icons but you wouldn't want it do to it as part of the normal loop, constantly looking at all pawns in range looking for icons would put a huge load on the partydps and slow it down considerably. You could however trigger it by setting an Icon on the character itself, so
if selficon == 4 then look for NPC with icon X, click it, do AcceptQuestByName() and CompleteQuestByName()

Issue with that is you would need to do that for each bot following you, so if 4 bots you would need to change the icon on each of them until they target the NPC, once the code to target occurs it will continue doing rest of code even if you change icons.

So in short it is doable yes.

nerdyone255 wrote:Ack, can't figure out what I'm doing wrong that partydps isn't targeting red players in pvp.
I actually never concidered pvp for this, when you just run bot normally does it attack red named players?

Re: Party Bot as at 7th oct 2011

Posted: Thu Oct 27, 2011 10:54 pm
by nerdyone255
nope doesnt attack reds, butttt bill was right

changing PT_MONSTER to PT_PLAYER; had the partydps attacking red players in pvp :D

now to figure out how to get it to do so in siege :P

noticed in siege that partyhealer only heals and buffs the party leader, and partydps doesnt recognize targets. will do some testing...

Re: Party Bot as at 7th oct 2011

Posted: Thu Oct 27, 2011 11:09 pm
by lisa
nerdyone255 wrote:noticed in siege that partyhealer only heals and buffs the party leader
I should heal the characters in group 1 of the raid that is within range.
Seige auto converts any party to a raid, this raid also acts differently to any other raid.
Notice you can't even click someone in raid unless they are within range of you?
The memory for raid and party members is exactly the same except that you wouldn't need to add the player to the table as it comes in as a raid member, shouldn't cause a conflict but would mean you basically check yourself 3 times every loop of checking party members.

So in order to do whole raid you would need to adjust the so instead of just checking 1-5 it does 1-36
line 31 has
for i = 1, 5 do

I am thinking could actually do a check for number of party/raid members and just do that many.


So basically I would create another WP and either edit the party.lua or just create a userfunction.
and check for raid instead of just party.
Since seige is pvp try to kill anything within range, no check for raid Icons.

Code: Select all

function PartyTable()
		partymemberpawn={}
		local partymemberName={}
		local partymemberObj={}
	for i = 1, 36 do
		if _firsttimes == nil then -- post party names when bot started
			if GetPartyMemberName(i) ~= nil then
				cprintf(cli.yellow,"Party member "..i.." has the name of ")
				cprintf(cli.red, GetPartyMemberName(i).."\n")
				_firsttimes = true
			end
		end
	
		if os.time() - _timexx >= 60  then --only post party names every 60 seconds
			if GetPartyMemberName(i) ~= nil then
				cprintf(cli.yellow,"Party member "..i.." has the name of ")
				cprintf(cli.red, GetPartyMemberName(i).."\n")
			_timexx = os.time()
			end
		end

		if GetPartyMemberName(i) then
			table.insert(partymemberName,i , GetPartyMemberName(i))
			table.insert(partymemberObj,i , player:findNearestNameOrId(partymemberName[i]))
			if partymemberObj[i] then
				table.insert(partymemberpawn,i , CPawn(partymemberObj[i].Address))
			end
		end
	end
end
Something like that will get you started for healer =)

For attacking you wouldn't use findenemy, I will look into it to find a better usage for PVP, there is probably an indicator for players you can attack, I will look into it.

Re: Party Bot as at 7th oct 2011

Posted: Thu Oct 27, 2011 11:16 pm
by lisa
Keep in mind that using memory to find enemies like we do will mean you also find hidden characters such as rogues and try to kill them.

Re: Party Bot as at 7th oct 2011

Posted: Fri Oct 28, 2011 12:57 am
by lisa
Removed file, new 1 in a post a few after this post.

Re: Party Bot as at 7th oct 2011

Posted: Fri Oct 28, 2011 3:27 am
by sdude13
lisa wrote:Keep in mind that using memory to find enemies like we do will mean you also find hidden characters such as rogues and try to kill them.
hmm... so we could target a "hidden" rouge ? (remembers me of old romeos multihack, there it never worked for me).
but attaking a hidden rouge found that way is it possible ??

Re: Party Bot as at 7th oct 2011

Posted: Fri Oct 28, 2011 4:24 am
by lisa
Using a skill on a hidden enemy you can't see is impossible but using an aoe at the coords they are at will break them out of hidden. Something also occurs when you get close to a hidden player and you see them faded, like a ghost, then you can target and attack them. Not sure if you can actually change the memory for the target to make them attackable or not.
Not something I would personally look into.
I am happy to make up a WP that will attack players in seige but not going to make it kill hidden players, need to draw a line somewhere lol

Re: Party Bot as at 7th oct 2011

Posted: Fri Oct 28, 2011 8:46 am
by nerdyone255
error while loading up siegedps.xml

not sure if its syntax or a clash with a setting or something.

ill dabble some more in siege tonight, maybe i wasnt paying enough attention to the healer to notice she was healing/buffing the rest of my party.

Re: Party Bot as at 7th oct 2011

Posted: Fri Oct 28, 2011 9:33 am
by nerdyone255
lisa wrote:I am happy to make up a WP that will attack players in seige but not going to make it kill hidden players, need to draw a line somewhere lol
totally agree

Re: Party Bot as at 7th oct 2011

Posted: Fri Oct 28, 2011 10:44 am
by lisa
I think I clicked the add file button and did some editing afterwards, try it again.

Like I said though really weird, I have prints and it says it should attack it but for some reason it won't actually target the other character. I figured out the player:fight() is fine it is just that it isn't targeting the character in the first place.

Need to work out why.

Code: Select all

	if( bestEnemy ) then
		print("should attack: "..bestEnemy.Name.." Id: "..bestEnemy.Id.."\n")
		return CPawn(bestEnemy.Address);
	else
		return nil;
	end

		player:target(findEnemySeige()) 
		if player:haveTarget() then
			printf("should attack now lol\n")
			player:fight();
		else
			printf("no target\n")
		end
those are just the important bits for now, So in the findEnemySeige() it returns the address for the other character as per the print
print("should attack: "..bestEnemy.Name.." Id: "..bestEnemy.Id.."\n")
but then the
player:target
doesn't actually make it target the player, I checked the function and all it does is make it target the player in memory.

Hmm had a thought, what if they made this the same as they did for objects, so will need to freeze memory for PVP aswell. It will need some testing to find out for sure. I doubt it but i guess it's possible.

Re: Party Bot as at 7th oct 2011

Posted: Fri Oct 28, 2011 12:25 pm
by lisa
Grr. Ok long story short I had a nice long post written out of how it took me hours to find the issue, I hit submit and stupid thing got some weird connection error and lost everything I typed.

Issue was a pvp setting for profile was removed from bot, I have a feeling I was the one that removed it like 6 months ago, really can't say for sure.

Anyway added back in an option for PVP, it is a profile option just look at the default profile to see it.

This WP now works 100%, in a duel atleast lol

I also set it to kill other things then just pvp, so it should attack balloons and kill any players that come near, obviously if you die then that is another issue as no waypoint coords.

So SVN update and then use this WP

Re: Party Bot as at 7th oct 2011

Posted: Mon Oct 31, 2011 7:16 am
by nerdyone255
friggin awesome

<3

Re: Party Bot as at 7th oct 2011

Posted: Mon Oct 31, 2011 8:12 am
by lisa
added a check for player hp into the loop and then to go to sleep.

Code: Select all

		if 10 > player.HP then
			player.sleep()
		end
So if it dies it will go to sleep, so head back and then hit delete to continue.

Re: Party Bot as at 7th oct 2011

Posted: Mon Oct 31, 2011 3:35 pm
by sdude13
hmmm as i look at this, it's doing nearly something I wanted a long time (mix of assist/healbot):

A character that follows my mainchar, heals him and if i set so when no heal is needed fight the
target the mainchar has. But as I want to use it to help level a low char as mainchar,
the two chars should not be in a group. So the mainchar gets the XP, and gets healed...

Re: Party Bot as at 7th oct 2011

Posted: Mon Oct 31, 2011 9:44 pm
by lisa
sdude13 wrote:hmmm as i look at this, it's doing nearly something I wanted a long time (mix of assist/healbot):

A character that follows my mainchar, heals him and if i set so when no heal is needed fight the
target the mainchar has. But as I want to use it to help level a low char as mainchar,
the two chars should not be in a group. So the mainchar gets the XP, and gets healed...
If you get healed by another character while killing a mob then the xp gets adjusted as if you were in the party, so you get bugger all xp. If the you get healed while not in combat then it's not an issue.

Re: Party Bot as at 7th oct 2011

Posted: Mon Oct 31, 2011 10:08 pm
by rock5
lisa wrote:If you get healed by another character while killing a mob then the xp gets adjusted as if you were in the party, so you get bugger all xp. If the you get healed while not in combat then it's not an issue.
I find that hard to believe. Are you sure of that? So if I'm minding my own business, killing stuff and someone runs up and heals me while I'm fighting, I loose out on XP? Does that mean the person healing me gets some of the XP? I thought it would be like killing the mob, if 2 people attack a mob the one to aggro it first gets the XP. That's how it works doesn't it?

Re: Party Bot as at 7th oct 2011

Posted: Mon Oct 31, 2011 11:25 pm
by lisa
rock5 wrote:
lisa wrote:If you get healed by another character while killing a mob then the xp gets adjusted as if you were in the party, so you get bugger all xp. If the you get healed while not in combat then it's not an issue.
I find that hard to believe. Are you sure of that? So if I'm minding my own business, killing stuff and someone runs up and heals me while I'm fighting, I loose out on XP? Does that mean the person healing me gets some of the XP? I thought it would be like killing the mob, if 2 people attack a mob the one to aggro it first gets the XP. That's how it works doesn't it?
Other person (support) doesn't get any xp but you (attacking) do get a reduced xp. It was implemented to stop people from getting max xp while a higher lvl char does the work or supports while not in party.
Otherwise you could take a low lvl char and get it to agro very high lvl mobs while another char not in party kills the mobs and the low level gets very high xp.

Because of the way stating works in RoM a lvl 1 character can walk around with 10k hp very easily.

Re: Party Bot as at 7th oct 2011

Posted: Tue Nov 01, 2011 12:07 am
by rock5
Makes sense I guess.

Re: Party Bot as at 7th oct 2011

Posted: Tue Nov 01, 2011 7:22 am
by sdude13
it does. thx for your comments.

Re: Party Bot as at 7th oct 2011

Posted: Wed Nov 02, 2011 7:33 pm
by nerdyone255
mmm cant get siegedps to attack correctly. seems like its not targeting on its own.

if a crim takes the first shot, it fights back. but a crim can literally stand right infront of the char running siegedps and it wont target and engage.

pvp setting true, not sure what im doing wrong.

seems like theres a difference between duel and actual pk. youre right lisa it does work in duel perfectly. but with criminal/reds in pk it ignores them till attacked first to force the target