Page 2 of 2

Re: Bot should stand on place and wait

Posted: Fri Aug 03, 2012 3:31 pm
by booting1
it works, but not perfect, sometimes change after second boss kill but not always at startpoint, change channel at the point where the boss stand/go, and so the other problem, the bot do not stand up after change, so sometimes he death, because the boss faster with kill, as the bot by stand up.

Re: Bot should stand on place and wait

Posted: Sat Sep 01, 2012 3:22 pm
by Ego95
Is it possible to change that code to wait for an object?

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- #  1 --><waypoint x="-1039" z="1870" y="52">
   local Boss
   repeat
     yrest(1000)
     Boss = player:findNearestNameOrId("bossname")
   until Boss   
   player:target(Boss.Address)
  player:fight()
</waypoint>
</waypoints>
There are two cages I need to click on to complete the quest. Now I've done it very simple. If one of the cages isn't there it runs to the other, but if the two cages were clicked by someone else the bot runs between them. It should wait for the cages if they aren't there and only until the quest is completed.
Why does this not work?

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- #  1 --><waypoint x="-1039" z="1870" y="52">
   local Object
   repeat
     yrest(1000)
     Object = player:findNearestNameOrId("cage")
   until Object   
   player:target("cage")
</waypoint>
</waypoints>

Re: Bot should stand on place and wait

Posted: Mon Sep 03, 2012 2:49 pm
by Ego95
Does no one know how to do that? There is an other player who is botting at that place and it works perfectly for him, but he won't admit that he's using a bot when i try to get his script :/

Re: Bot should stand on place and wait

Posted: Mon Sep 03, 2012 10:22 pm
by rock5
player:target doesn't do anything. It just makes the object the target. To "click" what you have targeted execute the "Attack()" command. Depending on how far the object is you might need to do a yrest as well to give the bot time to move to the object. Or maybe you could wait till "Object" disappears.

Re: Bot should stand on place and wait

Posted: Wed Sep 05, 2012 4:37 am
by Ego95
OK, finally got it working with:

Code: Select all

	<!-- #  8 --><waypoint x="-27922" z="23965" y="1" type="TRAVEL">		
		player:target_Object("Gefangener der Diebe");
		yrest(1500)
		quest = questlog:getQuest(424624)								-- Sofortige Hilfe
		if quest:isComplete() then
			__WPL:setForcedWaypointType("TRAVEL")
			player:mount()
			__WPL:setWaypointIndex(__WPL:findWaypointTag("quest1complete"));
		elseif not quest:isComplete() then
				repeat
					yrest(1000)
					Boss = player:findNearestNameOrId("119486") or player:findNearestNameOrId("119487")
				until Boss  
				player:target_Object("Gefangener der Diebe");
		end
The two cages had a different ID. If I use the Attack() it starts attacking mobs when you pull aggro of them. But now it works fine :)