Venus112
New Member
- Joined
- Jun 17, 2010
- Messages
- 1,509
- Reaction score
- 13
Hey Guys.
So i've been playing around with CodenameG's code for using Mana Gem, but i can't get the code to work properly
Right now, the CC is actually using the Mana Gem, but it also keep spamming it afterwards.
This is the code that i've taken from CodenameG (with his permission) and the last is how i activate it. It's not 100 % correct, but i couldn't get the CC to even fire the use of Mana Gem without it
Anyone got any suggestions or ideas on how to make the CC only use Mana Gem once, when appropriate? (Cause i dont)
So i've been playing around with CodenameG's code for using Mana Gem, but i can't get the code to work properly
Right now, the CC is actually using the Mana Gem, but it also keep spamming it afterwards.
Code:
//Thank you to CodenameG for this Mana Gem code
private WoWItem HaveItemCheck(List<int> listId)
{
foreach (WoWItem item in ObjectManager.GetObjectsOfType<WoWItem>(false))
{
if (listId.Contains(Convert.ToInt32(item.Entry)))
{
return item;
}
}
return null;
}
private WoWItem ManaGem;
public bool HaveManaGem()
{
if (ManaGem != null)
{
foreach (WoWItem item in Me.BagItems)
{
if (item.Entry == 36799)
{
ManaGem = item;
return true;
}
}
return false;
}
else
{
return true;
}
}
public bool ManaGemNotCooldown()
{
if (ManaGem != null)
{
if (ManaGem.Cooldown == 0)
{
return true;
}
}
return false;
}
{
if (Me.ManaPercent < 90 && ManaGem == null && !ManaGemNotCooldown())
{
Lua.DoString("RunMacroText('/Use Mana Gem');"); ;
}
}
This is the code that i've taken from CodenameG (with his permission) and the last is how i activate it. It's not 100 % correct, but i couldn't get the CC to even fire the use of Mana Gem without it
Anyone got any suggestions or ideas on how to make the CC only use Mana Gem once, when appropriate? (Cause i dont)






