private void Process( Mobile from ) { Item rewardItem; switch( m_Skill.SkillID ) { case 0: // alchemy rewardItem = new MortarPestle(); break; case 7: // Blacksmithy rewardItem = new GMSmithHammer(); break; case 8: // Bowcraft/fletching rewardItem = new Bow(); break; case 11: // Carpentry switch (m_Itemid) { case 4138: rewardItem = new Hammer(); break; case 4148: rewardItem = new Saw(); break; case 4146: rewardItem = new SmoothingPlane(); break; case 4325: rewardItem = new Froe(); break; case 4326: rewardItem = new Inshave(); break; case 4324: rewardItem = new DrawKnife(); break; default: return; } break; case 23: // Inscription rewardItem = new ScribesPen(); break; case 25: // Magery rewardItem = new Spellbook(); ( rewardItem as Spellbook ).Content = ulong.MaxValue; (rewardItem as Spellbook).LootType = LootType.Blessed; break; case 34: // Tailoring rewardItem = new RewardDyeTub(); break; case 35: // Animal Taming rewardItem = new ShepherdsCrook(); break; case 44: //Lumberjacking rewardItem = new Hatchet(); break; case 45: // Mining rewardItem = new Pickaxe(); break; //Bardic skills case 9: case 15: case 22: case 29: switch (m_Itemid) { case 3740: rewardItem = new Drums(); break; case 3761: rewardItem = new Harp(); break; case 3762: rewardItem = new LapHarp(); break; case 3763: rewardItem = new Lute(); break; case 3741: rewardItem = new Tambourine(); break; case 3742: rewardItem = new TambourineTassel(); break; default: return; } break; //"Thieving" skills case 21: case 28: case 33: case 47: rewardItem = new Cloak(); break; default: return; } rewardItem.Hue = m_CurrentHue; rewardItem.LootType = LootType.Blessed; if( m_Name != "" ) rewardItem.Name = m_Name; if( rewardItem is RewardDyeTub ) { var tub = (RewardDyeTub)rewardItem; tub.DyedHue = rewardItem.Hue; tub.Redyable = false; tub.LootType = LootType.Blessed; tub.Owner = from; } else if( rewardItem is GMSmithHammer ) { var hammer = (GMSmithHammer)rewardItem; hammer.Owner = from; } from.AddToBackpack( rewardItem ); // Log RewardLogging.WriteLine( from, m_Skill, m_Name, m_CurrentHue ); }
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 ); } } } }