public override void OnDoubleClick(Mobile from) { if (Parent != from) if (from.AccessLevel < AccessLevel.GameMaster) from.SendMessage("When you touch, it vanishes without trace..."); if (from.AccessLevel < AccessLevel.GameMaster) this.Consume(); if (from.AccessLevel < AccessLevel.GameMaster) return; { if (!IsChildOf(from.Backpack)) { from.Say("That must be in your pack for you to use it"); return; } if (!from.Hidden == true) { from.Emote("*" + from.Name + " goes to ethereal world*"); from.BoltEffect(0); from.Hidden = true; } else { from.Hidden = false; from.Emote("*" + from.Name + " strikes the earth*"); from.BoltEffect(0); } } }
public void Target(Mobile m) { SlayerEntry undead = SlayerGroup.GetEntryByName(SlayerName.Silver); SlayerEntry demon = SlayerGroup.GetEntryByName(SlayerName.DaemonDismissal); if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (m is PlayerMobile) { Caster.SendMessage("You cannot banish another player!"); } else if ((undead != null && !undead.Slays(m)) || (demon != null && !demon.Slays(m))) { Caster.SendMessage("This spell cannot be used on this type of creature."); } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); m.FixedParticles(0x3709, 10, 30, 5052, 0x480, 0, EffectLayer.LeftFoot); m.PlaySound(0x208); m.Say("No! I musn't be banished!"); new InternalTimer(m).Start(); } FinishSequence(); }
public SayALotTimer( string[] s, Mobile m, TimeSpan delay ) : base( delay, delay ) { m_Mode = 0; m_Owner = m; m_Say = s; Priority = TimerPriority.TwoFiftyMS; m_Owner.Say( m_Say[m_Mode++] ); //Say the first line right away }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.Location, 2)) { if (!this.m_Locked && this.m_Active) { from.MoveToWorld(this.m_PointDest, this.m_MapDest); from.SendLocalizedMessage(1072790); // The wall becomes transparent, and you push your way through it. } else from.Say(502684); // This door appears to be locked. } }
public override void OnMovement(Mobile from, Point3D oldLocation) { if (from.InRange(this, 3) && from is PlayerMobile) //chooses the area around the bannana { from.PlaySound(from.Female ? 791 : 1063); //sound from.Say("*slipped on " + Name + "*"); //message if (!from.Mounted) //if not on a horse do the following... { from.Freeze(TimeSpan.FromSeconds(4.0)); //stops player from running from.Animate(22, 5, 1, true, false, 0); //show the player falling from.Freeze(TimeSpan.FromSeconds(4.0)); //stops the player just a bit longer. } } }
public override void OnDoubleClick(Mobile from) //testing to make sure it works. { if (from.InRange(this, 3) && from is PlayerMobile) { from.PlaySound(from.Female ? 791 : 1063); from.Say("*slipped on " + Name + "*"); if (!from.Mounted) { from.Freeze(TimeSpan.FromSeconds(4.0)); from.Animate(22, 5, 1, true, false, 0); from.Freeze(TimeSpan.FromSeconds(4.0)); } } }
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus ) { switch (Utility.Random(5)) { case 0: { defender.FixedParticles(0x37CC, 1, 40, 97, 3, 9917, 0); attacker.Say("Suffer my fury!!!"); SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 30, 0, 0, 0); break; } } base.OnHit( attacker, defender, damageBonus ); }
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus ) { PlaySwingAnimation( attacker ); PlayHurtAnimation( defender ); attacker.PlaySound( GetHitAttackSound( attacker, defender ) ); defender.PlaySound( GetHitDefendSound( attacker, defender ) ); switch (Utility.Random(5)) { case 0: defender.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot); attacker.Say("Feel the hate Hell holds for you!!!"); SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 20, 20, 20, 20); break; } base.OnHit( attacker, defender, damageBonus ); }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1042001 ); } else if ( from.Region.Name == "Tele Center Tram" || from.Region.Name == "Tele Center Fel" ) { from.SendMessage( "You are not allowed to do that in the Tele Center" ); } else { from.SendMessage( "You eat the cake and begin to feel sick..." ); from.Poison = Poison.Lesser; from.Say( "*cough cough*" ); this.Delete(); } }
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus ) { PlaySwingAnimation( attacker ); PlayHurtAnimation( defender ); attacker.PlaySound( GetHitAttackSound( attacker, defender ) ); defender.PlaySound( GetHitDefendSound( attacker, defender ) ); switch ( Utility.Random( 5 ) ) { case 0: { defender.FixedParticles( 0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist ); attacker.Say( "Sacrafice your life to me!!!" ); SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 0, 0, 0, 30); break; } } base.OnHit( attacker, defender, damageBonus ); }
public override void OnDoubleClick(Mobile from) { if (DateTime.UtcNow >= LastUsed) { LastUsed = DateTime.UtcNow + TimeSpan.FromMinutes(20); Effects.SendIndividualFlashEffect(from, (FlashType) 2); from.SolidHueOverride = 2498; Timer.DelayCall(TimeSpan.FromSeconds(1), () => { from.BoltEffect(2049); from.Say("I HAVE THE POWER!"); Timer.DelayCall(TimeSpan.FromSeconds(3), () => { from.SolidHueOverride = -1; }); }); } else { TimeSpan nextuse = LastUsed - DateTime.UtcNow; from.SendMessage("You cannot use this again for another " + nextuse.Minutes + " minutes."); } base.OnDoubleClick(from); }
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus ) { PlaySwingAnimation( attacker ); PlayHurtAnimation( defender ); attacker.PlaySound( GetHitAttackSound( attacker, defender ) ); defender.PlaySound( GetHitDefendSound( attacker, defender ) ); switch (Utility.Random(5)) { case 0: { defender.FixedParticles(0x3789, 10, 25, 5032, EffectLayer.Head); attacker.Say("Death will Always Triumph!!!"); SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 0, 0, 30, 0); break; } } base.OnHit( attacker, defender, damageBonus ); }
public override void OnDoubleClick( Mobile from ) { if ( Parent != from ) if (from.AccessLevel < AccessLevel.GameMaster) from.SendMessage( "When you touch, it vanishes without trace..." ); if (from.AccessLevel < AccessLevel.GameMaster) this.Consume() ; if (from.AccessLevel < AccessLevel.GameMaster) return ; { if ( !IsChildOf( from.Backpack ) ) { from.Say ( "That must be in your pack for you to use it" ); return; } if ( !from.Hidden == true ) { from.Emote( "*" + from.Name + "* Disapears in a rage of magical fury *" ); from.FixedParticles(0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist ); from.FixedParticles( 0x37C4, 1, 31, 9502, 43, 2, EffectLayer.Waist ); from.PlaySound( 0x20F ); from.PlaySound( 0x44A ); from.Hidden = true; } else { from.Hidden=false; from.Emote( "*" + from.Name + "* Apears in a rage of magical fury *"); from.FixedParticles(0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist ); from.FixedParticles( 0x37C4, 1, 31, 9502, 43, 2, EffectLayer.Waist ); from.PlaySound( 0x20F ); from.PlaySound(0x44A ); } } }
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus ) { PlaySwingAnimation( attacker ); PlayHurtAnimation( defender ); attacker.PlaySound( GetHitAttackSound( attacker, defender ) ); defender.PlaySound( GetHitDefendSound( attacker, defender ) ); switch (Utility.Random(5)) { case 0: { defender.FixedParticles(0x37CC, 1, 40, 97, 3, 9917, 0); attacker.Say("Lord Defend me from this evil!!!"); SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 0, 30, 0, 0); break; } } base.OnHit( attacker, defender, damageBonus ); }
public override void OnDoubleClick(Mobile from) { if (Parent != from) if (from.AccessLevel < AccessLevel.GameMaster) from.SendMessage("When you touch, it vanishes without trace..."); if (from.AccessLevel < AccessLevel.GameMaster) this.Consume(); if (from.AccessLevel < AccessLevel.GameMaster) return; { if (!IsChildOf(from.Backpack)) { from.Say("That must be in your pack for you to use it"); return; } if (!from.Hidden == true) { from.Emote("*" + from.Name + " expands into a mist a floats away*"); from.FixedParticles(0x375A, 1, 17, 9919, 33, 7, EffectLayer.Waist); from.FixedParticles(0x3728, 1, 13, 9502, 33, 7, (EffectLayer)255); from.PlaySound(0x175); from.Hidden = true; } else { from.Hidden = false; from.Emote("*" + from.Name + " pulls together in front of you from the air*"); from.FixedParticles(0x375A, 1, 17, 9919, 33, 7, EffectLayer.Waist); from.FixedParticles(0x3728, 1, 13, 9502, 33, 7, (EffectLayer)255); from.PlaySound(0x175); } } }
public override void OnDoubleClick(Mobile from) { if (Parent != from) if (from.AccessLevel < AccessLevel.GameMaster) from.SendMessage("When you touch, it vanishes without trace..."); if (from.AccessLevel < AccessLevel.GameMaster) this.Consume(); if (from.AccessLevel < AccessLevel.GameMaster) return; { if (!IsChildOf(from.Backpack)) { from.Say("That must be in your pack for you to use it"); return; } if (!from.Hidden == true) { from.Emote("*" + from.Name + " evaporates into a watery mist*"); from.FixedParticles(0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist); from.FixedParticles(0x376A, 1, 30, 9502, 5, 3, EffectLayer.Waist); from.PlaySound(0x244); from.Hidden = true; } else { from.Hidden = false; from.Emote("*" + from.Name + " retakes shape from the magical watery mist*"); from.FixedParticles(0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist); from.FixedParticles(0x376A, 1, 30, 9502, 5, 3, EffectLayer.Waist); from.PlaySound(0x244); } } }
public override void OnDoubleClick( Mobile from ) { if ( Parent != from ) if (from.AccessLevel < AccessLevel.GameMaster) from.SendMessage( "When you touch, it vanishes without trace..." ); if (from.AccessLevel < AccessLevel.GameMaster) this.Consume() ; if (from.AccessLevel < AccessLevel.GameMaster) return ; { if ( !IsChildOf( from.Backpack ) ) { from.Say ( "That must be in your pack for you to use it" ); return; } if ( !from.Hidden == true ) { from.Emote( "*" + from.Name + "* Withers away to nothing But the wind around you *" ); from.FixedParticles( 0x37CC, 1, 40, 97, 3, 9917, EffectLayer.Waist ); from.FixedParticles( 0x374A, 1, 15, 9502, 97, 3, (EffectLayer)255 ); from.PlaySound( 0x1FB ); from.Hidden = true; } else { from.Hidden=false; from.Emote( "*" + from.Name + "* Steps out From A Ice cold wirlwind *"); from.FixedParticles( 0x37CC, 1, 40, 97, 3, 9917, EffectLayer.Waist ); from.FixedParticles( 0x374A, 1, 15, 9502, 97, 3, (EffectLayer)255 ); from.PlaySound( 0x10B ); } } }
public void DoEffect(Mobile from) { int effect = Utility.Random(30); if (effect <= 30 && effect >= 25) { from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "Vous terminez la sucette... enfin!", from.NetState); from.Say("Sa langue est toute jaune!"); this.Consume(); return; } if (effect <= 23 && effect >= 20) { from.Say("*Grimace*"); return; } if (effect <= 18 && effect >= 15) { from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "*L'acidité du bonbon vous fait frémir*",from.NetState); return; } if (effect <= 13 && effect >= 10) { from.Say("*Fait cogner le bonbon contre ses dents*"); return; } if (effect <= 5 && effect >= 0) { from.Say("*Slurp!*"); return; } return; }
public void DoEffect(Mobile from) { int effect = Utility.Random(30); if (effect <= 30 && effect >= 25) { from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "Vous terminez la sucette...", from.NetState); from.Say("Sa langue est toute rouge!"); this.Consume(); return; } if (effect <= 23 && effect >= 20) { from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "*Le goût sucré de la pomme chatouille vos papilles", from.NetState); return; } if (effect <= 18 && effect >= 15) { from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "*Vous salivez abondamment*",from.NetState); return; } if (effect <= 13 && effect >= 10) { from.Say("*Croque le bonbon, produisant un bruit sourd*"); return; } if (effect <= 5 && effect >= 0) { from.Say("*Lèche bruyamment la sucette*"); return; } return; }
public void DoEffect(Mobile from) { int effect = Utility.Random(30); if (effect <= 30 && effect >= 25) { from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "Vous terminez la sucette...", from.NetState); from.Say("Sa langue est toute verte!"); this.Consume(); return; } if (effect <= 23 && effect >= 20) { from.Say("*Affiche un large sourire*"); return; } if (effect <= 18 && effect >= 15) { from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, false, "*Le goût du melon vous appaise*",from.NetState); return; } if (effect <= 13 && effect >= 10) { from.Say("*Lèche bruyamment la sucette*"); return; } if (effect <= 5 && effect >= 0) { from.Say("*Joue avec le bâton de la sucette*"); return; } return; }
public override void OnDoubleClick(Mobile from) { if (Parent != from) if (from.AccessLevel < AccessLevel.GameMaster) from.SendMessage("When you touch, it vanishes without trace..."); if (from.AccessLevel < AccessLevel.GameMaster) this.Consume(); if (from.AccessLevel < AccessLevel.GameMaster) return; { if (!IsChildOf(from.Backpack)) { from.Say("That must be in your pack for you to use it"); return; } if (!from.Hidden == true) { from.Emote("*" + from.Name + " burned itself*"); from.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot); from.PlaySound(0x225); from.Hidden = true; } else { from.Hidden = false; from.Emote("*" + from.Name + " showed up among flames*"); from.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot); from.PlaySound(0x225); } } }
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus ) { // double damage = 0.0; // trying to clear up yellow errors since was 0.0 no need for it. PlaySwingAnimation( attacker ); PlayHurtAnimation( defender ); attacker.PlaySound( GetHitAttackSound( attacker, defender ) ); defender.PlaySound( GetHitDefendSound( attacker, defender ) ); switch (Utility.Random(5)) { case 0: { defender.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist); attacker.Say("Why must I endure this!!!"); SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 0, 0, 0, 0); break; } } base.OnHit( attacker, defender, damageBonus ); }
public override void OnDoubleClick(Mobile from) { if (Parent != from) if (from.AccessLevel < AccessLevel.GameMaster) from.SendMessage("When you touch, it vanishes without trace..."); if (from.AccessLevel < AccessLevel.GameMaster) this.Consume(); if (from.AccessLevel < AccessLevel.GameMaster) return; { if (!IsChildOf(from.Backpack)) { from.Say("That must be in your pack for you to use it"); return; } if (!from.Hidden == true) { from.Emote("*" + from.Name + " explodes out*"); from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head); from.PlaySound(0x307); from.Hidden = true; } else { from.Hidden = false; from.Emote("*" + from.Name + " explodes in*"); from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head); from.PlaySound(0x307); } } }
protected override void OnTick() { Container theirPack = m_Target.Backpack; double badKarmaChance = 0.5 - ((double)m_From.Karma / 8570); if (theirPack == null && m_Target.Race != Race.Elf) { m_From.SendLocalizedMessage(500404); // They seem unwilling to give you any money. } else if (m_From.Karma < 0 && badKarmaChance > Utility.RandomDouble()) { m_Target.PublicOverheadMessage(MessageType.Regular, m_Target.SpeechHue, 500406); // Thou dost not look trustworthy... no gold for thee today! } else if (m_From.CheckTargetSkill(SkillName.Begging, m_Target, 0.0, 100.0)) { if (m_Target.Race != Race.Elf) { int toConsume = theirPack.GetAmount(typeof(Gold)) / 10; int max = 10 + (m_From.Fame / 2500); if (max > 14) { max = 14; } else if (max < 10) { max = 10; } if (toConsume > max) { toConsume = max; } if (toConsume > 0) { int consumed = theirPack.ConsumeUpTo(typeof(Gold), toConsume); if (consumed > 0) { m_Target.PublicOverheadMessage(MessageType.Regular, m_Target.SpeechHue, 500405); // I feel sorry for thee... Gold gold = new Gold(consumed); m_From.AddToBackpack(gold); m_From.PlaySound(gold.GetDropSound()); if (m_From.Karma > -3000) { int toLose = m_From.Karma + 3000; if (toLose > 40) { toLose = 40; } Titles.AwardKarma(m_From, -toLose, true); } } else { m_Target.PublicOverheadMessage(MessageType.Regular, m_Target.SpeechHue, 500407); // I have not enough money to give thee any! } } else { m_Target.PublicOverheadMessage(MessageType.Regular, m_Target.SpeechHue, 500407); // I have not enough money to give thee any! } } else { double chance = Utility.RandomDouble(); Item reward = null; string rewardName = ""; if (chance >= .99) { int rand = Utility.Random(8); if (rand == 0) { reward = new BegBedRoll(); rewardName = "a bedroll"; } else if (rand == 1) { reward = new BegCookies(); rewardName = "a plate of cookies."; } else if (rand == 2) { reward = new BegFishSteak(); rewardName = "a fish steak."; } else if (rand == 3) { reward = new BegFishingPole(); rewardName = "a fishing pole."; } else if (rand == 4) { reward = new BegFlowerGarland(); rewardName = "a flower garland."; } else if (rand == 5) { reward = new BegSake(); rewardName = "a bottle of Sake."; } else if (rand == 6) { reward = new BegTurnip(); rewardName = "a turnip."; } else if (rand == 7) { reward = new BegWine(); rewardName = "a Bottle of wine."; } else if (rand == 8) { reward = new BegWinePitcher(); rewardName = "a Pitcher of wine."; } } else if (chance >= .76) { int rand = Utility.Random(6); if (rand == 0) { reward = new BegStew(); rewardName = "a bowl of stew."; } else if (rand == 1) { reward = new BegCheeseWedge(); rewardName = "a wedge of cheese."; } else if (rand == 2) { reward = new BegDates(); rewardName = "a bunch of dates."; } else if (rand == 3) { reward = new BegLantern(); rewardName = "a lantern."; } else if (rand == 4) { reward = new BegLiquorPitcher(); rewardName = "a Pitcher of liquor"; } else if (rand == 5) { reward = new BegPizza(); rewardName = "pizza"; } else if (rand == 6) { reward = new BegShirt(); rewardName = "a shirt."; } } else if (chance >= .25) { int rand = Utility.Random(1); if (rand == 0) { reward = new BegFrenchBread(); rewardName = "french bread."; } else { reward = new BegWaterPitcher(); rewardName = "a Pitcher of water."; } } if (reward == null) { reward = new Gold(1); } m_Target.Say(1074854); // Here, take this... m_From.AddToBackpack(reward); m_From.SendLocalizedMessage(1074853, rewardName); // You have been given ~1_name~ if (m_From.Karma > -3000) { int toLose = m_From.Karma + 3000; if (toLose > 40) { toLose = 40; } Titles.AwardKarma(m_From, -toLose, true); } } } else { m_Target.SendLocalizedMessage(500404); // They seem unwilling to give you any money. } m_From.NextSkillTime = Core.TickCount + 10000; }
public void SaySentance(Mobile mob, int wordCount) { mob.Say(true, ConstructSentance(wordCount)); mob.PlaySound(m_Sound); }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile from = sender.Mobile; if (info.ButtonID == 1) { from.AddToBackpack(new Gold(m_Jail.PrisonerReward)); from.SendSound(0x0EF); from.SendMessage("You free " + m_Jail.PrisonerName + " from their prison."); LoggingFunctions.LogStandard(from, "has freed " + m_Jail.PrisonerName + " " + m_Jail.PrisonerTitle + "."); Titles.AwardFame(from, ((int)((m_Jail.PrisonerReward) / 100)), true); if (((PlayerMobile)from).KarmaLocked == true) { Titles.AwardKarma(from, -((int)((m_Jail.PrisonerReward) / 100)), true); } else { Titles.AwardKarma(from, ((int)((m_Jail.PrisonerReward) / 100)), true); } m_Jail.Delete(); } else if (info.ButtonID == 2) { int gold = from.TotalGold; int join = m_Jail.PrisonerJoin; bool begging = false; if (Server.Mobiles.BaseVendor.BeggingPose(from) > 0) // LET US SEE IF THEY ARE BEGGING { int cut = (int)(from.Skills[SkillName.Begging].Value * 25); if (cut > 3000) { cut = 3000; } join = join - cut; begging = true; } if (gold >= join) { Container cont = from.Backpack; cont.ConsumeTotal(typeof(Gold), join); from.SendSound(0x0EF); if (begging) { from.SendMessage("You beg " + m_Jail.PrisonerName + " to join you as a henchman for only " + join + " gold."); } else { from.SendMessage("" + m_Jail.PrisonerName + " has joined you as a henchman."); } if (m_Jail.PrisonerType == 97) { HenchmanFighterItem fighter = new HenchmanFighterItem(); fighter.HenchName = m_Jail.PrisonerName; fighter.HenchTitle = m_Jail.PrisonerTitle; fighter.HenchBody = m_Jail.PrisonerBody; from.AddToBackpack(fighter); } else if (m_Jail.PrisonerType == 98) { HenchmanArcherItem archer = new HenchmanArcherItem(); archer.HenchName = m_Jail.PrisonerName; archer.HenchTitle = m_Jail.PrisonerTitle; archer.HenchBody = m_Jail.PrisonerBody; from.AddToBackpack(archer); } else if (m_Jail.PrisonerType == 99) { HenchmanWizardItem wizard = new HenchmanWizardItem(); wizard.HenchName = m_Jail.PrisonerName; wizard.HenchTitle = m_Jail.PrisonerTitle; wizard.HenchBody = m_Jail.PrisonerBody; from.AddToBackpack(wizard); } else { HenchmanMonsterItem item = new HenchmanMonsterItem(); item.HenchTimer = 300; item.HenchWeaponID = m_Jail.PrisonerType; item.HenchShieldID = m_Jail.PrisonerSound; item.HenchHelmID = 0; item.HenchArmorType = 0; item.HenchWeaponType = 0; item.HenchCloakColor = 0; item.HenchCloak = 0; item.HenchRobe = 0; item.HenchHatColor = 0; item.HenchGloves = 0; item.HenchSpeech = Utility.RandomDyedHue(); item.HenchDead = 0; item.HenchBody = m_Jail.PrisonerBody; item.HenchHue = 0; item.HenchHair = 0; item.HenchHairHue = 0; item.HenchGearColor = 0; item.HenchName = m_Jail.PrisonerName; item.HenchTitle = m_Jail.PrisonerTitle; item.HenchBandages = 0; from.AddToBackpack(item); } m_Jail.Delete(); } else { from.SendMessage("You do not have enough gold to convince them to join you."); } } else if (info.ButtonID == 3) { switch (Utility.RandomMinMax(0, 4)) { case 0: from.Say("I will leave you to your fate, " + m_Jail.PrisonerName + "!"); break; case 1: from.Say("" + m_Jail.PrisonerName + ", stay here and rot!"); break; case 2: from.Say("" + m_Jail.PrisonerName + ", the world is better with you in here!"); break; case 3: from.Say("You are not the sort I wish to free, " + m_Jail.PrisonerName + "."); break; case 4: from.Say("You must be here for a reason, " + m_Jail.PrisonerName + "."); break; } } }
public static void DoCommands(int[] selections, GumpType type, Mobile from) { World.Broadcast(0x35, false, "The world is generating. This may take some time..."); string prefix = Server.Commands.CommandSystem.Prefix; string error = null; WorldCreating = true; foreach (int sel in selections) { foreach (CreateWorld.CommandEntry entry in CreateWorld.Commands) { if (entry.CheckID == sel) { switch (type) { case CreateWorld.GumpType.Create: from.Say("Generating " + entry.Name); if (CanGenerate(entry, ref error)) { if (entry.Delay > 0) { DoDelayedCommand(from, TimeSpan.FromMinutes(entry.Delay), prefix + entry.CreateCommand); } else { CommandSystem.Handle(from, prefix + entry.CreateCommand); } if (CreateWorldData.CreateTable.ContainsKey(sel)) { CreateWorldData.CreateTable[sel] = true; } } break; case CreateWorld.GumpType.Delete: if (!String.IsNullOrEmpty(entry.DeleteCommand)) { from.Say("Deleting " + entry.Name); CommandSystem.Handle(from, prefix + entry.DeleteCommand); if (CreateWorldData.CreateTable.ContainsKey(sel)) { CreateWorldData.CreateTable[sel] = false; } } break; } } } } if (error != null) { from.SendGump(new BasicInfoGump(error, "World Generation Error")); } WorldCreating = false; World.Broadcast(0x35, false, "World generation complete."); }
public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; switch (info.ButtonID) { case 0: // Closed or Cancel { return; } default: { // Make sure that the OK, button was pressed if (info.ButtonID == 1) { // Get the array of switches selected ArrayList Selections = new ArrayList(info.Switches); string prefix = CommandSystem.Prefix; from.Say("CREATING WORLD..."); // Now use any selected command if (Selections.Contains(101) == true) { from.Say("Decorating world..."); CommandSystem.Handle(from, String.Format("{0}decorate", prefix)); } if (Selections.Contains(102) == true) { from.Say("Generating doors..."); CommandSystem.Handle(from, String.Format("{0}doorgen", prefix)); } if (Selections.Contains(103) == true) { from.Say("Generating moongates..."); CommandSystem.Handle(from, String.Format("{0}moongen", prefix)); } if (Selections.Contains(104) == true) { from.Say("Generating signs..."); CommandSystem.Handle(from, String.Format("{0}signgen", prefix)); } if (Selections.Contains(105) == true) { from.Say("Generating teleporters..."); CommandSystem.Handle(from, String.Format("{0}telgen", prefix)); } if (Selections.Contains(106) == true) { from.Say("Generating Gauntlet spawners..."); CommandSystem.Handle(from, String.Format("{0}gengauntlet", prefix)); } if (Selections.Contains(107) == true) { // champions message in champions script CommandSystem.Handle(from, String.Format("{0}genchampions", prefix)); } } from.Say("World generation completed!"); break; } } }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile from = sender.Mobile; switch (info.ButtonID) { case 0: //Closed or Cancel { break; } default: { // Make sure that the APPLY button was pressed if (info.ButtonID == 1) { // Get the array of switches selected List <int> Selections = new List <int>(info.Switches); //TRAMMEL from.Say("SPAWNING TRAMMEL..."); // DUNGEONS SpawnThis(from, Selections, 101, 2, "BlightedGrove"); SpawnThis(from, Selections, 102, 2, "BritainSewer"); SpawnThis(from, Selections, 103, 2, "Covetous"); SpawnThis(from, Selections, 104, 2, "Deceit"); SpawnThis(from, Selections, 105, 2, "Despise"); SpawnThis(from, Selections, 106, 2, "Destard"); SpawnThis(from, Selections, 107, 2, "Fire"); SpawnThis(from, Selections, 108, 2, "Graveyards"); SpawnThis(from, Selections, 109, 2, "Hythloth"); SpawnThis(from, Selections, 110, 2, "Ice"); //There is no Khaldun (118) SpawnThis(from, Selections, 112, 2, "OrcCaves"); SpawnThis(from, Selections, 114, 2, "PaintedCaves"); SpawnThis(from, Selections, 115, 2, "PalaceOfParoxysmus"); SpawnThis(from, Selections, 116, 2, "PrismOfLight"); SpawnThis(from, Selections, 117, 2, "Sanctuary"); SpawnThis(from, Selections, 119, 2, "Shame"); SpawnThis(from, Selections, 120, 2, "SolenHive"); SpawnThis(from, Selections, 121, 2, "TerathanKeep"); SpawnThis(from, Selections, 124, 2, "TrinsicPassage"); SpawnThis(from, Selections, 127, 2, "Wrong"); //TOWNS SpawnThis(from, Selections, 122, 2, "TownsLife"); SpawnThis(from, Selections, 123, 2, "TownsPeople"); SpawnThis(from, Selections, 125, 2, "Vendors"); //OUTDOORS SpawnThis(from, Selections, 126, 2, "WildLife"); SpawnThis(from, Selections, 111, 2, "LostLands"); SpawnThis(from, Selections, 113, 2, "Outdoors"); SpawnThis(from, Selections, 129, 2, "Reagents"); SpawnThis(from, Selections, 118, 2, "SeaLife"); //FELUCCA from.Say("SPAWNING FELUCCA..."); // DUNGEONS SpawnThis(from, Selections, 201, 1, "BlightedGrove"); SpawnThis(from, Selections, 202, 1, "BritainSewer"); SpawnThis(from, Selections, 203, 1, "Covetous"); SpawnThis(from, Selections, 204, 1, "Deceit"); SpawnThis(from, Selections, 205, 1, "Despise"); SpawnThis(from, Selections, 206, 1, "Destard"); SpawnThis(from, Selections, 207, 1, "Fire"); SpawnThis(from, Selections, 208, 1, "Graveyards"); SpawnThis(from, Selections, 209, 1, "Hythloth"); SpawnThis(from, Selections, 210, 1, "Ice"); SpawnThis(from, Selections, 229, 1, "Khaldun"); SpawnThis(from, Selections, 212, 1, "OrcCaves"); SpawnThis(from, Selections, 214, 1, "PaintedCaves"); SpawnThis(from, Selections, 215, 1, "PalaceOfParoxysmus"); SpawnThis(from, Selections, 216, 1, "PrismOfLight"); SpawnThis(from, Selections, 217, 1, "Sanctuary"); SpawnThis(from, Selections, 219, 1, "Shame"); SpawnThis(from, Selections, 220, 1, "SolenHive"); SpawnThis(from, Selections, 221, 1, "TerathanKeep"); SpawnThis(from, Selections, 224, 1, "TrinsicPassage"); SpawnThis(from, Selections, 227, 1, "Wrong"); //TOWNS SpawnThis(from, Selections, 222, 1, "TownsLife"); SpawnThis(from, Selections, 223, 1, "TownsPeople"); SpawnThis(from, Selections, 225, 1, "Vendors"); //OUTDOORS SpawnThis(from, Selections, 226, 1, "WildLife"); SpawnThis(from, Selections, 211, 1, "LostLands"); SpawnThis(from, Selections, 213, 1, "Outdoors"); SpawnThis(from, Selections, 229, 1, "Reagents"); SpawnThis(from, Selections, 218, 1, "SeaLife"); //ILSHENAR from.Say("SPAWNING ILSHENAR..."); SpawnThis(from, Selections, 301, 3, "Ancientlair"); SpawnThis(from, Selections, 302, 3, "Ankh"); SpawnThis(from, Selections, 303, 3, "Blood"); SpawnThis(from, Selections, 304, 3, "Exodus"); SpawnThis(from, Selections, 305, 3, "Mushroom"); SpawnThis(from, Selections, 306, 3, "Outdoors"); SpawnThis(from, Selections, 307, 3, "Ratmancave"); SpawnThis(from, Selections, 308, 3, "Rock"); SpawnThis(from, Selections, 309, 3, "Sorcerers"); SpawnThis(from, Selections, 310, 3, "Spectre"); SpawnThis(from, Selections, 311, 3, "Towns"); SpawnThis(from, Selections, 314, 3, "TwistedWeald"); SpawnThis(from, Selections, 312, 3, "Vendors"); SpawnThis(from, Selections, 313, 3, "Wisp"); //MALAS from.Say("SPAWNING MALAS..."); SpawnThis(from, Selections, 406, 4, "Citadel"); SpawnThis(from, Selections, 401, 4, "Doom"); SpawnThis(from, Selections, 407, 4, "Labyrinth"); SpawnThis(from, Selections, 402, 4, "North"); SpawnThis(from, Selections, 403, 4, "OrcForts"); SpawnThis(from, Selections, 404, 4, "South"); SpawnThis(from, Selections, 405, 4, "Vendors"); //TOKUNO from.Say("SPAWNING TOKUNO..."); SpawnThis(from, Selections, 501, 5, "FanDancersDojo"); SpawnThis(from, Selections, 502, 5, "Outdoors"); SpawnThis(from, Selections, 503, 5, "TownsLife"); SpawnThis(from, Selections, 504, 5, "Vendors"); SpawnThis(from, Selections, 505, 5, "WildLife"); SpawnThis(from, Selections, 506, 5, "YomutsoMines"); //TER MUR from.Say("SPAWNING TER MUR..."); SpawnThis(from, Selections, 601, 6, "Abyss"); SpawnThis(from, Selections, 602, 6, "TerMur"); SpawnThis(from, Selections, 603, 6, "Underworld"); SpawnThis(from, Selections, 604, 6, "Vendors"); from.Say("SPAWN GENERATION COMPLETED"); } break; } } }
private static void SayRandom(string[] say, Mobile m) { m.Say(say[Utility.Random(say.Length)]); }
public void SayRandomTranslate(Mobile mob, params string[] sentancesInEnglish) { SaySentance(mob, Utility.RandomMinMax(2, 3)); mob.Say(sentancesInEnglish[Utility.Random(sentancesInEnglish.Length)]); }
public bool OnSpeech( Mobile mob, Mobile speaker, string text ) { if ( (m_Flags & IHSFlags.OnSpeech) == 0 || m_Keywords == null || m_Responses == null || m_KeywordHash == null ) return false; // not enabled if ( !speaker.Alive ) return false; if ( !speaker.InRange( mob, 3 ) ) return false; if ( (speaker.Direction & Direction.Mask) != speaker.GetDirectionTo( mob ) ) return false; if ( (mob.Direction & Direction.Mask) != mob.GetDirectionTo( speaker ) ) return false; string[] split = text.Split( ' ' ); List<string> keywordsFound = new List<string>(); for ( int i = 0; i < split.Length; ++i ) { string keyword; m_KeywordHash.TryGetValue( split[i], out keyword ); if ( keyword != null ) keywordsFound.Add( keyword ); } if ( keywordsFound.Count > 0 ) { string responseWord; if ( Utility.RandomBool() ) responseWord = GetRandomResponseWord( keywordsFound ); else responseWord = keywordsFound[Utility.Random( keywordsFound.Count )]; string secondResponseWord = GetRandomResponseWord( keywordsFound ); StringBuilder response = new StringBuilder(); switch ( Utility.Random( 6 ) ) { default: case 0: { response.Append( "Me " ).Append( responseWord ).Append( '?' ); break; } case 1: { response.Append( responseWord ).Append( " thee!" ); response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 ); break; } case 2: { response.Append( responseWord ).Append( '?' ); response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 ); break; } case 3: { response.Append( responseWord ).Append( "! " ).Append( secondResponseWord ).Append( '.' ); response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 ); response.Replace( secondResponseWord[0], Char.ToUpper( secondResponseWord[0] ), responseWord.Length + 2, 1 ); break; } case 4: { response.Append( responseWord ).Append( '.' ); response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 ); break; } case 5: { response.Append( responseWord ).Append( "? " ).Append( secondResponseWord ).Append( '.' ); response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 ); response.Replace( secondResponseWord[0], Char.ToUpper( secondResponseWord[0] ), responseWord.Length + 2, 1 ); break; } } int maxWords = (split.Length / 2) + 1; if ( maxWords < 2 ) maxWords = 2; else if ( maxWords > 6 ) maxWords = 6; SaySentance( mob, Utility.RandomMinMax( 2, maxWords ) ); mob.Say( response.ToString() ); return true; } return false; }
public bool OnSpeech(Mobile mob, Mobile speaker, string text) { if ((Flags & IHSFlags.OnSpeech) == 0 || m_Keywords == null || Responses == null || m_KeywordHash == null) { return(false); // not enabled } if (!speaker.Alive) { return(false); } if (!speaker.InRange(mob, 3)) { return(false); } if ((speaker.Direction & Direction.Mask) != speaker.GetDirectionTo(mob)) { return(false); } if ((mob.Direction & Direction.Mask) != mob.GetDirectionTo(speaker)) { return(false); } string[] split = text.Split(' '); List <string> keywordsFound = new List <string>(); for (int i = 0; i < split.Length; ++i) { m_KeywordHash.TryGetValue(split[i], out string keyword); if (keyword != null) { keywordsFound.Add(keyword); } } if (keywordsFound.Count > 0) { string responseWord; if (Utility.RandomBool()) { responseWord = GetRandomResponseWord(keywordsFound); } else { responseWord = keywordsFound[Utility.Random(keywordsFound.Count)]; } string secondResponseWord = GetRandomResponseWord(keywordsFound); StringBuilder response = new StringBuilder(); switch (Utility.Random(6)) { default: case 0: { response.Append("Me ").Append(responseWord).Append('?'); break; } case 1: { response.Append(responseWord).Append(" thee!"); response.Replace(responseWord[0], char.ToUpper(responseWord[0]), 0, 1); break; } case 2: { response.Append(responseWord).Append('?'); response.Replace(responseWord[0], char.ToUpper(responseWord[0]), 0, 1); break; } case 3: { response.Append(responseWord).Append("! ").Append(secondResponseWord).Append('.'); response.Replace(responseWord[0], char.ToUpper(responseWord[0]), 0, 1); response.Replace(secondResponseWord[0], char.ToUpper(secondResponseWord[0]), responseWord.Length + 2, 1); break; } case 4: { response.Append(responseWord).Append('.'); response.Replace(responseWord[0], char.ToUpper(responseWord[0]), 0, 1); break; } case 5: { response.Append(responseWord).Append("? ").Append(secondResponseWord).Append('.'); response.Replace(responseWord[0], char.ToUpper(responseWord[0]), 0, 1); response.Replace(secondResponseWord[0], char.ToUpper(secondResponseWord[0]), responseWord.Length + 2, 1); break; } } int maxWords = (split.Length / 2) + 1; if (maxWords < 2) { maxWords = 2; } else if (maxWords > 6) { maxWords = 6; } SaySentance(mob, Utility.RandomMinMax(2, maxWords)); mob.Say(response.ToString()); return(true); } return(false); }
public static void DoJokes(Mobile m) { int act = Utility.Random(28); if (m is PlayerMobile) { act = Utility.Random(22); } switch (act) { case 0: m.Say("Why did the king go to the dentist? To get his teeth crowned."); break; case 1: m.Say("When a knight in armor was killed in battle, what sign did they put on his grave? Rust in peace!"); break; case 2: m.Say("What do you call a mosquito in a tin suit? A bite in shining armor."); break; case 3: m.Say("There are many castles in the world, but who is strong enough to move one? Any chess player"); break; case 4: m.Say("What king was famous because he spent so many nights at his Round Table writing books? King Author!"); break; case 5: m.Say("How do you find a princess? You follow the foot prince."); break; case 6: m.Say("Why were the early days called the dark ages? Because there were so many knights!"); break; case 7: m.Say("Why did Arthur have a round table? So no one could corner him!"); break; case 8: m.Say("Who invented King Arthur's round table? Sir Cumference!"); break; case 9: m.Say("Why did the knight run about shouting for a tin opener? He had a bee in his suit of armor!"); break; case 10: m.Say("What was Camelot famous for? It's knight life!"); break; case 11: m.Say("What did the toad say when the princess would not kiss him? Warts the matter with you?"); break; case 12: m.Say("What do you call the young royal who keeps falling down? Prince Harming!"); break; case 13: m.Say("What do you call a cat that flies over the castle wall? A cat-a-pult!"); break; case 14: m.Say("What game do the fish play in the moat? Trout or dare!"); break; case 15: m.Say("What did the fish say to the other when the horse fell in the moat? See horse!"); break; case 16: m.Say("What do you call an angry princess just awakened from a long sleep? Slapping beauty!"); break; case 17: m.Say("How did the prince get into the castle when the drawbridge was broken? He used a rowmoat!"); break; case 18: m.Say("How did the girl dragon win the beauty contest? She was the beast of the show!"); break; case 19: m.Say("Why did the dinosaur live longer than the dragon? Because it didn’t smoke!"); break; case 20: m.Say("What did the dragon say when it saw the Knight? 'Not more tinned food!'"); break; case 21: m.Say("What do you do with a green dragon? Wait until it ripens!"); break; case 22: m.PlaySound(m.Female ? 780 : 1051); m.Say("*claps*"); break; case 23: m.Say("*bows*"); m.Animate(32, 5, 1, true, false, 0); break; case 24: m.PlaySound(m.Female ? 794 : 1066); m.Say("*giggles*"); break; case 25: m.PlaySound(m.Female ? 801 : 1073); m.Say("*laughs*"); break; case 26: m.PlaySound(792); m.Say("*sticks out tongue*"); break; case 27: m.PlaySound(m.Female ? 783 : 1054); m.Say("*woohoo!*"); break; } ; if (act < 22 && Utility.RandomBool()) { switch (Utility.Random(6)) { case 0: m.PlaySound(m.Female ? 780 : 1051); break; case 1: m.Animate(32, 5, 1, true, false, 0); break; case 2: m.PlaySound(m.Female ? 794 : 1066); break; case 3: m.PlaySound(m.Female ? 801 : 1073); break; case 4: m.PlaySound(792); break; case 5: m.PlaySound(m.Female ? 783 : 1054); break; } ; } }
private void CopyFromLayer(Mobile from, Mobile mimic, Layer layer) { if (from.FindItemOnLayer(layer) != null) { Item copy = (Item)from.FindItemOnLayer(layer); Type t = copy.GetType(); ConstructorInfo[] info = t.GetConstructors(); foreach (ConstructorInfo c in info) { //if ( !c.IsDefined( typeof( ConstructableAttribute ), false ) ) continue; ParameterInfo[] paramInfo = c.GetParameters(); if (paramInfo.Length == 0) { object[] objParams = new object[0]; try { Item newItem = null; object o = c.Invoke(objParams); if (o != null && o is Item) { newItem = (Item)o; CopyProperties(newItem, copy);//copy.Dupe( item, copy.Amount ); newItem.Parent = null; mimic.EquipItem(newItem); } if (newItem != null) { if (newItem is BaseWeapon && o is BaseWeapon) { BaseWeapon weapon = newItem as BaseWeapon; BaseWeapon oweapon = o as BaseWeapon; weapon.Attributes = oweapon.Attributes; weapon.WeaponAttributes = oweapon.WeaponAttributes; } if (newItem is BaseArmor && o is BaseArmor) { BaseArmor armor = newItem as BaseArmor; BaseArmor oarmor = o as BaseArmor; armor.Attributes = oarmor.Attributes; armor.ArmorAttributes = oarmor.ArmorAttributes; armor.SkillBonuses = oarmor.SkillBonuses; } mimic.EquipItem(newItem); } } catch { from.Say("Error!"); return; } } } } if (mimic.FindItemOnLayer(layer) != null && mimic.FindItemOnLayer(layer).LootType != LootType.Blessed) mimic.FindItemOnLayer(layer).LootType = LootType.Newbied; }
public static void HandleSpeech(Mobile vendor, SpeechEventArgs e) { if (!e.Handled && e.Mobile.InRange(vendor, 12)) { if (e.Mobile.Map.Rules != MapRules.FeluccaRules && vendor is BaseVendor && !((BaseVendor)vendor).CheckVendorAccess(e.Mobile)) { return; } foreach (var keyword in e.Keywords) { switch (keyword) { case 0x0000: // *withdraw* { e.Handled = true; if (e.Mobile.Criminal) { // I will not do business with a criminal! vendor.Say(500389); break; } var split = e.Speech.Split(' '); if (split.Length >= 2) { int amount; var pack = e.Mobile.Backpack; if (!int.TryParse(split[1], out amount)) { break; } if (amount > 60000) { // Thou canst not withdraw so much at one time! vendor.Say(500381); } else if (pack == null || pack.Deleted || !(pack.TotalWeight < pack.MaxWeight) || !(pack.TotalItems < pack.MaxItems)) { // Your backpack can't hold anything else. vendor.Say(1048147); } else if (amount > 0) { var box = e.Mobile.Player ? e.Mobile.BankBox : e.Mobile.FindBankNoCreate(); if (box == null || !Withdraw(e.Mobile, amount)) { // Ah, art thou trying to fool me? Thou hast not so much gold! vendor.Say(500384); } else { pack.DropItem(new Gold(amount)); // Thou hast withdrawn gold from thy account. vendor.Say(1010005); } } } } break; case 0x0001: // *balance* { e.Handled = true; if (e.Mobile.Criminal) { // I will not do business with a criminal! vendor.Say(500389); break; } if (AccountGold.Enabled && e.Mobile.Account is Account) { vendor.Say(1155855, String.Format("{0:#,0}\t{1:#,0}", e.Mobile.Account.TotalPlat, e.Mobile.Account.TotalGold), 0x3BC); vendor.Say(1155848, String.Format("{0:#,0}", ((Account)e.Mobile.Account).GetSecureAccountAmount(e.Mobile)), 0x3BC); } else { // Thy current bank balance is ~1_AMOUNT~ gold. vendor.Say(1042759, GetBalance(e.Mobile).ToString("#,0")); } } break; case 0x0002: // *bank* { e.Handled = true; if (e.Mobile.Criminal) { // Thou art a criminal and cannot access thy bank box. vendor.Say(500378); break; } e.Mobile.BankBox.Open(); } break; case 0x0003: // *check* { e.Handled = true; if (e.Mobile.Criminal) { // I will not do business with a criminal! vendor.Say(500389); break; } if (AccountGold.Enabled && e.Mobile.Account != null) { vendor.Say("We no longer offer a checking service."); break; } var split = e.Speech.Split(' '); if (split.Length >= 2) { int amount; if (!int.TryParse(split[1], out amount)) { break; } if (amount < 5000) { // We cannot create checks for such a paltry amount of gold! vendor.Say(1010006); } else if (amount > 1000000) { // Our policies prevent us from creating checks worth that much! vendor.Say(1010007); } else { var check = new BankCheck(amount); var box = e.Mobile.BankBox; if (!box.TryDropItem(e.Mobile, check, false)) { // There's not enough room in your bankbox for the check! vendor.Say(500386); check.Delete(); } else if (!box.ConsumeTotal(typeof(Gold), amount)) { // Ah, art thou trying to fool me? Thou hast not so much gold! vendor.Say(500384); check.Delete(); } else { // Into your bank box I have placed a check in the amount of: vendor.Say(1042673, AffixType.Append, amount.ToString("#,0"), ""); } } } } break; } } } }
private static void SayRandom( string[] say, Mobile m ) { m.Say( say[Utility.Random( say.Length )] ); }
public static void HandleSpeech(Mobile vendor, SpeechEventArgs e) { if (!e.Handled && e.Mobile.InRange(vendor, 12)) { foreach (var keyword in e.Keywords) { switch (keyword) { case 0x0000: // *withdraw* { e.Handled = true; if (e.Mobile.Criminal) { // I will not do business with a criminal! vendor.Say(500389); break; } var split = e.Speech.Split(' '); if (split.Length >= 2) { int amount; var pack = e.Mobile.Backpack; if (!int.TryParse(split[1], out amount)) { break; } if ((!Core.ML && amount > 5000) || (Core.ML && amount > 60000)) { // Thou canst not withdraw so much at one time! vendor.Say(500381); } else if (pack == null || pack.Deleted || !(pack.TotalWeight < pack.MaxWeight) || !(pack.TotalItems < pack.MaxItems)) { // Your backpack can't hold anything else. vendor.Say(1048147); } else if (amount > 0) { var box = e.Mobile.FindBankNoCreate(); if (box == null || !Withdraw(e.Mobile, amount)) { // Ah, art thou trying to fool me? Thou hast not so much gold! vendor.Say(500384); } else { pack.DropItem(new Gold(amount)); // Thou hast withdrawn gold from thy account. vendor.Say(1010005); } } } } break; case 0x0001: // *balance* { e.Handled = true; if (e.Mobile.Criminal) { // I will not do business with a criminal! vendor.Say(500389); break; } if (AccountGold.Enabled && e.Mobile.Account != null) { vendor.Say( "Thy current bank balance is {0:#,0} platinum and {1:#,0} gold.", e.Mobile.Account.TotalPlat, e.Mobile.Account.TotalGold); } else { // Thy current bank balance is ~1_AMOUNT~ gold. vendor.Say(1042759, GetBalance(e.Mobile).ToString("#,0")); } } break; case 0x0002: // *bank* { e.Handled = true; if (e.Mobile.Criminal) { // Thou art a criminal and cannot access thy bank box. vendor.Say(500378); break; } e.Mobile.BankBox.Open(); } break; case 0x0003: // *check* { e.Handled = true; if (e.Mobile.Criminal) { // I will not do business with a criminal! vendor.Say(500389); break; } if (AccountGold.Enabled && e.Mobile.Account != null) { vendor.Say("We no longer offer a checking service."); break; } var split = e.Speech.Split(' '); if (split.Length >= 2) { int amount; if (!int.TryParse(split[1], out amount)) { break; } if (amount < 5000) { // We cannot create checks for such a paltry amount of gold! vendor.Say(1010006); } else if (amount > 1000000) { // Our policies prevent us from creating checks worth that much! vendor.Say(1010007); } else { var check = new BankCheck(amount); var box = e.Mobile.BankBox; if (!box.TryDropItem(e.Mobile, check, false)) { // There's not enough room in your bankbox for the check! vendor.Say(500386); check.Delete(); } else if (!box.ConsumeTotal(typeof(Gold), amount)) { // Ah, art thou trying to fool me? Thou hast not so much gold! vendor.Say(500384); check.Delete(); } else { // Into your bank box I have placed a check in the amount of: vendor.Say(1042673, AffixType.Append, amount.ToString("#,0"), ""); } } } } break; } } } }
public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; switch (info.ButtonID) { case 0: // Closed or Cancel { return; } default: { // Make sure that the OK, button was pressed if (info.ButtonID == 1) { // Get the array of switches selected ArrayList Selections = new ArrayList(info.Switches); string prefix = Server.Commands.CommandPrefix; // Now unloading any selected maps if (Selections.Contains(101) == true) { from.Say("ILSHENAR: Unloading AncientLair.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 300", prefix)); } if (Selections.Contains(102) == true) { from.Say("ILSHENAR: Unloading Ankh.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 301", prefix)); } if (Selections.Contains(103) == true) { from.Say("ILSHENAR: Unloading Blood.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 302", prefix)); } if (Selections.Contains(104) == true) { from.Say("ILSHENAR: Unloading Exodus.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 303", prefix)); } if (Selections.Contains(105) == true) { from.Say("ILSHENAR: Unloading Mushroom.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 304", prefix)); } if (Selections.Contains(106) == true) { from.Say("ILSHENAR: Unloading Northeast.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 305", prefix)); } if (Selections.Contains(107) == true) { from.Say("ILSHENAR: Unloading Northwest.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 306", prefix)); } if (Selections.Contains(108) == true) { from.Say("ILSHENAR: Unloading RatmanCave.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 307", prefix)); } if (Selections.Contains(109) == true) { from.Say("ILSHENAR: Unloading Rock.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 308", prefix)); } if (Selections.Contains(110) == true) { from.Say("ILSHENAR: Unloading Sorcerers.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 309", prefix)); } if (Selections.Contains(111) == true) { from.Say("ILSHENAR: Unloading Southeast.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 310", prefix)); } if (Selections.Contains(112) == true) { from.Say("ILSHENAR: Unloading Southwest.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 311", prefix)); } if (Selections.Contains(113) == true) { from.Say("ILSHENAR: Unloading Spectre.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 312", prefix)); } if (Selections.Contains(114) == true) { from.Say("ILSHENAR: Unloading Towns.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 313", prefix)); } if (Selections.Contains(115) == true) { from.Say("ILSHENAR: Unloading Vendors.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 314", prefix)); } if (Selections.Contains(116) == true) { from.Say("ILSHENAR: Unloading Wisp.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 315", prefix)); } } from.Say("Unload completed!"); break; } } }
protected override void OnTarget( Mobile from, object o ) { string title; if ( o is PlayerMobile && o != from) { Mobile to = o as Mobile; if ( from.Female && to.Female) title = "lesbian wife"; else if (from.Female && !to.Female) title = "husband"; else if (!from.Female && to.Female) title = "wife"; else title = "gay husband"; from.Say( "I " + from.Name + " humbly ask you " + to.Name + " to be my " + title + "." ); from.SendGump( new WaitGump( to ) ); to.SendGump( new ProposalGump( inscription, WeddingDeed, from ) ); } else { from.SendMessage("You cannot marry that" ); } }
public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; switch (info.ButtonID) { case 0: // Closed or Cancel { return; } default: { // Make sure that the OK, button was pressed if (info.ButtonID == 1) { // Get the array of switches selected ArrayList Selections = new ArrayList(info.Switches); string prefix = Server.Commands.CommandPrefix; // Now spawn any selected maps if (Selections.Contains(101) == true) { from.Say("TOKUNO: Unloading Animals.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 500", prefix)); } if (Selections.Contains(102) == true) { from.Say("TOKUNO: Unloading FanDancersDojo.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 501", prefix)); } if (Selections.Contains(103) == true) { from.Say("TOKUNO: Unloading Monsters.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 502", prefix)); } if (Selections.Contains(104) == true) { from.Say("TOKUNO: Unloading Vendors.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 503", prefix)); } if (Selections.Contains(105) == true) { from.Say("TOKUNO: Unloading YomutsoMines.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 504", prefix)); } if (Selections.Contains(106) == true) { from.Say("TOKUNO: Unloading Zento.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 505", prefix)); } } from.Say("Unload completed!"); break; } } }
public override void OnDoubleClick(Mobile from) { Mobile mSp = null; foreach (Mobile mouse in this.GetMobilesInRange(1)) { if (mouse is SpellCritter) { mSp = mouse; } } if (mSp != null) { from.Direction = from.GetDirectionTo(GetWorldLocation()); string[] chant = new string[] { "Ahm", "An", "Beh", "Bet", "Cah", "Corp", "Des", "Ex", "Flam", "Grav", "Hur", "In", "Jux", "Kal", "Lor", "Lum", "Mani", "Mu", "Nox", "Om", "Ort", "Por", "Quas", "Ra", "Rel", "Sanct", "Summ", "Tym", "Uus", "Vas", "Wis", "Xen", "Ylem", "Zu" }; string pray_chant_1 = chant[Utility.RandomMinMax(0, (chant.Length - 1))]; string pray_chant_2 = chant[Utility.RandomMinMax(0, (chant.Length - 1))]; string pray_chant_3 = chant[Utility.RandomMinMax(0, (chant.Length - 1))]; string pray_chant_4 = ""; if (Utility.RandomBool()) { pray_chant_4 = " " + chant[Utility.RandomMinMax(0, (chant.Length - 1))]; } string pray_chant = pray_chant_1 + " " + pray_chant_2 + " " + pray_chant_3 + pray_chant_4; from.Say(pray_chant); from.Animate(Utility.RandomList(236, 212, 230, 224, 209, 221, 233, 263, 245, 218, 206), 5, 1, true, false, 0); int circle = Utility.RandomMinMax(1, 8); int spells = Utility.RandomMinMax(1, 62); if (spells == 1) // magic arrow { from.MovingParticles(mSp, 0x36E4, 5, 0, false, false, 0, 0, 3600, 0, 0, 0); from.PlaySound(0x1E5); } else if (spells == 2) // harm { mSp.FixedParticles(0x374A, 10, 30, 5013, 0, 2, EffectLayer.Waist); mSp.PlaySound(0x0FC); } else if (spells == 3) // lightning { mSp.FixedParticles(0x2A4E, 10, 15, 5038, Utility.RandomList(0, 0x48D, 0x48E, 0x48F, 0x490, 0x491), 2, EffectLayer.Head); mSp.PlaySound(0x029); } else if (spells == 4) // mind blast { mSp.FixedParticles(0x374A, 10, 15, 5038, 1181, 2, EffectLayer.Head); mSp.PlaySound(0x213); } else if (spells == 5) // energy bolt { from.MovingParticles(mSp, 0x3818, 7, 0, false, true, 0, 0, 3043, 4043, 0x211, 0); mSp.PlaySound(0x20A); } else if (spells == 6) // web { from.MovingParticles(mSp, 0x10D3, 7, 0, false, false, 0, 0, 0); mSp.PlaySound(0x62D); } else if (spells == 7) // radiation { mSp.FixedParticles(0x3400, 10, 30, 5013, 0xB96, 2, EffectLayer.Waist); mSp.PlaySound(0x108); } else if (spells == 8) // electricity { if (Utility.RandomBool()) { mSp.FixedParticles(Utility.RandomList(0x3967, 0x3979), 10, 30, 5013, 0, 2, EffectLayer.Waist); mSp.PlaySound(0x5C3); } else { mSp.FixedParticles(0x5547, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x665); } } else if (spells == 9) // electrical storm { mSp.FixedParticles(Utility.RandomList(0x3967, 0x3979), 10, 30, 5013, 0, 2, EffectLayer.Head); mSp.PlaySound(0x5C3); mSp.BoltEffect(0); } else if (spells == 10) // dark void { mSp.FixedParticles(0x3400, 10, 30, 5052, Utility.RandomList(0x496, 0x844, 0x9C1), 0, EffectLayer.Head); mSp.PlaySound(0x108); } else if (spells == 11) // acid { mSp.FixedParticles(0x1A84, 10, 30, 5052, 0x48E, 0, EffectLayer.Head); mSp.PlaySound(0x026); } else if (spells == 12) // magical sparkles { int sparks = Utility.RandomMinMax(1, 4); if (sparks == 1) { mSp.FixedParticles(0x3039, 10, 30, 5052, Utility.RandomList(0, 0x48D, 0x48E, 0x48F, 0x490, 0x491), 0, EffectLayer.Head); } else if (sparks == 2) { mSp.FixedParticles(0x5469, 10, 30, 5052, Utility.RandomList(0, 0x48D, 0x48E, 0x48F, 0x490, 0x491), 0, EffectLayer.Head); } else if (sparks == 3) { mSp.FixedParticles(0x3F29, 10, 30, 5052, Utility.RandomList(0, 0x48D, 0x48E, 0x48F, 0x490, 0x491), 0, EffectLayer.LeftFoot); } else { mSp.FixedParticles(0x54E1, 10, 30, 5052, Utility.RandomList(0, 0x48D, 0x48E, 0x48F, 0x490, 0x491), 0, EffectLayer.Head); } mSp.PlaySound(Utility.RandomList(0x1DF, 0x1E2, 0x1E8, 0x1ED, 0x1F1, 0x1F7, 0x1FD, 0x203, 0x209, 0x20B, 0x5BC, 0x5C4, 0x5C5, 0x5C9)); } else if (spells == 13) // fire tornado { mSp.FixedParticles(0x3F29, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x345); } else if (spells == 14) // magic tentacles { mSp.FixedParticles(0x5475, 10, 30, 5052, Utility.RandomList(0, 0x48D, 0x48E, 0x48F, 0x490, 0x491), 0, EffectLayer.LeftFoot); mSp.PlaySound(Utility.RandomList(0x1DF, 0x1E2, 0x1E8, 0x1ED, 0x1F1, 0x1F7, 0x1FD, 0x203, 0x209, 0x20B, 0x5BC, 0x5C4, 0x5C5, 0x5C9)); } else if (spells == 15) // vortex { mSp.FixedParticles(0x5508, 10, 30, 5052, Utility.RandomList(0, 0x48D, 0x48E, 0x48F, 0x490, 0x491), 0, EffectLayer.Head); mSp.PlaySound(0x665); } else if (spells == 16) // shoot lightning { from.MovingParticles(mSp, 0x3818, 5, 0, false, false, 0, 0, 3600, 0, 0, 0); mSp.PlaySound(0x211); } else if (spells == 17) // fire bolt { from.MovingParticles(mSp, 0x4D17, 5, 0, false, false, 0, 0, 3600, 0, 0, 0); mSp.PlaySound(0x15E); } else if (spells == 18) // fireball { if (Utility.RandomBool()) { mSp.FixedParticles(0x5562, 10, 30, 5052, 0, 0, EffectLayer.Head); mSp.PlaySound(0x44B); } else { from.MovingParticles(mSp, 0x36D4, 7, 0, false, true, 0, 0, 9502, 4019, 0x160, 0); mSp.PlaySound(Core.AOS ? 0x15E : 0x44B); } } else if (spells == 19) // devastate { mSp.FixedParticles(0x2A4E, 10, 30, 5052, 0, 0, EffectLayer.Head); mSp.PlaySound(0x029); } else if (spells == 20) // meteors { Effects.SendLocationEffect(mSp.Location, mSp.Map, Utility.RandomList(0x33E5, 0x33F5), 85, 10, 0xB38, 0); if (circle > 3) { Point3D blast2 = new Point3D((mSp.X - 1), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast2, mSp.Map, Utility.RandomList(0x33E5, 0x33F5), 85, 10, 0xB38, 0); } if (circle > 5) { Point3D blast3 = new Point3D((mSp.X + 1), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast3, mSp.Map, Utility.RandomList(0x33E5, 0x33F5), 85, 10, 0xB38, 0); } if (circle > 6) { Point3D blast4 = new Point3D((mSp.X), (mSp.Y - 1), mSp.Z); Effects.SendLocationEffect(blast4, mSp.Map, Utility.RandomList(0x33E5, 0x33F5), 85, 10, 0xB38, 0); } if (circle > 7) { Point3D blast5 = new Point3D((mSp.X), (mSp.Y + 1), mSp.Z); Effects.SendLocationEffect(blast5, mSp.Map, Utility.RandomList(0x33E5, 0x33F5), 85, 10, 0xB38, 0); } mSp.PlaySound(0x65A); } else if (spells == 21) // destruction { mSp.FixedParticles(0x36B0, 10, 30, 5052, 0xAB3, 0, EffectLayer.Head); mSp.PlaySound(0x664); } else if (spells == 22) // flame bolt { from.MovingParticles(mSp, 0x3818, 5, 0, false, false, 0xAD2, 0, 3600, 0, 0, 0); mSp.PlaySound(0x658); } else if (spells == 23) // flame strike { if (Utility.RandomBool()) { mSp.FixedParticles(0x551A, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x345); } else { mSp.FixedParticles(0x3709, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x208); } } else if (spells == 24) // ignite { Point3D blast1 = new Point3D((mSp.X), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast1, mSp.Map, 0x3728, 85, 10, 0xB70, 0); if (circle > 3) { Point3D blast2 = new Point3D((mSp.X - 1), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast2, mSp.Map, 0x3728, 85, 10, 0xB70, 0); } if (circle > 5) { Point3D blast3 = new Point3D((mSp.X + 1), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast3, mSp.Map, 0x3728, 85, 10, 0xB70, 0); } if (circle > 6) { Point3D blast4 = new Point3D((mSp.X), (mSp.Y - 1), mSp.Z); Effects.SendLocationEffect(blast4, mSp.Map, 0x3728, 85, 10, 0xB70, 0); } if (circle > 7) { Point3D blast5 = new Point3D((mSp.X), (mSp.Y + 1), mSp.Z); Effects.SendLocationEffect(blast5, mSp.Map, 0x3728, 85, 10, 0xB70, 0); } mSp.PlaySound(0x208); } else if (spells == 25) // explosion { Point3D blast1 = new Point3D((mSp.X), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast1, mSp.Map, Utility.RandomList(0x36BD, 0x3822), 85, 10, 0, 0); if (circle > 3) { Point3D blast2 = new Point3D((mSp.X - 1), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast2, mSp.Map, Utility.RandomList(0x36BD, 0x3822), 85, 10, 0, 0); } if (circle > 5) { Point3D blast3 = new Point3D((mSp.X + 1), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast3, mSp.Map, Utility.RandomList(0x36BD, 0x3822), 85, 10, 0, 0); } if (circle > 6) { Point3D blast4 = new Point3D((mSp.X), (mSp.Y - 1), mSp.Z); Effects.SendLocationEffect(blast4, mSp.Map, Utility.RandomList(0x36BD, 0x3822), 85, 10, 0, 0); } if (circle > 7) { Point3D blast5 = new Point3D((mSp.X), (mSp.Y + 1), mSp.Z); Effects.SendLocationEffect(blast5, mSp.Map, Utility.RandomList(0x36BD, 0x3822), 85, 10, 0, 0); } mSp.PlaySound(0x307); } else if (spells == 26) // steam { mSp.FixedParticles(0x3400, 10, 30, 5052, 0x9C4, 0, EffectLayer.Head); mSp.PlaySound(0x108); } else if (spells == 27) // ice bolt { from.MovingParticles(mSp, 0x4D18, 5, 0, false, false, 0, 0, 3600, 0, 0, 0); mSp.PlaySound(0x650); } else if (spells == 28) // icicle { from.MovingParticles(mSp, 0x28EF, 5, 0, false, false, 0xB77, 0, 3600, 0, 0, 0); mSp.PlaySound(0x1E5); } else if (spells == 29) // hail storm { mSp.FixedParticles(Utility.RandomList(0x384E, 0x3859), 20, 10, 5044, 0, 0, EffectLayer.Head); mSp.PlaySound(0x64F); } else if (spells == 30) // frost strike { mSp.FixedParticles(0x23B32, 10, 30, 5052, 0x809, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x64F); } else if (spells == 31) // avalanche { Point3D blast1 = new Point3D((mSp.X), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast1, mSp.Map, Utility.RandomList(0x33E5, 0x33F5), 85, 10, 0xB77, 0); if (circle > 3) { Point3D blast2 = new Point3D((mSp.X - 1), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast2, mSp.Map, Utility.RandomList(0x33E5, 0x33F5), 85, 10, 0xB77, 0); } if (circle > 5) { Point3D blast3 = new Point3D((mSp.X + 1), (mSp.Y), mSp.Z); Effects.SendLocationEffect(blast3, mSp.Map, Utility.RandomList(0x33E5, 0x33F5), 85, 10, 0xB77, 0); } if (circle > 6) { Point3D blast4 = new Point3D((mSp.X), (mSp.Y - 1), mSp.Z); Effects.SendLocationEffect(blast4, mSp.Map, Utility.RandomList(0x33E5, 0x33F5), 85, 10, 0xB77, 0); } if (circle > 7) { Point3D blast5 = new Point3D((mSp.X), (mSp.Y + 1), mSp.Z); Effects.SendLocationEffect(blast5, mSp.Map, Utility.RandomList(0x33E5, 0x33F5), 85, 10, 0xB77, 0); } mSp.PlaySound(0x65A); } else if (spells == 32) // snow ball { from.MovingParticles(mSp, 0x36E4, 7, 0, false, true, 0xBB3, 0, 9502, 4019, 0x160, 0); mSp.PlaySound(0x650); } else if (spells == 33) // cold { mSp.FixedParticles(0x5590, 10, 30, 5052, 0xB77, 0, EffectLayer.Head); mSp.PlaySound(Utility.RandomList(0x10B, 0x5590)); } else if (spells == 34) // poison bolt { from.MovingParticles(mSp, 0x4F49, 5, 0, false, false, 0, 0, 3600, 0, 0, 0); mSp.PlaySound(0x658); } else if (spells == 35) // physic blast { mSp.FixedParticles(0x3822, 20, 10, 5044, 0xAF1, 0, EffectLayer.Head); mSp.PlaySound(0x658); } else if (spells == 36) // evil lightning { mSp.FixedParticles(0x55A6, 20, 10, 5044, EffectLayer.Head); mSp.PlaySound(0x653); } else if (spells == 37) // strike { mSp.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head); mSp.PlaySound(0x307); } else if (spells == 38) // mind rot { mSp.PlaySound(0x1FB); mSp.PlaySound(0x258); mSp.FixedParticles(0x373A, 1, 17, 9903, 15, 4, EffectLayer.Head); } else if (spells == 39) // pain spike { mSp.FixedParticles(0x37C4, 1, 8, 9916, 39, 3, EffectLayer.Head); mSp.FixedParticles(0x37C4, 1, 8, 9502, 39, 4, EffectLayer.Head); mSp.PlaySound(0x210); } else if (spells == 40) // strangle { mSp.PlaySound(0x22F); mSp.FixedParticles(0x36CB, 1, 9, 9911, 67, 5, EffectLayer.Head); mSp.FixedParticles(0x374A, 1, 17, 9502, 1108, 4, (EffectLayer)255); } else if (spells == 41) // wither { Effects.PlaySound(mSp.Location, mSp.Map, 0x1FB); mSp.PlaySound(0x10B); mSp.FixedParticles(0x37CC, 1, 9, 9911, 0xB1F, 5, EffectLayer.Waist); } else if (spells == 42) // poison strike { mSp.FixedParticles(0x36B0, 1, 9, 9911, 9915, 5, EffectLayer.Waist); mSp.PlaySound(0x229); } else if (spells == 43) // poison { mSp.FixedParticles(0x374A, 10, 15, 5021, 0, 0, EffectLayer.Waist); mSp.PlaySound(0x205); } else if (spells == 44) // poison { mSp.FixedParticles(0x3400, 10, 30, 5052, 0, 0, EffectLayer.Waist); mSp.PlaySound(0x108); } else if (spells == 45) // poison { mSp.FixedParticles(0x36B0, 10, 30, 5052, 9915, 0, EffectLayer.Waist); mSp.PlaySound(0x229); } else if (spells == 46) // venom vine { mSp.FixedParticles(0x5475, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x64F); } else if (spells == 47) // vines { mSp.FixedParticles(0x5487, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x64F); } else if (spells == 48) // leaves { mSp.FixedParticles(0x54F4, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x10B); } else if (spells == 49) // magical { mSp.FixedParticles(0x3039, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(Utility.RandomList(0x1DF, 0x1E2, 0x1E8, 0x1ED, 0x1F1, 0x1F7, 0x1FD, 0x203, 0x209, 0x20B, 0x5BC, 0x5C4, 0x5C5, 0x5C9)); } else if (spells == 50) // air { if (Utility.RandomBool()) { mSp.FixedParticles(0x5492, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); } else { mSp.FixedParticles(0x5590, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); } mSp.PlaySound(Utility.RandomList(0x10B, 0x5590)); } else if (spells == 51) // stone hands { mSp.FixedParticles(0x3837, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x65A); } else if (spells == 52) // water { if (Utility.RandomBool()) { mSp.FixedParticles(0x1A84, 10, 30, 5052, 0xB3D, 0, EffectLayer.Waist); mSp.PlaySound(0x026); } else { mSp.FixedParticles(0x5558, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x026); } } else if (spells == 53) // weed { mSp.FixedParticles(0x3400, 10, 30, 5052, 0xB97, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x64F); } else if (spells == 54) // water globe { if (Utility.RandomBool()) { mSp.FixedParticles(0x37E5, 10, 30, 5052, 0, 0, EffectLayer.Head); mSp.PlaySound(0x5BF); } else { mSp.FixedParticles(0x559A, 10, 30, 5052, 0, 0, EffectLayer.Head); mSp.PlaySound(0x56D); } } else if (spells == 55) // poison field { mSp.FixedParticles(Utility.RandomList(0x3915, 0x3924), 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x5BC); } else if (spells == 56) // fire field { if (Utility.RandomBool()) { mSp.FixedParticles(Utility.RandomList(0x3998, 0x398D), 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x356); } else { mSp.FixedParticles(0x55B1, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x5CF); } } else if (spells == 57) // bird wings { mSp.FixedParticles(0x3FE5, 10, 30, 5052, 0xB60, 0, EffectLayer.Head); mSp.PlaySound(0x64D); } else if (spells == 58) // throwing skull { from.MovingParticles(mSp, 0x3FF9, 7, 0, false, true, 0, 0, 9502, 4019, 0x160, 0); from.PlaySound(0x658); } else if (spells == 59) // insects { mSp.FixedParticles(0x554F, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(Utility.RandomList(0x5CC, 0x5CB)); } else if (spells == 60) // water splash { if (Utility.RandomBool()) { mSp.FixedParticles(0x5536, 10, 30, 5052, 0, 0, EffectLayer.Head); mSp.PlaySound(0x5CA); } else { mSp.FixedParticles(0x23B2, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x026); } } else if (spells == 61) // ice storm { if (Utility.RandomBool()) { mSp.FixedParticles(Utility.RandomList(0x384E, 0x3859), 10, 30, 5052, 0xB79, 0, EffectLayer.LeftFoot); } else { mSp.FixedParticles(0x55BB, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); } mSp.PlaySound(0x5CE); } else if (spells == 62) // ice spike { mSp.FixedParticles(0x5571, 10, 30, 5052, 0, 0, EffectLayer.LeftFoot); mSp.PlaySound(0x65D); } } }
public override void OnResponse(NetState state, RelayInfo info) { if (m_State == null) { return; } Mobile focus = m_State.Mobile; Mobile from = state.Mobile; if (focus == null) { from.SendMessage("That character is no longer online."); return; } else if (focus.Deleted) { from.SendMessage("That character no longer exists."); return; } else if (from != focus && focus.Hidden && from.AccessLevel < focus.AccessLevel && (!(focus is PlayerMobile) || !((PlayerMobile)focus).VisibilityList.Contains(from))) { from.SendMessage("That character is no longer visible."); return; } switch (info.ButtonID) { case 1: // Tell { TextRelay text = info.GetTextEntry(0); if (text != null) { focus.SendMessage(0x482, "{0} tells you:", from.Name); focus.SendMessage(0x482, text.Text); CommandLogging.WriteLine(from, "{0} {1} telling {2} \"{3}\" ", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(focus), text.Text); } from.SendGump(new ClientGump(from, m_State)); break; } case 4: // Props { Resend(from, info); if (!BaseCommand.IsAccessible(from, focus)) { from.SendMessage("That is not accessible."); } else { from.SendGump(new PropertiesGump(from, focus)); CommandLogging.WriteLine(from, "{0} {1} opening properties gump of {2} ", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(focus)); } break; } case 5: // Go to { if (focus.Map == null || focus.Map == Map.Internal) { from.SendMessage("That character is not in the world."); } else { from.MoveToWorld(focus.Location, focus.Map); Resend(from, info); CommandLogging.WriteLine(from, "{0} {1} going to {2}, Location {3}, Map {4}", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(focus), focus.Location, focus.Map); } break; } case 6: // Get { if (from.Map == null || from.Map == Map.Internal) { from.SendMessage("You cannot bring that person here."); } else { focus.MoveToWorld(from.Location, from.Map); Resend(from, info); CommandLogging.WriteLine(from, "{0} {1} bringing {2} to Location {3}, Map {4}", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(focus), from.Location, from.Map); } break; } case 7: // Move { from.Target = new MoveTarget(focus); Resend(from, info); break; } case 8: // Kick { if (from.AccessLevel >= AccessLevel.GameMaster && from.AccessLevel > focus.AccessLevel) { focus.Say("I've been kicked!"); m_State.Dispose(); CommandLogging.WriteLine(from, "{0} {1} kicking {2} ", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(focus)); } break; } case 9: // Kill { if (from.AccessLevel >= AccessLevel.GameMaster && from.AccessLevel > focus.AccessLevel) { focus.Kill(); CommandLogging.WriteLine(from, "{0} {1} killing {2} ", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(focus)); } Resend(from, info); break; } case 10: //Res { if (from.AccessLevel >= AccessLevel.GameMaster && from.AccessLevel > focus.AccessLevel) { focus.PlaySound(0x214); focus.FixedEffect(0x376A, 10, 16); focus.Resurrect(); CommandLogging.WriteLine(from, "{0} {1} resurrecting {2} ", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(focus)); } Resend(from, info); break; } case 11: // Skills { Resend(from, info); if (from.AccessLevel > focus.AccessLevel) { from.SendGump(new SkillsGump(from, (Mobile)focus)); CommandLogging.WriteLine(from, "{0} {1} Opening Skills gump of {2} ", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(focus)); } break; } } }
public void SayRandomTranslate( Mobile mob, params string[] sentancesInEnglish ) { SaySentance( mob, Utility.RandomMinMax( 2, 3 ) ); mob.Say( sentancesInEnglish[Utility.Random( sentancesInEnglish.Length )] ); }
public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; switch (info.ButtonID) { case 0: // Closed or Cancel { return; } default: { // Make sure that the OK, button was pressed if (info.ButtonID == 1) { // Get the array of switches selected ArrayList Selections = new ArrayList(info.Switches); string prefix = Server.Commands.CommandPrefix; // Trammel ------------------- // Now Unloading any selected maps if (Selections.Contains(101) == true) { from.Say("TRAMMEL: Unloading animals.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 10", prefix)); } if (Selections.Contains(102) == true) { from.Say("TRAMMEL: Unloading Camps.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 20", prefix)); } if (Selections.Contains(103) == true) { from.Say("TRAMMEL: Unloading Covetous.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 30", prefix)); } if (Selections.Contains(104) == true) { from.Say("TRAMMEL: Unloading Deceit.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 40", prefix)); } if (Selections.Contains(105) == true) { from.Say("TRAMMEL: Unloading Despise.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 50", prefix)); } if (Selections.Contains(106) == true) { from.Say("TRAMMEL: Unloading Destard.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 60", prefix)); } if (Selections.Contains(107) == true) { from.Say("TRAMMEL: Unloading Escorts.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 70", prefix)); } if (Selections.Contains(108) == true) { from.Say("TRAMMEL: Unloading Fire.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 80", prefix)); } if (Selections.Contains(109) == true) { from.Say("TRAMMEL: Unloading Graveyards.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 90", prefix)); } if (Selections.Contains(110) == true) { from.Say("TRAMMEL: Unloading Hythloth.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 100", prefix)); } if (Selections.Contains(111) == true) { from.Say("TRAMMEL: Unloading Ice.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 110", prefix)); } if (Selections.Contains(113) == true) { from.Say("TRAMMEL: Unloading Lostlands.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 120", prefix)); } if (Selections.Contains(114) == true) { from.Say("TRAMMEL: Unloading Miscellaneous.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 130", prefix)); } if (Selections.Contains(115) == true) { from.Say("TRAMMEL: Unloading Moonglowzoo.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 140", prefix)); } if (Selections.Contains(116) == true) { from.Say("TRAMMEL: Unloading OrcCaves.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 150", prefix)); } if (Selections.Contains(117) == true) { from.Say("TRAMMEL: Unloading OSIHeavy.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 160", prefix)); } if (Selections.Contains(118) == true) { from.Say("TRAMMEL: Unloading OSILight.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 170", prefix)); } if (Selections.Contains(119) == true) { from.Say("TRAMMEL: Unloading OSIMedium.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 180", prefix)); } if (Selections.Contains(120) == true) { from.Say("TRAMMEL: Unloading Shame.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 190", prefix)); } if (Selections.Contains(121) == true) { from.Say("TRAMMEL: Unloading SolenHive.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 200", prefix)); } if (Selections.Contains(122) == true) { from.Say("TRAMMEL: Unloading TerathanKeep.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 210", prefix)); } if (Selections.Contains(123) == true) { from.Say("TRAMMEL: Unloading TownCriers.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 220", prefix)); } if (Selections.Contains(124) == true) { from.Say("TRAMMEL: Unloading Towns.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 230", prefix)); } if (Selections.Contains(125) == true) { from.Say("TRAMMEL: Unloading TrinsicPassage.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 240", prefix)); } if (Selections.Contains(126) == true) { from.Say("TRAMMEL: Unloading Vendors.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 250", prefix)); } if (Selections.Contains(127) == true) { from.Say("TRAMMEL: Unloading Wrong.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 260", prefix)); } // Felucca ------------------- // Now Unloading any selected maps if (Selections.Contains(128) == true) { from.Say("FELUCCA: Unloading animals.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 11", prefix)); } if (Selections.Contains(129) == true) { from.Say("FELUCCA: Unloading Camps.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 21", prefix)); } if (Selections.Contains(130) == true) { from.Say("FELUCCA: Unloading Covetous.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 31", prefix)); } if (Selections.Contains(131) == true) { from.Say("FELUCCA: Unloading Deceit.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 41", prefix)); } if (Selections.Contains(132) == true) { from.Say("FELUCCA: Unloading Despise.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 51", prefix)); } if (Selections.Contains(133) == true) { from.Say("FELUCCA: Unloading Destard.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 61", prefix)); } if (Selections.Contains(134) == true) { from.Say("FELUCCA: Unloading Escorts.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 71", prefix)); } if (Selections.Contains(135) == true) { from.Say("FELUCCA: Unloading Fire.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 81", prefix)); } if (Selections.Contains(136) == true) { from.Say("FELUCCA: Unloading Graveyards.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 91", prefix)); } if (Selections.Contains(137) == true) { from.Say("FELUCCA: Unloading Hythloth.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 101", prefix)); } if (Selections.Contains(138) == true) { from.Say("FELUCCA: Unloading Ice.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 111", prefix)); } if (Selections.Contains(139) == true) { from.Say("FELUCCA: Unloading Khaldun.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 116", prefix)); } if (Selections.Contains(140) == true) { from.Say("FELUCCA: Unloading Lostlands.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 121", prefix)); } if (Selections.Contains(141) == true) { from.Say("FELUCCA: Unloading Miscellaneous.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 131", prefix)); Commands.Handle(from, String.Format("{0}Spawngen unload 132", prefix)); } if (Selections.Contains(142) == true) { from.Say("FELUCCA: Unloading Moonglowzoo.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 141", prefix)); } if (Selections.Contains(143) == true) { from.Say("FELUCCA: Unloading OrcCaves.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 151", prefix)); } if (Selections.Contains(144) == true) { from.Say("FELUCCA: Unloading OSIHeavy.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 161", prefix)); } if (Selections.Contains(145) == true) { from.Say("FELUCCA: Unloading OSILight.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 171", prefix)); } if (Selections.Contains(146) == true) { from.Say("FELUCCA: Unloading OSIMedium.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 181", prefix)); } if (Selections.Contains(147) == true) { from.Say("FELUCCA: Unloading Shame.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 191", prefix)); } if (Selections.Contains(148) == true) { from.Say("FELUCCA: Unloading SolenHive.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 201", prefix)); } if (Selections.Contains(149) == true) { from.Say("FELUCCA: Unloading TerathanKeep.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 211", prefix)); } if (Selections.Contains(150) == true) { from.Say("FELUCCA: Unloading TownCriers.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 221", prefix)); } if (Selections.Contains(151) == true) { from.Say("FELUCCA: Unloading Towns.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 231", prefix)); } if (Selections.Contains(152) == true) { from.Say("FELUCCA: Unloading TrinsicPassage.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 241", prefix)); } if (Selections.Contains(153) == true) { from.Say("FELUCCA: Unloading Vendors.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 251", prefix)); } if (Selections.Contains(154) == true) { from.Say("FELUCCA: Unloading Wrong.map..."); Commands.Handle(from, String.Format("{0}Spawngen unload 261", prefix)); } } from.Say("Unload completed!"); break; } } }
public void SaySentance( Mobile mob, int wordCount ) { mob.Say( ConstructSentance( wordCount ) ); mob.PlaySound( m_Sound ); }
public void CheckGuardCandidate(Mobile m) { if (IsGuarded == false) { return; } if (IsGuardCandidate(m)) { GuardTimer timer = (GuardTimer)m_GuardCandidates[m]; if (timer == null) { timer = new GuardTimer(m, m_GuardCandidates); timer.Start(); m_GuardCandidates[m] = timer; m.SendLocalizedMessage(502275); // Guards can now be called on you! // okay, look for a nearby mobile that may have seen the crime .. no complaint, no investegation! if (m.Map != null) { Mobile fakeCall = null; double prio = 0.0; IPooledEnumerable eable = m.GetMobilesInRange(8); foreach (Mobile v in eable) { // make sure the towns person remembers the mobile in question if (!v.Player && v.Body.IsHuman && v != m && !IsGuardCandidate(v) && v.Remembers(m)) { //Pixie 10/28/04: checking whether v is in the region fixes the problem // where player1 recalls to a guardzone before player2's explosion hits ... if (this.Contains(v.Location)) { double dist = m.GetDistanceToSqrt(v); if (fakeCall == null || dist < prio) { fakeCall = v; prio = dist; } } else { //System.Console.WriteLine( "Mobile ({0}) isn't in this region, so skip him!", v.Name ); } } } eable.Free(); if (fakeCall != null) { fakeCall.Say(Utility.RandomList(1007037, 501603, 1013037, 1013038, 1013039, 1013041, 1013042, 1013043, 1013052)); MakeGuards(m); m_GuardCandidates.Remove(m); m.SendLocalizedMessage(502276); // Guards can no longer be called on you. } } } else { timer.Stop(); timer.Start(); } } }