EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bots (https://www.eqemulator.org/forums/forumdisplay.php?f=676)
-   -   Question for Congdar on mage pets. (https://www.eqemulator.org/forums/showthread.php?t=28320)

provocating 05-24-2009 11:13 AM

Question for Congdar on mage pets.
 
On my server all of the players pretty well only want the Mage Bots to cast two possible pets (water and air). I played with the code last night and found this.
Code:


        case SpellType_Pet: {
  if (!IsPet() && !GetPetID() && !IsBotCharmer()) {
    if(botClass == MAGICIAN) {
                                int randpets;
                                randpets = 2;
                            }
                            i = MakeRandomInt(i-randpets, i);
                            }
                            AIDoSpellCast(i, tar, mana_cost);
                            return true;
                            }
                            break;
                    }
                }

Sorry I think the spacing from Visual Studio throws it off. This is not the original I modified it some and took out the comments before posting it.

Okay so I can reduce the number of pets case by changing the randpets number but I think it cast the first two, like fire and water pets. Where are these kept, my C++ is very basic. I may be able to do it in the database but not sure where to look.

provocating 05-24-2009 11:41 AM

This is the original case statement before I butchered it. Copying from VS and pasting here does not work that well.

Code:

case SpellType_Pet: {
                                                //keep mobs from recasting pets when they have them.
                                                if (!IsPet() && !GetPetID() && !IsBotCharmer()) {
                                                        if(botClass == MAGICIAN) {
                                                                // have the magician bot randomly summon
                                                                // the air, earth, fire or water pet
                                // include monster summoning after they
                                // become level 30 magicians
                                                                int randpets;
                                                                if(botLevel >= 30) {
                                                                        randpets = 4;
                                                                }
                                                                else {
                                                                        randpets = 3;
                                                                }
                                                                i = MakeRandomInt(i-randpets, i);
                                                        }
                                                        AIDoSpellCast(i, tar, mana_cost);
                                                        return true;
                                                }
                                                break;


Congdar 05-24-2009 03:24 PM

It's currently set to randomly spawn one of the 4 pets before they get monster summoning and then random one of the 5 pets. The code says 3 and 4 cuz it's 0-3 and 0-4. This matches up with the Bot Spell Lists for Mages. Level 2-4 have a little difficulty, but they figure it out pretty quick.

It you want to customize your server for a specific pet, theres a few ways you could go.

No c++ changes.
You could change the pet entries in the sql file so there are four or five water or air pets or a mix of the two types to random from. This would require you to edit the sql file to match those selections.

C++ changes.
You could change the random number to 1 (0-1) and then delete from the sql all the non air and water, and monster summoning pets.

No changes by you.
This sounds like a feature request. I'm thinking if you don't like the pet they summoned randomly, you target your mage bot and type the command #bot magepet [earth|water|air|fire|monster]

provocating 05-24-2009 04:25 PM

What I did temporarily was remove the npc_spell entries for the bot earth, MS, fire pets. Then I changed the C++ code to 1 instead of 4.

Congdar 05-25-2009 12:07 AM

svn r573 - Added new command #bot magepet [earth|water|air|fire|monster] - Select the pet type you want your Mage bot to use.

provocating 05-25-2009 08:37 AM

yay !!!

That is awesome.

Congdar 05-25-2009 02:57 PM

don't forget to put the spells back in. You can just source in the sql from this zip Bot Spell Lists

provocating 05-25-2009 03:23 PM

I will, I probably will wait till a few more releases.

provocating 05-25-2009 03:32 PM

Also I thought I read a thread a while back about a possibility of using a client newer than Titanium. Any chances of that happening this year ?

Congdar 05-26-2009 10:34 AM

I think the Secrets of Faydwer client is 98% working.

Snoopdog 05-26-2009 10:39 AM

I picked it up from Newegg. I think since they ship free it normally arrives snail-mail. I should have it in a few weeks. I cannot wait though. The Titanium client seems to crash readily on higher resolutions, I pray that the new client is more stable.

So_1337 05-26-2009 10:43 AM

The SoF client has better support for multi-core processors as well.

Snoopdog 05-28-2009 03:15 PM

Okay, I just compiled from source today to try the new bot commands.

Here is what it does for me. I am trying these at level 65, since I just dinged.

Monster pet - gives me monster pet.
Air pet - gives me water.
Fire pet - gives me water.
Earth pet - constantly cast fire and ice protection or other random spell until mage runs out of mana, then keeps casting as he gets mana.
Fire pet - did not try.

Congdar 05-28-2009 03:18 PM

re-source in the bot spells from the link a couple of posts up... I didn't specifically try level 65, but they should be the same 30+

provocating 05-28-2009 03:35 PM

Okay I did and restarted the server, trying the Earth Pet he keeps casting fire and ice protection repeatedly.

Ideas ?

I also tried fire and he keeps casting a spell over and over, not sure what it is though.


All times are GMT -4. The time now is 06:32 AM.

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