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

How to get number of uses for traps?

baal887

New Member
Joined
Oct 13, 2013
Messages
13
Reaction score
0
I see Loki.Game.Spell.UsesAvailable but how would I call it with, say, bear trap?
 
Actually, I think .UsesAvailable does not even work with traps because I have my code set up like this:
Code:
 int FTS = SpellManager.GetSpell("Fire Trap").UsesAvailable;
            int LTS = SpellManager.GetSpell("Lightning Trap").UsesAvailable;


            if (LTS > 0)
            {
                return Cast("Lightning Trap",
                ret =>
                    {
                        Monster monster = MainTarget;
                        return monster != null;
                    });
            }

            if (FTS > 0)
            {
                return Cast("Fire Trap",
                    ret =>
                    {
                        Monster monster = MainTarget;
                        return monster != null;
                    });
            }
and it is never casting fire trap
 
I see Loki.Game.Spell.UsesAvailable but how would I call it with, say, bear trap?
Iirc, there's a player settings called "MaxNumberOfTraps" or something check in the tools section of the bot, and retrieve player data, check for options.
 
That has absolutely nothing to do with what I am trying to do but thank you for that information, it would be useful if Spell.UsesAvailable actually worked.

EDIT: After debugging and looking at the actual values of these...this function just spits out a random number in the 300s. I get anywhere from 306 - 350 and it doesn't even seem to care how many charges I actually have it is just broken. It also seems that Fire Trap and Bear Trap always show the same number of charges while Lightning Trap is a completely different number. It would be awesome if this was fixed because I could release a working trap combat routine.
 
Back
Top