Page 1 of 2
Bot should stand on place and wait
Posted: Sat Jul 21, 2012 10:46 am
by booting1
hello,
when i will farm 1 litte boss, what i can do that the bot stand still, not move on stand left right left right and so on.
i will that the bot stand where i have make 1 waypoint and wait for the respawn, kill the enemy and loot and stand still on the marked waypoint.
this is my file.
<xml version="1.0" encoding="UTF-8"?>
-<waypoints>
<!-- # 1 -->
<waypoint y="39" z="1943" x="-1023"> </waypoint> </waypoints>
Re: Bot should stand on place and wait
Posted: Sat Jul 21, 2012 2:11 pm
by gloover
Code: Select all
<waypoint y="39" z="1943" x="-1023">
local Boss = player:findNearestNameOrId("Bossname")
repeat
yrest(1000)
until Boss
</waypoint>
I hope it is not Locface amd also hope you are not on the same server like me

Re: Bot should stand on place and wait
Posted: Sun Jul 22, 2012 1:10 am
by booting1
thx
but
this is in xml file now
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-1039" z="1870" y="52">
local Boss = player:findNearestNameOrId("bossname")
repeat
yrest(1000)
until Boss </waypoint>
</waypoints>
the boss is on i start the bot
he kills the boss, run and loot, and than he look another targeht kill this and than he go back and sand still
when the boss respawn the bot do nothing again? yrest 1000 is this wait 1000 seconds befor do anything again?
isnt locface

