Page 1 of 1

Wait for target at one waypoint

Posted: Sat May 12, 2012 4:30 pm
by Ego95
Good evening,
is it possible to let the bot wait for a mob to respawn? For example a mob like locface or hackman. The bot shouln't move, it should only wait for the mob to spawn and kill it. I've tried to do it very simple, i've created two waypoints at the same coordinates and changed in the profile options to attack only the mob i want.
Could anyone help me with this, I think it is very simple but i don't know how to do this o_O
Greetings AlterEgo95

Re: Wait for target at one waypoint

Posted: Sat May 12, 2012 11:30 pm
by rock5
That sounds like it should work. I think even 1 waypoint would work. Doesn't it work?

Re: Wait for target at one waypoint

Posted: Sun May 13, 2012 3:45 am
by Ego95
Sometimes it works, but sometimes after the kill the char moves, I don't know why, but it looks a bit strange for other people i think. I thought, there's maybe something to put in the script to wait.

Re: Wait for target at one waypoint

Posted: Sun May 13, 2012 4:17 am
by rock5
Yes, if you have it continuosly going to the waypoint it tends to jerk around a bit. To keep still you are better off with a loop that waits. Let me see, you want to wait for a specific mob to spawn. I'll assume you want to respond to aggro if something attacks you and that you set up mobs and/or friends in profile. So something like this

Code: Select all

repeat
    yrest(1000)
    player:update()
until player.Battling or player:findEnemy(nil,nil,evalTargetDefault)
Put this in your one waypoint and it should wait until it sees a valid mob then exit the loop at which point the regular bot code should take over and it should attack the mob.

Note: you can set up mobs in the waypoints onLoad section. There are a number of ways to do it. I do it like this

Code: Select all

settings.profile.mobs = {"mob1","mob2"}

Re: Wait for target at one waypoint

Posted: Mon May 14, 2012 6:15 pm
by Ego95
Sorry, I'm not home at this moment, I'll try it as soon as possible ;)

Code: Select all

settings.profile.mobs = {"mob1","mob2"}
This is very helpful, too. It's really annoying to change everything in the profile before starting an other waypoint. I'm happy to learn new things from week to week. One day, I'll write my own waypoint file :)

Thanks for the help so far :)

Re: Wait for target at one waypoint

Posted: Mon May 14, 2012 11:58 pm
by lisa
AlterEgo95 wrote:It's really annoying to change everything in the profile before starting an other waypoint
http://www.solarstrike.net/phpBB3/viewt ... =27&t=3626