public InternalTarget(InteriorDecorator decorator) : base(-1, false, TargetFlags.None) { this.CheckLOS = false; this.m_Decorator = decorator; }
public InternalGump(Mobile from, InteriorDecorator decorator) : base(150, 50) { m_Decorator = decorator; AddBackground(0, 0, 170, 260, 2600); AddPage(0); if (!InHouse(from)) { AddButton(40, 36, decorator.Command == DecorateCommand.GetHue ? 2154 : 2152, 2154, 4, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 41, 100, 20, 1158863, false, false); // Get Hue } else { AddButton(40, 36, decorator.Command == DecorateCommand.Turn ? 2154 : 2152, 2154, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 41, 100, 20, 1018323, false, false); // Turn AddButton(40, 86, decorator.Command == DecorateCommand.Up ? 2154 : 2152, 2154, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 91, 100, 20, 1018324, false, false); // Up AddButton(40, 136, decorator.Command == DecorateCommand.Down ? 2154 : 2152, 2154, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 141, 100, 20, 1018325, false, false); // Down AddButton(40, 186, decorator.Command == DecorateCommand.GetHue ? 2154 : 2152, 2154, 4, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 191, 100, 20, 1158863, false, false); // Get Hue } AddHtmlLocalized(0, 0, 0, 0, 4, false, false); }
public InternalGump(InteriorDecorator decorator) : base(150, 50) { m_Decorator = decorator; AddBackground(0, 0, 170, 360, 2600); AddButton(40, 45, 2152, 2154, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 50, 70, 40, 1018323, false, false); // Turn AddButton(40, 85, 2152, 2154, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 90, 70, 40, 1018324, false, false); // Up AddButton(40, 125, 2152, 2154, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 130, 70, 40, 1018325, false, false); // Down // added by Greywolf AddButton(40, 165, 2152, 2154, 4, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 170, 70, 40, 1075389, false, false); // north AddButton(40, 205, 2152, 2154, 5, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 210, 70, 40, 1075387, false, false); // east AddButton(40, 245, 2152, 2154, 6, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 250, 70, 40, 1075386, false, false); // south AddButton(40, 285, 2152, 2154, 7, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 290, 70, 40, 1075390, false, false); // west // end added by Greywolf }
public static bool CheckUse( InteriorDecorator tool, Mobile from ) { if ( !InHouse( from ) ) from.SendLocalizedMessage( 502092 ); // You must be in your house to do this. else return true; return false; }
protected override void OnTarget(Mobile from, object targeted) { if (targeted is Item && InteriorDecorator.CheckUse(m_Decorator, from)) { BaseHouse house = BaseHouse.FindHouseAt(from); Item item = (Item)targeted; if (house == null || !house.IsCoOwner(from)) { from.SendLocalizedMessage(502092); // You must be in your house to do this. } else if (item.Parent != null || !house.IsInside(item)) { from.SendLocalizedMessage(1042270); // That is not in your house. } else if (item is VendorRentalContract) { from.SendLocalizedMessage(1062491); // You cannot use the house decorator on that object. } else { switch (m_Decorator.Command) { case DecorateCommand.Up: Up(item, from); break; case DecorateCommand.Down: Down(item, from); break; case DecorateCommand.Turn: Turn(item, from); break; case DecorateCommand.North: North(item, from, house); break; case DecorateCommand.East: East(item, from, house); break; case DecorateCommand.South: South(item, from, house); break; case DecorateCommand.West: West(item, from, house); break; } } } from.Target = new InternalTarget(m_Decorator); }
protected override void OnTarget(Mobile from, object targeted) { if (targeted is Item && InteriorDecorator.CheckUse(m_Decorator, from)) { BaseHouse house = BaseHouse.FindHouseAt(from); Item item = (Item)targeted; bool isDecorableComponent = false; if (item is AddonComponent) { if (((AddonComponent)item).Addon.Components.Count == 1 && Core.SE) { isDecorableComponent = true; } } if (house == null || !house.IsKeyOwner(from)) { from.SendAsciiMessage("You must be in your house to do this."); // You must be in your house to do this. } else if (item.Parent != null || !house.IsInside(item)) { from.SendAsciiMessage("That is not in your house."); // That is not in your house. } else if (item is AddonComponent && m_Decorator.Command == DecorateCommand.Up) { from.SendLocalizedMessage("You cannot raise it up any higher."); // You cannot raise it up any higher. } else if (item is AddonComponent && m_Decorator.Command == DecorateCommand.Down) { from.SendLocalizedMessage("You cannot lower it down any further."); // You cannot lower it down any further. } else if (item is VendorRentalContract) { from.SendLocalizedMessage("You cannot use the house decorator on that object."); // You cannot use the house decorator on that object. } else if (item.TotalWeight + item.PileWeight > 100) { from.SendLocalizedMessage("That is too heavy."); // That is too heavy. } else { switch (m_Decorator.Command) { case DecorateCommand.Up: Up(item, from); break; case DecorateCommand.Down: Down(item, from); break; case DecorateCommand.Turn: Turn(item, from); break; } } } from.Target = new InternalTarget(m_Decorator); }
public static bool CheckUse( InteriorDecorator tool, Mobile from ) { /*if ( tool.Deleted || !tool.IsChildOf( from.Backpack ) ) from.SendASciiMessage( "That must be in your pack for you to use it." ); else*/ if ( !InHouse( from ) ) from.SendAsciiMessage( "You must be in your house to do this." ); else return true; return false; }
public static bool CheckUse( InteriorDecorator tool, Mobile from ) { /*if ( tool.Deleted || !tool.IsChildOf( from.Backpack ) ) from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. else*/ if ( !InHouse( from ) ) from.SendLocalizedMessage( 502092 ); // You must be in your house to do this. else return true; return false; }
public static bool CheckUse(InteriorDecorator tool, Mobile from) { if (!InHouse(from)) { from.SendLocalizedMessage(502092); } else { return(true); } return(false); }
protected override void OnTarget(Mobile from, object targeted) { if (targeted == m_Decorator) { m_Decorator.Command = DecorateCommand.None; from.SendGump(new InternalGump(m_Decorator)); } else if (targeted is Item && InteriorDecorator.CheckUse(m_Decorator, from)) { var house = HousingHelper.FindHouseAt(from); Item item = (Item)targeted; if (house == null || !house.IsCoOwner(from)) { from.SendLocalizedMessage(502092); // You must be in your house to do this. } else if (item.Parent != null || !house.IsInside(item)) { from.SendLocalizedMessage(1042270); // That is not in your house. } else if (!house.IsLockedDown(item) && !house.IsSecure(item)) { from.SendLocalizedMessage(1042271); // That is not locked down. } else if (item is VendorRentalContract) { from.SendLocalizedMessage(1062491); // You cannot use the house decorator on that object. } else if (item.TotalWeight + item.PileWeight > 100) { from.SendLocalizedMessage(1042272); // That is too heavy. } else { switch (m_Decorator.Command) { case DecorateCommand.Up: Up(item, from); break; case DecorateCommand.Down: Down(item, from); break; case DecorateCommand.Turn: Turn(item, from); break; } } } }
protected override void OnTarget(Mobile from, object targeted) { if (targeted == m_Decorator) { m_Decorator.Command = DecorateCommand.None; from.SendGump(new InternalGump(m_Decorator)); } else if (targeted is Item && InteriorDecorator.CheckUse(m_Decorator, from)) { BaseHouse house = BaseHouse.FindHouseAt(from); Item item = (Item)targeted; if (house == null || !house.IsCoOwner(from)) { from.SendLocalizedMessage(502092); // You must be in your house to do this. } else if (item.Parent != null || !house.IsInside(item)) { from.SendLocalizedMessage(1042270); // That is not in your house. } else if (!house.IsLockedDown(item) && !house.IsSecure(item) && !(item is BaseHouseDoor)) { from.SendLocalizedMessage(1042271); // That is not locked down. } else if ((item is BaseHouseDoor) && !house.IsOwner(from)) { from.SendMessage("Only the owner can turn doors."); } else if (item is BaseHouseDoor && m_Decorator.Command != DecorateCommand.Turn) { from.SendMessage("That can only be rotated."); } else if (item.TotalWeight + item.PileWeight > 100) { from.SendLocalizedMessage(1042272); // That is too heavy. } else { switch (m_Decorator.Command) { case DecorateCommand.Up: Up(item, from); break; case DecorateCommand.Down: Down(item, from); break; case DecorateCommand.Turn: Turn(item, from); break; } } } }
public static bool CheckUse(InteriorDecorator tool, Mobile from) { /*if ( tool.Deleted || !tool.IsChildOf( from.Backpack ) ) * from.SendASciiMessage( "That must be in your pack for you to use it." ); * else*/if (!InHouse(from)) { from.SendAsciiMessage("You must be in your house to do this."); } else { return(true); } return(false); }
public static bool CheckUse(InteriorDecorator tool, Mobile from) { if (tool == null) { return(false); } if (!InHouse(from)) { from.SendLocalizedMessage(502092); // You must be in your house to do this. return(false); } return(true); }
public InternalGump(InteriorDecorator decorator) : base(150, 50) { m_Decorator = decorator; AddBackground(0, 0, 200, 200, 2600); AddButton(50, 45, (decorator.Command == DecorateCommand.Turn ? 2154 : 2152), 2154, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(90, 50, 70, 40, 1018323, false, false); // Turn AddButton(50, 95, (decorator.Command == DecorateCommand.Up ? 2154 : 2152), 2154, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(90, 100, 70, 40, 1018324, false, false); // Up AddButton(50, 145, (decorator.Command == DecorateCommand.Down ? 2154 : 2152), 2154, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(90, 150, 70, 40, 1018325, false, false); // Down }
public static bool CheckUse(InteriorDecorator tool, Mobile from) { /*if ( tool.Deleted || !tool.IsChildOf( from.Backpack ) ) * from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. * else*/ if (!InHouse(from)) { from.SendLocalizedMessage(502092); // You must be in your house to do this. } else { return(true); } return(false); }
public InternalGump(InteriorDecorator decorator) : base(150, 50) { m_Decorator = decorator; AddBackground(0, 0, 170, 555, 2600); AddButton(40, 45, 2151, 2152, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 50, 70, 40, 1018323, false, false); // Turn AddButton(40, 85, 2151, 2152, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 90, 70, 40, 1018324, false, false); // Up AddButton(40, 125, 2151, 2152, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 130, 70, 40, 1018325, false, false); // Down AddButton(40, 165, 2151, 2152, 4, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 170, 70, 40, 1075389, false, false); // north AddButton(40, 205, 2151, 2152, 5, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 210, 70, 40, 1075387, false, false); // east AddButton(40, 245, 2151, 2152, 6, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 250, 70, 40, 1075386, false, false); // south AddButton(40, 285, 2151, 2152, 7, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 290, 70, 40, 1075390, false, false); // west AddButton(40, 325, 2151, 2152, 8, GumpButtonType.Reply, 0); AddHtml(80, 330, 70, 40, "Lock", false, false); // lock AddButton(40, 365, 2151, 2152, 9, GumpButtonType.Reply, 0); AddHtml(80, 370, 70, 40, "Secure", false, false); // secure AddButton(40, 405, 2151, 2152, 10, GumpButtonType.Reply, 0); AddHtml(80, 410, 70, 40, "Release", false, false); // release AddButton(40, 445, 2151, 2152, 11, GumpButtonType.Reply, 0); AddHtml(80, 450, 70, 40, "Trash", false, false); // trash AddButton(40, 485, 2472, 2472, 12, GumpButtonType.Reply, 0); AddHtml(80, 490, 70, 40, "Close", false, false); // close }
public InternalGump( InteriorDecorator decorator ) : base( 150, 50 ) { m_Decorator = decorator; AddBackground( 0, 0, 170, 360, 2600 ); AddButton( 40, 45, 2152, 2154, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 50, 70, 40, 1018323, false, false ); AddButton( 40, 85, 2152, 2154, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 90, 70, 40, 1018324, false, false ); AddButton( 40, 125, 2152, 2154, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 130, 70, 40, 1018325, false, false ); AddButton( 40, 165, 2152, 2154, 4, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 170, 70, 40, 1075389, false, false ); AddButton( 40, 205, 2152, 2154, 5, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 210, 70, 40, 1075387, false, false ); AddButton( 40, 245, 2152, 2154, 6, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 250, 70, 40, 1075386, false, false ); AddButton( 40, 285, 2152, 2154, 7, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 290, 70, 40, 1075390, false, false ); }
public InternalGump(InteriorDecorator decorator) : base(150, 50) { m_Decorator = decorator; AddBackground(0, 0, 170, 360, 2600); AddButton(40, 45, 2152, 2154, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 50, 70, 40, 1018323, false, false); AddButton(40, 85, 2152, 2154, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 90, 70, 40, 1018324, false, false); AddButton(40, 125, 2152, 2154, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 130, 70, 40, 1018325, false, false); AddButton(40, 165, 2152, 2154, 4, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 170, 70, 40, 1075389, false, false); AddButton(40, 205, 2152, 2154, 5, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 210, 70, 40, 1075387, false, false); AddButton(40, 245, 2152, 2154, 6, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 250, 70, 40, 1075386, false, false); AddButton(40, 285, 2152, 2154, 7, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 290, 70, 40, 1075390, false, false); }
public InternalGump(InteriorDecorator decorator) : base(150, 50) { m_Decorator = decorator; AddBackground(0, 0, 170, 200, 2600); AddPage(0); if (m_Decorator.Command == DecorateCommand.Turn) { AddButton(40, 36, 0x869, 0x86A, 1, GumpButtonType.Reply, 0); } else { AddButton(40, 36, 0x868, 0x869, 1, GumpButtonType.Reply, 0); } AddHtmlLocalized(80, 41, 100, 20, 1018323, 0x0, false, false); // Turn if (m_Decorator.Command == DecorateCommand.Up) { AddButton(40, 86, 0x869, 0x86A, 2, GumpButtonType.Reply, 0); } else { AddButton(40, 86, 0x868, 0x869, 2, GumpButtonType.Reply, 0); } AddHtmlLocalized(80, 91, 100, 20, 1018324, 0x0, false, false); // Up if (m_Decorator.Command == DecorateCommand.Down) { AddButton(40, 136, 0x869, 0x86A, 3, GumpButtonType.Reply, 0); } else { AddButton(40, 136, 0x868, 0x869, 3, GumpButtonType.Reply, 0); } AddHtmlLocalized(80, 141, 100, 20, 1018325, 0x0, false, false); // Down }
public InternalGump(InteriorDecorator decorator) : base(150, 50) { this.m_Decorator = decorator; AddBackground(0, 0, 170, 360, 2600); //this.AddBackground(0, 0, 200, 200, 2600); AddButton(40, 45, 2152, 2154, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 50, 70, 40, 1018323, false, false); AddButton(40, 85, 2152, 2154, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 90, 70, 40, 1018324, false, false); AddButton(40, 125, 2152, 2154, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 130, 70, 40, 1018325, false, false); AddButton(40, 165, 2152, 2154, 4, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 170, 70, 40, 1075389, false, false); AddButton(40, 205, 2152, 2154, 5, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 210, 70, 40, 1075387, false, false); AddButton(40, 245, 2152, 2154, 6, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 250, 70, 40, 1075386, false, false); AddButton(40, 285, 2152, 2154, 7, GumpButtonType.Reply, 0); AddHtmlLocalized(80, 290, 70, 40, 1075390, false, false); // this.AddButton(50, 45, (decorator.Command == DecorateCommand.Turn ? 2154 : 2152), 2154, 1, GumpButtonType.Reply, 0); // this.AddHtmlLocalized(90, 50, 70, 40, 1018323, false, false); // Turn // this.AddButton(50, 95, (decorator.Command == DecorateCommand.Up ? 2154 : 2152), 2154, 2, GumpButtonType.Reply, 0); // this.AddHtmlLocalized(90, 100, 70, 40, 1018324, false, false); // Up // this.AddButton(50, 145, (decorator.Command == DecorateCommand.Down ? 2154 : 2152), 2154, 3, GumpButtonType.Reply, 0); // this.AddHtmlLocalized(90, 150, 70, 40, 1018325, false, false); // Down }
public static bool CheckUse( InteriorDecorator tool, Mobile from ) { if ( !InHouse( from ) ) from.SendLocalizedMessage( 502092 ); else return true; return false; }
protected override void OnTarget(Mobile from, object targeted) { if (targeted is Item && InteriorDecorator.CheckUse(this.m_Decorator, from)) { BaseHouse house = BaseHouse.FindHouseAt(from); Item item = (Item)targeted; bool isDecorableComponent = false; if (item is AddonComponent || item is AddonContainerComponent || item is BaseAddonContainer) { object addon = null; int count = 0; if (item is AddonComponent) { AddonComponent component = (AddonComponent)item; count = component.Addon.Components.Count; addon = component.Addon; } else if (item is AddonContainerComponent) { AddonContainerComponent component = (AddonContainerComponent)item; count = component.Addon.Components.Count; addon = component.Addon; } else if (item is BaseAddonContainer) { BaseAddonContainer container = (BaseAddonContainer)item; count = container.Components.Count; addon = container; } if (count == 1 && Core.SE) { isDecorableComponent = true; } if (this.m_Decorator.Command == DecorateCommand.Turn) { FlipableAddonAttribute[] attributes = (FlipableAddonAttribute[])addon.GetType().GetCustomAttributes(typeof(FlipableAddonAttribute), false); if (attributes.Length > 0) { isDecorableComponent = true; } } } if (house == null || !house.IsCoOwner(from)) { from.SendLocalizedMessage(502092); // You must be in your house to do this. } else if (item.Parent != null || !house.IsInside(item)) { from.SendLocalizedMessage(1042270); // That is not in your house. } else if (!house.IsLockedDown(item) && !house.IsSecure(item) && !isDecorableComponent) { if (item is AddonComponent && this.m_Decorator.Command == DecorateCommand.Up) { from.SendLocalizedMessage(1042274); // You cannot raise it up any higher. } else if (item is AddonComponent && this.m_Decorator.Command == DecorateCommand.Down) { from.SendLocalizedMessage(1042275); // You cannot lower it down any further. } else { from.SendLocalizedMessage(1042271); // That is not locked down. } } else if (item is VendorRentalContract) { from.SendLocalizedMessage(1062491); // You cannot use the house decorator on that object. } /*else if (item.TotalWeight + item.PileWeight > 100) * { * from.SendLocalizedMessage(1042272); // That is too heavy. * }*/ else { switch (this.m_Decorator.Command) { case DecorateCommand.Up: Up(item, from); break; case DecorateCommand.Down: Down(item, from); break; case DecorateCommand.Turn: Turn(item, from); break; } } } from.Target = new InternalTarget(this.m_Decorator); }
public InternalGump(InteriorDecorator decorator) : base(150, 50) { m_Decorator = decorator; AddBackground(0, 0, 200, 330, 2600); // Scriptiz : default height is 200, increased for arrows AddButton(50, 45, (decorator.Command == DecorateCommand.Turn ? 2154 : 2152), 2154, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(90, 50, 70, 40, 1018323, false, false); // Turn AddButton(50, 95, (decorator.Command == DecorateCommand.Up ? 2154 : 2152), 2154, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(90, 100, 70, 40, 1018324, false, false); // Up AddButton(50, 145, (decorator.Command == DecorateCommand.Down ? 2154 : 2152), 2154, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(90, 150, 70, 40, 1018325, false, false); // Down // Scriptiz : ajout du bouton pour faire glisser un objet vers l'ouest (10) if (decorator.Command == DecorateCommand.West) { AddImage(40, 180, 4507, 35); } else { AddButton(40, 180, 4507, 4507, 10, GumpButtonType.Reply, 0); } // Scriptiz : ajout du bouton pour faire glisser un objet vers le nord (11) if (decorator.Command == DecorateCommand.North) { AddImage(110, 180, 4501, 35); } else { AddButton(110, 180, 4501, 4501, 11, GumpButtonType.Reply, 0); } // Scriptiz : ajout du bouton pour faire glisser un objet vers l'est (12) if (decorator.Command == DecorateCommand.East) { AddImage(110, 250, 4503, 35); } else { AddButton(110, 250, 4503, 4503, 12, GumpButtonType.Reply, 0); } // Scriptiz : ajout du bouton pour faire glisser un objet vers le sud (13) if (decorator.Command == DecorateCommand.South) { AddImage(40, 250, 4505, 35); } else { AddButton(40, 250, 4505, 4505, 13, GumpButtonType.Reply, 0); } if (Utility.Random(50) == 0) { AddLabel(63, 230, 0, "(C) Scriptiz"); } }
public InternalTarget( InteriorDecorator decorator ) : base(-1, false, TargetFlags.None) { CheckLOS = false; m_Decorator = decorator; }
public InternalGump( InteriorDecorator decorator ) : base(150, 50) { m_Decorator = decorator; AddBackground( 0, 0, 170, 360, 2600 ); AddButton( 40, 45, 2152, 2154, 1, GumpButtonType.Reply, 0 ); AddLabel( 80, 50, 1149, "Turn" ); //AddHtmlLocalized( 80, 50, 70, 40, 1018323, false, false ); // Turn AddButton( 40, 85, 2152, 2154, 2, GumpButtonType.Reply, 0 ); AddLabel( 80, 90, 1149, "Up" ); //AddHtmlLocalized( 80, 90, 70, 40, 1018324, false, false ); // Up AddButton( 40, 125, 2152, 2154, 3, GumpButtonType.Reply, 0 ); AddLabel( 80, 130, 1149, "Down" ); //AddHtmlLocalized( 80, 130, 70, 40, 1018325, false, false ); // Down // added by Greywolf AddButton( 40, 165, 2152, 2154, 4, GumpButtonType.Reply, 0 ); AddLabel( 80, 170, 1149, "North" ); //AddHtmlLocalized( 80, 170, 70, 40, 1075389, false, false ); // north AddButton( 40, 205, 2152, 2154, 5, GumpButtonType.Reply, 0 ); AddLabel( 80, 210, 1149, "East" ); //AddHtmlLocalized( 80, 210, 70, 40, 1075387, false, false ); // east AddButton( 40, 245, 2152, 2154, 6, GumpButtonType.Reply, 0 ); AddLabel( 80, 250, 1149, "South" ); //AddHtmlLocalized( 80, 250, 70, 40, 1075386, false, false ); // south AddButton( 40, 285, 2152, 2154, 7, GumpButtonType.Reply, 0 ); AddLabel( 80, 290, 1149, "West" ); //AddHtmlLocalized( 80, 290, 70, 40, 1075390, false, false ); // west // end added by Greywolf }
protected override void OnTarget(Mobile from, object targeted) { if (targeted == m_Decorator) { m_Decorator.Command = DecorateCommand.None; from.SendGump(new InternalGump(m_Decorator)); } else if (targeted is BaseCrop) { from.SendMessage("you can not move plants using this"); } else if (targeted is Item && InteriorDecorator.CheckUse(m_Decorator, from)) { BaseHouse house = BaseHouse.FindHouseAt(from); Item item = (Item)targeted; Map imap = item.Map; IPoint3D p = targeted as IPoint3D; bool isaddon = false; if (item is AddonComponent) { isaddon = true; } AddonComponent acomp = null; if (isaddon) { acomp = item as AddonComponent; } BaseAddon mainadd = null; if (isaddon) { mainadd = acomp.Addon; } bool couldfit = false; if (isaddon) { couldfit = (mainadd.CouldFit(p, imap, from, ref house) != AddonFitResult.NotInHouse); } if (house == null || !house.IsCoOwner(from)) { from.SendLocalizedMessage(502092); } else if (isaddon && couldfit == false) { from.SendMessage("That would move the item to far out of the house, or off a wall"); } else if (item.Parent != null || !house.IsInside(item)) { from.SendLocalizedMessage(1042270); } else if (!house.IsLockedDown(item) && !house.IsSecure(item) && (item.Movable)) { from.SendLocalizedMessage(1042271); } else if (item is VendorRentalContract) { from.SendLocalizedMessage(1062491); } else if (item is HouseTeleporter) { from.SendMessage("Can not move House Teleporters!!!!"); } else { switch (m_Decorator.Command) { case DecorateCommand.Up: Up(item, from); break; case DecorateCommand.Down: Down(item, from); break; case DecorateCommand.Turn: Turn(item, from); break; case DecorateCommand.North: North(item, from); break; case DecorateCommand.East: East(item, from); break; case DecorateCommand.South: South(item, from); break; case DecorateCommand.West: West(item, from); break; } } } }
public InternalGump( InteriorDecorator decorator ) : base(150, 50) { m_Decorator = decorator; AddBackground( 0, 0, 200, 200, 2600 ); AddButton( 50, 45, ( decorator.Command == DecorateCommand.Turn ? 2154 : 2152 ), 2154, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 90, 50, 70, 40, 1018323, false, false ); // Turn AddButton( 50, 95, ( decorator.Command == DecorateCommand.Up ? 2154 : 2152 ), 2154, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 90, 100, 70, 40, 1018324, false, false ); // Up AddButton( 50, 145, ( decorator.Command == DecorateCommand.Down ? 2154 : 2152 ), 2154, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 90, 150, 70, 40, 1018325, false, false ); // Down }
public InternalGump(InteriorDecorator decorator) : base(150, 50) { m_Decorator = decorator; AddBackground(0, 0, 200, 330, 2600); // Scriptiz : default height is 200, increased for arrows AddButton(50, 45, (decorator.Command == DecorateCommand.Turn ? 2154 : 2152), 2154, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(90, 50, 70, 40, 1018323, false, false); // Turn AddButton(50, 95, (decorator.Command == DecorateCommand.Up ? 2154 : 2152), 2154, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(90, 100, 70, 40, 1018324, false, false); // Up AddButton(50, 145, (decorator.Command == DecorateCommand.Down ? 2154 : 2152), 2154, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(90, 150, 70, 40, 1018325, false, false); // Down // Scriptiz : ajout du bouton pour faire glisser un objet vers l'ouest (10) if (decorator.Command == DecorateCommand.West) AddImage(40, 180, 4507, 35); else AddButton(40, 180, 4507, 4507, 10, GumpButtonType.Reply, 0); // Scriptiz : ajout du bouton pour faire glisser un objet vers le nord (11) if (decorator.Command == DecorateCommand.North) AddImage(110, 180, 4501, 35); else AddButton(110, 180, 4501, 4501, 11, GumpButtonType.Reply, 0); // Scriptiz : ajout du bouton pour faire glisser un objet vers l'est (12) if (decorator.Command == DecorateCommand.East) AddImage(110, 250, 4503, 35); else AddButton(110, 250, 4503, 4503, 12, GumpButtonType.Reply, 0); // Scriptiz : ajout du bouton pour faire glisser un objet vers le sud (13) if (decorator.Command == DecorateCommand.South) AddImage(40, 250, 4505, 35); else AddButton(40, 250, 4505, 4505, 13, GumpButtonType.Reply, 0); if (Utility.Random(50) == 0) AddLabel(63, 230, 0, "(C) Scriptiz"); }
public InternalGump( InteriorDecorator decorator ) : base(150, 50) { m_Decorator = decorator; AddBackground( 0, 0, 170, 200, 2600 ); AddPage( 0 ); if ( m_Decorator.Command == DecorateCommand.Turn ) AddButton( 40, 36, 0x869, 0x86A, 1, GumpButtonType.Reply, 0 ); else AddButton( 40, 36, 0x868, 0x869, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 41, 100, 20, 1018323, 0x0, false, false ); // Turn if ( m_Decorator.Command == DecorateCommand.Up ) AddButton( 40, 86, 0x869, 0x86A, 2, GumpButtonType.Reply, 0 ); else AddButton( 40, 86, 0x868, 0x869, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 91, 100, 20, 1018324, 0x0, false, false ); // Up if ( m_Decorator.Command == DecorateCommand.Down ) AddButton( 40, 136, 0x869, 0x86A, 3, GumpButtonType.Reply, 0 ); else AddButton( 40, 136, 0x868, 0x869, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 80, 141, 100, 20, 1018325, 0x0, false, false ); // Down }