the is another player 24 on day
can i say the bot to change channel for m1 -2 from 2-3 und vom 3-1?
Re: Bot should stand on place and wait
Posted: Sun Jul 22, 2012 2:25 am
by gloover
yrest (1000) means the bot is looking for this npc every 1 sec. (yrest is allways in msec. player:rest(..) is in sec.)
this will solve your problem
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-1039" z="1870" y="52">
local Boss = player:findNearestNameOrId("bossname")
repeat
yrest(1000)
until Boss
player:target(Boss.Address)
player:fight()
</waypoint>
</waypoints>
yes, u can change channel i.e. after leave combat or in your wp:
Code: Select all
if( 1 == RoMScript("GetCurrentParallelID()") ) then
sendMacro("ChangeParallelID(2)");
else
sendMacro("ChangeParallelID(1)");
end
Re: Bot should stand on place and wait
Posted: Sun Jul 22, 2012 3:10 am
by lisa
wouldn't you need the find mob inside the loop? otherwise it would just be stuck in the loop forever as the variable has been defined before the loop?
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-1039" z="1870" y="52">
repeat
yrest(1000)
local Boss = player:findNearestNameOrId("bossname")
until Boss
player:target(Boss.Address)
player:fight()
</waypoint>
</waypoints>
Re: Bot should stand on place and wait
Posted: Sun Jul 22, 2012 3:15 am
by booting1
@lisa
i stand range 100-120 from respawn the boss. the boss walk in a very litte lange.
i log in see the boss. start the bot / waypoint. he kills the boss and go to loot. than he look for an other target kills this when i kann, or go back to start waypoint. there he stand, but when the bot come again the bot do nothing. when the boss attacks the bot, the bot die because he does nothing
i will test this from gloover.
@ gloover where i can found the boss-adress?
Re: Bot should stand on place and wait
Posted: Sun Jul 22, 2012 3:21 am
by gloover
Lisa, you've right - it belongs inside the loop
@ botting
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-1039" z="1870" y="52">
repeat
yrest(1000)
local Boss = player:findNearestNameOrId("bossname")
until Boss
player:target(Boss.Address)
player:fight()
</waypoint>
</waypoints>
should work. You dont need the boss adress - using this as written should work.
Re: Bot should stand on place and wait
Posted: Sun Jul 22, 2012 4:05 am
by lisa
don't forget to add the name of the "boss"
Code: Select all
local Boss = player:findNearestNameOrId("bossname")
bossname needs to be changed to the name of the boss, or the ID.
Re: Bot should stand on place and wait
Posted: Sun Jul 22, 2012 12:04 pm
by booting1
status:
start game start bot
bot kill and loot boss, bot attack another targeht, bot goes back to startpoint and wait
boss comes agaein bot crash
look screen.
in the xml file is the last code from gloover
in bossname stand the name from boss
Re: Bot should stand on place and wait
Posted: Sun Jul 22, 2012 12:56 pm
by rock5
'Boss' was made a local variable so it would only have a value inside the 'repeat' loop. Try this.
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>
Re: Bot should stand on place and wait
Posted: Sun Jul 22, 2012 2:33 pm
by booting1
thank you
it looks good at the time. but now my next wish.
the bot shoud change the channels
i start on 1 after kill change to 2, after kill to 3, after kill to 1 and so on....
groovler has written this
if( 1 == RoMScript("GetCurrentParallelID()") ) then
sendMacro("ChangeParallelID(2)");
else
sendMacro("ChangeParallelID(1)");
end
i but this in the waypointfile but nothing will do.
Re: Bot should stand on place and wait
Posted: Mon Jul 23, 2012 12:56 am
by gloover
Post your whole script - me and other doesnt know where you have pasted this, so may it is without the loop.
Re: Bot should stand on place and wait
Posted: Mon Jul 23, 2012 2:03 am
by rock5
To make it so you can use it with any number of channels, try this instead.
Code: Select all
local NumChannels = RoMScript("GetNumParalleZones()")
local NextChannel = RoMScript("GetCurrentParallelID()") + 1
if NextChannel > NumChannels then
NextChannel = 1
end
sendMacro("ChangeParallelID(".. NextChannel ..")");
Re: Bot should stand on place and wait
Posted: Thu Aug 02, 2012 11:32 am
by booting1
where i have to do this?
at least of the waypointfile?
there comes an error,
file: .....boss.xml
line 12
column 1
pos 280
message junk after document element
when i file it so:
Code: Select all
......
</waypoint>
local NumChannels = RoMScript("GetNumParalleZones()")
local NextChannel = RoMScript("GetCurrentParallelID()") + 1
if NextChannel > NumChannels then
NextChannel = 1
end
sendMacro("ChangeParallelID(".. NextChannel ..")");
</waypoints>
it do nothing, kills boss go back and stand, kill boss go back and stand...
when i but it before
it do nothing, kills boss go back and stand, kill boss go back and stand...
Re: Bot should stand on place and wait
Posted: Thu Aug 02, 2012 11:39 am
by rock5
All code has to be between tags so it has to be before </waypoint>. If it's after "player:fight()" then it should change channel after the fight. If it doesn't, maybe you can't change channel at that location. Have you tried to manually?
Re: Bot should stand on place and wait
Posted: Fri Aug 03, 2012 9:48 am
by booting1
Code: Select all
player:target(Boss.Address)
player:fight()
local NumChannels = RoMScript("GetNumParalleZones()")
local NextChannel = RoMScript("GetCurrentParallelID()") + 1
if NextChannel > NumChannels then
NextChannel = 1
end
sendMacro("ChangeParallelID(".. NextChannel ..")");
</waypoint>
</waypoints>
manuall i can change the channel. but the bot kills the boss and other enemys around his target. loots and go back to startpoint und wait, if boss respawn the bot kill again boss und enemys loot und wait...
but no change channel
Re: Bot should stand on place and wait
Posted: Fri Aug 03, 2012 9:58 am
by rock5
Maybe it's because it moves. Add a yrest after changing channel, however long it takes to change channel. I'm not sure how long it is.
Re: Bot should stand on place and wait
Posted: Fri Aug 03, 2012 11:29 am
by booting1
change takes 25seconts at the moment when i klick.
Code: Select all
player:target(Boss.Address)
player:fight()
yrest(25000)
local NumChannels = RoMScript("GetNumParalleZones()")
local NextChannel = RoMScript("GetCurrentParallelID()") + 1
if NextChannel > NumChannels then
but nothing do.
Re: Bot should stand on place and wait
Posted: Fri Aug 03, 2012 11:40 am
by rock5
So after changing channel (that's the ChangeParallelID command) add
yrest is in ms.
Re: Bot should stand on place and wait
Posted: Fri Aug 03, 2012 11:42 am
by booting1
oh my edit was to late. this 25000 i have don but on the right place?
one time i change manual to 1, there the boss cant attack, i was everthing between me and the boss after i think 25 the bot chance the channel. i cancle this, than the bot attacks the boss, after that nothing
edit:
ok i think now its go?!?!
i chanche manual zu channel 3, the bot kills the boss. stand and change to ch 1, there he go back to the startpoint. now there i have to wait for the boss.... i tell you later more
edit2:
normal i goes ok.
but a little problem. when another enemy is in range than he will kill this, and the 25 seconds will be ignored.
so the bot will not change and wait for the boss again,
when no other enemey is in range the bot change after 25sec.
when i say 60 seconds than i think the bot change after the fight with another enemy. i will test this now.