New option idea
New option idea
I just thought about possible risk of meeting with GM or having other players trying to caught our bot I realized that may be there is very good method to leave bot for night without any attendance and be sure it is not reported by anyone.
Just one siple question to Admin: Is it possible to detect other players beeing close e.g. in radius of 300 if yes, then just please do add option to stop the bot untill there is someone around! If player is not moving then nobody never asks or worries - does not matten where it stops. If bot is alone then it can do most stupid things - no one will see it.
Just one siple question to Admin: Is it possible to detect other players beeing close e.g. in radius of 300 if yes, then just please do add option to stop the bot untill there is someone around! If player is not moving then nobody never asks or worries - does not matten where it stops. If bot is alone then it can do most stupid things - no one will see it.
-
- Posts: 316
- Joined: Wed Jun 16, 2010 8:16 am
Re: New option idea
to be honest on the place where i bot theres always ppl (crabs) so it wouldn't work for me, but a simple way to see if ppl are around would be usefull for example i'd make a check that on waypoint # if theres some ppl gor for shop or swithc chanel and if no ppl around go another round that would make my bot look more human for sure
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: New option idea
Yes, this is possible. I'm just not entirely sure how it would best be implemented. I suppose the best route would be to continue the current action (if running to a waypoint, continue until you reach it; if fighting, kill any aggressive monsters, etc.) before entering a "resting" state.
This would be disabled by default, of course.
This would be disabled by default, of course.
-
- Posts: 316
- Joined: Wed Jun 16, 2010 8:16 am
Re: New option idea
just make it possible to check for nearby ppl, and from them we could scirp it to rest on waypoint without a problem imho
Re: New option idea
The stop and change channel is a good idea.
You could also call a safe spot waypoint file the character will run to were there is no spawn
Or on detect time to sell/repair the continue
or you could setup al three and setup a random string to select one of them to do on detect
You could also call a safe spot waypoint file the character will run to were there is no spawn
Or on detect time to sell/repair the continue
or you could setup al three and setup a random string to select one of them to do on detect
Re: New option idea
I think what people choose to do if other players are near by is up to them. What I think is need, as swietlowka said, is just a function that people can run to see if any players are nearby. Maybe with an argument of the range you want to check.
- 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
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: New option idea
Here's an addon for that. Save the file to your userfunctions folder.
Use:
Use:
Code: Select all
if( player:isHumanInRange(400) ) then
-- do something
end
- Attachments
-
- addon_player.lua
- (1007 Bytes) Downloaded 204 times
Re: New option idea
in the
-- Do Something
part, what option would i have to enable so that the bot would stop moving and stop aquiring targets, but still defend itself if its attacked, kinda like the RUN option but without the running lol
-- Do Something
part, what option would i have to enable so that the bot would stop moving and stop aquiring targets, but still defend itself if its attacked, kinda like the RUN option but without the running lol
- MiesterMan
- Posts: 543
- Joined: Tue Jul 06, 2010 9:15 pm
- Location: Between the Second and Third Circles of Hell
Re: New option idea
If that's what you want replace "-- do something" with "player:rest(60);". That way it will rest for 60 seconds only fighting back if attacked and if the person is still there it'll rest for 60 seconds again. Feel free to make it longer, like 300 for 5 minutes. Or if you want it to not move until you get back accept for fighting back against aggros you can use "player:sleep();" which will have your char in rest mode until you resume.
My RoM Bot toys:
- Object Viewer: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2619
Teleporter Functions: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2605
Waypoint Finder: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2616
Mail Functions: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2612
Equipment Swapper(TempFixed): http://www.solarstrike.net/phpBB3/viewt ... =27&t=2571
Re: New option idea
Did it and works perfectly until now.
Used code:
so it waits but not forever. Just need to avoid crowded places not to waste too much time.
Every waypoint need to have pw(true); or pw(false); depending if we harvest or not there.
Also did small fix in isHumanInRange:
that means in this case it does not matter if distance is computed exactly - approx range should be enough and processing time is more decreased.
Used code:
Code: Select all
function pw(_harvest)
_harvest = _harvest or false;
if (_harvest) then
player:harvest();
end
restc = 0;
while ( player:isHumanInRange(400) and restc<5 ) do
player:rest(60);
restc = restc + 1;
end
return true;
end
Every waypoint need to have pw(true); or pw(false); depending if we harvest or not there.
Also did small fix in isHumanInRange:
Code: Select all
local function isInDist(x1, y1, x2, y2, radius)
if( x2 >= x1-radius and x2 <= x1+radius and
y2 >= y1-radius and y2 <= y1+radius ) then
return true;
--if( ((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)) <= radius*radius ) then
-- return true;
--else
-- return false;
--end
end
return false;
end
Re: New option idea
Hi! Sorry for reviving an old topic but this is still pretty useful..id just like to ask if someone can update this? it works.. but when i tried my alt to get near to my other character (which are both friends with) the bot still stops.. i thought that this won't stop as long as you are friends with a player which is near you.
Re: New option idea
I don't see anything about friends.
There is also my countplayers function
http://www.solarstrike.net/phpBB3/viewt ... 781#p36781
but that doesn't consider friends either.
One of them would have to be modified just for you. Although there are probably others that might find it useful too.
There is also my countplayers function
http://www.solarstrike.net/phpBB3/viewt ... 781#p36781
but that doesn't consider friends either.
One of them would have to be modified just for you. Although there are probably others that might find it useful too.
- 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: New option idea
I decided it was a useful option so I added it to my function at the above link.
- 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: New option idea
thanks rock for this.. i got a little idea about it.. so basically what i did is this but i still have to test it.
hmm i think i misinterpreted those arguments..
should i put it this way instead?
what does this line mean?
can i just add this instead?
Code: Select all
function checkcrowd()
if CountPlayers(300, printnames, ignorefriends) > 1 then
print("Waiting till it's less crowded")
repeat
yrest(5000)
until 2 > CountPlayers(nil,true)
end
end
Arguments:
inrange - The range in which you want to count the players. Optional. If omitted, it will count all players it can detect.
printnames - If true, prints the names of the players. I find this useful if creating a wait loop so I can see how the names change over time while I wait.
ignorefriends - If true, does not include friends in the count. 'Friends' includes names in your profile friends list, party members if in a party and warden pet if you have one.
Code: Select all
if CountPlayers(300, true, true)
what does this line mean?
Code: Select all
until 2 > CountPlayers(nil,true)
end
Code: Select all
until 0 == CountPlayers(nil,true)
end
Re: New option idea
Correct.vo2male wrote:Code: Select all
if CountPlayers(300, true, true)
should i put it this way instead?
The 'until' is the end of the repeat loop. The 'end' is the end of the 'if' statement.vo2male wrote:what does this line mean?
Code: Select all
until 2 > CountPlayers(nil,true) end
Basically what that code says is, if the number of players is more than 1 then wait until the number of players is less than 2 using a repeat loop.
If you want to wait even when there is only one player then you would use.
Code: Select all
function checkcrowd()
if CountPlayers(300, nil, true) > 0 then
print("Waiting till it's less crowded")
repeat
yrest(5000)
until 1 > CountPlayers(300,true,true)
end
end
Well you could usevo2male wrote:can i just add this instead?Code: Select all
until 0 == CountPlayers(nil,true)
Code: Select all
until 0 == CountPlayers(300,true,true)
- 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: New option idea
i have an error
one more thing, is it right that there should be no spaces b/w these?
Code: Select all
0:14am - ...scripts/rom/userfunctions/userfunction_countmobs.lua:38: attempt to
call method 'isFriend' (a nil value)
Code: Select all
(300,true,true)
Re: New option idea
Sorry, 'isFriend' is a new pawn function in RC3. It was an easy way to add a friend check to the userfunction. You could try the RC3 version or wait until I commit it. I should be committing it soon.
- 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: New option idea
i tried with the RC3 version but still doesnt work
i put my alt there near my bot.. their strangers..and he just keeps going
btw they are both in the same guild..
EDIT***
tried to put my another alt ( different guilds/not friends) does not also work as it should
i put my alt there near my bot.. their strangers..and he just keeps going
btw they are both in the same guild..
EDIT***
tried to put my another alt ( different guilds/not friends) does not also work as it should
Re: New option idea
So were you using this code?
Did you put it in the onload of the waiypoint file? Did you then use 'checkcrowd()' in your waypoints? Did it print any names?
Code: Select all
function checkcrowd()
if CountPlayers(300, nil, true) > 0 then
print("Waiting till it's less crowded")
repeat
yrest(5000)
until 1 > CountPlayers(300,true,true)
end
end
- 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: New option idea
this is on my onload
this is on my waypoints 1 and 2
it only printed names..but didn't rest
Code: Select all
function checkcrowd()
if CountPlayers(300,true,true) > 1 then
print("Waiting till it's less crowded")
repeat
yrest(3000)
until 0 == CountPlayers(300,true,true)
end
end
Code: Select all
checkcrowd()
Who is online
Users browsing this forum: Bing [Bot] and 1 guest