What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Angully

Member
Joined
Sep 19, 2010
Messages
764
using System;
using Buddy.Wildstar.Engine;
using Buddy.Wildstar.Game;

using log4net;
using System.Threading.Tasks;


namespace ExpBuff
{
public class WildstarPlugin : CoroutinePulsable, IPlugin
{
private static ILog Log = LogManager.GetLogger("ExpBuff");
public string Name { get { return "ExpBuff"; } }
public string Author { get { return "King Dwink"; } }
public Version Version { get { return new Version(0, 0, 1); } }
public bool Enabled { get; set; }

public override async Task CoroutineImplementation()
{
#region ExpBuff
if (Enabled)
{

//See if we have a exp buff food type in Inventory
if (Buddy.Wildstar.Game.GameManager.Inventory.Bags.Items.Equals(31443))
Log.Info("Has Pots");
else
Log.Info("No Pots");
//if we already have 'Stuffed' return
if (Buddy.Wildstar.Game.GameManager.LocalPlayer.HasBuff("Flask of Experience"))
Log.Info("Got Buff");
else
Log.Info("Got no Buff");
//We have food and need buff.
if (Buddy.Wildstar.Game.GameManager.Inventory.Bags.Items.Equals(31443))
GameEngine.BotPulsator.Suspend(GameEngine.CurrentBot, TimeSpan.FromMilliseconds(15000));
Buddy.Wildstar.BotCommon.Navigator.Stop(true);
Buddy.Wildstar.Game.InventoryItem.Use("Flask of Experience");
Log.Info("Using Pot");
else
Log.Info("Fckd up Somewhere");
return;
}
#endregion
}

public override void OnRegistered() { }
public override void OnUnregistered() { }

public void Initialize()
{
GameEngine.BotPulsator.RegisterForPulse(this);
Enabled = true;
}


public override bool CanBePulsed
{
get
{
var Me = GameManager.LocalPlayer;
// Loading screen.
if (GameManager.WorldLoadState != WorldLoadState.InWorld)
return false;

// Sanity checks.
if (Me == null || !Me.IsValid)
return false;

if (Me.IsDead || !Me.IsAlive)
return false;

if (Me.IsInCombat)
return false;

return true;
}
}

private void ToggleMe()
{
Enabled = !Enabled;
}

public void Uninitialize()
{
GameEngine.BotPulsator.UnregisterForPulse(this);
}
}
}
 
Last edited:
I believe this is one of the functions that the bot does natively... or it might be a part of Recovery. Simply drop the flask on one of your side bars and it will use it
 
Severity Code Description Project File Line Suppression State
Error CS1513 } expected ExpBuff D:\angus\Documents\Visual Studio 2015\Projects\ClassLibrary1\ClassLibrary1\ExpBuff.cs 40 Active
Error CS1501 No overload for method 'Use' takes 1 arguments ExpBuff D:\angus\Documents\Visual Studio 2015\Projects\ClassLibrary1\ClassLibrary1\ExpBuff.cs 39 Active
Warning CS1998 This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. ExpBuff D:\angus\Documents\Visual Studio 2015\Projects\ClassLibrary1\ClassLibrary1\ExpBuff.cs 19 Active
 
Found it. It is part of the Official Combat Routine:

https://www.thebuddyforum.com/wildbuddy-forum/combat-routines/193412-official-default-combat-routine-9.html

Updated the SVN and added Flask support to the combat routine (Flask of Speed, Flask of Greed, Flask of Experience etc).
Note in order for the flasks to be activated, they must be slotted anywhere on the toolbars.

Fixed logic with Medishots so that they will properly activate in combat now.

If you encounter any bugs, post in this thread.
 
Back
Top