public override void OnCombatantChange() { if (m_SpawnedFriends) { return; } for (int i = 1; i < MaxFriends + 1; i++) { // spawn new friends BaseCreature friend = new Drake(); friend.MoveToWorld(Map.GetSpawnPosition(Location, 3), Map); m_SpawnedFriends = true; } }
public void SpawnDrakes(Mobile target) { Map map = this.Map; if (map == null) { return; } int newDrakes = 2; for (int i = 0; i < newDrakes; ++i) { Drake drake = new Drake(); drake.Team = this.Team; drake.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); } } drake.MoveToWorld(loc, map); drake.Combatant = target; } }
public override void IncreaseTier() { base.IncreaseTier(); List<object> list = new List<object>(); BaseCreature c; // haven't got a clue if levels are OSI switch ( this.Tier ) { case 1: c = new Crane(); c.MoveToWorld(new Point3D(4500, 1382, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); break; case 2: c = new DireWolf(); c.MoveToWorld(new Point3D(4494, 1370, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); c = new DireWolf(); c.MoveToWorld(new Point3D(4494, 1360, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); c = new WhiteWolf(); c.MoveToWorld(new Point3D(4491, 1366, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); c = new WhiteWolf(); c.MoveToWorld(new Point3D(4497, 1366, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); c = new GreyWolf(); c.MoveToWorld(new Point3D(4497, 1366, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); break; case 3: c = new Quagmire(); c.MoveToWorld(new Point3D(4483, 1392, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); c = new BogThing(); c.MoveToWorld(new Point3D(4486, 1385, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); c = new PlagueBeast(); c.MoveToWorld(new Point3D(4486, 1379, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); break; case 4: c = new PolarBear(); c.MoveToWorld(new Point3D(4513, 1395, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); c = new PolarBear(); c.MoveToWorld(new Point3D(4508, 1393, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); break; case 5: c = new Yamandon(); c.MoveToWorld(new Point3D(4498, 1393, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); break; case 6: c = new Changeling(); c.MoveToWorld(new Point3D(4518, 1358, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); break; case 7: c = new Wyvern(); c.MoveToWorld(new Point3D(4512, 1381, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); break; case 8: c = new Dragon(); c.MoveToWorld(new Point3D(4511, 1372, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); c = new Drake(); c.MoveToWorld(new Point3D(4516, 1371, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); break; case 9: c = new Reptalon(); c.MoveToWorld(new Point3D(4530, 1387, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); break; case 10: c = new SilverSteed(); c.MoveToWorld(new Point3D(4506, 1358, 23), this.Map); c.Blessed = true; c.Tamable = false; list.Add(c); /* c = new Sphynx(); c.MoveToWorld( new Point3D( 4506, 1358, 23 ), Map ); c.Blessed = true; c.Tamable = false; list.Add( c );*/ break; } if (list.Count > 0) this.Tiers.Add(list); }
public override void OnTrigger(object activator, Mobile m) { if (m == null || this.Word == null || (this.RequireIdentification && !this.m_Identified)) return; if (DateTime.Now < this.m_EndTime) return; string msgstr = "Activating the power of " + this.Word; // assign powers to certain words switch ( this.Word ) { case "Shoda": m.AddStatMod(new StatMod(StatType.Int, "Shoda", 20, this.Duration)); m.SendMessage("Your mind expands!"); break; case "Malik": m.AddStatMod(new StatMod(StatType.Str, "Malik", 20, this.Duration)); m.SendMessage("Your strength surges!"); break; case "Lepto": m.AddStatMod(new StatMod(StatType.Dex, "Lepto", 20, this.Duration)); m.SendMessage("You are more nimble!"); break; case "Velas": Timer.DelayCall(TimeSpan.Zero, new TimerStateCallback(Hide_Callback), new object[] { m }); m.SendMessage("You disappear!"); break; case "Tarda": m.AddSkillMod(new TimedSkillMod(SkillName.Tactics, true, 20, this.Duration)); m.SendMessage("You are more skillful warrior!"); break; case "Marda": m.AddSkillMod(new TimedSkillMod(SkillName.Magery, true, 20, this.Duration)); m.SendMessage("You are more skillful mage!"); break; case "Vas Malik": m.AddStatMod(new StatMod(StatType.Str, "Vas Malik", 40, this.Duration)); m.SendMessage("You are exceptionally strong!"); break; case "Nartor": BaseCreature b = new Drake(); b.MoveToWorld(m.Location, m.Map); b.Owners.Add(m); b.SetControlMaster(m); if (b.Controlled) m.SendMessage("You master the beast!"); break; case "Santor": b = new Horse(); b.MoveToWorld(m.Location, m.Map); b.Owners.Add(m); b.SetControlMaster(m); if (b.Controlled) m.SendMessage("You master the beast!"); break; default: m.SendMessage("There is no effect."); break; } // display activation effects Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3728, 8, 20, 5042); Effects.PlaySound(m, m.Map, 0x201); // display a message over the item it was attached to if (this.AttachedTo is Item) { ((Item)this.AttachedTo).PublicOverheadMessage(MessageType.Regular, 0x3B2, true, msgstr); } this.Charges--; // remove the attachment after the charges run out if (this.Charges == 0) { this.Delete(); } else { this.m_EndTime = DateTime.Now + this.Refractory; } }
public override void OnCombatantChange() { if ( m_SpawnedFriends ) return; for ( int i = 1; i < MaxFriends + 1; i++ ) { // spawn new friends BaseCreature friend = new Drake(); friend.MoveToWorld( Map.GetSpawnPosition( Location, 3 ), Map ); m_SpawnedFriends = true; } }
public virtual void SpawnEnemies( RVS Handeling, String RegionName, int amount) { int numberOfEnemies = amount; int kindOfEnemy = 0; int randomEnemy = 0; Mobile Enemy = null; //Mobile Enemy = new Sheep(); int randomValueX = 0; int randomValueY = 0; int negative = 0; Point3D spawn; Map spawnmap; if ( RegionName == "Sheep" ) { spawn = SheepSpawnPoint; spawnmap = SheepSpawnMap; kindOfEnemy = 0; } else if ( RegionName == "Rabbit" ) { spawn = RabbitSpawnPoint; spawnmap = RabbitSpawnMap; kindOfEnemy = 1; } else { spawn = SheepSpawnPoint; spawnmap = SheepSpawnMap; kindOfEnemy = 0; } for ( int i = 0; i < numberOfEnemies; i++ ) { //kindOfEnemy = Utility.Random( 5 ); randomValueX = Utility.Random( 11 ); negative = Utility.Random( 2 ); if ( negative > 0 ) randomValueX *= -1; negative = Utility.Random( 2 ); randomValueY = Utility.Random( 11 ); if ( negative > 0 ) randomValueY *= -1; if ( Handeling.RvS ) { switch ( kindOfEnemy ) { case 0: { Enemy = new Sheep(); break; } case 1: { Enemy = new Rabbit(); break; } } } else if ( Handeling.Orcs ) { kindOfEnemy = 0; randomEnemy = Utility.Random( 100 ); if ( randomEnemy <= 20 ) kindOfEnemy++; if ( randomEnemy <= 10 ) kindOfEnemy++; if ( randomEnemy <= 5 ) kindOfEnemy++; switch ( kindOfEnemy ) { case 0: { Enemy = new Orc(); break; } case 1: { Enemy = new OrcishLord(); break; } case 2: { Enemy = new Ettin(); break; } case 3: { Enemy = new OrcishMage(); break; } } } else if ( Handeling.Lizardmen ) { kindOfEnemy = 0; randomEnemy = Utility.Random( 100 ); if ( randomEnemy <= 20 ) kindOfEnemy++; if ( randomEnemy <= 10 ) kindOfEnemy++; if ( randomEnemy <= 5 ) kindOfEnemy++; switch ( kindOfEnemy ) { case 0: { Enemy = new Snake(); break; } case 1: { Enemy = new GiantSerpent(); break; } case 2: { Enemy = new Lizardman(); break; } case 3: { Enemy = new Drake(); break; } } } else if ( Handeling.Ratmen ) { kindOfEnemy = 0; randomEnemy = Utility.Random( 100 ); if ( randomEnemy <= 20 ) kindOfEnemy++; if ( randomEnemy <= 15 ) kindOfEnemy++; if ( randomEnemy <= 10 ) kindOfEnemy++; if ( randomEnemy <= 5 ) kindOfEnemy++; switch ( kindOfEnemy ) { case 0: { Enemy = new Sewerrat(); break; } case 1: { Enemy = new GiantRat(); break; } case 2: { Enemy = new Ratman(); break; } case 3: { Enemy = new RatmanMage(); break; } case 4: { Enemy = new RatmanArcher(); break; } } } else if ( Handeling.Undead ) { kindOfEnemy = 0; randomEnemy = Utility.Random( 100 ); if ( randomEnemy <= 50 ) kindOfEnemy++; if ( randomEnemy <= 40 ) kindOfEnemy++; if ( randomEnemy <= 30 ) kindOfEnemy++; if ( randomEnemy <= 20 ) kindOfEnemy++; if ( randomEnemy <= 10 ) kindOfEnemy++; if ( randomEnemy <= 5 ) kindOfEnemy++; switch ( kindOfEnemy ) { case 0: { Enemy = new Skeleton(); break; } case 1: { Enemy = new Zombie(); break; } case 2: { Enemy = new RestlessSoul(); break; } case 3: { Enemy = new SkeletalMage(); break; } case 4: { Enemy = new SkeletalKnight(); break; } case 5: { Enemy = new Mummy(); break; } case 6: { Enemy = new Lich(); break; } } } Enemy.Map = spawnmap; Enemy.Location = new Point3D((spawn.X + randomValueX), (spawn.Y + randomValueY), (spawn.Z)); Enemies.Add(Enemy); } }
public void SpawnDrakes( Mobile target ) { Map map = this.Map; if( map == null ) return; int newDrakes = 2; for( int i = 0; i < newDrakes; ++i ) { Drake drake = new Drake(); drake.Team = this.Team; drake.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 ); } drake.MoveToWorld( loc, map ); drake.Combatant = target; } }
protected override void OnTick() { if ( m_Item.Deleted ) return; Mobile spawn; switch ( Utility.Random( 8 ) ) { default: case 0: spawn = new ElderGazer(); break; case 1: spawn = new Imp(); break; case 2: spawn = new OrcBrute(); break; case 3: spawn = new Phoenix(); break; case 4: spawn = new Quagmire(); break; case 5: spawn = new WhippingVine(); break; case 6: spawn = new Drake(); break; case 7: spawn = new VorpalBunny(); break; } spawn.MoveToWorld( m_Item.Location, m_Item.Map ); m_Item.Delete(); }