-
Jig
- Posts: 13
- Joined: Tue Apr 23, 2013 4:14 pm
#1
Post
by Jig » Sat Apr 27, 2013 2:06 am
Hello,
i have follow problem, i want to farm some mobs, but without running - just standing still.
if i use wander with radius 0 then i have the problem the bot doesnt run to the original position. im using this atm:
Code: Select all
<waypoints>
<option name="PATH_TYPE" value="wander"/>
<option name="WANDER_RADIUS" value="0" />
<!-- # 1 --><waypoint x="x" z="z" y="y"> player:restrnd(100, 3, 10) </waypoint>
</waypoints>
so he runs back after every fight,
but the bot is circling his head, and that is obviously a bot after some minutes.
If i dont pause, the bot is circling his head continuously - but it doesnt fight or scan for targets.
Can someone help me?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#2
Post
by rock5 » Sat Apr 27, 2013 4:44 am
If you don't want it to move while it waits then you have to write some wait code
Eg.
Code: Select all
repeat
yrest(1000)
until player:findEnemy(false,nil,evalTargetDefault)
That should work. It should stand still and wait until a valid mob is in range and then continue normally and attack it. When there are no more mobs it should return to the wp to wait again.
- 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.”
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#3
Post
by lisa » Sat Apr 27, 2013 5:05 am
i really don't see how this part can work
Code: Select all
<option name="PATH_TYPE" value="wander"/>
<option name="WANDER_RADIUS" value="0" />
What I usually do though in this situation is do the code in onload and not even have any actual waypoints
If you are melee you would also need to add code to go back to the spot you want, if ranged it's pretty easy.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
changeProfileOption("MAX_TARGET_DIST", 180);
changeProfileOption("COMBAT_DISTANCE", 180);
while (true) do
local done = false
local objectList = CObjectList();
objectList:update();
local objSize = objectList:size()
for i = 0,objSize do
obj = objectList:getObject(i);
if done ~= true and (obj.Name == "Puppet Warrior" or obj.Name == "Puppet Shaman" and obj.Type ~= 1) then
player:target(obj);
--player:update();
--if( player:haveTarget() ) then
player:fight();
done = true
--end
end
end
player:checkSkills(true);
end
</onLoad>
</waypoints>
-
Jig
- Posts: 13
- Joined: Tue Apr 23, 2013 4:14 pm
#4
Post
by Jig » Sat Apr 27, 2013 5:15 am
Thank you very much rock5 and lisa.
It works really great. Now its perfect.

-
minhtien86
- Posts: 31
- Joined: Sat Mar 17, 2012 1:14 am
#5
Post
by minhtien86 » Sun Jun 16, 2013 11:03 pm
lisa wrote:i really don't see how this part can work
Code: Select all
<option name="PATH_TYPE" value="wander"/>
<option name="WANDER_RADIUS" value="0" />
What I usually do though in this situation is do the code in onload and not even have any actual waypoints
If you are melee you would also need to add code to go back to the spot you want, if ranged it's pretty easy.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
changeProfileOption("MAX_TARGET_DIST", 180);
changeProfileOption("COMBAT_DISTANCE", 180);
while (true) do
local done = false
local objectList = CObjectList();
objectList:update();
local objSize = objectList:size()
for i = 0,objSize do
obj = objectList:getObject(i);
if done ~= true and (obj.Name == "Puppet Warrior" or obj.Name == "Puppet Shaman" and obj.Type ~= 1) then
player:target(obj);
--player:update();
--if( player:haveTarget() ) then
player:fight();
done = true
--end
end
end
player:checkSkills(true);
end
</onLoad>
</waypoints>
How do i make char stand at one point and attack when enemy appear then go back ?
Who is online
Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 1 guest