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);
}
}
}
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: