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

Exile Request

Angully

Member
Joined
Sep 19, 2010
Messages
764
Reaction score
1
I was wondering if it was possible for someone to clean an edit i made to the Exile Code

private void RegisterSummons()
{
RegisterSummon("Raise Zombie", () => NumZombies, () => MaxZombies, true);
RegisterSummon("Raise Spectre", () => NumSpectres, () => MaxSpectres, true); // TODO: add spectre selection logic
RegisterSummon("Summon Skeletons",
() => NumSkeletons,
() => MaxSkeletons,
false,
extraReqs: o => NumberOfMobsNear(BestTarget, 20, 1) || BestTarget.Rarity >= Rarity.Normal);

I changed the rarity to normal and the mobs near to 20, 1. It does exactly what i want it to however it causes a syntax error

Error during bot tick: Buddy.Coroutines.CoroutineException: Exception was thrown by coroutine ---> System.NullReferenceException: Object reference not set to an instance of an object.
at ExileRoutine.Exile.<>c__DisplayClass60.<RegisterSummon>b__5d(Object ctx) in d:\Desktop\EB\Routines\Exile\Exile.cs:line 492
at Loki.Bot.SpellManager..(Object )
at Loki.TreeSharp.Action.RunAction(Object context)
at Loki.TreeSharp.Action..()
at Loki.TreeSharp.Composite.Tick(Object context)
at Loki.TreeSharp.Decorator..()
at Loki.TreeSharp.Composite.Tick(Object context)
at Loki.TreeSharp.PrioritySelector..()
at Loki.TreeSharp.Composite.Tick(Object context)
at Loki.TreeSharp.PrioritySelector..()
at Loki.TreeSharp.Composite.Tick(Object context)
at Loki.Bot.v2.LokiCoroutine..()
at Buddy.Coroutines.Coroutine.Resume(Object& value)
--- End of inner exception stack trace ---
at Buddy.Coroutines.Coroutine.Resume(Object& value)
at Loki.Bot.v2.LokiCoroutine.Tick(Coroutine coroutine)
at Loki.Bot.v2.ActionRunCoroutine.Run(Object context)
at Loki.TreeSharp.Action.RunAction(Object context)
at Loki.TreeSharp.Action..()
at Loki.TreeSharp.Composite.Tick(Object context)
at Loki.Bot.BotMain.()

Its not a massive issue but it would be nice if someone could tell me how to fix this so i can learn to edit more things.

Thanks in advance.

-Angully A.k.a Dwink
 
Shouldn't need the Rarity.Normal part since having no rarity listed means it will do it whenever there is a mob within 20 range of you. I get that null reference exception without your edit too if my skeletons die really quick after they're summoned. Could be they're dying before the bot can register them or something? Not 100% sure but it doesn't stop it from working.

I know this doesn't answer the question but just wanted to point out it's not a syntax error, it's something with the bot trying to do something with an object that doesn't exist hence the null reference.
 
Ok thanks for the reply ive moved away from using summons since they are very slow for clearing
 
Back
Top