View Single Post
  #2  
Old 05-24-2009, 11:41 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

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;
Reply With Quote