with
new Spell("bla").IsDistanceGood
This is my complete spell validation
// Validate spell
if (!ObjectManager.Me.IsStunned && !ObjectManager.Me.IsDead && !ObjectManager.Me.IsCast && !target.IsDead && spell.KnownSpell && spell.IsSpellUsable && spell.IsDistanceGood && !hasDebuff)
{
if (target.Guid == ObjectManager.Me.Guid)
{
// Cast on self
Lua.LuaDoString($"CastSpellByID({spell.Id}, \"player\")");
}
else
{
// Cast on target
Lua.LuaDoString($"CastSpellByID({spell.Id}, \"target\")");
}
// Log
Logging.WriteDebug($"Cast: {spell.NameInGame}");
I also have the problem that the bot seems to have some other problems, too
LOG:
[D] 23:08:07 - [SpellManager] Cannot found spell: public static SpellInfo SpellInfoCreateCache()