I would like to know which function I need to still look for a target and continue fighting instead of fighting back if you are attacked.
So it want this function: player:restrnd([probability [, minrest [, maxrest]]]); but instead of fighting back, I want it to look for a target during the rest and attack it.
Is that possible?
Just a small question.
Re: Just a small question.
You could start it in wander mode with a radius of '0' and I think it will just stand there and kill stuff. Haven't tried it though.
- 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.”
- Ronald Reagan
-
NightWing91
- Posts: 2
- Joined: Tue Aug 09, 2011 2:44 am
Re: Just a small question.
Thanks for the reply, but its not really what i was looking for. I wanted to farm dog meat and have 4 waypoints that i use close to each other. But i dont want the bot to run in circles, the pauses should make it more realistic, but he must keep targeting and attacking the guard dogs.
Re: Just a small question.
You could probably do a check for the dog's and if not then have a yrest.
Thing is though if there is a dog in range you should attack it regardless of if you reach the waypoint coords or not.
If it was me I would go with the wander and radius 0. increase the max target distance and start the bot in the middle of where the dogs are. I'd also set the dogs in the "mobs" profile option so it doesn't bother to attack anything else.
If you set the distance properly then basically the bot will kill dogs anytime they appear and if no dogs to kill it will move to the same spot and wait for dogs.
Thing is though if there is a dog in range you should attack it regardless of if you reach the waypoint coords or not.
If it was me I would go with the wander and radius 0. increase the max target distance and start the bot in the middle of where the dogs are. I'd also set the dogs in the "mobs" profile option so it doesn't bother to attack anything else.
If you set the distance properly then basically the bot will kill dogs anytime they appear and if no dogs to kill it will move to the same spot and wait for dogs.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Just a small question.
There's no option for that. You would have to use yout own code. Something like,
Put this in the onLoad section of your waypoint file. At the waypoints add
This should wait 10 seconds for a mob, kill it then move to the next waypoint. Use whatever pause time you like. If you want it to continue waiting after killing the mob, remove the "break".
Note: This is untested.
Although what Lisa said is probably easier and should work.
Code: Select all
function mobWait(_waitTime)
local starttime = os.clock()
repeat
yrest(1000)
local mob = player:findEnemy(false, nil, evalTargetDefault)
if target then
player:target(mob)
player:update()
player:fight()
break
end
until os.clock() - starttime > _waitTime
endCode: Select all
mobWait(10000)Note: This is untested.
Although what Lisa said is probably easier and should work.
- 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.”
- Ronald Reagan
Re: Just a small question.
hi all, and rock5 
i used this function but for some reason on the second waypoint ( i am guessing where the mobwait occurs) just stands there not even fighting back to mobs.
can you tell my how can i fix this?
thanks!
i used this function but for some reason on the second waypoint ( i am guessing where the mobwait occurs) just stands there not even fighting back to mobs.
can you tell my how can i fix this?
thanks!
Re: Just a small question.
There is a bug. I did say it was untested.
should be
Also, I think '_waitTime' should be given in seconds not miliseconds. So '10' for 10 seconds.
Code: Select all
if target thenCode: Select all
if mob then- 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.”
- Ronald Reagan
Re: Just a small question.
lol i should have seen it myself.
anyway, thanks for the helpful reply
anyway, thanks for the helpful reply