EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bots (https://www.eqemulator.org/forums/forumdisplay.php?f=676)
-   -   Interrupting bot casting? (https://www.eqemulator.org/forums/showthread.php?t=32548)

Randymarsh9 11-27-2010 12:29 PM

Interrupting bot casting?
 
Is there a command in the source code to temporarily stop a bot from casting a spell? I was using #bot sow regular and I noticed that you have to wait for the bot to finish casting whatever spell it is casting before he will actually listen to you. Is there a way you can update this so that once you tell a bot to cast a spell, it automatically starts casting that one and stops doing whatever it was doing before?

bad_captain 11-27-2010 12:44 PM

Not that I'm aware of.. It's frustrating trying to get a rez when my Cleric is rebuffing everyone..

Randymarsh9 11-27-2010 12:51 PM

Yeah I'm trying to find something that you could just put in those commands that will make the bot stop doing everything until it casts whatever spell you tell it to

steve 11-27-2010 01:28 PM

That or a queuing system would be nice.

bad_captain 11-27-2010 02:10 PM

I assume in the AI_Process it could check to see if you're trying to have them cast something before trying to cast their own spells, but I'm not sure of the best way to handle it.

Randymarsh9 11-28-2010 05:48 PM

Has anyone made any progress on this?

Caryatis 11-28-2010 07:32 PM

in 1 day? patience dude.

Congdar 11-28-2010 10:30 PM

There's an example in the command #bot corpse summon
the shadowknight or necromacner bot is first inerrupted from any other spell casting before casting the summon corpse spell using:
Code:

g->members[i]->InterruptSpell();

Randymarsh9 11-28-2010 10:35 PM

Where should I put that to make it work? Like if I was putting it on the sow command would I make it look like
Code:

                                        if      ((!strcasecmp(sep->arg[2], "regular")) && (zone->CanCastOutdoor())  && (c->GetLevel() >= 10) ) {
                                                g->members[i]->InterruptSpell();
                                                Sower->Say("Casting sow...");
                                                Sower->CastSpell(278, c->GetID(), 1, -1, -1);
                                        }

and then just add that in for every line?

Congdar 11-29-2010 11:18 AM

no, then you would have the same line of code too many times. just put it before the switch(SowerClass) so you only need it once, and it would look better as Sower->InterruptSpell();


All times are GMT -4. The time now is 09:18 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.