Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Custom Behaviour if Player is nearby

Featured Replies

Hello, is there any code for Custom behaviour for bot, if player is nearby? 
Additional thing is: Ignore list of players, as "pause bot if player is nearby" inside wrobot,

There is no such by default function, but i belive it is possible to do a plugin like that. You will need to scan like 100 meters radius for every unit, every 0.5 second. Then check if any of those units are players, then decide what to do. Also it will be constantley trigered in towns and major hubs, like roads, so you will need to add an exceptions when to ignore those players.
To do so you will need or, check your current region (like If i'm in Orgrimmar), or, add a list of zones "by hands", like if (me.Position.DistanceTo(new Vector3(x, y, z) < 100) then you are at the road and you should ignore players.

First problem here, it's really pain in the ass to wright such thing, add all black list locations, edit them constantly and so on. The second problem, it will constantly scanning and will do a lot of work (i supese). This will increase your CPU load and, as a result, may reduse you bot amount per pc, wich is also not good.

  • Author

No need to false positives, this thing will be implemented into Plugin, So how it works:

Creating custom behavior and put it into plugin.
1. Run to Grinding spot with empty bags
2. Enable plugin ( i have that code to enable plugin in any step, so it's easy)
3. Grind spot with enabled plugin, checking nearby players in 100 yards,
4. Grinding spot has IsCompleteCondition = MeFreeBagSlots < 6 as example
5. Next step Turn Off plugin and Force To Town sell that shit,
6. GoToStep 0

P.S I'm okay to Press Shadowmelt if player is nearby for 2mins, cause usually my spots are not poluted with ppl, pausing bot for 2mins in 1hours is fine for me, but i will not get bans cause of report that way

var playersList = new List<WoWUnit>();
playersList.AddRange(ObjectManager.GetObjectWoWUnit().Where(u => 
	// Here you may also need something like u != Me 
	u.Type == WoWObjectType.Player &&
	u.GetDistance < 100).ToList());

//	Or you can change 1 to 2 here in the IF, if it will be always positive, because 1 is your bot himself.								
if (playersList.Count() >= 1)
{
// Do work or pause bot here
}

You will need to wrap it in to the cikle or subscribe to some event of your choice. For example, maybe you would like to do it only on the fight end, or only when bot is not in combat. Else you will die when any player arrives at a horizont if you are in combat at this moment. After 10 deaths your equipment will broke and then your bot will decide to run for repair with your plugin still on because bags are still not full ?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.