Page 1 of 1
Stop botting if other players are in range
Posted: Tue Oct 16, 2012 5:51 pm
by Ego95
Hey rock,
I'm using your "wait until it's less crowded" code you posted in the CountMobs userfunction topic. I tried to change something but it seems not to work:
Code: Select all
function playerDetect()
if Count_Players == true then
if CountPlayers(nil, true) > 0 then
player:cast("ROGUE_HIDE");
print("1 or more players found. Don't bot. Wait")
repeat
yrest(20000)
until 1 > CountPlayers(nil, true)
elseif player:findNearestNameOrId("mobID") then
sendMacro('TargetNearestEnemy("mobID")')
player:fight()
end
end
end
What it should do is stop killing mobs, but only if it can find one specific mob it should kill it.
What am I doing wrong?
Already thanks for your answer
Edit: I totally forgot to set it to true in the onload
But it gives an error now.
Re: Stop botting if other players are in range
Posted: Tue Oct 16, 2012 10:41 pm
by rock5
Think about the error. Fix it in your mind. *Rock5 tries to read AlterEgo95s mind*
Concentrate, damn it!
. . . . .
Nope, I'm not getting anything. Either my mind reading skills, which are considerable, are on the fritz today or your not concentrating hard enough.
So I'm afraid you'll have to describe your error in a post and I'll have to read it instead.
Re: Stop botting if other players are in range
Posted: Wed Oct 17, 2012 12:34 am
by lisa
rock5 wrote:Think about the error. Fix it in your mind. *Rock5 tries to read AlterEgo95s mind*
Concentrate, damn it!
. . . . .
Nope, I'm not getting anything. Either my mind reading skills, which are considerable, are on the fritz today or your not concentrating hard enough.
So I'm afraid you'll have to describe your error in a post and I'll have to read it instead.
and I thought your mind reading skills were of legend, I am sure I read about it on a wiki somewhere lol
Re: Stop botting if other players are in range
Posted: Wed Oct 17, 2012 12:41 am
by rock5
Lisa is going to say
"and I thought your mind reading skills were of legend, I am sure I read about it on a wiki somewhere lol".
Oh you bet me to it.
Re: Stop botting if other players are in range
Posted: Wed Oct 17, 2012 1:05 am
by lisa
yes because my typing skills are of legend
Re: Stop botting if other players are in range
Posted: Wed Oct 17, 2012 5:11 am
by botje
lol guys, that made me laugh in real life xd
now my wife looks at me as if im weird, thanx
Re: Stop botting if other players are in range
Posted: Thu Oct 18, 2012 4:14 pm
by Ego95
Think about the error. Fix it in your mind. *Rock5 tries to read AlterEgo95s mind*
And I thought you have mind reading skills!
LOL, sorry rock
Yes, would be helpful to post what kind of error it is
But I think I found the error today. There was only an "end" too much under the "player:fight()".
I'll see if it works when the mob spawns and an other person is next to me.
Anyway thanks for you funny dialog rock and lisa
Re: Stop botting if other players are in range
Posted: Thu Oct 18, 2012 6:54 pm
by BillDoorNZ
Code: Select all
function playerDetect()
if Count_Players == true then
while (CountPlayers(nil, true) > 0) do
player:cast("ROGUE_HIDE");
print("1 or more players found. Don't bot. Wait")
yrest(20000);
end;
end
local enemy = player:findNearestNameOrId("mobID");
if (enemy) then
player:target(enemy);
player:fight()
end
end
Re: Stop botting if other players are in range
Posted: Thu Oct 18, 2012 6:55 pm
by BillDoorNZ
or
Code: Select all
function playerDetect()
while ((Count_Players) and (CountPlayers(nil, true) > 0)) do
player:cast("ROGUE_HIDE");
print("1 or more players found. Don't bot. Wait")
yrest(20000);
end;
local enemy = player:findNearestNameOrId("mobID");
if (enemy) then
player:target(enemy);
player:fight()
end
end
Re: Stop botting if other players are in range
Posted: Thu Apr 04, 2013 12:53 pm
by NyTr0g3n3
Hi everybody,
I was wondering if there was a way to add a "player exception" to this count player function.
I level up a secondary char with my main char and I want to stop botting if other players come too close but if I use this function I will stop botting because of my secondary char. It's why I want to add a "player exception".
Thanks ^^
Best Regards,
NyTr0g3n3
Re: Stop botting if other players are in range
Posted: Thu Apr 04, 2013 2:39 pm
by rock5
Yes, the CountPlayers function has an option to ignore 'friends'. Check this page for the userfunction file and usage.
http://www.solarstrike.net/phpBB3/viewt ... 781#p36781
Re: Stop botting if other players are in range
Posted: Fri Apr 05, 2013 2:32 am
by NyTr0g3n3
Hi rock5,
Thanks for your answer but it doesn't work for me. I think i'm doing something wrong.
Here is the code:
Code: Select all
function playerdetect()
if CountPlayers(600, true, true) > 0 then
player:cast("ROGUE_HIDE");
print("Waiting till it's less crowded")
repeat
yrest(15000)
until 1 > CountPlayers(600, true, true)
end
end
The bot still stops if my alt is in range however my alt is set as friend in my profile.
Do you see what's the problem ?
Thanks.
NyTr0g3n3
Re: Stop botting if other players are in range
Posted: Fri Apr 05, 2013 5:17 am
by rock5
Are you using the latest version of CountMobs?
Re: Stop botting if other players are in range
Posted: Fri Apr 05, 2013 1:43 pm
by NyTr0g3n3
I use the last you put on the link you gave me.
Re: Stop botting if other players are in range
Posted: Fri Apr 05, 2013 2:09 pm
by rock5
What does it print? Does it print the alts name?
Re: Stop botting if other players are in range
Posted: Fri Apr 05, 2013 3:42 pm
by vo2male
use Lisa's changeprofile userfunction -->
http://www.solarstrike.net/phpBB3/viewt ... =27&t=3626
and add your list of exceptions to your onload like this.. make sure you only use this function when adding friends or mobs..
Code: Select all
changeOptionFriendMob("friend", "Alt-Name", "Add")
if you have a code similar to this in your waypoint
Code: Select all
settings.profile.friends = {"mobname"}
remove it or else it will make conflict to the above userfunction
Re: Stop botting if other players are in range
Posted: Sat Apr 06, 2013 12:53 pm
by NyTr0g3n3
Thanks rock, I'm not home today so I'll try as soon as possible and let you know if it works.
Re: Stop botting if other players are in range
Posted: Mon Apr 08, 2013 12:50 pm
by NyTr0g3n3
Alright, it seems to work ! Thanks a lot !