//---------------// //---XXX007XXX---// //---------------// //*C@C Start using System; using Server; using Server.Misc; using Server.Items; //Basic Monster stop here using System.Collections; using Server.Targeting; using System.Collections.Generic; using Server.ContextMenus; //*C@C namespace Server.Mobiles { //*C@C Corps Display Name [CorpseName( "Corpse" )] //*C@C Name: BaseCreature public class AntLion : BaseCreature { //*C@C Name : AIType, FightMode, RangePerception, RangeFight, ActiveSpeed, PassiveSpeed //FightMode //None // Never focus on others //Aggressor // Only attack aggressors //Strongest // Attack the strongest //Weakest // Attack the weakest //Closest // Attack the closest //Evil // Only attack aggressor -or- negative karma //AI ???Custom AI??? //AI_Use_Default, //AI_Melee, //AI_Animal, //AI_Archer, //AI_Healer, //AI_Vendor, //AI_Mage, //AI_Berserk, //AI_Predator, //AI_Thief, //From RunUO.com //AI_Necro, //AI_Necromage, //AI_Paladin, //AI_Army, // AI_Ninja //C@C Body ID *Thx To Camerous And BTuesday22 //0 = invisible 1 = Ogre 2 = Ettin 3 = zombi 4 = gargoyle 5 = eagle //6 = sparrow 7 = Orc Lord 8 = corpser 9 = daemon 10 = sm daemon //11 = dread spider 12 = dragon 13 = Air elemental 14 = Earth Elemental //15 = Fire Elemental 16 = Water Elemental 17 = orc 18 = ettin (club) //19 = Dread spider 20 = Ice Spider 21 = L. Serpent 22 =gazer 23 = wolf //24 = lich 25 = wolf 26 = ghoul 27 = wolf 28 = g. Spider 29 = gorilla //30 = harpy 31 = headless 32 = null 33 = lizardman 34 = wolf //35 = lizardman(spear) 36 = lizardman(mace) 37 = wolf 38 = Balrog Lord //39 = mongbat 40 = Balrog 41 = orc(club) 42 = ratman 43 = Ice Fiend //44 = ratman(club) 45 = ratman(sword) 46 = Ancient Dragon 47 = reaper //48 = g. scorpian 49 = dragon 50 = skeleton 51 = slime 52 = snake //53 = troll(axe) 54 = troll 55 = troll(axe) 56 = skeleton(axe) //57 = skeleton(sword & shield) 58 = sprite 59 = dragon 60 = drake //61 = drake 62 = wyvern 63 = panther 64 = panther 65 = panther //66 = corpser 67 = stone gargoyle 68 = gazer 69 = gazer //70 = terathan warrior 71 = terathan drone 72 = terthan 73 = harpy //74 = imp 75 = cyclops 76 = titan 77 = kraken 78 = lich 79 = lich //80 = g. toad 81 = toad 82 = lich 83 = ogre 84 = ogre //85 = ophidan enforcer 86 = ophidan avenger 87 = ophidan queen //88 = ram 89 = g. serpent 90 = g. serpent 91 = g. serpent //92 = g. serpent 93 = g. serpent 94 = slime 95 = null 96 = slime //97 = wolf 98 = wolf 99 = wolf 100 = wolf 101 = centaur 102 = daemon //103 = serpent dragon 104 = bone dragon 105 = dragon 106 = dragon //107 = earth elemental 108 = earth elemental 109 = earth elemental //110 = earth elemental 111 = earth elemental 112 = earth elemental //113 = earth elemental 114 = horse 115 = horse 116 = horse 117 = horse //118 = horse 119 = horse 120 = horse 121 = horse 122 = unicorn //123 = angel 124 = evil mage 125 = evil mage lord 126 = evil mage lord //127 = panther 128 = pixie 129 = corpser 130 = flame gargoyle //131 = air elemental 132 = kirin 133 = alligator 134 = crocodile 135 = ogre //136 = ophidain 137 = ophidian avenger 138 = orc lord 139 = orc Lord //140 = orc 141 = naked man 142 = ratman(sword) 143 = ratman(sword) //144 = horse 145 = sea serpent 146 = Harrower (1st) //147 = skeleton (sword & shield) 148 = skeletal mage 149 = succubus //150 = sea serpent 151 = dolphin 152 = new terathan? 153 = ghast //154 = mummy 155 = zombi 156 = null 157 = black widow //158 = water elemental 159 = water elemental 160 = water elemental //161 = earth elemental 162 = air elemental 163 = air elemental //164 = air elemental 165 = sprite 166 = earth elemental 167 = brown bear //168 = water elemental 169 = g. beetle 170 = llama 171 = ostard //172 = Ancient Dragon 173 = Mephitis 174 = Semidar 175 = Lord Oaks //176 = Silvani 177 = horse 178 = horse 179 = horse 180 = dragon //181 = new orc mage 182 = orc bomber 183 = normal 184 = normal //185 = normal 186 = normal 187 = ridgeback 188 = new ridgeback? //189 = orc brute 190 = horse 191 = kirin 192 = unicorn 193 = ridgeback //194 = swamp dragon 195 = g. beetle 196 = kaze kemono 197 = null //198 = null 199 = rai-ju 200 = horse 201 = cat 202 = alligator 203 = pig //204 = horse 205 = rabbit 206 = crocodile 207 = sheep 208 = chicken //209 = ram 210 = ostard 211 = brown bear 212 = grizzly 213 = polar bear //214 = panther 215 = g. rat 216 = cow 217 = dog 218 = ostard //219 = ostard 220 = llama 221 = walrus 222 = Lizardman(spear) //223 = sheep 224 = invisible 225 = wolf 226 = horse 227 = invisible //228 = horse 229 = invisible 230 = invisible 231 = cow 232 = bull //233 = bull 234 = deer(buck) 235 = invisible 236 = broke skelly //237 = deer (doe) 238 = rat 239 = invisible 240 =kappa 241 = oni //242 = death beetle 243 = hiryu 244 = rune beetle 245 = Yomotsu War //246 = Bake Kitsune 247 = fan dancer 248 = gaman 249 = Yamandon //250 = tsuki wolf 251 = revenant lion 252 = lady of the snow //253 = Yomotsu priest 254 = crane 255 = yomotsu elder //256 = Chief Paroxysmus 257 = dread horn 258 = Lady M //259 = Monstrous Interred Grizzle 260 = shimmering Effusion //261 = shimmering Effusion 262 = Tormented Minotaur 263 = minotaur //264 = thorn bat 265 = hydra 267 = troglodyte 268 = invisible //269 = broke satyr 270 = broke satyr 271 = satyr 272 = fetid essence //273 = fetid essence 274 = invisible 275 = invisible 276 = chimera //277 = cu sidhe 278 = squirrel 279 = ferret 280 = armored minotaur //281 = minotaur 282 = parrot 283 = crow 284 = mondain’s steed //285 = reaper redux 286 = invisible 287 = invisible 288 = invisible //289 = invisible 290 = pig 291 = pack horse 292 = pack llama //293 = invisible 294 = invisible 295 = dolphin 296 = invisible //297 = invisible 298 = invisible 299 = invisible 300 = crystal elemental //301 = tree fellow 302 = skittering hopper 303 = devourer of souls //304 = flesh golem 305 = gore fiend 306 = impaler 307 = gibberling //308 = bone daemon 309 = patchwork skeleton 310 = wail banshee //311 = shadow knight 312 = abysmal horror 313 = Darknight creeper //314 = ravager 315 = flesh renderer 316 = wanderer of the void //317 = vampire bat 318 = deamon knight 319 = mound of maggots //320 = invisible 750 = Male Controller 751 = Female Controller //752 = Golem 753 = Enslaved Gargoyle 754 = Gargoyle Enforcer //755 = Gargoyle Destroyer 756 = Exodus Overseer //757 = Exodus Minion 758 = Fiery Gargoyle //763 = Exodus Minion Lord 764 = Juka Warrior 765 = Juka Mage //766 = Juka Lord 767 = Betrayer 768 = Juggernaut 769 = Blackthorn //770 = Meer Mage 771 = Meer Warrior 772 = Meer Eternal //773 = Meer Captain 774 = Dawn 775 = Plague Beast //776 = Small Horde Minion 777 = Doppleganger 778 = Swarm //779 = Bogling 780 = Bog Thing 781 = Ant Worker 782 = Ant Warrior //783 = Ant Queen 784 = Arcane Demon 785 = Moloch 786 = Black Widow //787 = Ant Lion 788 = Sphinx 789 = Quagmire 790 = Sand Vortex //791 = Beetle 792 = Chaos Daemon 793 = Skeletal Steed //794 = Swamp Dragon 795 = Medium Horde Minion //796 = Large Horde Minion 797 = Rikkitor 798 = Ancient Wyrm //799 = Armored Swamp Dragon //C@C Mount ID Thx A_Li_N //16016 = Chimera //16017 = Cu Sidhe //16018 = Charger of the Fallen //16020 = Hiyrur //16021 = beetle //16023 = beetle //16024 = swamp dragon //16026 = Ridgback //16027 = Uni //16028 = Kiri //16029 = Uni //16030 = Fire steed //16031 = Horse //16032 = grey horse //16033 = horse //16034 = brown horse //16035 = os //16036 = zos //16037 = zos //16038 = llama //16039 = nightmare //16040 = Silver Steed (1,2) //16041 = nightmare //16042 = ethy horse //16043 = ethy llama //16044 = ethy os //16045 = kirin //16047 = Minax Warhorse (2) //16048 = Shadow Lords Warhorse (2) //16049 = COM Warhorse (2) //16050 = True Brits Warhorse (2) //16051 = seahorse //16052 = uni //16053 = nightmare //16054 = nightmare //16055 = darknightmare //16056 = ridgbeack //16058 = ridgeback //16059 = undead horse //16060 = beetle //16061 = swamp dragon //16062 = armored swamp dragon //16239 = Daemon //*C@C Name : AIType, FightMode, RangePerception, RangeFight, ActiveSpeed, PassiveSpeed [Constructable] public AntLion() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 ) { Title = "the guardian"; Name = "an ant lion"; Female = false; Body = 787; Body = 988;//sprectral invis evilspellbook // mod if (Body == 18) //Hammer { DamageMin += 2; DamageMax += 6; RawStr += 10; RawDex -= 10; Skills.Macing.Base += 60; } //See List SoundNumbers.doc from RunUO.com BaseSoundID = 1006; SpeechHue = Utility.RandomDyedHue(); EmoteHue = 0x3; Hue = Utility.RandomSkinHue();//Hue =1345; //C@C Hair Beard ???Human Body??? Item hair = new Item( Utility.RandomList( 0x203B, 0x2049, 0x2048, 0x204A ) ); hair.Hue = 1150; hair.Layer = Layer.Hair; hair.Movable = false; AddItem( hair ); Item beard = new Item( Utility.RandomList( 0x203E, 0x203F, 0x2040, 0x2041, 0x204B, 0x204C, 0x204D ) ); beard.Hue = hair.Hue; beard.Layer = Layer.FacialHair; beard.Movable = false; AddItem( beard ); //C@C Equiped Item ???Human Body??? HalfApron halfapron = new HalfApron(); halfapron.Movable = false; halfapron.Hue = 1055; halfapron.Layer = Layer.Waist; AddItem(halfapron); Scythe weapon = new Scythe(); weapon.DamageLevel = (WeaponDamageLevel)Utility.Random( 5, 6 ); weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random( 5, 6 ); weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random( 5, 6 ); weapon.Skill = SkillName.Swords; weapon.Speed = 46; weapon.Hue = 0x151; weapon.Weight = 1.0; weapon.Movable = false; weapon.Attributes.SpellChanneling = 1; AddItem( weapon ); //C@C* Stats SetStr( 296, 320 ); SetDex( 81, 105 ); SetInt( 36, 60 ); SetHits( 151, 162 ); SetStam( 151, 162 ); SetMana( 151, 162 ); SetDamage( 7, 21 ); SetDamageType( ResistanceType.Physical, 70 ); SetDamageType( ResistanceType.Poison, 30 ); SetDamageType( ResistanceType.Fire, 30 ); SetDamageType( ResistanceType.Cold, 30 ); SetDamageType( ResistanceType.Energy, 30 ); SetResistance( ResistanceType.Physical, 45, 60 ); SetResistance( ResistanceType.Fire, 25, 35 ); SetResistance( ResistanceType.Cold, 30, 40 ); SetResistance( ResistanceType.Poison, 40, 50 ); SetResistance( ResistanceType.Energy, 30, 35 ); //C@C* Skills List /* SkillName.Parry, SkillName.Healing, SkillName.Hiding, SkillName.Stealing, SkillName.Alchemy, SkillName.AnimalLore, SkillName.ItemID, SkillName.ArmsLore, SkillName.Begging, SkillName.Blacksmith, SkillName.Fletching, SkillName.Peacemaking, SkillName.Camping, SkillName.Carpentry, SkillName.Cartography, SkillName.Cooking, SkillName.DetectHidden, SkillName.Discordance, SkillName.EvalInt, SkillName.Fishing, SkillName.Provocation, SkillName.Lockpicking, SkillName.Magery, SkillName.MagicResist, SkillName.Tactics, SkillName.Snooping, SkillName.RemoveTrap, SkillName.Musicianship, SkillName.Poisoning, SkillName.Archery, SkillName.SpiritSpeak, SkillName.Tailoring, SkillName.AnimalTaming, SkillName.TasteID, SkillName.Tinkering, SkillName.Veterinary, SkillName.Forensics, SkillName.Herding, SkillName.Tracking, SkillName.Stealth, SkillName.Inscribe, SkillName.Swords, SkillName.Macing, SkillName.Fencing, SkillNae.Wrestling, SkillName.Lumberjacking, SkillName.Mining, SkillName.Chivalry, SkillName.Meditation */ SetSkill( SkillName.MagicResist, 70.0 ); //C@C Karma & Frame Fame = 4500; Karma = -4500; VirtualArmor = 45; // Spells AddSpellAttack( typeof(Spells.First.MagicArrowSpell) ); AddSpellAttack( typeof(Spells.First.WeakenSpell) ); AddSpellAttack( typeof(Spells.Third.FireballSpell) ); AddSpellDefense( typeof(Spells.Third.WallOfStoneSpell) ); AddSpellDefense( typeof(Spells.First.HealSpell) ); //C@C Mount ???Human Body??? new ForestOstard().Rider = this; //From Runuo VirtualMount //C@C Tamable Tamable = true; ControlSlots = 1; MinTameSkill = 71.1; //C@C Pack Warning See //C@CPack OR+ for //BaseFamiliarPACK At The End // Or see BaseFamiliar.cs or PackHorse.cs Container pack = Backpack; if ( pack != null ) pack.Delete(); pack = new StrongBackpack(); pack.Movable = false; AddItem( pack ); EquipItem(new ChaosShield()); //C@C LooT1 PackItem( new Bone( 3 ) ); PackItem( new FertileDirt( Utility.RandomMinMax( 1, 5 ) ) ); //C@C LooT2 PackNecroReg( 50, 100 ); PackGold( 5500, 8000 ); //C@C LooT3 switch ( Utility.Random( 4 ) ) { case 0: PackItem( new DullCopperOre( Utility.RandomMinMax( 1, 10 ) ) ); break; case 1: PackItem( new ShadowIronOre( Utility.RandomMinMax( 1, 10 ) ) ); break; case 2: PackItem( new CopperOre( Utility.RandomMinMax( 1, 10 ) ) ); break; case 3: PackItem( new BronzeOre( Utility.RandomMinMax( 1, 10 ) ) ); break; } //C@C LooT4 double gschance = Utility.RandomDouble(); //If the random generated number is higher then 70, or exacly 70, a staff will drop. //Meaning: there's a 30% chance that one will drop. if ( gschance <= 0.3 ) { Item IceStaff = new IceStaff(); AddItem( IceStaff ); } //*C@C Close public AntLion()... } //*C@C Name (serial) public AntLion( Serial serial ) : base( serial ) { } //C@C SAVE public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); } //C@C LOAD public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); } //You can stop here, For a basic monster //*C@C Close public class AntLion ... } //*C@C Close namespace Server.Mobiles } //Dont close now if you want to Add new action // you can add more complex thing //C@C GeneratedLoot Lootpack.cs //Poor //Meager //Average //Rich //FilthyRich //UltraRich //SuperBoss //C@C Generated Loot loot.cs and lootpack.cs public override void GenerateLoot() { AddLoot( LootPack.Meager ); AddLoot( LootPack.Average ); AddLoot( LootPack.Potions ); } //C@C Custom Sound public override int GetAngerSound() { return 0x5A; } public override int GetIdleSound() { return 0x5A; } public override int GetAttackSound() { return 0x164; } public override int GetHurtSound() { return 0x187; } public override int GetDeathSound() { return 0x1BA; } //C@C InhumanSpeech.cs public override InhumanSpeech SpeechType{ get{ return InhumanSpeech.Orc; } } //C@C WeaponAbility // ArmorIgnore // BleedAttack // ConcussionBlow // CrushingBlow // Disarm // Dismount // DoubleStrike // InfectiousStrike // MortalStrike // MovingShot // ParalyzingBlow // ShadowStrike // WhirlwindAttack // RidingSwipe // FrenziedWhirlwind // Block // DefenseMastery // NerveStrike // TalonStrike // Feint // DualWield // DoubleShot // ArmorPierce //ML Ability From RunUO.com //C@C eaponAbility public virtual double WeaponAbilityChance{ get{ return 0.4; } } public override WeaponAbility GetWeaponAbility() { return Utility.RandomBool() ? WeaponAbility.MortalStrike : WeaponAbility.WhirlwindAttack; } //C@C PackInstinct ////////// // None = 0x0000, // Canine = 0x0001, // Ostard = 0x0002, // Feline = 0x0004, // Arachnid = 0x0008, // Daemon = 0x0010, // Bear = 0x0020, // Equine = 0x0040, // Bull = 0x0080 //C@C\\ public override PackInstinct PackInstinct{ get{ return PackInstinct.None; } } //C@C Base Creature public override bool AllowMaleTamer{ get{ return true; } } public override bool AllowFemaleTamer{ get{ return true; } } public override bool SubdueBeforeTame{ get{ return false; } } public override bool StatLossAfterTame{ get{ return SubdueBeforeTame; } } public override bool Commandable{ get{ return true; } } public override bool AutoDispel { get { return true; } } //C@C LVLPoison //////////// //Lesser //Regular //Greater //Deadly //Lethal public override Poison PoisonImmune{ get{ return Poison.Lethal; } } public override Poison HitPoison{ get{ return Poison.Lethal; } } public override double HitPoisonChance{ get{ return 0.5; } } public override bool BardImmune{ get{ return false; } } public override bool Unprovokable{ get{ return BardImmune || m_IsDeadPet; } } public override bool Uncalmable{ get{ return BardImmune || m_IsDeadPet; } } public override bool BleedImmune{ get{ return false; } } //C@C Line: 460 BaseCreature.cs #region Breath ability, like dragon fire breath // Must be overriden in subclass to enable public override bool HasBreath{ get{ return false; } } // Base damage given is: CurrentHitPoints * BreathDamageScalar public override double BreathDamageScalar{ get{ return (Core.AOS ? 0.16 : 0.05); } } // Min/max seconds until next breath public override double BreathMinDelay{ get{ return 10.0; } } public override double BreathMaxDelay{ get{ return 15.0; } } // Creature stops moving for 1.0 seconds while breathing public override double BreathStallTime{ get{ return 1.0; } } // Effect is sent 1.3 seconds after BreathAngerSound and BreathAngerAnimation is played public override double BreathEffectDelay{ get{ return 1.3; } } // Damage is given 1.0 seconds after effect is sent public override double BreathDamageDelay{ get{ return 1.0; } } public override int BreathRange{ get{ return RangePerception; } } // Damage types public override int BreathPhysicalDamage{ get{ return 0; } } public override int BreathFireDamage{ get{ return 100; } } public override int BreathColdDamage{ get{ return 0; } } public override int BreathPoisonDamage{ get{ return 0; } } public override int BreathEnergyDamage{ get{ return 0; } } // Effect details and sound public override int BreathEffectItemID{ get{ return 0x36D4; } } public override int BreathEffectSpeed{ get{ return 5; } } public override int BreathEffectDuration{ get{ return 0; } } public override bool BreathEffectExplodes{ get{ return false; } } public override bool BreathEffectFixedDir{ get{ return false; } } public override int BreathEffectHue{ get{ return 0; } } public override int BreathEffectRenderMode{ get{ return 0; } } public virtual int BreathEffectSound{ get{ return 0x227; } } // Anger sound/animations public override int BreathAngerSound{ get{ return GetAngerSound(); } } public override int BreathAngerAnimation{ get{ return 12; } } #endregion public override bool DeathAdderCharmable{ get{ return true; } } public override bool CanAngerOnTame{ get{ return false; } } public override bool NoHouseRestrictions{ get{ return false; } } public override bool IsHouseSummonable{ get{ return false; } } public override bool CanRummageCorpses{ get{ return false; } } public override bool IsScaryToPets{ get{ return false; } } public override bool IsScaredOfScaryThings{ get{ return true; } } //C@C Food Type //Gold //FruitsAndVegies //Meat //GrainsAndHay //Fish //Eggs //C@C Food.cs public override FoodType FavoriteFood{ get{ return FoodType.Meat; } } //C@C Resource OnCarve // public override int Feathers{ get{ return 0; } } public override int Wool{ get{ return 0; } } //Ribs, //Bird, //LambLeg public override MeatType MeatType{ get{ return MeatType.Ribs; } } public override int Meat{ get{ return 0; } } // Regular, // Spined, // Horned, // Barbed public override int Hides{ get{ return 0; } } public override HideType HideType{ get{ return HideType.Regular; } } //Red, //Yellow, //Black, //Green, //White, //Blue, //All public override int Scales{ get{ return 0; } } public override ScaleType ScaleType{ get{ return ScaleType.Red; } } //C@C Title Options public override bool ClickTitle{ get{ return false; } } public override bool ShowFameTitle{ get{ return false; } } //C@C Map public override int TreasureMapLevel{ get{ return 4; } } //C@C Enemy Group OppositionGroop.cs //???List??? //FeyAndUndead //TerathansAndOphidians // public override OppositionGroup OppositionGroup { get{ return OppositionGroup.TerathansAndOphidians; } } //C@C To Alter Damage public override void AlterDamageScalarFrom( Mobile caster, ref double scalar ) public override void AlterDamageScalarTo( Mobile target, ref double scalar ) public override void AlterSpellDamageFrom( Mobile from, ref int damage ) public override void AlterSpellDamageTo( Mobile to, ref int damage ) public override void AlterMeleeDamageFrom( Mobile from, ref int damage ) public override void AlterMeleeDamageTo( Mobile to, ref int damage ) //C@C Action public override void OnActionWander() public override void OnActionCombat() public override void OnActionGuard() public override void OnActionFlee() public override void OnActionInteract() public override void OnActionBackoff() public override void OnThink() public override void OnDamage() public override void OnDamagedBySpell( Mobile from ) public override void OnSpeech(SpeechEventArgs e) public override void AggressiveAction( Mobile aggressor, bool criminal ) public override void OnMovement( Mobile m, Point3D oldLocation ) public override void OnDoubleClick( Mobile from ) public override void OnGaveMeleeAttack( Mobile defender ) public override void OnGotMeleeAttack( Mobile attacker ) public override bool OnBeforeDeath() public override bool OnDragDrop( Mobile from, Item dropped ) public override bool CanBeDamaged() public override void CheckReflect( Mobile caster, ref bool reflect ) public override bool IsEnemy( Mobile m ) //C@C Custom stuff m_Mobile.UseSkill( SkillName.Meditation ); new HealSpell( m_Mobile, null ).Cast(); //talk this.Say("You ... !"); this.Emote("Hi !"); m.SendMessage( "You feel the life drain out of you!" ); SayTo( m, "the Frog Drink your blood!" ); //animation and sound m.FixedParticles( 0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist ); m.PlaySound( 0x231 ); Animate( 10, 4, 1, true, false, 0 ); Effects.SendLocationParticles( EffectItem.Create( from, m.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 ); to.BoltEffect( 0 ); //dmg AOS.Damage( m, this, Utility.RandomMinMax( 20, 25 ), true, 0, 0, 0, 100, 0 ); m.ApplyPoison( this, Poison.Lethal ); m.Damage( 5, this ); DoHarmful( to ); //C@C Is Enemy !NO its my Friend! public override bool IsEnemy( Mobile m ) { if ( m.Player && m.FindItemOnLayer( Layer.Helm ) is OrcishKinMask ) return false; if ( m.BodyMod == 183 || m.BodyMod == 184 ) return false; return base.IsEnemy( m ); } //C@C No Domage From Pet public override void AlterMeleeDamageFrom( Mobile from, ref int damage ) { if ( from is BaseCreature ) { BaseCreature bc = (BaseCreature)from; if ( bc.Controled || bc.BardTarget == this ) damage = 0; // Immune to pets and provoked creatures } } //C@C Reflect public override void CheckReflect( Mobile caster, ref bool reflect ) { if ( caster.Body.IsMale ) reflect = true; // Always reflect if caster isn't female } public override void AlterDamageScalarFrom( Mobile caster, ref double scalar ) { if ( caster.Body.IsMale ) scalar = 20; // Male bodies always reflect.. damage scaled 20x } // Serado REZ/Life Set private void ScaleResistances() { double hitsLost = (HitsMax - Hits) / (double)HitsMax; SetResistance( ResistanceType.Physical, 30 + (int)(hitsLost * ( 95 - 30 )) ); SetResistance( ResistanceType.Fire, 60 + (int)(hitsLost * ( 95 - 60 )) ); SetResistance( ResistanceType.Cold, 60 + (int)(hitsLost * ( 95 - 60 )) ); SetResistance( ResistanceType.Poison, 90 + (int)(hitsLost * ( 95 - 90 )) ); SetResistance( ResistanceType.Energy, 50 + (int)(hitsLost * ( 95 - 50 )) ); } // No Dmg public override bool CanBeDamaged() { return false; } // More dmg to public override void AlterMeleeDamageTo( Mobile to, ref int damage ) { if ( to is Dragon || to is WhiteWyrm || to is SwampDragon || to is Drake || to is Nightmare || to is Hiryu || to is LesserHiryu || to is Daemon ) damage *= 3; } //C@C On agresive action public override void AggressiveAction( Mobile aggressor, bool criminal ) { base.AggressiveAction( aggressor, criminal ); Item item = aggressor.FindItemOnLayer( Layer.Helm ); if ( item is OrcishKinMask ) { AOS.Damage( aggressor, 50, 0, 100, 0, 0, 0 ); item.Delete(); aggressor.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Head ); aggressor.PlaySound( 0x307 ); } } //C@C Sample Action Starter public override void OnGaveMeleeAttack( Mobile defender ) { base.OnGaveMeleeAttack(defender); if (Hits < 500 ) { MobileFeatures.DoSpawnUndeadArmy(defender);// ClasseName.Action(Target) } } //C@C Talk Action public override void OnSpeech(SpeechEventArgs e) { if (!e.Handled && e.Mobile.InRange(this.Location, 5)) { if (e.Speech == "HiddenTreasure") { this.Say("You ... !"); this.Emote("Hi !"); } base.OnSpeech(e); } } //C@C public override bool OnBeforeDeath() { this.Say("Arrr, Arrr!"); } //C@C Drag Drop Gold public override bool OnDragDrop( Mobile from, Item dropped ) { if ( CheckFeed( from, dropped ) ) return true; else if ( CheckGold( from, dropped ) ) return true; return base.OnDragDrop( from, dropped ); } public override bool CheckGold( Mobile from, Item dropped ) { if ( dropped is Gold ) return OnGoldGiven( from, (Gold)dropped ); return false; } public override bool OnGoldGiven( Mobile from, Gold dropped ) { Direction = GetDirectionTo( from ); int oldSpeechHue = this.SpeechHue; this.SpeechHue = 0x23F; SayTo( from, "Thou art giving me gold?" ); if ( dropped.Amount >= 400 ) SayTo( from, "'Tis a noble gift." ); else SayTo( from, "Money is always welcome." ); this.SpeechHue = 0x3B2; SayTo( from, 501548 ); // I thank thee. this.SpeechHue = oldSpeechHue; dropped.Delete(); return true; } //C@C Spawm Item on Ground + delete timer public override bool OnBeforeDeath() { Item item = (Item)Activator.CreateInstance( typeof(Moongate) ); Moongate moon = (Moongate)item; moon.TargetMap = Map.Trammel; //or map moon.Target = new Point3D( 5394, 1116, 0 ); // Map map = Map.Trammel; Point3D pnt = GetSpawnLocation(); moon.MoveToWorld(pnt,this.Map); Timer m_timer = new MobileDeleteTime( item ); m_timer.Start() } public class MobileDeleteTime : Timer { private Item mob; public MobileDeleteTime( Item m ) : base( TimeSpan.FromSeconds( 30 ) ) { mob = m; Priority = TimerPriority.OneSecond; } protected override void OnTick() { if( mob == null || mob.Deleted ) { Stop(); return; } mob.Delete(); } } //Get Spawn Location public Point3D GetSpawnLocation() { int m_SpawnRange = 2; Map map = Map; if ( map == null ) return Location; // Try 20 times to find a spawnable location. for ( int i = 0; i < 20; i++ ) { int x = Location.X + (Utility.Random( (m_SpawnRange * 2) + 1 ) - m_SpawnRange); int y = Location.Y + (Utility.Random( (m_SpawnRange * 2) + 1 ) - m_SpawnRange); int z = Map.GetAverageZ( 5394, 1116 ); if ( Map.CanSpawnMobile( new Point2D( 5394, 1116 ), 0 ) ) return new Point3D( 5394, 1116, 0 ); } return Location; } //C@C Hidde Time public override void OnMovement( Mobile m, Point3D oldLocation ) { base.OnMovement( m, oldLocation ); int hours, minutes; Server.Items.Clock.GetTime( m.Map, m.X, m.Y, out hours, out minutes ); if (hours >= 9 ) { this.Hidden = true; this.FightMode = FightMode.None; } if (hours <= 9) { this.Hidden = false; this.FightMode = FightMode.Closest; } } //C@C Hypnotize ADD writer.Write( mHypnoDmg ); to Serialize // AND mHypnoDmg = reader.ReadInt(); to Deserialize private int mHypnoDmg; public void Hypnotize( Mobile target ) { Item weapon = target.FindItemOnLayer( Layer.OneHanded ); if( weapon == null ) // Is the item NOT a weapon? return; if ( ( ((BaseWeapon)weapon).MaxDamage ) > 1 ) { mHypnoDmg++; if ( ( ((BaseWeapon) weapon).MaxDamage / 2) > 0 ) { mHypnoDmg = ((BaseWeapon)weapon).MaxDamage + 15; DoHarmful( target ); double damage; damage = ( mHypnoDmg ); target.SendMessage( "You no longer have control of your body!" ); target.Freeze( TimeSpan.FromSeconds( 15.0 ) ); target.Say( "I can't move my body!" ); } Combatant = target; } } public void DoSpecialAbility( Mobile target ) { if ( 0.5 >= Utility.RandomDouble() ) Hypnotize( target ); } public override void OnGotMeleeAttack( Mobile attacker ) { base.OnGotMeleeAttack( attacker ); DoSpecialAbility( attacker ); } //C@C Paralyze public override void OnGaveMeleeAttack( Mobile defender ) { defender.Paralyze( new TimeSpan( 0,0,0,5,0 )); base.OnGaveMeleeAttack( defender ); defender.SendMessage( "You feel Paralysis set in" ); } //C@C Morph in an other monster public override void OnDoubleClick( Mobile from ) { MimicMelee rm = new MimicMelee();// the new monster rm.Map = this.Map; rm.Location = this.Location; Effects.SendLocationEffect( Location,Map, 0x3709, 13, 0x3B2, 0 ); this.Delete(); } //C@C Morph in to you public override void OnDamagedBySpell( Mobile from ) { if (from.Combatant == null) return; Mobile m = from.Combatant; if (m.Combatant == null) return; if (m.Body == 58) m.Say( "I will steal your Body and now your Soul..." ); if (m.Body != from.Body) { m.BoltEffect( 0 ); m.Body = from.Body; m.Hue = from.Hue; m.Name = from.Name; m.Fame = from.Fame; m.Karma = (0 -from.Karma); m.Title = from.Title; m.Str = from.Str; m.Int = from.Int; m.Dex = from.Dex; m.Hits = from.Hits; m.Dex = from.Dex; m.Mana = from.Mana; m.Stam = from.Stam; m.Female = from.Female; m.VirtualArmor = (from.VirtualArmor); Item hair = new Item( Utility.RandomList( 8265 ) ); hair.Hue = 1153; hair.Layer = Layer.Hair; hair.Movable = false; m.AddItem( hair ); Kasa hat = new Kasa(); hat.Name = "Dark Kasa"; hat.Hue = 1175; hat.Movable =false; m.AddItem( hat ); DeathRobe robe = new DeathRobe(); robe.Name = "Death Robe"; robe.Hue = 1175; robe.Movable = false; m.AddItem( robe ); Sandals sandals = new Sandals(); sandals.Name = "Black Pearl"; sandals.Hue = 1; sandals.Movable = false; m.AddItem( sandals ); Spellbook book = new Spellbook( UInt64.MaxValue ); book.Name = "Black Magick"; book.Hue = 1175; book.Movable = false; m.AddItem( book ); BagOfAllReagents bag = new BagOfAllReagents(); m.AddToBackpack( bag ); m.BoltEffect( 0 ); } switch ( Utility.Random( 6 ) ) { case 0: m.Say( "You can not Win with Magic..." ); break; case 1: m.Say( "Your image is weak as with your mind..." ); break; case 2: m.Say( "It feels good to wear your skin..." ); break; case 3: m.Say( "I'll take over your life as soon as I end it..." ); break; case 4: m.Say( "Don't you like having a twin, lol..." ); break; case 5: m.Say( "You lack the skills to defeat me..." ); break; } from.BoltEffect( 0 ); from.Damage( Utility.Random( 1, 100 ) ); m.Hits += ( Utility.Random( 1, 100 ) ); } //C@C Spawn + and - int SpawnCount = 2; public void SpawnEle( Mobile target ) { Map map = this.Map; if ( map == null ) return; int newele = Utility.Random( 2 ); for ( int i = 0; i < newele; ++i ) { BaseCreature monster = null; switch ( Utility.Random( 3 ) ) { case 0: monster = new BabyWhiteWyrm(); break; case 1: monster = new BabyWhiteWyrm(); break; case 2: monster = new BabyWhiteWyrm(); break; } monster.Team = this.Team; monster.FightMode = FightMode.Closest; bool validLocation = false; Point3D loc = this.Location; for ( int j = 0; !validLocation && j < 10; ++j ) { int x = X + Utility.Random( 3 ) - 1; int y = Y + Utility.Random( 3 ) - 1; int z = map.GetAverageZ( x, y ); if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) ) loc = new Point3D( x, y, Z ); else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) ) loc = new Point3D( x, y, z ); } monster.MoveToWorld( loc, map ); monster.Combatant = target; } } public override void OnGaveMeleeAttack( Mobile defender) { base.OnGaveMeleeAttack( defender); int AddCountChance = Utility.Random( 100 ); if ( AddCountChance >= 50) { ++SpawnCount; } } public override void OnGotMeleeAttack( Mobile attacker) { base.OnGotMeleeAttack( attacker); if (SpawnCount > 0) { SpawnEle( attacker ); --SpawnCount; } else { SpawnCount = 0; } } //*C@C Rez Heal Method public virtual bool CheckResurrect( Mobile m ) { return true; } private DateTime m_NextResurrect; private static TimeSpan ResurrectDelay = TimeSpan.FromSeconds( 2.0 ); public virtual void OfferResurrection( Mobile m ) { Direction = GetDirectionTo( m ); Say( 501224 ); // Thou hast strayed from the path of virtue, but thou still deservest a second chance. m.PlaySound( 0x214 ); m.FixedEffect( 0x376A, 10, 16 ); m.CloseGump( typeof( ResurrectGump ) ); m.SendGump( new ResurrectGump( m, ResurrectMessage.Healer ) ); } public virtual void OfferHeal( PlayerMobile m ) { Direction = GetDirectionTo( m ); if ( m.Hits < m.HitsMax ) { Say( 501229 ); // You look like you need some healing my child. m.PlaySound( 0x1F2 ); m.FixedEffect( 0x376A, 9, 32 ); m.Hits = m.HitsMax; } else { Say( 501228 ); // I can do no more for you at this time. } } public override void OnMovement( Mobile m, Point3D oldLocation ) { if ( !m.Frozen && DateTime.Now >= m_NextResurrect && InRange( m, 1 ) && !InRange( oldLocation, 1 ) && InLOS( m ) ) { if ( !m.Alive ) { m_NextResurrect = DateTime.Now + ResurrectDelay; if ( m.Map == null || !m.Map.CanFit( m.Location, 16, false, false ) ) { m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there! } else if ( CheckResurrect( m ) ) { OfferResurrection( m ); } } else if ( m.Hits < m.HitsMax ) { OfferHeal( (PlayerMobile) m ); } } } //*C@C Set Mana private DateTime m_NextFlare; public override void OnThink() { base.OnThink(); if ( DateTime.Now < m_NextFlare ) return; m_NextFlare = DateTime.Now + TimeSpan.FromSeconds( 5.0 + (25.0 * Utility.RandomDouble()) ); this.FixedEffect( 0x37C4, 1, 12, 1109, 6 ); this.PlaySound( 0x1D3 ); Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerCallback( Flare ) ); } private void Flare() { Mobile caster = this.ControlMaster; if ( caster == null ) caster = this.SummonMaster; if ( caster == null ) return; ArrayList list = new ArrayList(); foreach ( Mobile m in this.GetMobilesInRange( 5 ) ) { if ( m.Player && m.Alive && !m.IsDeadBondedPet && m.Karma <= 0 ) list.Add( m ); } for ( int i = 0; i < list.Count; ++i ) { Mobile m = (Mobile)list[i]; bool friendly = true; for ( int j = 0; friendly && j < caster.Aggressors.Count; ++j ) friendly = ( caster.Aggressors[j].Attacker != m ); for ( int j = 0; friendly && j < caster.Aggressed.Count; ++j ) friendly = ( caster.Aggressed[j].Defender != m ); if ( friendly ) { m.FixedEffect( 0x37C4, 1, 12, 1109, 3 ); // At player m.Mana += 1 - (m.Karma / 1000); } } } //Close if you didn't do it before. //*C@C //*C@C Close public class AntLion ... } //*C@C Close namespace Server.Mobiles } // // // // // //C@C animal Pack Add public override bool OnBeforeDeath() { if ( !base.OnBeforeDeath() ) return false; PackAnimal.CombineBackpacks( this ); return true; } public override DeathMoveResult GetInventoryMoveResultFor( Item item ) { return DeathMoveResult.MoveToCorpse; } public override bool IsSnoop( Mobile from ) { if ( PackAnimal.CheckAccess( this, from ) ) return false; return base.IsSnoop( from ); } public override bool OnDragDrop( Mobile from, Item item ) { if ( CheckFeed( from, item ) ) return true; if ( PackAnimal.CheckAccess( this, from ) ) { AddToBackpack( item ); return true; } return base.OnDragDrop( from, item ); } public override bool CheckNonlocalDrop( Mobile from, Item item, Item target ) { return PackAnimal.CheckAccess( this, from ); } public override bool CheckNonlocalLift( Mobile from, Item item ) { return PackAnimal.CheckAccess( this, from ); } public override void OnDoubleClick( Mobile from ) { PackAnimal.TryPackOpen( this, from ); } public override void GetContextMenuEntries( Mobile from, List list ) { base.GetContextMenuEntries( from, list ); PackAnimal.GetContextMenuEntries( this, from, list ); } public class PackAnimalBackpackEntry : ContextMenuEntry { private BaseCreature m_Animal; private Mobile m_From; public PackAnimalBackpackEntry( BaseCreature animal, Mobile from ) : base( 6145, 3 ) { m_Animal = animal; m_From = from; if ( animal.IsDeadPet ) Enabled = false; } public override void OnClick() { PackAnimal.TryPackOpen( m_Animal, m_From ); } } public class PackAnimal { public static void GetContextMenuEntries( BaseCreature animal, Mobile from, List list ) { if ( CheckAccess( animal, from ) ) list.Add( new PackAnimalBackpackEntry( animal, from ) ); } public static bool CheckAccess( BaseCreature animal, Mobile from ) { if ( from == animal || from.AccessLevel >= AccessLevel.GameMaster ) return true; if ( fom.Alive && animal.Controlled && !animal.IsDeadPet && (from == animal.ControlMaster || from == animal.SummonMaster) ) return true; return false; } public static void CombineBackpacks( BaseCreature animal ) { if ( Core.AOS ) return; //if ( animal.IsBonded || animal.IsDeadPet ) // return; Container pack = animal.Backpack; if ( pack != null ) { Container newPack = new Backpack(); for ( int i = pack.Items.Count - 1; i >= 0; --i ) { if ( i >= pack.Items.Count ) continue; newPack.DropItem( pack.Items[i] ); } pack.DropItem( newPack ); } } public static void TryPackOpen( BaseCreature animal, Mobile from ) { if ( animal.IsDeadPet ) return; Container item = animal.Backpack; if ( item != null ) from.Use( item ); } }