protected override void OnTarget(Mobile from, object target) { if (target is BlankMap) { Item item = (Item)target; BaseTool tool = new MapmakersPen(); if (item.RootParent != from) from.SendAsciiMessage("That must be in your pack for you to use it."); else from.SendMenu(new CartographyMenu(from, CartographyMenu.Main(from), "Main", tool)); if (tool != null) tool.Delete(); } else if (target is WorldMap || target is LocalMap || target is CityMap || target is SeaChart) //from.Send(new AsciiMessage(((Item)target).Serial, ((Item)target).ItemID, MessageType.Regular, 0, 3, "", "You cannot overwrite this carefully hand-drawn map!")); from.SendAsciiMessage("You cannot overwrite this carefully hand-drawn map!"); else { from.SendAsciiMessage("This is not a map."); /*if (target is Item) from.Send(new AsciiMessage(((Item)target).Serial, ((Item)target).ItemID, MessageType.Regular, 0, 3, "", "This is not a map."));*/ } }
public override void OnDestroyed( WoodenBox lootbox ) { Item book; if( Utility.RandomBool( ) ) { book = new BlueBook( ); } else { book = new BrownBook( ); } if( book != null || !book.Deleted ) lootbox.DropItem( book ); if( Utility.RandomDouble( ) < 0.25 ) { Item loot; if( Utility.RandomBool( ) ) { loot = new ScribesPen( ); } else { loot = new MapmakersPen( ); } if( loot != null || !loot.Deleted ) lootbox.DropItem( loot ); } }
public override void OnDestroyed(WoodenBox lootbox) { Item book; if (Utility.RandomBool( )) { book = new BlueBook( ); } else { book = new BrownBook( ); } if (book != null || !book.Deleted) { lootbox.DropItem(book); } if (Utility.RandomDouble( ) < 0.25) { Item loot; if (Utility.RandomBool( )) { loot = new ScribesPen( ); } else { loot = new MapmakersPen( ); } if (loot != null || !loot.Deleted) { lootbox.DropItem(loot); } } }
public override void OnResponse( NetState state, RelayInfo info ) { PlayerMobile m = m_user; ToolBox box = i_box; BaseTool tool; BaseHarvestTool toola; Container pack = m.Backpack; switch ( info.ButtonID ) { default: { break; } case 1: { break; } case 2: { box.OW( m ); break; } case 3: { tool = new Tongs(); tool.UsesRemaining = box.i_S; pack.DropItem( tool ); box.i_S = 0; break; } case 4: { tool = new MouldingPlane(); tool.UsesRemaining = box.i_C; pack.DropItem( tool ); box.i_C = 0; break; } case 5: { tool = new TinkerTools(); tool.UsesRemaining = box.i_Ti; pack.DropItem( tool ); box.i_Ti = 0; break; } case 6: { tool = new SewingKit(); tool.UsesRemaining = box.i_T; pack.DropItem( tool ); box.i_T = 0; break; } case 7: { tool = new Blowpipe(); tool.UsesRemaining = box.i_G; pack.DropItem( tool ); box.i_G = 0; break; } case 8: { tool = new ScribesPen(); tool.UsesRemaining = box.i_Sc; pack.DropItem( tool ); box.i_Sc = 0; break; } case 9: { toola = new Shovel(); toola.UsesRemaining = box.i_M; pack.DropItem( toola ); box.i_M = 0; break; } case 10: { tool = new Skillet(); tool.UsesRemaining = box.i_Co; pack.DropItem( tool ); box.i_Co = 0; break; } case 11: { tool = new FletcherTools(); tool.UsesRemaining = box.i_F; pack.DropItem( tool ); box.i_F = 0; break; } case 12: { tool = new MortarPestle(); tool.UsesRemaining = box.i_A; pack.DropItem( tool ); box.i_A = 0; break; } case 13: { tool = new MalletAndChisel(); tool.UsesRemaining = box.i_St; pack.DropItem( tool ); box.i_St = 0; break; } case 14: { tool = new MapmakersPen(); tool.UsesRemaining = box.i_Ca; pack.DropItem( tool ); box.i_Ca = 0; break; } } if ( info.ButtonID > 2 ) { box.NG( m, box ); } } } }