Page 1 of 1

targeting hostile players?

Posted: Wed Dec 28, 2011 2:27 am
by Blyad
im from grimdal (a pvp server) and i farm dogmeats, as you can imagine, its rather crowded from time to time. i like to resolve this by tab targeting other bots from time to time. however im very inefficient at it. this is my dogmeat farming script for the sake of example.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="NORMAL">
	<!-- #  1 --><waypoint x="6301" z="5028" y="179">if inventory:itemTotalCount(0) == 0 then loadPaths("blyads_dogmeat_merchant.xml") end
	</waypoint>
	<!-- #  2 --><waypoint x="6411" z="4763" y="181">if inventory:itemTotalCount("Guard Dog Meat") > 2000 then loadPaths("blyads_dogmeat_mail.xml")
end	</waypoint>
	<!-- #  3 --><waypoint x="6355" z="4529" y="180">  RomScript("TargetNearestEnemy") yrest(250) player:fight()	</waypoint>
	<!-- #  4 --><waypoint x="6518" z="4333" y="181">   RomScript("TargetNearestEnemy") yrest(250) player:fight()	</waypoint>
	<!-- #  5 --><waypoint x="6438" z="4201" y="181">   RomScript("TargetNearestEnemy") yrest(250) player:fight()	</waypoint>
	<!-- #  6 --><waypoint x="6526" z="4216" y="181">   RomScript("TargetNearestEnemy") yrest(250) player:fight()		</waypoint>
	<!-- #  7 --><waypoint x="6360" z="4487" y="180">  RomScript("TargetNearestEnemy") yrest(250) player:fight()	</waypoint>
	<!-- #  8 --><waypoint x="6424" z="4705" y="181">   RomScript("TargetNearestEnemy") yrest(250) player:fight()	</waypoint>
</waypoints>
i keep my bot flagged for PvP at all times ( the skill is setup as a buff like Enhanced armor and executed as such)

the bot them stops at every waypoint and tab targets. sometimes it's a player sometimes its a mob sometimes its nothing and just keeps walking.

is there a more effective method to target players via memory? its very important that i dont execute the Player:Fight(); function on someone who has a pk bubble or i will just end up chasing an immune player.

ultimately this is just another one of my small side project to make my bots behave more human like, and what's more human than killing people who killsteal your mobs?

any advice is appreciated i checked the wiki and it didnt have any valuable information regarding this type of thing.

Re: targeting hostile players?

Posted: Wed Dec 28, 2011 3:19 am
by lisa
I did up some code for siege a little while back, not sure where it is at the moment. Could probably do a forum search for siege dps or siege damage.

I also added in a profile option for PVP.

Code: Select all

     <!-- pvp -->
      <!--option name="PVP"         value="true" /> -->       <!-- To enable PVP, with this set to true it will auto attack any players with red names -->
      
I did it mainly for siege, not sure if it will attack on a pvp server.

Re: targeting hostile players?

Posted: Wed Dec 28, 2011 7:05 am
by Blyad
now i just feel silly. thanks lisa ^_^