Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
115
Scripts/Services/PointsSystems/BlackthornData.cs
Normal file
115
Scripts/Services/PointsSystems/BlackthornData.cs
Normal file
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using Server;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.ResortAndCasino;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class BlackthornData : PointsSystem
|
||||
{
|
||||
public override PointsType Loyalty { get { return PointsType.Blackthorn; } }
|
||||
public override TextDefinition Name { get { return m_Name; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return double.MaxValue; } }
|
||||
public override bool ShowOnLoyaltyGump { get { return false; } }
|
||||
|
||||
private TextDefinition m_Name = null;
|
||||
|
||||
public BlackthornData()
|
||||
{
|
||||
DungeonPoints = new Dictionary<Mobile, int>();
|
||||
}
|
||||
|
||||
public override void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
from.SendLocalizedMessage(1154518, ((int)points).ToString()); // You have turned in ~1_COUNT~ artifacts bearing the crest of Minax.
|
||||
}
|
||||
|
||||
public override void ProcessKill(Mobile victim, Mobile damager)
|
||||
{
|
||||
var bc = victim as BaseCreature;
|
||||
|
||||
if (bc == null || bc.Controlled || bc.Summoned || !damager.Alive || damager.Deleted)
|
||||
return;
|
||||
|
||||
Region r = bc.Region;
|
||||
|
||||
if (damager is PlayerMobile && r.IsPartOf("BlackthornDungeon"))
|
||||
{
|
||||
if (!DungeonPoints.ContainsKey(damager))
|
||||
DungeonPoints[damager] = 0;
|
||||
|
||||
int fame = bc.Fame / 2;
|
||||
int luck = Math.Max(0, ((PlayerMobile)damager).RealLuck);
|
||||
|
||||
DungeonPoints[damager] += (int)(fame * (1 + Math.Sqrt(luck) / 100));
|
||||
|
||||
int x = DungeonPoints[damager];
|
||||
const double A = 0.000863316841;
|
||||
const double B = 0.00000425531915;
|
||||
|
||||
double chance = A * Math.Pow(10, B * x);
|
||||
|
||||
if (chance > Utility.RandomDouble())
|
||||
{
|
||||
Item i = Loot.RandomArmorOrShieldOrWeaponOrJewelry(LootPackEntry.IsInTokuno(bc), LootPackEntry.IsMondain(bc), LootPackEntry.IsStygian(bc));
|
||||
|
||||
if (i != null)
|
||||
{
|
||||
RunicReforging.GenerateRandomItem(i, damager, Math.Max(100, RunicReforging.GetDifficultyFor(bc)), RunicReforging.GetLuckForKiller(bc), ReforgedPrefix.None, ReforgedSuffix.Minax);
|
||||
|
||||
damager.PlaySound(0x5B4);
|
||||
damager.SendLocalizedMessage(1062317); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
|
||||
|
||||
if (!damager.PlaceInBackpack(i))
|
||||
{
|
||||
if (damager.BankBox != null && damager.BankBox.TryDropItem(damager, i, false))
|
||||
damager.SendLocalizedMessage(1079730); // The item has been placed into your bank box.
|
||||
else
|
||||
{
|
||||
damager.SendLocalizedMessage(1072523); // You find an artifact, but your backpack and bank are too full to hold it.
|
||||
i.MoveToWorld(damager.Location, damager.Map);
|
||||
}
|
||||
}
|
||||
|
||||
DungeonPoints.Remove(damager);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<Mobile, int> DungeonPoints { get; set; }
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(DungeonPoints.Count);
|
||||
foreach (KeyValuePair<Mobile, int> kvp in DungeonPoints)
|
||||
{
|
||||
writer.Write(kvp.Key);
|
||||
writer.Write(kvp.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
int count = reader.ReadInt();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
Mobile m = reader.ReadMobile();
|
||||
int points = reader.ReadInt();
|
||||
|
||||
if (m != null && points > 0)
|
||||
DungeonPoints[m] = points;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Scripts/Services/PointsSystems/CasinoData.cs
Normal file
55
Scripts/Services/PointsSystems/CasinoData.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using Server;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.ResortAndCasino;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class CasinoData : PointsSystem
|
||||
{
|
||||
public override PointsType Loyalty { get { return PointsType.CasinoData; } }
|
||||
public override TextDefinition Name { get { return m_Name; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return double.MaxValue; } }
|
||||
public override bool ShowOnLoyaltyGump { get { return false; } }
|
||||
|
||||
public static readonly int ChipCost = 100;
|
||||
|
||||
private TextDefinition m_Name = new TextDefinition(1153485); // Fortune's Fire Resort & Casino
|
||||
|
||||
public CasinoData()
|
||||
{
|
||||
}
|
||||
|
||||
public override void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
//from.SendLocalizedMessage(1153189, ((int)points).ToString());
|
||||
}
|
||||
|
||||
public override TextDefinition GetTitle(PlayerMobile from)
|
||||
{
|
||||
return new TextDefinition(1153485); // Fortune's Fire Resort & Casino
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
if (Version >= 2)
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
|
||||
// all deserialize code in here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
979
Scripts/Services/PointsSystems/CleanUpBritanniaData.cs
Normal file
979
Scripts/Services/PointsSystems/CleanUpBritanniaData.cs
Normal file
@@ -0,0 +1,979 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
using Server.Engines.Quests.Doom;
|
||||
using Server.Accounting;
|
||||
using Server.Engines.Craft;
|
||||
using Server.SkillHandlers;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class CleanUpBritanniaData : PointsSystem
|
||||
{
|
||||
public override PointsType Loyalty { get { return PointsType.CleanUpBritannia; } }
|
||||
public override TextDefinition Name { get { return m_Name; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return double.MaxValue; } }
|
||||
public override bool ShowOnLoyaltyGump { get { return false; } }
|
||||
|
||||
private TextDefinition m_Name = null;
|
||||
|
||||
public static bool Enabled { get; set; }
|
||||
|
||||
public CleanUpBritanniaData()
|
||||
{
|
||||
Enabled = Core.ML;
|
||||
|
||||
if (Enabled)
|
||||
{
|
||||
InitializeEntries();
|
||||
PointsExchange = new Dictionary<string, double>();
|
||||
}
|
||||
}
|
||||
|
||||
public static double GetPoints(Item item)
|
||||
{
|
||||
if (item is IVvVItem && ((IVvVItem)item).IsVvVItem)
|
||||
return 0;
|
||||
|
||||
double points = 0;
|
||||
|
||||
Type type = item.GetType();
|
||||
|
||||
if (Entries.ContainsKey(type))
|
||||
{
|
||||
points = Entries[type];
|
||||
|
||||
// Kind of ametuar, but if this arrizes more, we'll make a seperate function
|
||||
if (item is SOS && ((SOS)item).IsAncient)
|
||||
points = 2500;
|
||||
|
||||
if (item.Stackable)
|
||||
points = points * item.Amount;
|
||||
|
||||
return points;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item is RunicHammer)
|
||||
{
|
||||
RunicHammer hammer = (RunicHammer)item;
|
||||
|
||||
if (hammer.Resource == CraftResource.DullCopper)
|
||||
points = 5 * hammer.UsesRemaining;
|
||||
else if (hammer.Resource == CraftResource.ShadowIron)
|
||||
points = 10 * hammer.UsesRemaining;
|
||||
else if (hammer.Resource == CraftResource.Copper)
|
||||
points = 25 * hammer.UsesRemaining;
|
||||
else if (hammer.Resource == CraftResource.Bronze)
|
||||
points = 100 * hammer.UsesRemaining;
|
||||
else if (hammer.Resource == CraftResource.Gold)
|
||||
points = 250 * hammer.UsesRemaining;
|
||||
else if (hammer.Resource == CraftResource.Agapite)
|
||||
points = 1000 * hammer.UsesRemaining;
|
||||
else if (hammer.Resource == CraftResource.Verite)
|
||||
points = 4000 * hammer.UsesRemaining;
|
||||
else if (hammer.Resource == CraftResource.Valorite)
|
||||
points = 8000 * hammer.UsesRemaining;
|
||||
}
|
||||
else if (item is RunicSewingKit)
|
||||
{
|
||||
RunicSewingKit sewing = (RunicSewingKit)item;
|
||||
|
||||
if (sewing.Resource == CraftResource.SpinedLeather)
|
||||
points = 10 * sewing.UsesRemaining;
|
||||
else if (sewing.Resource == CraftResource.HornedLeather)
|
||||
points = 100 * sewing.UsesRemaining;
|
||||
else if (sewing.Resource == CraftResource.BarbedLeather)
|
||||
points = 400 * sewing.UsesRemaining;
|
||||
}
|
||||
else if (item is PowerScroll)
|
||||
{
|
||||
PowerScroll ps = (PowerScroll)item;
|
||||
|
||||
if (ps.Value == 105)
|
||||
points = 50;
|
||||
else if (ps.Value == 110)
|
||||
points = 100;
|
||||
else if (ps.Value == 115)
|
||||
points = 500;
|
||||
else if (ps.Value == 120)
|
||||
points = 2500;
|
||||
}
|
||||
else if (item is ScrollOfTranscendence)
|
||||
{
|
||||
SpecialScroll sot = (SpecialScroll)item;
|
||||
|
||||
points = sot.Value / 0.1 * 2;
|
||||
}
|
||||
else if (item is Bait)
|
||||
{
|
||||
Bait bait = (Bait)item;
|
||||
|
||||
points = 10 * bait.UsesRemaining;
|
||||
}
|
||||
else if (item is TreasureMap)
|
||||
{
|
||||
TreasureMap tmap = (TreasureMap)item;
|
||||
|
||||
if (TreasureMapInfo.NewSystem)
|
||||
{
|
||||
switch (tmap.Level)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
case 1: return 50;
|
||||
case 2: return 250;
|
||||
case 3: return 750;
|
||||
case 4: return 1000;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tmap.Level)
|
||||
{
|
||||
default:
|
||||
case 0: return 25;
|
||||
case 1: return 50;
|
||||
case 2: return 100;
|
||||
case 3: return 250;
|
||||
case 4: return 500;
|
||||
case 5: return 750;
|
||||
case 6:
|
||||
case 7: return 1000;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (item is MidnightBracers && item.LootType == LootType.Cursed)
|
||||
{
|
||||
points = 5000;
|
||||
}
|
||||
else if (item is MonsterStatuette)
|
||||
{
|
||||
MonsterStatuette ms = (MonsterStatuette)item;
|
||||
|
||||
if (ms.Type == MonsterStatuetteType.Slime)
|
||||
points = 5000;
|
||||
}
|
||||
else if (item is PigmentsOfTokuno || item is LesserPigmentsOfTokuno)
|
||||
{
|
||||
BasePigmentsOfTokuno pigments = (BasePigmentsOfTokuno)item;
|
||||
points = 500 * pigments.UsesRemaining;
|
||||
}
|
||||
else if (item is ICombatEquipment)
|
||||
{
|
||||
points = GetPointsForEquipment(item);
|
||||
}
|
||||
|
||||
if (item.LootType != LootType.Blessed && points < 100 && item is IShipwreckedItem && ((IShipwreckedItem)item).IsShipwreckedItem)
|
||||
{
|
||||
points = 100;
|
||||
}
|
||||
|
||||
return points;
|
||||
}
|
||||
}
|
||||
|
||||
public override void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
from.SendLocalizedMessage(1151281, CleanUpBritannia.GetPoints(from).ToString()); // Your Clean Up Britannia point total is now ~1_VALUE~!
|
||||
}
|
||||
|
||||
public static Dictionary<Type, double> Entries;
|
||||
|
||||
public void InitializeEntries()
|
||||
{
|
||||
Entries = new Dictionary<Type, double>();
|
||||
|
||||
Entries[typeof(DecorativeTopiary)] = 2.0;
|
||||
|
||||
//Fishing
|
||||
Entries[typeof(LargeFishingNet)] = 500.0;
|
||||
Entries[typeof(AntiqueWeddingDress)] = 500.0;
|
||||
Entries[typeof(BronzedArmorValkyrie)] = 500.0;
|
||||
Entries[typeof(BaseCrabAndLobster)] = 1.0;
|
||||
Entries[typeof(KelpWovenLeggings)] = 500.0;
|
||||
Entries[typeof(FabledFishingNet)] = 2500.0;
|
||||
Entries[typeof(LavaRock)] = 500.0;
|
||||
Entries[typeof(SmugglersLiquor)] = 30.0;
|
||||
Entries[typeof(MessageInABottle)] = 100.0;
|
||||
Entries[typeof(SOS)] = 100.0;
|
||||
Entries[typeof(RunedDriftwoodBow)] = 500.0;
|
||||
Entries[typeof(Rope)] = 1600.0;
|
||||
Entries[typeof(SpecialFishingNet)] = 250.0;
|
||||
|
||||
//Mining
|
||||
Entries[typeof(IronIngot)] = 0.10;
|
||||
Entries[typeof(DullCopperIngot)] = 0.50;
|
||||
Entries[typeof(ShadowIronIngot)] = 0.75;
|
||||
Entries[typeof(CopperIngot)] = 1.0;
|
||||
Entries[typeof(BronzeIngot)] = 1.50;
|
||||
Entries[typeof(GoldIngot)] = 2.50;
|
||||
Entries[typeof(AgapiteIngot)] = 5.0;
|
||||
Entries[typeof(VeriteIngot)] = 8.50;
|
||||
Entries[typeof(ValoriteIngot)] = 10.0;
|
||||
Entries[typeof(Amber)] = 0.30;
|
||||
Entries[typeof(Citrine)] = 0.30;
|
||||
Entries[typeof(Ruby)] = 0.30;
|
||||
Entries[typeof(Tourmaline)] = 0.30;
|
||||
Entries[typeof(Amethyst)] = 0.30;
|
||||
Entries[typeof(Emerald)] = 0.30;
|
||||
Entries[typeof(Sapphire)] = 0.30;
|
||||
Entries[typeof(StarSapphire)] = 0.30;
|
||||
Entries[typeof(Diamond)] = 0.30;
|
||||
Entries[typeof(BlueDiamond)] = 25.0;
|
||||
Entries[typeof(FireRuby)] = 25.0;
|
||||
Entries[typeof(PerfectEmerald)] = 25.0;
|
||||
Entries[typeof(DarkSapphire)] = 25.0;
|
||||
Entries[typeof(Turquoise)] = 25.0;
|
||||
Entries[typeof(EcruCitrine)] = 25.0;
|
||||
Entries[typeof(WhitePearl)] = 25.0;
|
||||
Entries[typeof(SmallPieceofBlackrock)] = 10.0;
|
||||
|
||||
//Lumberjacking
|
||||
Entries[typeof(Board)] = 0.05;
|
||||
Entries[typeof(OakBoard)] = 0.10;
|
||||
Entries[typeof(AshBoard)] = 0.25;
|
||||
Entries[typeof(YewBoard)] = 0.50;
|
||||
Entries[typeof(HeartwoodBoard)] = 1.0;
|
||||
Entries[typeof(BloodwoodBoard)] = 2.0;
|
||||
Entries[typeof(FrostwoodBoard)] = 3.0;
|
||||
Entries[typeof(BarkFragment)] = 1.60;
|
||||
Entries[typeof(LuminescentFungi)] = 2.0;
|
||||
Entries[typeof(SwitchItem)] = 3.0;
|
||||
Entries[typeof(ParasiticPlant)] = 6.0;
|
||||
Entries[typeof(BrilliantAmber)] = 62.0;
|
||||
|
||||
//Fletching
|
||||
Entries[typeof(Arrow)] = 0.05;
|
||||
Entries[typeof(Bolt)] = 0.05;
|
||||
|
||||
//Tailoring
|
||||
Entries[typeof(Leather)] = 0.10;
|
||||
Entries[typeof(SpinedLeather)] = 0.50;
|
||||
Entries[typeof(HornedLeather)] = 1.0;
|
||||
Entries[typeof(BarbedLeather)] = 2.0;
|
||||
Entries[typeof(Fur)] = 0.10;
|
||||
|
||||
|
||||
//BOD Rewards
|
||||
Entries[typeof(Sandals)] = 2.0;
|
||||
Entries[typeof(LeatherGlovesOfMining)] = 50.0;
|
||||
Entries[typeof(StuddedGlovesOfMining)] = 100.0;
|
||||
Entries[typeof(RingmailGlovesOfMining)] = 500.0;
|
||||
|
||||
//ArtifactRarity 1 Stealable Artifacts
|
||||
Entries[typeof(RockArtifact)] = 5.0;
|
||||
Entries[typeof(SkullCandleArtifact)] = 5.0;
|
||||
Entries[typeof(BottleArtifact)] = 5.0;
|
||||
Entries[typeof(DamagedBooksArtifact)] = 5.0;
|
||||
Entries[typeof(Basket1Artifact)] = 5.0;
|
||||
Entries[typeof(Basket2Artifact)] = 5.0;
|
||||
Entries[typeof(Basket3NorthArtifact)] = 5.0;
|
||||
Entries[typeof(Basket3WestArtifact)] = 5.0;
|
||||
|
||||
//ArtifactRarity 2 Stealable Artifacts
|
||||
Entries[typeof(StretchedHideArtifact)] = 15.0;
|
||||
Entries[typeof(BrazierArtifact)] = 15.0;
|
||||
Entries[typeof(Basket4Artifact)] = 15.0;
|
||||
Entries[typeof(Basket5NorthArtifact)] = 15.0;
|
||||
Entries[typeof(Basket5WestArtifact)] = 15.0;
|
||||
Entries[typeof(Basket6Artifact)] = 15.0;
|
||||
Entries[typeof(ZenRock1Artifact)] = 15.0;
|
||||
|
||||
//ArtifactRarity 3 Stealable Artifacts
|
||||
Entries[typeof(LampPostArtifact)] = 25.0;
|
||||
Entries[typeof(BooksNorthArtifact)] = 25.0;
|
||||
Entries[typeof(BooksWestArtifact)] = 25.0;
|
||||
Entries[typeof(BooksFaceDownArtifact)] = 25.0;
|
||||
Entries[typeof(BowlsVerticalArtifact)] = 25.0;
|
||||
Entries[typeof(FanWestArtifact)] = 25.0;
|
||||
Entries[typeof(FanNorthArtifact)] = 25.0;
|
||||
Entries[typeof(Sculpture1Artifact)] = 25.0;
|
||||
Entries[typeof(Sculpture2Artifact)] = 25.0;
|
||||
Entries[typeof(TeapotWestArtifact)] = 25.0;
|
||||
Entries[typeof(TeapotNorthArtifact)] = 25.0;
|
||||
Entries[typeof(TowerLanternArtifact)] = 25.0;
|
||||
Entries[typeof(Urn1Artifact)] = 25.0;
|
||||
Entries[typeof(Urn2Artifact)] = 25.0;
|
||||
Entries[typeof(ZenRock2Artifact)] = 25.0;
|
||||
Entries[typeof(ZenRock3Artifact)] = 25.0;
|
||||
Entries[typeof(JugsOfGoblinRotgutArtifact)] = 25.0;
|
||||
Entries[typeof(MysteriousSupperArtifact)] = 25.0;
|
||||
|
||||
//ArtifactRarity 4 Stealable Artifacts
|
||||
Entries[typeof(BowlArtifact)] = 50.0;
|
||||
Entries[typeof(BowlsHorizontalArtifact)] = 50.0;
|
||||
Entries[typeof(CupsArtifact)] = 50.0;
|
||||
Entries[typeof(TripleFanWestArtifact)] = 50.0;
|
||||
Entries[typeof(TripleFanNorthArtifact)] = 50.0;
|
||||
Entries[typeof(Painting1WestArtifact)] = 50.0;
|
||||
Entries[typeof(Painting1NorthArtifact)] = 50.0;
|
||||
Entries[typeof(Painting2WestArtifact)] = 50.0;
|
||||
Entries[typeof(Painting2NorthArtifact)] = 50.0;
|
||||
Entries[typeof(SakeArtifact)] = 50.0;
|
||||
Entries[typeof(StolenBottlesOfLiquor1Artifact)] = 50.0;
|
||||
Entries[typeof(StolenBottlesOfLiquor2Artifact)] = 50.0;
|
||||
Entries[typeof(BottlesOfSpoiledWine1Artifact)] = 50.0;
|
||||
Entries[typeof(NaverysWeb1Artifact)] = 50.0;
|
||||
Entries[typeof(NaverysWeb2Artifact)] = 50.0;
|
||||
|
||||
//ArtifactRarity 5 Stealable Artifacts
|
||||
Entries[typeof(Painting3Artifact)] = 100.0;
|
||||
Entries[typeof(SwordDisplay1WestArtifact)] = 100.0;
|
||||
Entries[typeof(SwordDisplay1NorthArtifact)] = 100.0;
|
||||
Entries[typeof(DyingPlantArtifact)] = 100.0;
|
||||
Entries[typeof(LargePewterBowlArtifact)] = 100.0;
|
||||
Entries[typeof(NaverysWeb3Artifact)] = 100.0;
|
||||
Entries[typeof(NaverysWeb4Artifact)] = 100.0;
|
||||
Entries[typeof(NaverysWeb5Artifact)] = 100.0;
|
||||
Entries[typeof(NaverysWeb6Artifact)] = 100.0;
|
||||
Entries[typeof(BloodySpoonArtifact)] = 100.0;
|
||||
Entries[typeof(RemnantsOfMeatLoafArtifact)] = 100.0;
|
||||
Entries[typeof(HalfEatenSupperArtifact)] = 100.0;
|
||||
Entries[typeof(BackpackArtifact)] = 100.0;
|
||||
Entries[typeof(BloodyWaterArtifact)] = 100.0;
|
||||
Entries[typeof(EggCaseArtifact)] = 100.0;
|
||||
Entries[typeof(GruesomeStandardArtifact)] = 100.0;
|
||||
Entries[typeof(SkinnedGoatArtifact)] = 100.0;
|
||||
Entries[typeof(StuddedLeggingsArtifact)] = 100.0;
|
||||
Entries[typeof(TarotCardsArtifact)] = 100.0;
|
||||
|
||||
//ArtifactRarity 6 Stealable Artifacts
|
||||
Entries[typeof(Painting4WestArtifact)] = 200.0;
|
||||
Entries[typeof(Painting4NorthArtifact)] = 200.0;
|
||||
Entries[typeof(SwordDisplay2WestArtifact)] = 200.0;
|
||||
Entries[typeof(SwordDisplay2NorthArtifact)] = 200.0;
|
||||
Entries[typeof(LargeDyingPlantArtifact)] = 200.0;
|
||||
Entries[typeof(GargishLuckTotemArtifact)] = 200.0;
|
||||
Entries[typeof(BookOfTruthArtifact)] = 200.0;
|
||||
Entries[typeof(GargishTraditionalVaseArtifact)] = 200.0;
|
||||
Entries[typeof(GargishProtectiveTotemArtifact)] = 200.0;
|
||||
Entries[typeof(BottlesOfSpoiledWine2Artifact)] = 200.0;
|
||||
Entries[typeof(BatteredPanArtifact)] = 200.0;
|
||||
Entries[typeof(RustedPanArtifact)] = 200.0;
|
||||
|
||||
//ArtifactRarity 7 Stealable Artifacts
|
||||
Entries[typeof(FlowersArtifact)] = 350.0;
|
||||
Entries[typeof(GargishBentasVaseArtifact)] = 350.0;
|
||||
Entries[typeof(GargishPortraitArtifact)] = 350.0;
|
||||
Entries[typeof(GargishKnowledgeTotemArtifact)] = 350.0;
|
||||
Entries[typeof(GargishMemorialStatueArtifact)] = 350.0;
|
||||
Entries[typeof(StolenBottlesOfLiquor3Artifact)] = 350.0;
|
||||
Entries[typeof(BottlesOfSpoiledWine3Artifact)] = 350.0;
|
||||
Entries[typeof(DriedUpInkWellArtifact)] = 350.0;
|
||||
Entries[typeof(FakeCopperIngotsArtifact)] = 350.0;
|
||||
Entries[typeof(CocoonArtifact)] = 350.0;
|
||||
Entries[typeof(StuddedTunicArtifact)] = 350.0;
|
||||
|
||||
//ArtifactRarity 8 Stealable Artifacts
|
||||
Entries[typeof(Painting5WestArtifact)] = 750.0;
|
||||
Entries[typeof(Painting5NorthArtifact)] = 750.0;
|
||||
Entries[typeof(DolphinLeftArtifact)] = 750.0;
|
||||
Entries[typeof(DolphinRightArtifact)] = 750.0;
|
||||
Entries[typeof(SwordDisplay3SouthArtifact)] = 750.0;
|
||||
Entries[typeof(SwordDisplay3EastArtifact)] = 750.0;
|
||||
Entries[typeof(SwordDisplay4WestArtifact)] = 750.0;
|
||||
Entries[typeof(PushmePullyuArtifact)] = 750.0;
|
||||
Entries[typeof(StolenBottlesOfLiquor4Artifact)] = 750.0;
|
||||
Entries[typeof(RottedOarsArtifact)] = 750.0;
|
||||
Entries[typeof(PricelessTreasureArtifact)] = 750.0;
|
||||
Entries[typeof(SkinnedDeerArtifact)] = 750.0;
|
||||
|
||||
//ArtifactRarity 9 Stealable Artifacts
|
||||
Entries[typeof(Painting6WestArtifact)] = 1400.0;
|
||||
Entries[typeof(Painting6NorthArtifact)] = 1400.0;
|
||||
Entries[typeof(ManStatuetteSouthArtifact)] = 1400.0;
|
||||
Entries[typeof(ManStatuetteEastArtifact)] = 1400.0;
|
||||
Entries[typeof(SwordDisplay4NorthArtifact)] = 1400.0;
|
||||
Entries[typeof(SwordDisplay5WestArtifact)] = 1400.0;
|
||||
Entries[typeof(SwordDisplay5NorthArtifact)] = 1400.0;
|
||||
Entries[typeof(TyballsFlaskStandArtifact)] = 1400.0;
|
||||
Entries[typeof(BlockAndTackleArtifact)] = 1400.0;
|
||||
Entries[typeof(LeatherTunicArtifact)] = 1400.0;
|
||||
Entries[typeof(SaddleArtifact)] = 1400.0;
|
||||
|
||||
//ArtifactRarity 10
|
||||
Entries[typeof(TitansHammer)] = 2750.0;
|
||||
Entries[typeof(ZyronicClaw)] = 2750.0;
|
||||
Entries[typeof(InquisitorsResolution)] = 2750.0;
|
||||
Entries[typeof(BladeOfTheRighteous)] = 2750.0;
|
||||
Entries[typeof(LegacyOfTheDreadLord)] = 2750.0;
|
||||
Entries[typeof(TheTaskmaster)] = 2750.0;
|
||||
|
||||
//Virtue Artifacts
|
||||
Entries[typeof(TenthAnniversarySculpture)] = 1500.0;
|
||||
Entries[typeof(MapOfTheKnownWorld)] = 1500.0;
|
||||
Entries[typeof(AnkhPendant)] = 1500.0;
|
||||
Entries[typeof(DragonsEnd)] = 1500.0;
|
||||
Entries[typeof(JaanasStaff)] = 1500.0;
|
||||
Entries[typeof(KatrinasCrook)] = 1500.0;
|
||||
Entries[typeof(LordBlackthornsExemplar)] = 1500.0;
|
||||
Entries[typeof(SentinelsGuard)] = 1500.0;
|
||||
Entries[typeof(CompassionArms)] = 1500.0;
|
||||
Entries[typeof(JusticeBreastplate)] = 1500.0;
|
||||
Entries[typeof(ValorGauntlets)] = 1500.0;
|
||||
Entries[typeof(HonestyGorget)] = 1500.0;
|
||||
Entries[typeof(SpiritualityHelm)] = 1500.0;
|
||||
Entries[typeof(HonorLegs)] = 1500.0;
|
||||
Entries[typeof(SacrificeSollerets)] = 1500.0;
|
||||
|
||||
//Minor Artifacts (ML/Peerless/Tokuno)
|
||||
Entries[typeof(CandelabraOfSouls)] = 100.0;
|
||||
Entries[typeof(GhostShipAnchor)] = 100.0;
|
||||
Entries[typeof(GoldBricks)] = 100.0;
|
||||
Entries[typeof(PhillipsWoodenSteed)] = 100.0;
|
||||
Entries[typeof(SeahorseStatuette)] = 100.0;
|
||||
Entries[typeof(ShipModelOfTheHMSCape)] = 100.0;
|
||||
Entries[typeof(AdmiralsHeartyRum)] = 100.0;
|
||||
Entries[typeof(AlchemistsBauble)] = 100.0;
|
||||
Entries[typeof(ArcticDeathDealer)] = 100.0;
|
||||
Entries[typeof(BlazeOfDeath)] = 100.0;
|
||||
Entries[typeof(BurglarsBandana)] = 100.0;
|
||||
Entries[typeof(CaptainQuacklebushsCutlass)] = 100.0;
|
||||
Entries[typeof(CavortingClub)] = 100.0;
|
||||
Entries[typeof(DreadPirateHat)] = 100.0;
|
||||
Entries[typeof(EnchantedTitanLegBone)] = 100.0;
|
||||
Entries[typeof(GwennosHarp)] = 100.0;
|
||||
Entries[typeof(IolosLute)] = 100.0;
|
||||
Entries[typeof(LunaLance)] = 100.0;
|
||||
Entries[typeof(NightsKiss)] = 100.0;
|
||||
Entries[typeof(NoxRangersHeavyCrossbow)] = 100.0;
|
||||
Entries[typeof(PolarBearMask)] = 100.0;
|
||||
Entries[typeof(VioletCourage)] = 100.0;
|
||||
Entries[typeof(GlovesOfThePugilist)] = 100.0;
|
||||
Entries[typeof(PixieSwatter)] = 100.0;
|
||||
Entries[typeof(WrathOfTheDryad)] = 100.0;
|
||||
Entries[typeof(StaffOfPower)] = 100.0;
|
||||
Entries[typeof(OrcishVisage)] = 100.0;
|
||||
Entries[typeof(BowOfTheJukaKing)] = 100.0;
|
||||
Entries[typeof(ColdBlood)] = 100.0;
|
||||
Entries[typeof(CreepingVine)] = 100.0;
|
||||
Entries[typeof(ForgedPardon)] = 100.0;
|
||||
Entries[typeof(ManaPhasingOrb)] = 500.0;
|
||||
Entries[typeof(RunedSashOfWarding)] = 100.0;
|
||||
Entries[typeof(SurgeShield)] = 100.0;
|
||||
Entries[typeof(HeartOfTheLion)] = 100.0;
|
||||
Entries[typeof(ShieldOfInvulnerability)] = 100.0;
|
||||
Entries[typeof(AegisOfGrace)] = 100.0;
|
||||
Entries[typeof(BladeDance)] = 100.0;
|
||||
Entries[typeof(BloodwoodSpirit)] = 100.0;
|
||||
Entries[typeof(Bonesmasher)] = 100.0;
|
||||
Entries[typeof(Boomstick)] = 100.0;
|
||||
Entries[typeof(BrightsightLenses)] = 100.0;
|
||||
Entries[typeof(FeyLeggings)] = 100.0;
|
||||
Entries[typeof(FleshRipper)] = 100.0;
|
||||
Entries[typeof(HelmOfSwiftness)] = 100.0;
|
||||
Entries[typeof(PadsOfTheCuSidhe)] = 100.0;
|
||||
Entries[typeof(QuiverOfRage)] = 100.0;
|
||||
Entries[typeof(QuiverOfElements)] = 100.0;
|
||||
Entries[typeof(RaedsGlory)] = 100.0;
|
||||
Entries[typeof(RighteousAnger)] = 100.0;
|
||||
Entries[typeof(RobeOfTheEclipse)] = 100.0;
|
||||
Entries[typeof(RobeOfTheEquinox)] = 100.0;
|
||||
Entries[typeof(SoulSeeker)] = 100.0;
|
||||
Entries[typeof(TalonBite)] = 100.0;
|
||||
Entries[typeof(TotemOfVoid)] = 100.0;
|
||||
Entries[typeof(WildfireBow)] = 100.0;
|
||||
Entries[typeof(Windsong)] = 100.0;
|
||||
Entries[typeof(CrimsonCincture)] = 100.0;
|
||||
Entries[typeof(DreadFlute)] = 100.0;
|
||||
Entries[typeof(DreadsRevenge)] = 100.0;
|
||||
Entries[typeof(MelisandesCorrodedHatchet)] = 100.0;
|
||||
Entries[typeof(AlbinoSquirrelImprisonedInCrystal)] = 100.0;
|
||||
Entries[typeof(GrizzledMareStatuette)] = 100.0;
|
||||
Entries[typeof(GrizzleGauntlets)] = 100.0;
|
||||
Entries[typeof(GrizzleGreaves)] = 100.0;
|
||||
Entries[typeof(GrizzleHelm)] = 100.0;
|
||||
Entries[typeof(GrizzleTunic)] = 100.0;
|
||||
Entries[typeof(GrizzleVambraces)] = 100.0;
|
||||
Entries[typeof(ParoxysmusSwampDragonStatuette)] = 100.0;
|
||||
Entries[typeof(ScepterOfTheChief)] = 100.0;
|
||||
Entries[typeof(CrystallineRing)] = 100.0;
|
||||
Entries[typeof(MarkOfTravesty)] = 100.0;
|
||||
Entries[typeof(ImprisonedDog)] = 100.0;
|
||||
Entries[typeof(AncientFarmersKasa)] = 100.0;
|
||||
Entries[typeof(AncientSamuraiDo)] = 100.0;
|
||||
Entries[typeof(AncientUrn)] = 100.0;
|
||||
Entries[typeof(ArmsOfTacticalExcellence)] = 100.0;
|
||||
Entries[typeof(BlackLotusHood)] = 100.0;
|
||||
Entries[typeof(ChestOfHeirlooms)] = 100.0;
|
||||
Entries[typeof(DaimyosHelm)] = 100.0;
|
||||
Entries[typeof(DemonForks)] = 100.0;
|
||||
Entries[typeof(TheDestroyer)] = 100.0;
|
||||
Entries[typeof(DragonNunchaku)] = 100.0;
|
||||
Entries[typeof(Exiler)] = 100.0;
|
||||
Entries[typeof(FluteOfRenewal)] = 100.0;
|
||||
Entries[typeof(GlovesOfTheSun)] = 100.0;
|
||||
Entries[typeof(HanzosBow)] = 100.0;
|
||||
Entries[typeof(HonorableSwords)] = 100.0;
|
||||
Entries[typeof(LegsOfStability)] = 100.0;
|
||||
Entries[typeof(LeurociansMempoOfFortune)] = 100.0;
|
||||
Entries[typeof(PeasantsBokuto)] = 100.0;
|
||||
Entries[typeof(PilferedDancerFans)] = 100.0;
|
||||
Entries[typeof(TomeOfEnlightenment)] = 100.0;
|
||||
|
||||
//Stygian Abyss Artifacts
|
||||
Entries[typeof(AbyssalBlade)] = 5000.0;
|
||||
Entries[typeof(AnimatedLegsoftheInsaneTinker)] = 5000.0;
|
||||
Entries[typeof(AxeOfAbandon)] = 5000.0;
|
||||
Entries[typeof(AxesOfFury)] = 5000.0;
|
||||
Entries[typeof(BansheesCall)] = 5000.0;
|
||||
Entries[typeof(BasiliskHideBreastplate)] = 5000.0;
|
||||
Entries[typeof(BladeOfBattle)] = 5000.0;
|
||||
Entries[typeof(BouraTailShield)] = 5000.0;
|
||||
Entries[typeof(BreastplateOfTheBerserker)] = 5000.0;
|
||||
Entries[typeof(BurningAmber)] = 5000.0;
|
||||
Entries[typeof(CastOffZombieSkin)] = 5000.0;
|
||||
Entries[typeof(CavalrysFolly)] = 5000.0;
|
||||
Entries[typeof(ChannelersDefender)] = 5000.0;
|
||||
Entries[typeof(ClawsOfTheBerserker)] = 5000.0;
|
||||
Entries[typeof(DeathsHead)] = 5000.0;
|
||||
Entries[typeof(DefenderOfTheMagus)] = 5000.0;
|
||||
Entries[typeof(DemonBridleRing)] = 5000.0;
|
||||
Entries[typeof(DemonHuntersStandard)] = 5000.0;
|
||||
Entries[typeof(DragonHideShield)] = 5000.0;
|
||||
Entries[typeof(DragonJadeEarrings)] = 5000.0;
|
||||
Entries[typeof(DraconisWrath)] = 5000.0;
|
||||
Entries[typeof(EternalGuardianStaff)] = 5000.0;
|
||||
Entries[typeof(FallenMysticsSpellbook)] = 5000.0;
|
||||
Entries[typeof(GiantSteps)] = 5000.0;
|
||||
Entries[typeof(IronwoodCompositeBow)] = 5000.0;
|
||||
Entries[typeof(JadeWarAxe)] = 5000.0;
|
||||
Entries[typeof(LegacyOfDespair)] = 5000.0;
|
||||
Entries[typeof(Lavaliere)] = 5000.0;
|
||||
Entries[typeof(LifeSyphon)] = 5000.0;
|
||||
Entries[typeof(Mangler)] = 5000.0;
|
||||
Entries[typeof(MantleOfTheFallen)] = 5000.0;
|
||||
Entries[typeof(MysticsGarb)] = 5000.0;
|
||||
Entries[typeof(NightEyes)] = 5000.0;
|
||||
Entries[typeof(ObsidianEarrings)] = 5000.0;
|
||||
Entries[typeof(PetrifiedSnake)] = 5000.0;
|
||||
Entries[typeof(PillarOfStrength)] = 5000.0;
|
||||
Entries[typeof(ProtectoroftheBattleMage)] = 5000.0;
|
||||
Entries[typeof(RaptorClaw)] = 5000.0;
|
||||
Entries[typeof(ResonantStaffofEnlightenment)] = 5000.0;
|
||||
Entries[typeof(ShroudOfTheCondemned)] = 500.0;
|
||||
Entries[typeof(GargishSignOfOrder)] = 5000.0;
|
||||
Entries[typeof(HumanSignOfOrder)] = 5000.0;
|
||||
Entries[typeof(GargishSignOfChaos)] = 5000.0;
|
||||
Entries[typeof(HumanSignOfChaos)] = 5000.0;
|
||||
Entries[typeof(Slither)] = 5000.0;
|
||||
Entries[typeof(SpinedBloodwormBracers)] = 5000.0;
|
||||
Entries[typeof(StandardOfChaos)] = 5000.0;
|
||||
Entries[typeof(StandardOfChaosG)] = 5000.0;
|
||||
Entries[typeof(StaffOfShatteredDreams)] = 5000.0;
|
||||
Entries[typeof(StoneDragonsTooth)] = 5000.0;
|
||||
Entries[typeof(StoneSlithClaw)] = 5000.0;
|
||||
Entries[typeof(StormCaller)] = 5000.0;
|
||||
Entries[typeof(SwordOfShatteredHopes)] = 5000.0;
|
||||
Entries[typeof(SummonersKilt)] = 5000.0;
|
||||
Entries[typeof(Tangle1)] = 5000.0;
|
||||
Entries[typeof(TheImpalersPick)] = 5000.0;
|
||||
Entries[typeof(TorcOfTheGuardians)] = 5000.0;
|
||||
Entries[typeof(TokenOfHolyFavor)] = 5000.0;
|
||||
Entries[typeof(VampiricEssence)] = 5000.0;
|
||||
Entries[typeof(Venom)] = 5000.0;
|
||||
Entries[typeof(VoidInfusedKilt)] = 5000.0;
|
||||
Entries[typeof(WallOfHungryMouths)] = 5000.0;
|
||||
|
||||
//Tokuno Major Artifacts
|
||||
Entries[typeof(DarkenedSky)] = 2500.0;
|
||||
Entries[typeof(KasaOfTheRajin)] = 2500.0;
|
||||
Entries[typeof(RuneBeetleCarapace)] = 2500.0;
|
||||
Entries[typeof(Stormgrip)] = 2500.0;
|
||||
Entries[typeof(SwordOfTheStampede)] = 2500.0;
|
||||
Entries[typeof(SwordsOfProsperity)] = 2500.0;
|
||||
Entries[typeof(TheHorselord)] = 2500.0;
|
||||
Entries[typeof(TomeOfLostKnowledge)] = 2500.0;
|
||||
Entries[typeof(WindsEdge)] = 2500.0;
|
||||
|
||||
//Major Artifacts
|
||||
Entries[typeof(TheDryadBow)] = 5500.0;
|
||||
Entries[typeof(RingOfTheElements)] = 5500.0;
|
||||
Entries[typeof(ArcaneShield)] = 5500.0;
|
||||
Entries[typeof(SerpentsFang)] = 5500.0;
|
||||
Entries[typeof(OrnamentOfTheMagician)] = 5500.0;
|
||||
Entries[typeof(BoneCrusher)] = 5500.0;
|
||||
Entries[typeof(OrnateCrownOfTheHarrower)] = 5500.0;
|
||||
Entries[typeof(HuntersHeaddress)] = 5500.0;
|
||||
Entries[typeof(DivineCountenance)] = 5500.0;
|
||||
Entries[typeof(BraceletOfHealth)] = 5500.0;
|
||||
Entries[typeof(Aegis)] = 5500.0;
|
||||
Entries[typeof(AxeOfTheHeavens)] = 5500.0;
|
||||
Entries[typeof(HelmOfInsight)] = 5500.0;
|
||||
Entries[typeof(Frostbringer)] = 5500.0;
|
||||
Entries[typeof(StaffOfTheMagi)] = 5500.0;
|
||||
Entries[typeof(TheDragonSlayer)] = 5500.0;
|
||||
Entries[typeof(BreathOfTheDead)] = 5500.0;
|
||||
Entries[typeof(HolyKnightsBreastplate)] = 5500.0;
|
||||
Entries[typeof(TunicOfFire)] = 5500.0;
|
||||
Entries[typeof(ShadowDancerLeggings)] = 5500.0;
|
||||
Entries[typeof(VoiceOfTheFallenKing)] = 5500.0;
|
||||
Entries[typeof(TheBeserkersMaul)] = 5500.0;
|
||||
Entries[typeof(HatOfTheMagi)] = 5500.0;
|
||||
Entries[typeof(BladeOfInsanity)] = 5500.0;
|
||||
Entries[typeof(JackalsCollar)] = 5500.0;
|
||||
|
||||
//Artifacts
|
||||
Entries[typeof(PendantOfTheMagi)] = 35;
|
||||
|
||||
//Replicas
|
||||
Entries[typeof(TatteredAncientMummyWrapping)] = 5000.0;
|
||||
Entries[typeof(WindSpirit)] = 5000.0;
|
||||
Entries[typeof(GauntletsOfAnger)] = 5000.0;
|
||||
Entries[typeof(GladiatorsCollar)] = 5000.0;
|
||||
Entries[typeof(OrcChieftainHelm)] = 5000.0;
|
||||
Entries[typeof(ShroudOfDeceit)] = 5000.0;
|
||||
Entries[typeof(AcidProofRobe)] = 5000.0;
|
||||
Entries[typeof(ANecromancerShroud)] = 5000.0;
|
||||
Entries[typeof(CaptainJohnsHat)] = 5000.0;
|
||||
Entries[typeof(CrownOfTalKeesh)] = 5000.0;
|
||||
|
||||
Entries[typeof(DetectiveBoots)] = 5000.0;
|
||||
Entries[typeof(EmbroideredOakLeafCloak)] = 5000.0;
|
||||
Entries[typeof(JadeArmband)] = 5000.0;
|
||||
Entries[typeof(LieutenantOfTheBritannianRoyalGuard)] = 5000.0;
|
||||
Entries[typeof(MagicalDoor)] = 5000.0;
|
||||
Entries[typeof(RoyalGuardInvestigatorsCloak)] = 5000.0;
|
||||
Entries[typeof(SamaritanRobe)] = 5000.0;
|
||||
Entries[typeof(TheMostKnowledgePerson)] = 5000.0;
|
||||
Entries[typeof(TheRobeOfBritanniaAri)] = 5000.0;
|
||||
Entries[typeof(DjinnisRing)] = 5000.0;
|
||||
|
||||
Entries[typeof(BraveKnightOfTheBritannia)] = 5000.0;
|
||||
Entries[typeof(Calm)] = 5000.0;
|
||||
Entries[typeof(FangOfRactus)] = 5000.0;
|
||||
Entries[typeof(OblivionsNeedle)] = 5000.0;
|
||||
Entries[typeof(Pacify)] = 5000.0;
|
||||
//Entries[typeof(Quell)] = 5000.0;
|
||||
Entries[typeof(RoyalGuardSurvivalKnife)] = 5000.0;
|
||||
Entries[typeof(Subdue)] = 5000.0;
|
||||
Entries[typeof(Asclepius)] = 5000.0;
|
||||
Entries[typeof(BracersofAlchemicalDevastation)] = 5000.0;
|
||||
|
||||
Entries[typeof(GargishAsclepius)] = 5000.0;
|
||||
Entries[typeof(GargishBracersofAlchemicalDevastation)] = 5000.0;
|
||||
Entries[typeof(HygieiasAmulet)] = 5000.0;
|
||||
Entries[typeof(ScrollofValiantCommendation)] = 5000.0;
|
||||
|
||||
//Easter
|
||||
Entries[typeof(EasterEggs)] = 2.0;
|
||||
Entries[typeof(JellyBeans)] = 1.0;
|
||||
|
||||
//Miscellaneous
|
||||
Entries[typeof(ParrotItem)] = 25.0;
|
||||
Entries[typeof(Gold)] = 0.01;
|
||||
Entries[typeof(RedScales)] = 0.10;
|
||||
Entries[typeof(YellowScales)] = 0.10;
|
||||
Entries[typeof(BlackScales)] = 0.10;
|
||||
Entries[typeof(GreenScales)] = 0.10;
|
||||
Entries[typeof(WhiteScales)] = 0.10;
|
||||
Entries[typeof(BlueScales)] = 0.10;
|
||||
Entries[typeof(Bottle)] = 0.25;
|
||||
Entries[typeof(OrcishKinMask)] = 100.0;
|
||||
Entries[typeof(PottedPlantDeed)] = 15000.0;
|
||||
Entries[typeof(BagOfSending)] = 250.0;
|
||||
Entries[typeof(Cauldron)] = 200.0;
|
||||
Entries[typeof(ChampionSkull)] = 1000.0;
|
||||
//Entries[typeof(ChaosShield)] = 2500.0;
|
||||
Entries[typeof(ClockworkAssembly)] = 50.0;
|
||||
Entries[typeof(ConjurersTrinket)] = 10000.0;
|
||||
|
||||
Entries[typeof(CorgulsHandbookOnMysticism)] = 250.0;
|
||||
Entries[typeof(CrownOfArcaneTemperament)] = 5000.0;
|
||||
Entries[typeof(DeadWood)] = 1.0;
|
||||
Entries[typeof(DustyPillow)] = 250.0;
|
||||
Entries[typeof(EndlessDecanter)] = 10.0;
|
||||
Entries[typeof(EternallyCorruptTree)] = 1000.0;
|
||||
Entries[typeof(ExcellentIronMaiden)] = 50.0;
|
||||
Entries[typeof(ExecutionersCap)] = 1.0;
|
||||
Entries[typeof(Flowstone)] = 250.0;
|
||||
Entries[typeof(GlacialStaff)] = 500.0;
|
||||
Entries[typeof(GrapeVine)] = 500.0;
|
||||
Entries[typeof(GrobusFur)] = 20.0;
|
||||
Entries[typeof(HorseShoes)] = 200.0;
|
||||
|
||||
Entries[typeof(JocklesQuicksword)] = 2.0;
|
||||
Entries[typeof(MangledHeadOfDreadhorn)] = 1000.0;
|
||||
Entries[typeof(MedusaBlood)] = 1000.0;
|
||||
Entries[typeof(MedusaDarkScales)] = 200.0;
|
||||
Entries[typeof(MedusaLightScales)] = 200.0;
|
||||
Entries[typeof(ContestMiniHouseDeed)] = 6500.0;
|
||||
Entries[typeof(Moonstone)] = 5000.0;
|
||||
Entries[typeof(MysticsGuard)] = 2500.0;
|
||||
Entries[typeof(PowerCrystal)] = 100.0;
|
||||
Entries[typeof(PristineDreadHorn)] = 1000.0;
|
||||
Entries[typeof(ProspectorsTool)] = 3.0;
|
||||
Entries[typeof(RecipeScroll)] = 10.0;
|
||||
|
||||
Entries[typeof(SwampTile)] = 5000.0;
|
||||
Entries[typeof(TastyTreat)] = 100.0;
|
||||
Entries[typeof(TatteredAncientScroll)] = 200.0;
|
||||
Entries[typeof(ThorvaldsMedallion)] = 250.0;
|
||||
Entries[typeof(TribalBerry)] = 10.0;
|
||||
Entries[typeof(TunicOfGuarding)] = 2.0;
|
||||
Entries[typeof(UndeadGargHorn)] = 1000.0;
|
||||
Entries[typeof(UntranslatedAncientTome)] = 200.0;
|
||||
Entries[typeof(WallBlood)] = 5000.0;
|
||||
Entries[typeof(Whip)] = 200.0;
|
||||
Entries[typeof(BalmOfSwiftness)] = 100.0;
|
||||
Entries[typeof(TaintedMushroom)] = 1000.0;
|
||||
Entries[typeof(GoldenSkull)] = 1000.0;
|
||||
Entries[typeof(RedSoulstone)] = 15000.0;
|
||||
Entries[typeof(BlueSoulstone)] = 15000.0;
|
||||
Entries[typeof(SoulStone)] = 15000.0;
|
||||
Entries[typeof(HornOfPlenty)] = 2500.0;
|
||||
Entries[typeof(KepetchWax)] = 500.0;
|
||||
Entries[typeof(SlithEye)] = 500.0;
|
||||
Entries[typeof(SoulstoneFragment)] = 500.0;
|
||||
Entries[typeof(WhiteClothDyeTub)] = 300.0;
|
||||
Entries[typeof(Lodestone)] = 75.0;
|
||||
Entries[typeof(FeyWings)] = 75.0;
|
||||
Entries[typeof(StoutWhip)] = 3.0;
|
||||
Entries[typeof(PlantClippings)] = 1.0;
|
||||
Entries[typeof(BasketOfRolls)] = 5.0;
|
||||
Entries[typeof(Yeast)] = 10.0;
|
||||
Entries[typeof(ValentinesCard)] = 50.0;
|
||||
Entries[typeof(MetallicClothDyeTub)] = 100.0;
|
||||
|
||||
//Treasure Hunting
|
||||
Entries[typeof(Lockpick)] = 0.10;
|
||||
}
|
||||
|
||||
public static int GetPointsForEquipment(Item item)
|
||||
{
|
||||
if (item is IEpiphanyArmor)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
|
||||
foreach (CraftSystem system in CraftSystem.Systems)
|
||||
{
|
||||
CraftItem crItem = null;
|
||||
|
||||
if (system != null && system.CraftItems != null)
|
||||
{
|
||||
var type = item.GetType();
|
||||
|
||||
if (type == typeof(SilverRing))
|
||||
{
|
||||
type = typeof(GoldRing);
|
||||
}
|
||||
else if (type == typeof(SilverBracelet))
|
||||
{
|
||||
type = typeof(GoldBracelet);
|
||||
}
|
||||
|
||||
crItem = system.CraftItems.SearchFor(type);
|
||||
|
||||
if (crItem != null && crItem.Resources != null)
|
||||
{
|
||||
CraftRes craftRes = crItem.Resources.GetAt(0);
|
||||
double amount = 1;
|
||||
|
||||
if (craftRes != null)
|
||||
{
|
||||
amount = craftRes.Amount;
|
||||
}
|
||||
|
||||
double award = 1;
|
||||
|
||||
if (item is IResource)
|
||||
{
|
||||
switch (((IResource)item).Resource)
|
||||
{
|
||||
default: award = amount * .1; break;
|
||||
case CraftResource.DullCopper: award = amount * .47; break;
|
||||
case CraftResource.ShadowIron: award = amount * .73; break;
|
||||
case CraftResource.Copper: award = amount * 1.0; break;
|
||||
case CraftResource.Bronze: award = amount * 1.47; break;
|
||||
case CraftResource.Gold: award = amount * 2.5; break;
|
||||
case CraftResource.Agapite: award = amount * 5.0; break;
|
||||
case CraftResource.Verite: award = amount * 8.5; break;
|
||||
case CraftResource.Valorite: award = amount * 10; break;
|
||||
case CraftResource.SpinedLeather: award = amount * 0.5; break;
|
||||
case CraftResource.HornedLeather: award = amount * 1.0; break;
|
||||
case CraftResource.BarbedLeather: award = amount * 2.0; break;
|
||||
case CraftResource.OakWood: award = amount * .17; break;
|
||||
case CraftResource.AshWood: award = amount * .33; break;
|
||||
case CraftResource.YewWood: award = amount * .67; break;
|
||||
case CraftResource.Heartwood: award = amount * 1.0; break;
|
||||
case CraftResource.Bloodwood: award = amount * 2.17; break;
|
||||
case CraftResource.Frostwood: award = amount * 3.17; break;
|
||||
}
|
||||
}
|
||||
|
||||
int weight = item is BaseWeapon && !((BaseWeapon)item).DImodded ? Imbuing.GetTotalWeight(item, 12, false, true) : Imbuing.GetTotalWeight(item, -1, false, true);
|
||||
|
||||
if (weight > 0)
|
||||
{
|
||||
award += weight / 30;
|
||||
}
|
||||
|
||||
return (int)award;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#region Points Exchange
|
||||
|
||||
public Dictionary<string, double> PointsExchange { get; private set; }
|
||||
|
||||
public double GetPointsFromExchange(Mobile m)
|
||||
{
|
||||
Account a = m.Account as Account;
|
||||
|
||||
if (a != null && !PointsExchange.ContainsKey(a.Username))
|
||||
{
|
||||
PointsExchange[a.Username] = 0.0;
|
||||
}
|
||||
|
||||
return a == null ? 0.0 : PointsExchange[a.Username];
|
||||
}
|
||||
|
||||
public bool AddPointsToExchange(Mobile m)
|
||||
{
|
||||
Account a = m.Account as Account;
|
||||
|
||||
if (a == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
double points = GetPoints(m);
|
||||
|
||||
if (points <= 0)
|
||||
{
|
||||
m.SendLocalizedMessage(1158451); // This account has no points to deposit.
|
||||
}
|
||||
else if (DeductPoints(m, points))
|
||||
{
|
||||
if (!PointsExchange.ContainsKey(a.Username))
|
||||
{
|
||||
PointsExchange[a.Username] = points;
|
||||
}
|
||||
else
|
||||
{
|
||||
PointsExchange[a.Username] += points;
|
||||
}
|
||||
|
||||
m.SendLocalizedMessage(1158452, points.ToString("N0")); // You have deposited ~1_VALUE~ Cleanup Britannia Points.
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool RemovePointsFromExchange(Mobile m)
|
||||
{
|
||||
Account a = m.Account as Account;
|
||||
|
||||
if (a == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
double points = GetPointsFromExchange(m);
|
||||
|
||||
if (points <= 0)
|
||||
{
|
||||
m.SendLocalizedMessage(1158457); // This account has no points to withdraw.
|
||||
}
|
||||
else if (PointsExchange.ContainsKey(a.Username))
|
||||
{
|
||||
PointsExchange[a.Username] = 0;
|
||||
AwardPoints(m, points, false, false);
|
||||
|
||||
m.SendLocalizedMessage(1158453, String.Format("{0}\t{1}", points.ToString("N0"), ((int)GetPoints(m)).ToString("N0"))); // You have withdrawn ~1_VALUE~ Cleanup Britannia Points. You now have ~2_VALUE~ points.
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(PointsExchange == null ? 0 : PointsExchange.Count);
|
||||
|
||||
if (PointsExchange != null)
|
||||
{
|
||||
foreach (var kvp in PointsExchange)
|
||||
{
|
||||
writer.Write(kvp.Key);
|
||||
writer.Write(kvp.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
if (this.Version >= 2)
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
|
||||
int count = reader.ReadInt();
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
string accountName = reader.ReadString();
|
||||
double points = reader.ReadDouble();
|
||||
|
||||
PointsExchange[accountName] = points;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class AppraiseforCleanupTarget : Target
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public AppraiseforCleanupTarget(Mobile from) : base(-1, true, TargetFlags.None)
|
||||
{
|
||||
m_Mobile = from;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile m, object targeted)
|
||||
{
|
||||
if (targeted is Item)
|
||||
{
|
||||
Item item = (Item)targeted;
|
||||
|
||||
if (!item.IsChildOf(m_Mobile))
|
||||
return;
|
||||
|
||||
double points = CleanUpBritanniaData.GetPoints(item);
|
||||
|
||||
if (points == 0)
|
||||
m_Mobile.SendLocalizedMessage(1151271); // This item has no turn-in value for Clean Up Britannia.
|
||||
else if (points < 1)
|
||||
m_Mobile.SendLocalizedMessage(1151272); // This item is worth less than one point for Clean Up Britannia.
|
||||
else if (points == 1)
|
||||
m_Mobile.SendLocalizedMessage(1151273); // This item is worth approximately one point for Clean Up Britannia.
|
||||
else
|
||||
m_Mobile.SendLocalizedMessage(1151274, points.ToString()); //This item is worth approximately ~1_VALUE~ points for Clean Up Britannia.
|
||||
|
||||
m_Mobile.Target = new AppraiseforCleanupTarget(m_Mobile);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.SendLocalizedMessage(1151271); // This item has no turn-in value for Clean Up Britannia.
|
||||
m_Mobile.Target = new AppraiseforCleanupTarget(m_Mobile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Services/PointsSystems/DespiseCrystals.cs
Normal file
52
Scripts/Services/PointsSystems/DespiseCrystals.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class DespiseCrystals : PointsSystem
|
||||
{
|
||||
public override PointsType Loyalty { get { return PointsType.DespiseCrystals; } }
|
||||
public override TextDefinition Name { get { return m_Name; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return double.MaxValue; } }
|
||||
|
||||
private TextDefinition m_Name = new TextDefinition(1151673);
|
||||
|
||||
public DespiseCrystals()
|
||||
{
|
||||
}
|
||||
|
||||
public override void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
from.SendLocalizedMessage(1153423, ((int)points).ToString()); // You have gained ~1_AMT~ Dungeon Crystal Points of Despise.
|
||||
}
|
||||
|
||||
public override TextDefinition GetTitle(PlayerMobile from)
|
||||
{
|
||||
return new TextDefinition(1123418);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
if (Version >= 2)
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
|
||||
// all deserialize code in here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Services/PointsSystems/FellowshipData.cs
Normal file
52
Scripts/Services/PointsSystems/FellowshipData.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using Server.Engines.SeasonalEvents;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class FellowshipData : PointsSystem
|
||||
{
|
||||
public override PointsType Loyalty { get { return PointsType.FellowshipData; } }
|
||||
public override TextDefinition Name { get { return "Fellowship Event"; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return double.MaxValue; } }
|
||||
|
||||
public override bool ShowOnLoyaltyGump { get { return false; } }
|
||||
public bool InSeason { get { return SeasonalEventSystem.IsActive(EventType.Fellowship); } }
|
||||
|
||||
public bool Enabled { get; set; }
|
||||
public bool QuestContentGenerated { get; set; }
|
||||
|
||||
public FellowshipData()
|
||||
{
|
||||
}
|
||||
|
||||
public override void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
from.SendLocalizedMessage(1159189, string.Format("{0}", ((int)points).ToString())); // The soul has been cleansed and you have been awarded ~1_SILVER~ Fellowship Silver for your efforts!
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(1);
|
||||
|
||||
writer.Write(Enabled);
|
||||
writer.Write(QuestContentGenerated);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
Enabled = reader.ReadBool();
|
||||
QuestContentGenerated = reader.ReadBool();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
171
Scripts/Services/PointsSystems/GauntletPoints.cs
Normal file
171
Scripts/Services/PointsSystems/GauntletPoints.cs
Normal file
@@ -0,0 +1,171 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class DoomGauntlet : PointsSystem
|
||||
{
|
||||
public override PointsType Loyalty { get { return PointsType.GauntletPoints; } }
|
||||
public override TextDefinition Name { get { return m_Name; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return double.MaxValue; } }
|
||||
public override bool ShowOnLoyaltyGump { get { return false; } }
|
||||
|
||||
private TextDefinition m_Name = new TextDefinition("Gauntlet Points");
|
||||
|
||||
public DoomGauntlet()
|
||||
{
|
||||
}
|
||||
|
||||
public override void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
}
|
||||
|
||||
public override TextDefinition GetTitle(PlayerMobile from)
|
||||
{
|
||||
return new TextDefinition("Gauntlet Points");
|
||||
}
|
||||
|
||||
public override void ProcessKill(Mobile victim, Mobile killer)
|
||||
{
|
||||
PlayerMobile pm = killer as PlayerMobile;
|
||||
BaseCreature bc = victim as BaseCreature;
|
||||
|
||||
if (!Core.AOS)
|
||||
return;
|
||||
|
||||
if (pm == null || bc == null || bc.NoKillAwards || !pm.Alive)
|
||||
return;
|
||||
|
||||
//Make sure its a boss we killed!!
|
||||
bool boss = bc is Impaler || bc is DemonKnight || bc is DarknightCreeper || bc is FleshRenderer || bc is ShadowKnight || bc is AbysmalHorror;
|
||||
|
||||
if (!boss)
|
||||
return;
|
||||
|
||||
int luck = Math.Max(0, pm.RealLuck);
|
||||
AwardPoints(pm, (int)Math.Max(0, (bc.Fame * (1 + Math.Sqrt(luck) / 100)) / 2));
|
||||
|
||||
double gpoints = GetPoints(pm);
|
||||
const double A = 0.000863316841;
|
||||
const double B = 0.00000425531915;
|
||||
|
||||
double chance = A * Math.Pow(10, B * gpoints);
|
||||
double roll = Utility.RandomDouble();
|
||||
|
||||
if (chance > roll)
|
||||
{
|
||||
Item i = null;
|
||||
|
||||
if (Core.TOL)
|
||||
{
|
||||
int ran = Utility.Random(m_RewardTable.Length + 1);
|
||||
|
||||
if (ran >= m_RewardTable.Length)
|
||||
{
|
||||
i = Loot.RandomArmorOrShieldOrWeaponOrJewelry(LootPackEntry.IsInTokuno(killer), LootPackEntry.IsMondain(killer), LootPackEntry.IsStygian(killer));
|
||||
RunicReforging.GenerateRandomArtifactItem(i, luck, Utility.RandomMinMax(800, 1200));
|
||||
NegativeAttributes attrs = RunicReforging.GetNegativeAttributes(i);
|
||||
|
||||
if (attrs != null)
|
||||
{
|
||||
attrs.Prized = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Type[] list = m_RewardTable[ran];
|
||||
Type t = list.Length == 1 ? list[0] : list[Utility.Random(list.Length)];
|
||||
|
||||
i = Activator.CreateInstance(t) as Item;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
i = Activator.CreateInstance(m_DoomArtifact[Utility.Random(m_DoomArtifact.Length)]) as Item;
|
||||
}
|
||||
|
||||
if (i != null)
|
||||
{
|
||||
pm.SendLocalizedMessage(1062317); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
|
||||
|
||||
pm.PlaySound(0x5B4);
|
||||
|
||||
if (!pm.PlaceInBackpack(i))
|
||||
{
|
||||
if (pm.BankBox != null && pm.BankBox.TryDropItem(killer, i, false))
|
||||
pm.SendLocalizedMessage(1079730); // The item has been placed into your bank box.
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(1072523); // You find an artifact, but your backpack and bank are too full to hold it.
|
||||
i.MoveToWorld(pm.Location, pm.Map);
|
||||
}
|
||||
}
|
||||
|
||||
SetPoints(pm, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Type[] DoomArtifact { get { return m_DoomArtifact; } }
|
||||
private static Type[] m_DoomArtifact = new Type[]
|
||||
{
|
||||
typeof(LegacyOfTheDreadLord), typeof(TheTaskmaster), typeof(TheDragonSlayer),
|
||||
typeof(ArmorOfFortune), typeof(GauntletsOfNobility), typeof(HelmOfInsight),
|
||||
typeof(HolyKnightsBreastplate), typeof(JackalsCollar), typeof(LeggingsOfBane),
|
||||
typeof(MidnightBracers), typeof(OrnateCrownOfTheHarrower), typeof(ShadowDancerLeggings),
|
||||
typeof(TunicOfFire), typeof(VoiceOfTheFallenKing), typeof(BraceletOfHealth),
|
||||
typeof(OrnamentOfTheMagician), typeof(RingOfTheElements), typeof(RingOfTheVile),
|
||||
typeof(Aegis), typeof(ArcaneShield), typeof(AxeOfTheHeavens),
|
||||
typeof(BladeOfInsanity), typeof(BoneCrusher), typeof(BreathOfTheDead),
|
||||
typeof(Frostbringer), typeof(SerpentsFang), typeof(StaffOfTheMagi),
|
||||
typeof(TheBeserkersMaul), typeof(TheDryadBow), typeof(DivineCountenance),
|
||||
typeof(HatOfTheMagi), typeof(HuntersHeaddress), typeof(SpiritOfTheTotem)
|
||||
};
|
||||
|
||||
public static Type[][] RewardTable { get { return m_RewardTable; } }
|
||||
private static Type[][] m_RewardTable = new Type[][]
|
||||
{
|
||||
new Type[] { typeof(HatOfTheMagi) }, new Type[] { typeof(StaffOfTheMagi) }, new Type[] { typeof(OrnamentOfTheMagician) },
|
||||
new Type[] { typeof(ShadowDancerLeggings) }, new Type[] {typeof(RingOfTheElements) }, new Type[] { typeof(GauntletsOfNobility) },
|
||||
new Type[] { typeof(LeggingsOfBane) }, new Type[] { typeof(MidnightBracers) }, new Type[] { typeof(Glenda) },
|
||||
new Type[] { typeof(BowOfTheInfiniteSwarm) }, new Type[] { typeof(TheDeceiver) }, new Type[] { typeof(TheScholarsHalo) },
|
||||
new Type[] { typeof(DoomRecipeScroll) },
|
||||
new Type[]
|
||||
{
|
||||
typeof(LegacyOfTheDreadLord), typeof(TheTaskmaster),
|
||||
typeof(ArmorOfFortune), typeof(HelmOfInsight),
|
||||
typeof(HolyKnightsBreastplate), typeof(JackalsCollar),
|
||||
typeof(OrnateCrownOfTheHarrower), typeof(TheDragonSlayer),
|
||||
typeof(TunicOfFire), typeof(VoiceOfTheFallenKing),
|
||||
typeof(RingOfTheVile), typeof(BraceletOfHealth),
|
||||
typeof(Aegis), typeof(ArcaneShield),
|
||||
typeof(BladeOfInsanity), typeof(BoneCrusher),
|
||||
typeof(Frostbringer), typeof(SerpentsFang),
|
||||
typeof(TheBeserkersMaul), typeof(TheDryadBow),
|
||||
typeof(HuntersHeaddress), typeof(SpiritOfTheTotem),
|
||||
typeof(AxeOfTheHeavens), typeof(BreathOfTheDead),
|
||||
typeof(DivineCountenance)
|
||||
}
|
||||
};
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
526
Scripts/Services/PointsSystems/PlayerMobileProps.cs
Normal file
526
Scripts/Services/PointsSystems/PlayerMobileProps.cs
Normal file
@@ -0,0 +1,526 @@
|
||||
using System;
|
||||
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Points;
|
||||
using Server.Accounting;
|
||||
using Server.Engines.BulkOrders;
|
||||
using Server.Engines.CityLoyalty;
|
||||
using Server.Misc;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[PropertyObject]
|
||||
public class PointsSystemProps
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return "...";
|
||||
}
|
||||
|
||||
public PlayerMobile Player { get; set; }
|
||||
|
||||
public PointsSystemProps(PlayerMobile pm)
|
||||
{
|
||||
Player = pm;
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double Blackthorn
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.Blackthorn.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.Blackthorn.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double CleanUpBrit
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.CleanUpBritannia.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.CleanUpBritannia.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double VoidPool
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.VoidPool.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.VoidPool.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double Casino
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.CasinoData.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.CasinoData.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double QueensLoyalty
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.QueensLoyalty.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.QueensLoyalty.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double ShameCrystals
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.ShameCrystals.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.ShameCrystals.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double DespiseCrystals
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.DespiseCrystals.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.DespiseCrystals.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double ViceVsVirtue
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.ViceVsVirtue.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.ViceVsVirtue.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double Khaldun
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.Khaldun.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.Khaldun.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double Doom
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.TreasuresOfDoom.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.TreasuresOfDoom.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double Doubloons
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.RisingTide.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.RisingTide.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double Fellowship
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.FellowshipData.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.FellowshipData.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double GauntletPoints
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.DoomGauntlet.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.DoomGauntlet.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double TOTPoints
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.TreasuresOfTokuno.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.TreasuresOfTokuno.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int TOTurnIns
|
||||
{
|
||||
get
|
||||
{
|
||||
return PointsSystem.TreasuresOfTokuno.GetTurnIns(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.TreasuresOfTokuno.GetPlayerEntry<TreasuresOfTokuno.TOTEntry>(Player).TurnIns = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double VASPoints
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)PointsSystem.VirtueArtifacts.GetPoints(Player);
|
||||
}
|
||||
set
|
||||
{
|
||||
PointsSystem.VirtueArtifacts.SetPoints(Player, value);
|
||||
}
|
||||
}
|
||||
|
||||
private CityLoyaltyProps _CityLoyaltyProps;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityLoyaltyProps CityLoyalty
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_CityLoyaltyProps == null)
|
||||
_CityLoyaltyProps = new CityLoyaltyProps(Player);
|
||||
|
||||
return _CityLoyaltyProps;
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[PropertyObject]
|
||||
public class AccountGoldProps
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
if (Player.Account == null)
|
||||
return "...";
|
||||
|
||||
return (Player.Account.TotalCurrency * Account.CurrencyThreshold).ToString("N0", System.Globalization.CultureInfo.GetCultureInfo("en-US"));
|
||||
}
|
||||
|
||||
public PlayerMobile Player { get; set; }
|
||||
|
||||
public AccountGoldProps(PlayerMobile pm)
|
||||
{
|
||||
Player = pm;
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster, AccessLevel.Administrator)]
|
||||
public int AccountGold
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Player.Account == null)
|
||||
return 0;
|
||||
|
||||
return Player.Account.TotalGold;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int AccountPlatinum
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Player.Account == null)
|
||||
return 0;
|
||||
|
||||
return Player.Account.TotalPlat;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double TotalCurrency
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Player.Account == null)
|
||||
return 0;
|
||||
|
||||
return Player.Account.TotalCurrency * Account.CurrencyThreshold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[PropertyObject]
|
||||
public class BODProps
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return "...";
|
||||
}
|
||||
|
||||
public PlayerMobile Player { get; set; }
|
||||
|
||||
public BODProps(PlayerMobile pm)
|
||||
{
|
||||
Player = pm;
|
||||
|
||||
var context = BulkOrderSystem.GetContext(pm, false);
|
||||
|
||||
if (context != null)
|
||||
{
|
||||
foreach (var kvp in context.Entries)
|
||||
{
|
||||
switch (kvp.Key)
|
||||
{
|
||||
case BODType.Smith: Smithy = new BODData(kvp.Key, kvp.Value); break;
|
||||
case BODType.Tailor: Tailor = new BODData(kvp.Key, kvp.Value); break;
|
||||
case BODType.Alchemy: Alchemy = new BODData(kvp.Key, kvp.Value); break;
|
||||
case BODType.Inscription: Inscription = new BODData(kvp.Key, kvp.Value); break;
|
||||
case BODType.Tinkering: Tinkering = new BODData(kvp.Key, kvp.Value); break;
|
||||
case BODType.Cooking: Cooking = new BODData(kvp.Key, kvp.Value); break;
|
||||
case BODType.Fletching: Fletching = new BODData(kvp.Key, kvp.Value); break;
|
||||
case BODType.Carpentry: Carpentry = new BODData(kvp.Key, kvp.Value); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BODData Tailor { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BODData Smithy { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BODData Alchemy { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BODData Carpentry { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BODData Cooking { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BODData Fletching { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BODData Inscription { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BODData Tinkering { get; private set; }
|
||||
}
|
||||
|
||||
[PropertyObject]
|
||||
public class BODData
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return "...";
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BODEntry Entry { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BODType Type { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int CachedDeeds { get { return Entry == null ? 0 : Entry.CachedDeeds; } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime LastBulkOrder { get { return Entry == null ? DateTime.MinValue : Entry.LastBulkOrder; } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double BankedPoints { get { return Entry == null ? 0 : Entry.BankedPoints; } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int PendingRewardPoints { get { return Entry == null ? 0 : Entry.PendingRewardPoints; } }
|
||||
|
||||
public BODData(BODType type, BODEntry entry)
|
||||
{
|
||||
Type = type;
|
||||
Entry = entry;
|
||||
}
|
||||
}
|
||||
|
||||
[PropertyObject]
|
||||
public class CityLoyaltyProps
|
||||
{
|
||||
public PlayerMobile Player { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityLoyaltyEntry Moonglow
|
||||
{
|
||||
get
|
||||
{
|
||||
return CityLoyaltySystem.Moonglow.GetPlayerEntry<CityLoyaltyEntry>(Player);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityLoyaltyEntry Britain
|
||||
{
|
||||
get
|
||||
{
|
||||
return CityLoyaltySystem.Britain.GetPlayerEntry<CityLoyaltyEntry>(Player);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityLoyaltyEntry Jhelom
|
||||
{
|
||||
get
|
||||
{
|
||||
return CityLoyaltySystem.Jhelom.GetPlayerEntry<CityLoyaltyEntry>(Player);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityLoyaltyEntry Yew
|
||||
{
|
||||
get
|
||||
{
|
||||
return CityLoyaltySystem.Yew.GetPlayerEntry<CityLoyaltyEntry>(Player);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityLoyaltyEntry Minoc
|
||||
{
|
||||
get
|
||||
{
|
||||
return CityLoyaltySystem.Minoc.GetPlayerEntry<CityLoyaltyEntry>(Player);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityLoyaltyEntry Trinsic
|
||||
{
|
||||
get
|
||||
{
|
||||
return CityLoyaltySystem.Trinsic.GetPlayerEntry<CityLoyaltyEntry>(Player);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityLoyaltyEntry SkaraBrae
|
||||
{
|
||||
get
|
||||
{
|
||||
return CityLoyaltySystem.SkaraBrae.GetPlayerEntry<CityLoyaltyEntry>(Player);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityLoyaltyEntry NewMagincia
|
||||
{
|
||||
get
|
||||
{
|
||||
return CityLoyaltySystem.NewMagincia.GetPlayerEntry<CityLoyaltyEntry>(Player);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityLoyaltyEntry Vesper
|
||||
{
|
||||
get
|
||||
{
|
||||
return CityLoyaltySystem.Vesper.GetPlayerEntry<CityLoyaltyEntry>(Player);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CityTradeSystem.CityTradeEntry TradeEntry
|
||||
{
|
||||
get
|
||||
{
|
||||
return CityLoyaltySystem.CityTrading.GetPlayerEntry<CityTradeSystem.CityTradeEntry>(Player);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
public CityLoyaltyProps(PlayerMobile pm)
|
||||
{
|
||||
Player = pm;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var sys = CityLoyaltySystem.GetCitizenship(Player, false);
|
||||
|
||||
if (sys != null)
|
||||
{
|
||||
return String.Format("Citizenship: {0}", sys.City.ToString());
|
||||
}
|
||||
|
||||
return base.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
463
Scripts/Services/PointsSystems/PointsSystem.cs
Normal file
463
Scripts/Services/PointsSystems/PointsSystem.cs
Normal file
@@ -0,0 +1,463 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.CityLoyalty;
|
||||
using Server.Engines.VvV;
|
||||
using Server.Engines.ArenaSystem;
|
||||
using Server.Engines.SorcerersDungeon;
|
||||
using Server.Misc;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public enum PointsType
|
||||
{
|
||||
None = -1,
|
||||
|
||||
QueensLoyalty,
|
||||
VoidPool,
|
||||
DespiseCrystals,
|
||||
ShameCrystals,
|
||||
CasinoData,
|
||||
|
||||
//City Trading
|
||||
CityTrading,
|
||||
|
||||
// City Loyalty System
|
||||
Moonglow,
|
||||
Britain,
|
||||
Jhelom,
|
||||
Yew,
|
||||
Minoc,
|
||||
Trinsic,
|
||||
SkaraBrae,
|
||||
NewMagincia,
|
||||
Vesper,
|
||||
|
||||
Blackthorn,
|
||||
CleanUpBritannia,
|
||||
ViceVsVirtue,
|
||||
|
||||
TreasuresOfKotlCity,
|
||||
PVPArena,
|
||||
|
||||
Khaldun,
|
||||
Doom,
|
||||
SorcerersDungeon,
|
||||
RisingTide,
|
||||
|
||||
GauntletPoints,
|
||||
TOT,
|
||||
VAS,
|
||||
FellowshipData,
|
||||
}
|
||||
|
||||
public abstract class PointsSystem
|
||||
{
|
||||
public static string FilePath = Path.Combine("Saves/PointsSystem", "Persistence.bin");
|
||||
|
||||
public List<PointsEntry> PlayerTable { get; set; }
|
||||
|
||||
public abstract TextDefinition Name { get; }
|
||||
public abstract PointsType Loyalty { get; }
|
||||
public abstract bool AutoAdd { get; }
|
||||
public abstract double MaxPoints { get; }
|
||||
|
||||
public virtual bool ShowOnLoyaltyGump { get { return true; } }
|
||||
|
||||
public PointsSystem()
|
||||
{
|
||||
PlayerTable = new List<PointsEntry>();
|
||||
|
||||
AddSystem(this);
|
||||
}
|
||||
|
||||
private static void AddSystem(PointsSystem system)
|
||||
{
|
||||
if(Systems.FirstOrDefault(s => s.Loyalty == system.Loyalty) != null)
|
||||
return;
|
||||
|
||||
Systems.Add(system);
|
||||
}
|
||||
|
||||
public virtual void ProcessKill(Mobile victim, Mobile damager)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void ProcessQuest(Mobile from, Type quest)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void ConvertFromOldSystem(PlayerMobile from, double points)
|
||||
{
|
||||
PointsEntry entry = GetEntry(from, false);
|
||||
|
||||
if (entry == null)
|
||||
{
|
||||
if (points > MaxPoints)
|
||||
points = MaxPoints;
|
||||
|
||||
AddEntry(from, true);
|
||||
GetEntry(from).Points = points;
|
||||
|
||||
Utility.PushColor(ConsoleColor.Green);
|
||||
Console.WriteLine("Converted {0} points for {1} to {2}!", (int)points, from.Name, this.GetType().Name);
|
||||
Utility.PopColor();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void AwardPoints(Mobile from, double points, bool quest = false, bool message = true)
|
||||
{
|
||||
if (!(from is PlayerMobile) || points <= 0)
|
||||
return;
|
||||
|
||||
PointsEntry entry = GetEntry(from);
|
||||
|
||||
if (entry != null)
|
||||
{
|
||||
double old = entry.Points;
|
||||
|
||||
SetPoints((PlayerMobile)from, Math.Min(MaxPoints, entry.Points + points));
|
||||
SendMessage((PlayerMobile)from, old, points, quest);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPoints(PlayerMobile pm, double points)
|
||||
{
|
||||
PointsEntry entry = GetEntry(pm);
|
||||
|
||||
if(entry != null)
|
||||
entry.Points = points;
|
||||
}
|
||||
|
||||
public virtual void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
if (quest)
|
||||
from.SendLocalizedMessage(1113719, ((int)points).ToString(), 0x26); //You have received ~1_val~ loyalty points as a reward for completing the quest.
|
||||
else
|
||||
from.SendLocalizedMessage(1115920, String.Format("{0}\t{1}", Name.ToString(), ((int)points).ToString())); // Your loyalty to ~1_GROUP~ has increased by ~2_AMOUNT~;Original
|
||||
}
|
||||
|
||||
public virtual bool DeductPoints(Mobile from, double points, bool message = false)
|
||||
{
|
||||
PointsEntry entry = GetEntry(from);
|
||||
|
||||
if (entry == null || entry.Points < points)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
entry.Points -= points;
|
||||
|
||||
if (message)
|
||||
from.SendLocalizedMessage(1115921, String.Format("{0}\t{1}", Name.ToString(), ((int)points).ToString())); // Your loyalty to ~1_GROUP~ has decreased by ~2_AMOUNT~;Original
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void OnPlayerAdded(PlayerMobile pm)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual PointsEntry AddEntry(PlayerMobile pm, bool existed = false)
|
||||
{
|
||||
PointsEntry entry = GetSystemEntry(pm);
|
||||
|
||||
if (!PlayerTable.Contains(entry))
|
||||
{
|
||||
PlayerTable.Add(entry);
|
||||
|
||||
if(!existed)
|
||||
OnPlayerAdded(pm);
|
||||
}
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
public double GetPoints(Mobile from)
|
||||
{
|
||||
PointsEntry entry = GetEntry(from);
|
||||
|
||||
if (entry != null)
|
||||
return entry.Points;
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
public virtual TextDefinition GetTitle(PlayerMobile from)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public PointsEntry GetEntry(Mobile from, bool create = false)
|
||||
{
|
||||
PlayerMobile pm = from as PlayerMobile;
|
||||
|
||||
if (pm == null)
|
||||
return null;
|
||||
|
||||
PointsEntry entry = PlayerTable.FirstOrDefault(e => e.Player == pm);
|
||||
|
||||
if (entry == null && (create || AutoAdd))
|
||||
entry = AddEntry(pm);
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
public TEntry GetPlayerEntry<TEntry>(Mobile mobile, bool create = false) where TEntry : PointsEntry
|
||||
{
|
||||
PlayerMobile pm = mobile as PlayerMobile;
|
||||
|
||||
if (pm == null)
|
||||
return null;
|
||||
|
||||
TEntry e = PlayerTable.FirstOrDefault(p => p.Player == pm) as TEntry;
|
||||
|
||||
if (e == null && (AutoAdd || create))
|
||||
e = AddEntry(pm) as TEntry;
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override this if you are going to derive Points Entry into a bigger and badder class!
|
||||
/// </summary>
|
||||
/// <param name="pm"></param>
|
||||
/// <returns></returns>
|
||||
public virtual PointsEntry GetSystemEntry(PlayerMobile pm)
|
||||
{
|
||||
return new PointsEntry(pm);
|
||||
}
|
||||
|
||||
public int Version { get; set; }
|
||||
|
||||
public virtual void Serialize(GenericWriter writer)
|
||||
{
|
||||
writer.Write((int)2);
|
||||
|
||||
writer.Write(PlayerTable.Count);
|
||||
|
||||
PlayerTable.ForEach(entry =>
|
||||
{
|
||||
writer.Write(entry.Player);
|
||||
entry.Serialize(writer);
|
||||
});
|
||||
}
|
||||
|
||||
public virtual void Deserialize(GenericReader reader)
|
||||
{
|
||||
Version = reader.ReadInt();
|
||||
|
||||
switch (Version)
|
||||
{
|
||||
case 2: // added serialize/deserialize in all base classes. Poor implementation on my part, should have had from the get-go
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
int count = reader.ReadInt();
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
PlayerMobile player = reader.ReadMobile() as PlayerMobile;
|
||||
PointsEntry entry = GetSystemEntry(player);
|
||||
|
||||
if (Version > 0)
|
||||
entry.Deserialize(reader);
|
||||
else
|
||||
entry.Points = reader.ReadDouble();
|
||||
|
||||
if (player != null)
|
||||
{
|
||||
if (!PlayerTable.Contains(entry))
|
||||
{
|
||||
PlayerTable.Add(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#region Static Methods and Accessors
|
||||
public static PointsSystem GetSystemInstance(PointsType t)
|
||||
{
|
||||
return Systems.FirstOrDefault(s => s.Loyalty == t);
|
||||
}
|
||||
|
||||
public static void OnSave(WorldSaveEventArgs e)
|
||||
{
|
||||
Persistence.Serialize(
|
||||
FilePath,
|
||||
writer =>
|
||||
{
|
||||
writer.Write((int)2);
|
||||
|
||||
writer.Write(Systems.Count);
|
||||
Systems.ForEach(s =>
|
||||
{
|
||||
writer.Write((int)s.Loyalty);
|
||||
s.Serialize(writer);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public static void OnLoad()
|
||||
{
|
||||
Persistence.Deserialize(
|
||||
FilePath,
|
||||
reader =>
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (version < 2)
|
||||
reader.ReadBool();
|
||||
|
||||
PointsType loaded = PointsType.None;
|
||||
|
||||
int count = reader.ReadInt();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
PointsType type = (PointsType)reader.ReadInt();
|
||||
loaded = type;
|
||||
PointsSystem s = GetSystemInstance(type);
|
||||
|
||||
s.Deserialize(reader);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new Exception(String.Format("Points System Failed Load: {0} Last Loaded...", loaded.ToString()));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static List<PointsSystem> Systems { get; set; }
|
||||
|
||||
public static QueensLoyalty QueensLoyalty { get; set; }
|
||||
public static VoidPool VoidPool { get; set; }
|
||||
public static DespiseCrystals DespiseCrystals { get; set; }
|
||||
public static ShameCrystals ShameCrystals { get; set; }
|
||||
public static CasinoData CasinoData { get; set; }
|
||||
public static BlackthornData Blackthorn { get; set; }
|
||||
public static CleanUpBritanniaData CleanUpBritannia { get; set; }
|
||||
public static ViceVsVirtueSystem ViceVsVirtue { get; set; }
|
||||
public static KotlCityData TreasuresOfKotlCity { get; set; }
|
||||
public static PVPArenaSystem ArenaSystem { get; set; }
|
||||
public static KhaldunData Khaldun { get; set; }
|
||||
public static DoomData TreasuresOfDoom { get; set; }
|
||||
public static SorcerersDungeonData SorcerersDungeon { get; set; }
|
||||
public static RisingTide RisingTide { get; set; }
|
||||
public static DoomGauntlet DoomGauntlet { get; set; }
|
||||
public static TreasuresOfTokuno TreasuresOfTokuno { get; set; }
|
||||
public static VirtueArtifactsSystem VirtueArtifacts { get; set; }
|
||||
public static FellowshipData FellowshipData { get; set; }
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
EventSink.WorldSave += OnSave;
|
||||
EventSink.WorldLoad += OnLoad;
|
||||
EventSink.QuestComplete += CompleteQuest;
|
||||
EventSink.OnKilledBy += OnKilledBy;
|
||||
|
||||
Systems = new List<PointsSystem>();
|
||||
|
||||
QueensLoyalty = new QueensLoyalty();
|
||||
VoidPool = new VoidPool();
|
||||
DespiseCrystals = new DespiseCrystals();
|
||||
ShameCrystals = new ShameCrystals();
|
||||
CasinoData = new CasinoData();
|
||||
Blackthorn = new BlackthornData();
|
||||
CleanUpBritannia = new CleanUpBritanniaData();
|
||||
ViceVsVirtue = new ViceVsVirtueSystem();
|
||||
TreasuresOfKotlCity = new KotlCityData();
|
||||
|
||||
CityLoyaltySystem.ConstructSystems();
|
||||
ArenaSystem = new PVPArenaSystem();
|
||||
Khaldun = new KhaldunData();
|
||||
TreasuresOfDoom = new DoomData();
|
||||
SorcerersDungeon = new SorcerersDungeonData();
|
||||
RisingTide = new RisingTide();
|
||||
DoomGauntlet = new DoomGauntlet();
|
||||
TreasuresOfTokuno = new TreasuresOfTokuno();
|
||||
VirtueArtifacts = new VirtueArtifactsSystem();
|
||||
FellowshipData = new FellowshipData();
|
||||
}
|
||||
|
||||
public static void OnKilledBy(OnKilledByEventArgs e)
|
||||
{
|
||||
OnKilledBy(e.Killed, e.KilledBy);
|
||||
}
|
||||
|
||||
public static void OnKilledBy(Mobile victim, Mobile damager)
|
||||
{
|
||||
Systems.ForEach(s => s.ProcessKill(victim, damager));
|
||||
}
|
||||
|
||||
public static void CompleteQuest(QuestCompleteEventArgs e)
|
||||
{
|
||||
Systems.ForEach(s => s.ProcessQuest(e.Mobile, e.QuestType));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class PointsEntry
|
||||
{
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public PlayerMobile Player { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public double Points { get; set; }
|
||||
|
||||
public PointsEntry(PlayerMobile pm)
|
||||
{
|
||||
Player = pm;
|
||||
}
|
||||
|
||||
public PointsEntry(PlayerMobile pm, double points)
|
||||
{
|
||||
Player = pm;
|
||||
Points = points;
|
||||
}
|
||||
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
if (o == null || !(o is PointsEntry))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return ((PointsEntry)o).Player == Player;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
if (Player != null)
|
||||
return Player.GetHashCode();
|
||||
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
public virtual void Serialize(GenericWriter writer)
|
||||
{
|
||||
writer.Write(0);
|
||||
writer.Write(Player);
|
||||
writer.Write(Points);
|
||||
}
|
||||
|
||||
public virtual void Deserialize(GenericReader reader)
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
Player = reader.ReadMobile() as PlayerMobile;
|
||||
Points = reader.ReadDouble();
|
||||
}
|
||||
}
|
||||
}
|
||||
198
Scripts/Services/PointsSystems/QueensLoyalty.cs
Normal file
198
Scripts/Services/PointsSystems/QueensLoyalty.cs
Normal file
@@ -0,0 +1,198 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class QueensLoyalty : PointsSystem
|
||||
{
|
||||
public enum QueensLoyaltyRating
|
||||
{
|
||||
Enemy,
|
||||
Friend,
|
||||
Citizen,
|
||||
Noble
|
||||
}
|
||||
|
||||
public override PointsType Loyalty { get { return PointsType.QueensLoyalty; } }
|
||||
public override TextDefinition Name { get { return m_Name; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return 15000; } }
|
||||
|
||||
private TextDefinition m_Name = new TextDefinition(1095163);
|
||||
|
||||
public QueensLoyalty()
|
||||
{
|
||||
InitializeEntries();
|
||||
}
|
||||
|
||||
public override void ProcessKill(Mobile victim, Mobile damager)
|
||||
{
|
||||
var bc = victim as BaseCreature;
|
||||
|
||||
if(bc == null || bc.Map != Map.TerMur || damager.Map != Map.TerMur)
|
||||
return;
|
||||
|
||||
Type type = bc.GetType();
|
||||
|
||||
if (!Entries.ContainsKey(type))
|
||||
return;
|
||||
|
||||
if (damager is BaseCreature && (((BaseCreature)damager).Controlled || ((BaseCreature)damager).Summoned))
|
||||
damager = ((BaseCreature)damager).GetMaster();
|
||||
|
||||
if (damager == null)
|
||||
return;
|
||||
|
||||
if(bc.GetHighestDamager() == damager)
|
||||
{
|
||||
AwardPoints(damager, Entries[type].Item1, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
AwardPoints(damager, Entries[type].Item2, false);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ProcessQuest(Mobile from, Type type)
|
||||
{
|
||||
if (from == null || type == null)
|
||||
return;
|
||||
|
||||
if(Entries.ContainsKey(type))
|
||||
AwardPoints(from, Entries[type].Item1, true);
|
||||
}
|
||||
|
||||
public override void OnPlayerAdded(PlayerMobile pm)
|
||||
{
|
||||
if (pm.Race == Race.Gargoyle)
|
||||
{
|
||||
AwardPoints(pm, 2000, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsNoble(Mobile from)
|
||||
{
|
||||
return GetLoyalty(from as PlayerMobile) >= QueensLoyaltyRating.Noble;
|
||||
}
|
||||
|
||||
public QueensLoyaltyRating GetLoyalty(PlayerMobile from)
|
||||
{
|
||||
if (from == null)
|
||||
return QueensLoyaltyRating.Enemy;
|
||||
|
||||
double points = GetPoints(from);
|
||||
|
||||
if(points <= 0)
|
||||
return QueensLoyaltyRating.Enemy;
|
||||
if(points <= 1999)
|
||||
return QueensLoyaltyRating.Friend;
|
||||
if(points <= 9999)
|
||||
return QueensLoyaltyRating.Citizen;
|
||||
|
||||
return QueensLoyaltyRating.Noble;
|
||||
}
|
||||
|
||||
public override TextDefinition GetTitle(PlayerMobile from)
|
||||
{
|
||||
switch(GetLoyalty(from))
|
||||
{
|
||||
default:
|
||||
case QueensLoyaltyRating.Friend: return new TextDefinition(1095166);
|
||||
case QueensLoyaltyRating.Noble: return new TextDefinition(1095167);
|
||||
case QueensLoyaltyRating.Enemy: return new TextDefinition(1095164);
|
||||
case QueensLoyaltyRating.Citizen: return new TextDefinition(1095165);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<Type, Tuple<double, double>> Entries;
|
||||
|
||||
public void InitializeEntries()
|
||||
{
|
||||
Entries = new Dictionary<Type, Tuple<double, double>>();
|
||||
|
||||
Entries[typeof(FireAnt)] = new Tuple<double, double>(2, .2);
|
||||
Entries[typeof(LavaLizard)] = new Tuple<double, double>(2, .2);
|
||||
Entries[typeof(LavaSnake)] = new Tuple<double, double>(2, .2);
|
||||
Entries[typeof(CoralSnake)] = new Tuple<double, double>(3, .3);
|
||||
Entries[typeof(Korpre)] = new Tuple<double, double>(3, .3);
|
||||
Entries[typeof(Ortanord)] = new Tuple<double, double>(3, .3);
|
||||
//Entries[typeof(ClanRibbonCourtier)] = new Tuple<double, double>(5, .5);
|
||||
Entries[typeof(Daemon)] = new Tuple<double, double>(5, .5);
|
||||
Entries[typeof(TrapdoorSpider)] = new Tuple<double, double>(5, .5);
|
||||
Entries[typeof(Gremlin)] = new Tuple<double, double>(5, .5);
|
||||
Entries[typeof(WolfSpider)] = new Tuple<double, double>(5, .5);
|
||||
Entries[typeof(GrayGoblin)] = new Tuple<double, double>(8, .8);
|
||||
Entries[typeof(GreenGoblin)] = new Tuple<double, double>(8, .8);
|
||||
Entries[typeof(Anlorzen)] = new Tuple<double, double>(10, 1);
|
||||
Entries[typeof(Anzuanord)] = new Tuple<double, double>(10, 1);
|
||||
Entries[typeof(Ballem)] = new Tuple<double, double>(10, 1);
|
||||
Entries[typeof(LowlandBoura)] = new Tuple<double, double>(10, 1);
|
||||
Entries[typeof(Kepetch)] = new Tuple<double, double>(10, 1);
|
||||
Entries[typeof(GrayGoblinKeeper)] = new Tuple<double, double>(10, 1);
|
||||
Entries[typeof(GrayGoblinMage)] = new Tuple<double, double>(10, 1);
|
||||
Entries[typeof(GreenGoblinAlchemist)] = new Tuple<double, double>(10, 1);
|
||||
Entries[typeof(GreenGoblinScout)] = new Tuple<double, double>(10, 1);
|
||||
Entries[typeof(Rotworm)] = new Tuple<double, double>(10, 1);
|
||||
Entries[typeof(Skree)] = new Tuple<double, double>(15, 1.5);
|
||||
Entries[typeof(Slith)] = new Tuple<double, double>(15, 1.5);
|
||||
Entries[typeof(BloodWorm)] = new Tuple<double, double>(15, 1.5);
|
||||
Entries[typeof(HighPlainsBoura)] = new Tuple<double, double>(15, 1.5);
|
||||
Entries[typeof(PutridUndeadGargoyle)] = new Tuple<double, double>(15, 1.5);
|
||||
Entries[typeof(Anlorlem)] = new Tuple<double, double>(20, 2);
|
||||
Entries[typeof(Ballem)] = new Tuple<double, double>(20, 2);
|
||||
Entries[typeof(Raptor)] = new Tuple<double, double>(20, 2);
|
||||
Entries[typeof(Relanord)] = new Tuple<double, double>(20, 2);
|
||||
Entries[typeof(StoneSlith)] = new Tuple<double, double>(20, 2);
|
||||
Entries[typeof(LavaElemental)] = new Tuple<double, double>(20, 2);
|
||||
Entries[typeof(IronBeetle)] = new Tuple<double, double>(20, 2);
|
||||
Entries[typeof(KepetchAmbusher)] = new Tuple<double, double>(25, 2.5);
|
||||
Entries[typeof(ToxicSlith)] = new Tuple<double, double>(30, 3);
|
||||
Entries[typeof(Anlorvaglem)] = new Tuple<double, double>(50, 5);
|
||||
Entries[typeof(VitaviRenowned)] = new Tuple<double, double>(50, 5);
|
||||
Entries[typeof(WyvernRenowned)] = new Tuple<double, double>(50, 5);
|
||||
Entries[typeof(MinionOfScelestus)] = new Tuple<double, double>(35, 3.5);
|
||||
Entries[typeof(GargishRouser)] = new Tuple<double, double>(50, 5.0);
|
||||
Entries[typeof(GargishOutcast)] = new Tuple<double, double>(25, 2.5);
|
||||
Entries[typeof(VoidManifestation)] = new Tuple<double, double>(50, 5);
|
||||
Entries[typeof(Navrey)] = new Tuple<double, double>(75, 7.5);
|
||||
Entries[typeof(Niporailem)] = new Tuple<double, double>(75, 7.5);
|
||||
Entries[typeof(Navrey)] = new Tuple<double, double>(75, 7.5);
|
||||
Entries[typeof(StygianDragon)] = new Tuple<double, double>(150, 15.0);
|
||||
Entries[typeof(PrimevalLich)] = new Tuple<double, double>(150, 15.0);
|
||||
Entries[typeof(Medusa)] = new Tuple<double, double>(150, 15.0);
|
||||
Entries[typeof(AbyssalInfernal)] = new Tuple<double, double>(150, 15.0);
|
||||
|
||||
//Quests
|
||||
Entries[typeof(ABrokenVaseQuest)] = new Tuple<double, double>(5, 0.5);
|
||||
Entries[typeof(PuttingThePiecesTogetherQuest)] = new Tuple<double, double>(15, 1.5);
|
||||
Entries[typeof(ALittleSomething)] = new Tuple<double, double>(25, 2.5);
|
||||
Entries[typeof(TheExchangeQuest)] = new Tuple<double, double>(35, 3.5);
|
||||
Entries[typeof(YeOldeGargishQuest)] = new Tuple<double, double>(50, 5.0);
|
||||
Entries[typeof(AWorthyPropositionQuest)] = new Tuple<double, double>(50, 5.0);
|
||||
Entries[typeof(UnusualGoods)] = new Tuple<double, double>(75, 7.5);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
if (Version >= 2)
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
|
||||
// all deserialize code in here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Services/PointsSystems/ShameCrystals.cs
Normal file
52
Scripts/Services/PointsSystems/ShameCrystals.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class ShameCrystals : PointsSystem
|
||||
{
|
||||
public override PointsType Loyalty { get { return PointsType.ShameCrystals; } }
|
||||
public override TextDefinition Name { get { return m_Name; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return double.MaxValue; } }
|
||||
|
||||
private TextDefinition m_Name = new TextDefinition(1151673);
|
||||
|
||||
public ShameCrystals()
|
||||
{
|
||||
}
|
||||
|
||||
public override void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
from.SendLocalizedMessage(1151634, String.Format("{0}\t{1}\t{2}", ((int)points).ToString(), "Shame", ((int)old + points).ToString())); // You gain ~1_AMT~ dungeon points for ~2_NAME~. Your total is now ~3_TOTAL~.
|
||||
}
|
||||
|
||||
public override TextDefinition GetTitle(PlayerMobile from)
|
||||
{
|
||||
return new TextDefinition(1123444);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
if (Version >= 2)
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
|
||||
// all deserialize code in here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
122
Scripts/Services/PointsSystems/VirtueArtifactsSystem.cs
Normal file
122
Scripts/Services/PointsSystems/VirtueArtifactsSystem.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Engines.SeasonalEvents;
|
||||
using Server.Engines.Points;
|
||||
|
||||
namespace Server.Misc
|
||||
{
|
||||
public class VirtueArtifactsSystem : PointsSystem
|
||||
{
|
||||
public static bool Enabled { get { return SeasonalEventSystem.IsActive(EventType.VirtueArtifacts); } }
|
||||
|
||||
private static Type[] m_VirtueArtifacts = new Type[]
|
||||
{
|
||||
typeof( KatrinasCrook ), typeof( JaanasStaff ), typeof( DragonsEnd ), typeof( AnkhPendant ),
|
||||
typeof( SentinelsGuard ), typeof( LordBlackthornsExemplar ), typeof( MapOfTheKnownWorld ), typeof( TenthAnniversarySculpture ),
|
||||
typeof( CompassionArms ), typeof( JusticeBreastplate ), typeof( ValorGauntlets ), typeof( HonestyGorget ),
|
||||
typeof( SpiritualityHelm ), typeof( HonorLegs ), typeof( SacrificeSollerets )
|
||||
};
|
||||
|
||||
public static Type[] Artifacts { get { return m_VirtueArtifacts; } }
|
||||
|
||||
public override PointsType Loyalty { get { return PointsType.VAS; } }
|
||||
public override TextDefinition Name { get { return m_Name; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return double.MaxValue; } }
|
||||
public override bool ShowOnLoyaltyGump { get { return false; } }
|
||||
|
||||
private TextDefinition m_Name = new TextDefinition("Virtue Artifact System");
|
||||
|
||||
public VirtueArtifactsSystem()
|
||||
{
|
||||
}
|
||||
|
||||
private bool CheckLocation(Mobile m)
|
||||
{
|
||||
Region r = m.Region;
|
||||
|
||||
if (m is BaseCreature && ((BaseCreature)m).IsChampionSpawn)
|
||||
return false;
|
||||
|
||||
if (r.IsPartOf<Server.Regions.HouseRegion>() || Server.Multis.BaseBoat.FindBoatAt(m, m.Map) != null)
|
||||
return false;
|
||||
|
||||
return (r.IsPartOf("Covetous") || r.IsPartOf("Deceit") || r.IsPartOf("Despise") || r.IsPartOf("Destard") ||
|
||||
r.IsPartOf("Hythloth") || r.IsPartOf("Shame") || r.IsPartOf("Wrong"));
|
||||
}
|
||||
|
||||
public override void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
}
|
||||
|
||||
public override TextDefinition GetTitle(PlayerMobile from)
|
||||
{
|
||||
return new TextDefinition("Virtue Artifact System");
|
||||
}
|
||||
|
||||
public override void ProcessKill(Mobile victim, Mobile killer)
|
||||
{
|
||||
PlayerMobile pm = killer as PlayerMobile;
|
||||
BaseCreature bc = victim as BaseCreature;
|
||||
|
||||
if (!Enabled || pm == null || bc == null || !CheckLocation(bc) || !CheckLocation(pm) || !killer.InRange(victim, 18) || !killer.Alive || bc.GivenSpecialArtifact)
|
||||
return;
|
||||
|
||||
if (bc.Controlled || bc.Owners.Count > 0 || bc.Fame <= 0)
|
||||
return;
|
||||
|
||||
int luck = Math.Max(0, pm.RealLuck);
|
||||
AwardPoints(pm, (int)Math.Max(0, (bc.Fame * (1 + Math.Sqrt(luck) / 100))));
|
||||
|
||||
var vapoints = GetPoints(pm);
|
||||
const double A = 0.000863316841;
|
||||
const double B = 0.00000425531915;
|
||||
|
||||
double chance = A * Math.Pow(10, B * vapoints);
|
||||
|
||||
double roll = Utility.RandomDouble();
|
||||
|
||||
if (chance > roll)
|
||||
{
|
||||
Item i = null;
|
||||
|
||||
try
|
||||
{
|
||||
i = Activator.CreateInstance(m_VirtueArtifacts[Utility.Random(m_VirtueArtifacts.Length)]) as Item;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (i != null)
|
||||
{
|
||||
killer.PlaySound(0x5B4);
|
||||
pm.SendLocalizedMessage(1062317); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
|
||||
|
||||
if (!pm.PlaceInBackpack(i))
|
||||
{
|
||||
if (pm.BankBox != null && pm.BankBox.TryDropItem(killer, i, false))
|
||||
pm.SendLocalizedMessage(1079730); // The item has been placed into your bank box.
|
||||
else
|
||||
{
|
||||
pm.SendLocalizedMessage(1072523); // You find an artifact, but your backpack and bank are too full to hold it.
|
||||
i.MoveToWorld(pm.Location, pm.Map);
|
||||
}
|
||||
}
|
||||
|
||||
bc.GivenSpecialArtifact = true;
|
||||
SetPoints(pm, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
76
Scripts/Services/PointsSystems/VoidPool.cs
Normal file
76
Scripts/Services/PointsSystems/VoidPool.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Engines.VoidPool;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class VoidPool : PointsSystem
|
||||
{
|
||||
public override PointsType Loyalty { get { return PointsType.VoidPool; } }
|
||||
public override TextDefinition Name { get { return m_Name; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return double.MaxValue; } }
|
||||
|
||||
private TextDefinition m_Name = new TextDefinition(1152733);
|
||||
|
||||
public VoidPool()
|
||||
{
|
||||
}
|
||||
|
||||
public override void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
from.SendLocalizedMessage(1152649, String.Format("{0}\t{1}", from.Map.ToString(), points));
|
||||
// For your participation in the Battle for the Void Pool on ~1_FACET~, you have received ~2_POINTS~ reward points. Any reward points you have accumulated may be redeemed by visiting Vela in Cove.
|
||||
}
|
||||
|
||||
public override TextDefinition GetTitle(PlayerMobile from)
|
||||
{
|
||||
return new TextDefinition(1152531); // The Void Pool
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
if (Version >= 2)
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
|
||||
// all deserialize code in here
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class VoidPoolInfo : ContextMenuEntry
|
||||
{
|
||||
private Mobile m_From;
|
||||
private VoidPoolController m_Controller;
|
||||
|
||||
public VoidPoolInfo(Mobile from, VoidPoolController controller)
|
||||
: base(1152531, -1) // The Void Pool
|
||||
{
|
||||
m_From = from;
|
||||
m_Controller = controller;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if (m_From is PlayerMobile && m_Controller != null)
|
||||
{
|
||||
m_From.SendGump(new VoidPoolGump(m_Controller, m_From as PlayerMobile));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user