public void Chop(Mobile from) { if (from.InRange(this.GetWorldLocation(), 1)) { if (from == m_sower) { from.Direction = from.GetDirectionTo(this); double lumberValue = from.Skills[SkillName.Lumberjacking].Value / 100; if ((lumberValue > .5) && (Utility.RandomDouble() <= lumberValue)) { Ginseng fruit = new Ginseng(Utility.Random(m_yield + 2)); from.AddToBackpack(fruit); } this.Delete(); from.SendMessage("You chop the plant up"); } else { from.SendMessage("You do not own this plant !!!"); } } else { from.SendLocalizedMessage(500446); } }
public InternalSellInfo() { Add(typeof(Bottle), Bottle.GetSBSellValue()); Add(typeof(MortarPestle), MortarPestle.GetSBSellValue()); Add(typeof(BlackPearl), BlackPearl.GetSBSellValue()); Add(typeof(Bloodmoss), Bloodmoss.GetSBSellValue()); Add(typeof(MandrakeRoot), MandrakeRoot.GetSBSellValue()); Add(typeof(Garlic), Garlic.GetSBSellValue()); Add(typeof(Ginseng), Ginseng.GetSBSellValue()); Add(typeof(Nightshade), Nightshade.GetSBSellValue()); Add(typeof(SpidersSilk), SpidersSilk.GetSBSellValue()); Add(typeof(SulfurousAsh), SulfurousAsh.GetSBSellValue()); Add(typeof(LesserMagicResistPotion), LesserMagicResistPotion.GetSBSellValue()); Add(typeof(AgilityPotion), AgilityPotion.GetSBSellValue()); Add(typeof(StrengthPotion), StrengthPotion.GetSBSellValue()); Add(typeof(RefreshPotion), RefreshPotion.GetSBSellValue()); Add(typeof(LesserCurePotion), LesserCurePotion.GetSBSellValue()); Add(typeof(LesserHealPotion), LesserHealPotion.GetSBSellValue()); Add(typeof(LesserPoisonPotion), LesserPoisonPotion.GetSBSellValue()); Add(typeof(LesserExplosionPotion), LesserExplosionPotion.GetSBSellValue()); Add(typeof(HairDye), HairDye.GetSBSellValue()); }
public InternalBuyInfo() { Add(new GenericBuyInfo("Bottle", typeof(Bottle), Bottle.GetSBPurchaseValue(), 200, 0xF0E, 0)); Add(new GenericBuyInfo("Mortar and Pestle", typeof(MortarPestle), MortarPestle.GetSBPurchaseValue(), 10, 0xE9B, 0)); Add(new GenericBuyInfo("Black Pearl", typeof(BlackPearl), BlackPearl.GetSBPurchaseValue(), 500, 0xF7A, 0)); Add(new GenericBuyInfo("Bloodmoss", typeof(Bloodmoss), Bloodmoss.GetSBPurchaseValue(), 500, 0xF7B, 0)); Add(new GenericBuyInfo("Mandrake Root", typeof(MandrakeRoot), MandrakeRoot.GetSBPurchaseValue(), 500, 0xF86, 0)); Add(new GenericBuyInfo("Garlic", typeof(Garlic), Garlic.GetSBPurchaseValue(), 500, 0xF84, 0)); Add(new GenericBuyInfo("Ginseng", typeof(Ginseng), Ginseng.GetSBPurchaseValue(), 500, 0xF85, 0)); Add(new GenericBuyInfo("Nightshade", typeof(Nightshade), Nightshade.GetSBPurchaseValue(), 500, 0xF88, 0)); Add(new GenericBuyInfo("Spider Silk", typeof(SpidersSilk), SpidersSilk.GetSBPurchaseValue(), 500, 0xF8D, 0)); Add(new GenericBuyInfo("Sulfurous Ash", typeof(SulfurousAsh), SulfurousAsh.GetSBPurchaseValue(), 500, 0xF8C, 0)); Add(new GenericBuyInfo("Lesser Heal Potion", typeof(LesserHealPotion), LesserHealPotion.GetSBPurchaseValue(), 50, 0xF0C, 0)); Add(new GenericBuyInfo("Lesser Cure Potion", typeof(LesserCurePotion), LesserCurePotion.GetSBPurchaseValue(), 50, 0xF07, 0)); Add(new GenericBuyInfo("Refresh Potion", typeof(RefreshPotion), RefreshPotion.GetSBPurchaseValue(), 50, 0xF0B, 0)); Add(new GenericBuyInfo("Agility Potion", typeof(AgilityPotion), AgilityPotion.GetSBPurchaseValue(), 50, 0xF08, 0)); Add(new GenericBuyInfo("Strength Potion", typeof(StrengthPotion), StrengthPotion.GetSBPurchaseValue(), 50, 0xF09, 0)); Add(new GenericBuyInfo("Lesser Magic Resist Potion", typeof(LesserMagicResistPotion), LesserMagicResistPotion.GetSBPurchaseValue(), 10, 0xF06, 0)); Add(new GenericBuyInfo("Lesser Poison Potion", typeof(LesserPoisonPotion), LesserPoisonPotion.GetSBPurchaseValue(), 50, 0xF0A, 0)); Add(new GenericBuyInfo("Lesser Explosion Potion", typeof(LesserExplosionPotion), LesserExplosionPotion.GetSBPurchaseValue(), 50, 0xF0D, 0)); Add(new GenericBuyInfo("Hair Dye", typeof(HairDye), HairDye.GetSBPurchaseValue(), 10, 0xEFF, 0)); }
public InternalSellInfo() { //TEST: FIX THIS !!!!! //TEST: DETERMINE SPELL SCROLL PRICES /* * Type[] types = Loot.RegularScrollTypes; * * for (int i = 0; i < types.Length; ++i) * { * Type type = types[i]; * * var ci = Server.Engines.Craft.DefInscription.CraftSystem.CraftItems.SearchFor(type); * * if (ci == null) * continue; * * var res = ci.Resources; * * int cost = 0; * * foreach (CraftRes c in ci.Resources) * cost += CostOfResource(c.ItemType); * * int level = ((i + 1) / 8) / 2; * * cost += LevelBonusFor(level); * * cost *= 3; * * int count = res.Count; * * //TEST: DETERMINE SCROLL SELL PRICES * Add(type, Math.Min(6 + ((i / 8) * 5), cost)); * } */ Add(typeof(BlackPearl), BlackPearl.GetSBSellValue()); Add(typeof(Bloodmoss), Bloodmoss.GetSBSellValue()); Add(typeof(MandrakeRoot), MandrakeRoot.GetSBSellValue()); Add(typeof(Garlic), Garlic.GetSBSellValue()); Add(typeof(Ginseng), Ginseng.GetSBSellValue()); Add(typeof(Nightshade), Nightshade.GetSBSellValue()); Add(typeof(SpidersSilk), SpidersSilk.GetSBSellValue()); Add(typeof(SulfurousAsh), SulfurousAsh.GetSBSellValue()); Add(typeof(RecallRune), RecallRune.GetSBSellValue()); Add(typeof(BlankScroll), BlankScroll.GetSBSellValue()); Add(typeof(Spellbook), Spellbook.GetSBSellValue()); Add(typeof(ScribesPen), ScribesPen.GetSBSellValue()); Add(typeof(MagicWizardsHat), MagicWizardsHat.GetSBSellValue()); }
public InternalSellInfo() { Add(typeof(Bottle), Bottle.GetSBSellValue()); Add(typeof(MortarPestle), MortarPestle.GetSBSellValue()); Add(typeof(BlackPearl), BlackPearl.GetSBSellValue()); Add(typeof(Bloodmoss), Bloodmoss.GetSBSellValue()); Add(typeof(MandrakeRoot), MandrakeRoot.GetSBSellValue()); Add(typeof(Garlic), Garlic.GetSBSellValue()); Add(typeof(Ginseng), Ginseng.GetSBSellValue()); Add(typeof(Nightshade), Nightshade.GetSBSellValue()); Add(typeof(SpidersSilk), SpidersSilk.GetSBSellValue()); Add(typeof(SulfurousAsh), SulfurousAsh.GetSBSellValue()); }
public InternalBuyInfo() { Add(new GenericBuyInfo("Bottle", typeof(Bottle), Bottle.GetSBPurchaseValue(), 200, 0xF0E, 0)); Add(new GenericBuyInfo("Mortar and Pestle", typeof(MortarPestle), MortarPestle.GetSBPurchaseValue(), 10, 0xE9B, 0)); Add(new GenericBuyInfo("Black Pearl", typeof(BlackPearl), BlackPearl.GetSBPurchaseValue(), 500, 0xF7A, 0)); Add(new GenericBuyInfo("Bloodmoss", typeof(Bloodmoss), Bloodmoss.GetSBPurchaseValue(), 500, 0xF7B, 0)); Add(new GenericBuyInfo("Mandrake Root", typeof(MandrakeRoot), MandrakeRoot.GetSBPurchaseValue(), 500, 0xF86, 0)); Add(new GenericBuyInfo("Garlic", typeof(Garlic), Garlic.GetSBPurchaseValue(), 500, 0xF84, 0)); Add(new GenericBuyInfo("Ginseng", typeof(Ginseng), Ginseng.GetSBPurchaseValue(), 500, 0xF85, 0)); Add(new GenericBuyInfo("Nightshade", typeof(Nightshade), Nightshade.GetSBPurchaseValue(), 500, 0xF88, 0)); Add(new GenericBuyInfo("Spider Silk", typeof(SpidersSilk), SpidersSilk.GetSBPurchaseValue(), 500, 0xF8D, 0)); Add(new GenericBuyInfo("Sulfurous Ash", typeof(SulfurousAsh), SulfurousAsh.GetSBPurchaseValue(), 500, 0xF8C, 0)); }
public override bool LootItem(Mobile from) { if (Utility.RandomDouble() <= .05) { GinsengSeed item = new GinsengSeed(); from.AddToBackpack(item); from.SendMessage("You manage to gather 1 ginseng seed."); } Ginseng c = new Ginseng(); c.ItemID = 3973; from.AddToBackpack(c); from.SendMessage("You manage to gather 1 ginseng."); return(true); }
public InternalBuyInfo() { //TEST: FIX THIS!!!! /* * Type[] types = Loot.RegularScrollTypes; * * //for ( int i = 0; i < types.Length; ++i ) * for ( int i = 0; i < 32; ++i ) * * { * int itemID = 0x1F2E + i; * * if ( i == 6 ) * itemID = 0x1F2D; * * else if ( i > 6 ) * --itemID; * * //TEST: DETERMINE SCROLL PRICES * Add( new GenericBuyInfo( types[i], 12 + ((i / 3) * 10), 20, itemID, 0 ) ); * } */ Add(new GenericBuyInfo("Black Pearl", typeof(BlackPearl), BlackPearl.GetSBPurchaseValue(), 500, 0xF7A, 0)); Add(new GenericBuyInfo("Bloodmoss", typeof(Bloodmoss), Bloodmoss.GetSBPurchaseValue(), 500, 0xF7B, 0)); Add(new GenericBuyInfo("Mandrake Root", typeof(MandrakeRoot), MandrakeRoot.GetSBPurchaseValue(), 500, 0xF86, 0)); Add(new GenericBuyInfo("Garlic", typeof(Garlic), Garlic.GetSBPurchaseValue(), 500, 0xF84, 0)); Add(new GenericBuyInfo("Ginseng", typeof(Ginseng), Ginseng.GetSBPurchaseValue(), 500, 0xF85, 0)); Add(new GenericBuyInfo("Nightshade", typeof(Nightshade), Nightshade.GetSBPurchaseValue(), 500, 0xF88, 0)); Add(new GenericBuyInfo("Spider Silk", typeof(SpidersSilk), SpidersSilk.GetSBPurchaseValue(), 500, 0xF8D, 0)); Add(new GenericBuyInfo("Sulfurous Ash", typeof(SulfurousAsh), SulfurousAsh.GetSBPurchaseValue(), 500, 0xF8C, 0)); Add(new GenericBuyInfo("Recall Rune", typeof(RecallRune), RecallRune.GetSBPurchaseValue(), 50, 0x1f14, 0)); Add(new GenericBuyInfo("Spellbook", typeof(Spellbook), Spellbook.GetSBPurchaseValue(), 25, 0xEFA, 0)); Add(new GenericBuyInfo("Blank Scroll", typeof(BlankScroll), BlankScroll.GetSBPurchaseValue(), 500, 0x0E34, 0)); Add(new GenericBuyInfo("Scribe's Pen", typeof(ScribesPen), ScribesPen.GetSBPurchaseValue(), 50, 0xFBF, 0)); Add(new GenericBuyInfo("Magical Wizard's Hat", typeof(MagicWizardsHat), MagicWizardsHat.GetSBPurchaseValue(), 25, 0x1718, 0)); }
public override void OnDoubleClick(Mobile from) { if (m_sower == null || m_sower.Deleted) { m_sower = from; } if (from.Mounted && !CropHelper.CanWorkMounted) { from.SendMessage("You cannot gather anything while mounted."); return; } if (DateTime.Now > lastpicked.AddSeconds(3)) // 3 seconds between picking { lastpicked = DateTime.Now; int mageValue = (int)from.Skills[SkillName.Magery].Value / 10; //FUTURE add two skill checks... if (mageValue == 0) { from.SendMessage("You have no idea how to pick this."); return; } if (from.InRange(this.GetWorldLocation(), 1)) { if (m_yield < 1) { from.SendMessage("There is nothing here to harvest."); if (PlayerCanDestroy && !(m_sower.AccessLevel > AccessLevel.Counselor)) { UpRootGump g = new UpRootGump(from, this); from.SendGump(g); } } else //check skill and sower { from.Direction = from.GetDirectionTo(this); from.Animate(from.Mounted ? 29 : 32, 5, 1, true, false, 0); if (from == m_sower) { mageValue *= 2; m_lastvisit = DateTime.Now; } if (mageValue > m_yield) { mageValue = m_yield + 1; } int pick = Utility.Random(mageValue); if (pick == 0) { from.SendMessage("You do not manage to harvest anything."); return; } m_yield -= pick; from.SendMessage("You manage to gather {0} ginseng!", pick); double chance = Utility.RandomDouble(); // chance to get a seed is 20% if (0.20 > chance) { from.AddToBackpack(new GinsengSeed(1)); from.SendMessage("You found a seed!"); } ((Item)this).ItemID = pickedGraphic; Ginseng crop = new Ginseng(pick); from.AddToBackpack(crop); chance = Utility.RandomDouble(); // chance to pull out plant is 10% if ((0.10 > chance) && !(m_sower.AccessLevel > AccessLevel.Counselor)) { from.SendMessage("You accidently uproot all of the ginseng plant."); regrowTimer.Stop(); this.Delete(); return; } if (SowerPickTime != TimeSpan.Zero && m_lastvisit + SowerPickTime < DateTime.Now && !(m_sower.AccessLevel > AccessLevel.Counselor)) { this.UpRoot(from); return; } if (!regrowTimer.Running) { regrowTimer.Start(); } } } else { from.SendMessage("You are too far away to gather anything."); } } }
public override void OnDoubleClick(Mobile from) { if (m_sower == null || m_sower.Deleted) { m_sower = from; } if (from != m_sower) { from.SendMessage("You do not own this plant !!!"); return; } if (from.Mounted && !CropHelper.CanWorkMounted) { from.SendMessage("You cannot harvest a crop while mounted."); return; } if (DateTime.UtcNow > lastpicked.AddSeconds(3)) { lastpicked = DateTime.UtcNow; int cookValue = (int)from.Skills[SkillName.Cooking].Value / 20; if (cookValue == 0) { from.SendMessage("You have no idea how to harvest this crop."); return; } if (from.InRange(this.GetWorldLocation(), 1)) { if (m_yield < 1) { from.SendMessage("There is nothing here to harvest."); } else { from.Direction = from.GetDirectionTo(this); from.Animate(from.Mounted ? 29:32, 5, 1, true, false, 0); m_lastvisit = DateTime.UtcNow; if (cookValue > m_yield) { cookValue = m_yield + 1; } int pick = Utility.RandomMinMax(cookValue - 4, cookValue); if (pick < 0) { pick = 0; } if (pick == 0) { from.SendMessage("You do not manage to harvest any crops."); return; } m_yield -= pick; from.SendMessage("You harvest {0} crop{1}!", pick, (pick == 1 ? "" : "s")); if (m_yield < 1) { ((Item)this).ItemID = pickedGraphic; } Ginseng crop = new Ginseng(pick); from.AddToBackpack(crop); if (!regrowTimer.Running) { regrowTimer.Start(); } } } else { from.SendMessage("You are too far away to harvest anything."); } } }
public override void OnDoubleClick(Mobile from) { if (m_sower == null || m_sower.Deleted) { m_sower = from; } if (from.Mounted && !CropHelper.CanWorkMounted) { from.SendMessage("You cannot harvest a crop while mounted."); return; } if (DateTime.Now > lastpicked.AddSeconds(3)) // 3 seconds between picking { lastpicked = DateTime.Now; int mageValue = (int)from.Skills[SkillName.Magery].Value / 20; //FUTURE add two skill checks... if (mageValue == 0) { from.SendMessage("You have no idea how to harvest this crop."); return; } if (from.InRange(this.GetWorldLocation(), 1)) { if (m_yield < 1) { from.SendMessage("There is nothing here to harvest."); if (PlayerCanDestroy && !(m_sower.AccessLevel > AccessLevel.Counselor)) { UpRootGump g = new UpRootGump(from, this); from.SendGump(g); } } else //check skill and sower { from.Direction = from.GetDirectionTo(this); from.Animate(from.Mounted ? 29:32, 5, 1, true, false, 0); if (from == m_sower) { mageValue *= 2; m_lastvisit = DateTime.Now; } if (mageValue > m_yield) { mageValue = m_yield + 1; } int pick = Utility.Random(mageValue); if (pick == 0) { from.SendMessage("You do not manage to harvest any crops."); return; } m_yield -= pick; from.SendMessage("You harvest {0} crop{1}!", pick, (pick == 1 ? "" : "s")); //PublicOverheadMessage( MessageType.Regular, 0x3BD, false, string.Format( "{0}", m_yield )); ((Item)this).ItemID = pickedGraphic; Ginseng crop = new Ginseng(pick); from.AddToBackpack(crop); if (SowerPickTime != TimeSpan.Zero && m_lastvisit + SowerPickTime < DateTime.Now && !(m_sower.AccessLevel > AccessLevel.Counselor)) { this.UpRoot(from); return; } if (!regrowTimer.Running) { regrowTimer.Start(); } } } else { from.SendMessage("You are too far away to harvest anything."); } } }