public override void OnDoubleClick( Mobile from ) { Map map = from.Map; if ( map == null || map == Map.Internal ) return; if ( from.AccessLevel >= AccessLevel.GameMaster ) { from.CloseGump( typeof( HolidayTreeAddonChoiceGump ) ); from.SendGump( new HolidayTreeAddonChoiceGump( from, this ) ); } else { if ( !IsChildOf( from.Backpack ) ) from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. else if ( !from.InRange( this.GetWorldLocation(), 1 ) ) from.SendLocalizedMessage( 500446 ); // That is too far away. else if ( DateTime.Now.Month != 12 ) from.SendLocalizedMessage( 1005700 ); // You will have to wait till next December to put your tree back up for display. else { from.CloseGump( typeof( HolidayTreeAddonChoiceGump ) ); from.SendGump( new HolidayTreeAddonChoiceGump( from, this ) ); } } }
public override void OnDoubleClick(Mobile from) { if ( this.IsChildOf( from.Backpack ) ) { if (i_Owner == 0) { i_Owner = from.Serial; Name = from.Name + "'s Reward Ticket Ledger"; i_RewardTickets = 0; from.SendGump( new RewardTicketsGump( from, this ) ); } else if (from.Serial == i_Owner) { from.SendGump( new RewardTicketsGump( from, this ) ); } else if (from.AccessLevel >= AccessLevel.GameMaster) { from.SendMessage(1161, "Select a new owner for this Reward ticket ledger."); BeginSetOwner( from ); } else { from.PlaySound(1074); //play no!! sound from.SendMessage(1161, "This book is not yours and you cannot seem to write your name in it!"); } } else from.SendMessage(1161, "The Reward ticket ledger must be in your backpack to be used."); }
public static void SendTo( Mobile to, Mobile sender, Mobile handler, bool staff, PageEntry entry, bool resendEntryGump ) { to.SendGump( new ChatGumpDisplay( sender, handler, staff, entry ) ); if( resendEntryGump ) to.SendGump( new ChatGumpEntry( sender, handler, entry ) ); }
protected override void OnTargetFinish( Mobile from ) { if ( m_Type == typeof( Type ) ) from.SendGump( new PropertiesGump( m_Mobile, m_Object, m_Stack, m_List, m_Page ) ); else from.SendGump( new SetObjectGump( m_Property, m_Mobile, m_Object, m_Stack, m_Type, m_Page, m_List ) ); }
protected override void OnTarget(Mobile from, object targeted) { try { m_Callback.DynamicInvoke( new object[] { from, targeted } ); } catch { // Console.WriteLine( "The auction system cannot access the cliloc.enu file. Please review the system instructions for proper installation" ); if (targeted != null) { // from.SendMessage ("target ! null"); if (targeted is Item) { ((Item)targeted).Visible = true; from.SendGump(new AuctionWontAcceptNoticeGump(from)); } else { from.SendGump( new NoticeGump( 1060637, 30720, "Please let a GM know - Aution Target Else.", 0xFFC000, 320, 240, null, null ) ); } } else { from.SendMessage ("targeted was null"); } } }
public override void Drink(Mobile from) { Item am = from.Backpack.FindItemByType(typeof(RecluseStingMarker)); if (am != null) { from.BodyMod = 0; from.Hue = -1; from.YellowHealthbar = false; from.PlaySound(0xF6); from.PlaySound(0x1F7); from.FixedParticles(0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head); BasePotion.PlayDrinkEffect(from); this.Consume(); from.SendGump(new RecluseAntidoteGump()); //am.Delete(); } else if (am == null ) { from.SendGump(new RecluseCuredGump()); } }
public override void OnDoubleClick( Mobile from ) { if ( from.InRange( GetWorldLocation(), 2 ) ) { if ( BlueMageControl.IsBlueMage( from ) ) { if ( from.HasGump( typeof( BlueQuitGump ) ) ) from.CloseGump( typeof( BlueQuitGump ) ); from.SendGump( new BlueQuitGump( from ) ); } else { if ( from.AccessLevel == AccessLevel.Player ) from.SendMessage( "Please speak to Ben in New Haven" ); else { if ( from.HasGump( typeof( BlueAcceptGump ) ) ) from.CloseGump( typeof( BlueAcceptGump ) ); from.SendGump( new BlueAcceptGump( from ) ); } } } }
protected override void OnTarget(Mobile from, object target) { if (from != null && !from.Deleted && target != null) { if (target is PlayerMobile) { Mobile targetted = target as Mobile; if (targetted == from) { from.SendMessage("Cela sera un jet sur vous-même..."); } else { from.SendMessage("Cela sera un jet contre un joueur..."); targetted.SendMessage("{0} prépare une jet RolePlay avec vous...", from.Name); } from.SendGump(new RolePlayGump(from, (Mobile)target, 0, false, 1, false)); } else if (target is Mobile) { from.SendMessage("Cela sera un jet contre un personnage non joueur..."); from.SendGump(new RolePlayGump(from, (Mobile)target, 0, false, 1, false)); } } }
protected override void OnTarget( Mobile from, object targeted ) { if( targeted is Mobile ) { Mobile m = ((Mobile)targeted); if( m == creature ) { from.SendMessage( "It cannot attack itself!" ); from.SendGump( new CreatureControl( creature, from ) ); } else { if( creature.Alive ) { m_AI.Action = ActionType.Combat; m_AI.NextMove = DateTime.Now; creature.Combatant = m; from.SendGump( new CreatureControl( creature, from ) ); } } } else { from.SendMessage( "You cannot attack that!" ); from.SendGump( new CreatureControl( creature, from ) ); } }
protected override void OnTarget( Mobile from, object o ) { if ( !BaseCommand.IsAccessible( from, o ) ) from.SendMessage( "That is not accessible." ); else if ( m_Normal ) from.SendGump( new PropertiesGump( from, o ) ); else if ( o is Guildstone ) from.SendGump( new PropertiesGump( from, ((Guildstone)o).Guild ) ); }
protected override void OnTargetFinish( Mobile from ) { if( m_Type == typeof( Type ) ) from.SendGump( new PropertiesGump( m_Mobile, m_Object, m_Stack, m_List, m_Page ) ); else { PlayerMobile pm = from as PlayerMobile; if( pm.AccessLevel > AccessLevel.Player ) { from.SendGump( new SetObjectGump( m_Property, m_Mobile, m_Object, m_Stack, m_Type, m_Page, m_List ) ); } } }
public override void OnDoubleClick( Mobile from ) { if ( m_Faction == null ) return; if ( from.Kills >= 5 ) { if (MurderSystemController._MurderersCanJoinAnyFaction == false) { if ((m_Faction.Definition.FriendlyName == "True Britannians" || m_Faction.Definition.FriendlyName == "Council of Mages")) { from.SendMessage("Murderers cannot join this faction!"); return; } } } if ( !from.InRange( GetWorldLocation(), 2 ) ) { from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. } else if ( FactionGump.Exists( from ) ) { from.SendLocalizedMessage( 1042160 ); // You already have a faction menu open. } else if ( from is PlayerMobile ) { Faction existingFaction = Faction.Find( from ); if ( existingFaction == m_Faction || from.AccessLevel >= AccessLevel.GameMaster ) { PlayerState pl = PlayerState.Find( from ); if ( pl != null && pl.IsLeaving ) from.SendLocalizedMessage( 1005051 ); // You cannot use the faction stone until you have finished quitting your current faction else from.SendGump( new FactionStoneGump( (PlayerMobile) from, m_Faction ) ); } else if ( existingFaction != null ) { // TODO: Validate from.SendLocalizedMessage( 1005053 ); // This is not your faction stone! } else { from.SendGump( new JoinStoneGump( (PlayerMobile) from, m_Faction ) ); } } }
public static void OnAccepted( Mobile from ) { if ( from.Backpack == null ) return; PlainGreyCloak cloak = from.FindItemOnLayer( Layer.Cloak ) as PlainGreyCloak; if ( cloak == null ) { from.DropHolding(); cloak = from.Backpack.FindItemByType<PlainGreyCloak>(); } if ( cloak == null ) return; cloak.Delete(); from.PlaceInBackpack( new ShieldOfRecognition() ); /* *smiles* Surely thy deeds will be recognized by those who see thee * wearing this shield! It shall serve as a reminder of the exalted * path that thou hast journeyed upon, and I wish to thank thee on * behalf of all whom thine efforts shall benefit. Ah, let us not * forget that old cloak I gavest thee - I shall take it back now and * give thee thine reward. */ from.SendGump( new GenericQuestGump( 1075783 ) ); if ( from is PlayerMobile ) ( (PlayerMobile) from ).HumilityQuestStatus = HumilityQuestStatus.RewardAccepted; }
protected override void OnTarget( Mobile from, object o ) { if ( !BaseCommand.IsAccessible( from, o ) ) from.SendMessage( "That is not accessible." ); else from.SendGump( new PropertiesGump( from, o ) ); }
public override void OnDoubleClick(Mobile from) { if (m_Arena != null && !m_Arena.Deleted && m_Arena.Running) from.SendGump(new ArenaScoreBoardGump(m_Arena)); else from.SendMessage("The Arena is under maintainance; there is no score available at the moment."); }
public override void OnDoubleClick( Mobile from ) { if ( IsChildOf( from.Backpack ) ) { from.SendGump( new ScrollOfAbraxusGump() ); PlayerMobile pm = from as PlayerMobile; if ( pm != null ) { QuestSystem qs = pm.Quest; if ( qs is DarkTidesQuest ) { QuestObjective obj = qs.FindObjective( typeof( ReadAbraxusScrollObjective ) ); if ( obj != null && !obj.Completed ) obj.Complete(); } } } else { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } }
protected override void OnTargetFinish( Mobile from ) { if ( !m_Plant.Deleted && m_Plant.PlantStatus < PlantStatus.DecorativePlant && from.InRange( m_Plant.GetWorldLocation(), 3 ) && m_Plant.IsUsableBy( from ) && !from.HasGump( typeof(MainPlantGump) ) ) { from.SendGump( new MainPlantGump( m_Plant ) ); } }
public override void OnDoubleClick( Mobile from ) { if ( IsChildOf( from.Backpack ) ) { PlayerMobile pm = (PlayerMobile)from; if ( from.Skills[SkillName.AnimalTaming].Base < 100.0 && from.Skills[SkillName.Tinkering].Base < 100.0 ) { from.SendMessage( "You have no clue how to use this." ); } else if ( FSATS.EnableBioEngineer == false ) { from.SendMessage( "Bio-Engineering has been disabled on this server, Please contact your server administrator for more information." ); } //else if ( pm.Bioenginer == false ) //{ // from.SendMessage( "You have no clue how to use this." ); //} else { from.CloseGump( typeof( SampleDNAGump ) ); from.SendGump( new SampleDNAGump( this ) ); } } else { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } }
public override void OnDoubleClick( Mobile from ) { if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) ) return; if ( m_UsesRemaining > 0 ) { from.SendLocalizedMessage( 1072357 ); // Select an object to engrave. from.Target = new TargetWeapon( this ); } else { if ( from.Skills.Tinkering.Value == 0 ) { from.SendLocalizedMessage( 1076179 ); // Since you have no tinkering skill, you will need to find an NPC tinkerer to repair this for you. } else if ( from.Skills.Tinkering.Value < 75.0 ) { from.SendLocalizedMessage( 1076178 ); // Your tinkering skill is too low to fix this yourself. An NPC tinkerer can help you repair this for a fee. } else { Item diamond = from.Backpack.FindItemByType( typeof( BlueDiamond ) ); if ( diamond != null ) from.SendGump( new ConfirmGump( this, null ) ); else from.SendLocalizedMessage( 1076166 ); // You do not have a blue diamond needed to recharge the engraving tool. } from.SendLocalizedMessage( 1076163 ); // There are no charges left on this engraving tool. } }
public override void OnDoubleClick( Mobile from ) { if ( IsChildOf( from.Backpack ) || Parent == from ) { if ( UsesRemaining > 0 ) { CraftSystem system = this.CraftSystem; int num = system.CanCraft( from, this, null ); if ( num > 0 ) { from.SendLocalizedMessage( num ); } else { CraftContext context = system.GetContext( from ); from.SendGump( new CraftGump( from, system, this, null ) ); } } else from.SendLocalizedMessage( 1072306 ); // You must wait a moment for it to recharge. } else { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } }
public override void OnDoubleClick( Mobile from ) { if ( this.Parent != null || !this.VerifyMove( from ) ) return; if ( !from.InRange( this, 2 ) ) { from.LocalOverheadMessage( MessageType.Regular, 0x3B2, true, "I can't reach that." ); // I can't reach that. return; } if ( this.ItemID == 0xA57 ) // rolled { Direction dir = PlayerMobile.GetDirection4( from.Location, this.Location ); if ( dir == Direction.North || dir == Direction.South ) this.ItemID = 0xA55; else this.ItemID = 0xA56; } else // unrolled { this.ItemID = 0xA57; if ( !from.HasGump( typeof( LogoutGump ) ) ) { CampfireEntry entry = Campfire.GetEntry( from ); if ( entry != null && entry.Safe ) from.SendGump( new LogoutGump( entry, this ) ); } } }
public override void OnDoubleClick(Mobile from) { if ((!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this)) && from.AccessLevel == AccessLevel.Player) { from.SendLocalizedMessage(500446); // That is too far away. return; } m_TimeOut = DateTime.UtcNow - m_LastBuild; if (m_UpdateTimer < m_TimeOut || itemarray == null) BuildArrayList(from); else if (turboslotsarray != null) { foreach (TurboSlot t in turboslotsarray) { if ((t == null || t.Deleted) ) { BuildArrayList(from); break; } } } if (turboslotsarray != null) { from.CloseGump(typeof(TurboSlotsStatGump)); from.SendGump(new TurboSlotsStatGump(from, turboslotsarray)); } }
public override void OnDoubleClick( Mobile from ) { if ( IsChildOf( from.Backpack ) ) from.SendGump( new ConfirmBreakCrystalGump( this ) ); else from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. }
public static void SendToolbar(Mobile m) { ToolbarModule module = m.GetModule(typeof(ToolbarModule)) as ToolbarModule ?? new ToolbarModule(m); m.CloseGump(typeof(ToolbarGump)); m.SendGump(new ToolbarGump(module.ToolbarInfo, m)); }
public override void OnDoubleClickSecureTrade( Mobile from ) { if ( !from.InRange( GetWorldLocation(), 2 ) ) { from.SendLocalizedMessage( 500446 ); // That is too far away. } else if ( m_Entries.Count == 0 ) { from.SendLocalizedMessage( 1062381 ); // The book is empty. } else { from.SendGump( new BOBGump( (PlayerMobile)from, this ) ); SecureTradeContainer cont = GetSecureTradeCont(); if ( cont != null ) { SecureTrade trade = cont.Trade; if ( trade != null && trade.From.Mobile == from ) trade.To.Mobile.SendGump( new BOBGump( (PlayerMobile)(trade.To.Mobile), this ) ); else if ( trade != null && trade.To.Mobile == from ) trade.From.Mobile.SendGump( new BOBGump( (PlayerMobile)(trade.From.Mobile), this ) ); } } }
public override void OnDoubleClick(Mobile from) { MerlinsStaff Staff = from.FindItemOnLayer(Layer.TwoHanded) as MerlinsStaff; if (Parent != from) { from.SendMessage("You remember that you must equip the staff to summon a portal to Merlin"); } else { Item marker1 = from.Backpack.FindItemByType(typeof(Marker1)); if (marker1 != null) { marker1.Delete(); from.AddToBackpack(new Marker2()); from.AddToBackpack(new Tablet()); from.FixedParticles(0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot); from.SendGump(new MerlinsQuestGump6(from)); from.SendMessage("Muahahahaha!!!! You fool!"); Talon2 tl = new Talon2(); tl.Map = from.Map; tl.Location = from.Location; Delete(); } else { from.SendMessage("You have no right to have this staff!!!!"); } } }
public bool UseGate( Mobile m ) { if ( m.Criminal ) { m.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily. return false; } else if ( SpellHelper.CheckCombat( m ) ) { m.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle?? return false; } else if ( m.Spell != null ) { m.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment. return false; } else { m.CloseGump( typeof( MoongateGump ) ); m.SendGump( new MoongateGump( m, this ) ); if ( !m.Hidden || m.AccessLevel == AccessLevel.Player ) Effects.PlaySound( m.Location, m.Map, 0x20E ); return true; } }
public override void OnDoubleClick( Mobile from ) { if ( IsChildOf( from.Backpack ) ) from.SendGump( new HousePlacementCategoryGump( from ) ); else from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. }
public override void OnDoubleClick( Mobile from ) { if ( !from.InRange( GetWorldLocation(), 2 ) ) from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. else if ( from is PlayerMobile ) from.SendGump( new FoodPantryGump( (PlayerMobile)from, this ) ); }
public static void SendGump(Mobile from, MasterLooterBackpack backpack, int page) { CloseGump(from); if ( backpack == null || backpack.Deleted || !backpack.IsOwner(from as PlayerMobile)) return; from.SendGump(new MasterLooterSetupGump(backpack, page)); }