Skip to content

Commit 01e7eb3

Browse files
committed
Death Rattle
1 parent d4cbd3b commit 01e7eb3

File tree

7 files changed

+98
-218
lines changed

7 files changed

+98
-218
lines changed
174 KB
Binary file not shown.

Zolian.Server.Base/GameScripts/Creations/RewardScript.cs

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,14 @@ public abstract class RewardScript
7474
[(551, 600)] = ["Flame-Etched Dragon's Cingulum", "Wind-Etched Dragon's Cingulum", "Earth-Etched Dragon's Cingulum", "Sea-Etched Dragon's Cingulum", "Void-Etched Dragon's Cingulum", "Holy-Etched Dragon's Cingulum"],
7575
[(601, 650)] = ["Void-Etched Dragon's Cingulum", "Holy-Etched Dragon's Cingulum"],
7676
[(651, 700)] = ["Skull Dragon's Void Clasp", "Skull Dragon's Holy Clasp"],
77-
[(701, 750)] = null,
78-
[(751, 800)] = null,
79-
[(801, 850)] = null,
80-
[(851, 900)] = null,
81-
[(901, 950)] = null,
82-
[(951, 1000)] = null
77+
[(701, 750)] = ["Holy Mantled Belt", "Void Mantled Belt", "Fire Mantled Belt", "Wind Mantled Belt", "Water Mantled Belt", "Earth Mantled Belt"],
78+
[(751, 800)] = ["Holy Sigilbound Belt", "Void Sigilbound Belt", "Fire Sigilbound Belt", "Wind Sigilbound Belt", "Water Sigilbound Belt", "Earth Sigilbound Belt"],
79+
[(801, 850)] = ["Holy Lithe Girdle", "Void Lithe Girdle", "Fire Lithe Girdle", "Wind Lithe Girdle", "Water Lithe Girdle", "Earth Lithe Girdle"],
80+
[(851, 900)] = ["Holy Runewoven Belt", "Void Runewoven Belt"],
81+
[(901, 950)] = ["Fire Ascendant Belt", "Wind Ascendant Belt", "Water Ascendant Belt", "Earth Ascendant Belt"],
82+
[(951, 980)] = ["Holy Ascendant Belt", "Void Ascendant Belt"],
83+
[(981, 994)] = ["Holy Sovereign Dragon Girdle", "Void Sovereign Dragon Girdle"],
84+
[(995, 1000)] = ["Holy Abyssal Girdle", "Void Abyssal Girdle"]
8385
};
8486

8587
protected static readonly Dictionary<(int, int), List<string>> BootDrops = new()
@@ -109,13 +111,15 @@ public abstract class RewardScript
109111
[(501, 550)] = ["Atlantis Sandals", "Depth Voyagers"],
110112
[(551, 600)] = ["Obsidian Tipped Voyagers"],
111113
[(601, 650)] = ["Laced Obsidian Boots"],
112-
[(651, 700)] = null,
113-
[(701, 750)] = null,
114+
[(651, 700)] = ["Shadow Wrappings"],
115+
[(701, 750)] = ["Mantled Treads"],
114116
[(751, 800)] = null,
115-
[(801, 850)] = null,
116-
[(851, 900)] = null,
117-
[(901, 950)] = null,
118-
[(951, 1000)] = null
117+
[(801, 850)] = ["Sigilbound Sabatons", "Lithe Sandals", "Iced Lithe Sandals"],
118+
[(851, 900)] = ["Runewoven Sandals", "Pitch Runewoven Sandals"],
119+
[(901, 950)] = ["Graymaw Battle Boots"],
120+
[(951, 980)] = ["Ascendant Treads"],
121+
[(981, 994)] = ["Traveler's Treads", "Pegasus's Boots"],
122+
[(995, 1000)] = ["Sovereign Dragon Boots", "Abyssal Treads"]
119123
};
120124

121125
protected static readonly Dictionary<(int, int), List<string>> EarringDrops = new()

Zolian.Server.Base/GameScripts/Formulas/RiftRewards.cs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ private void GenerateAbility(Aisling player, bool canCrit = false)
336336

337337
var partyDiff = party.ExpLevel + player.AbpLevel - _monster.Template.Level;
338338
var partyExp = LevelRestrictionsOnExpAp(ap, partyDiff);
339-
339+
340340
party.Client.EnqueueAbilityEvent(party, (int)partyExp, true);
341341
}
342342
}
@@ -414,6 +414,27 @@ private static List<string> JoinList(Monster monster)
414414
if (wrist != null)
415415
dropList.AddRange(wrist);
416416

417-
return dropList;
417+
// Restriction on items above level 750 to not drop in Rifts
418+
var filteredDropList = new List<string>(dropList.Count);
419+
420+
foreach (var item in dropList)
421+
{
422+
// If the item template does not exist, exclude it
423+
if (!ServerSetup.Instance.GlobalItemTemplateCache.TryGetValue(
424+
item, out Templates.ItemTemplate template))
425+
{
426+
continue;
427+
}
428+
429+
// Exclude items whose combined level requirement is 750 or higher
430+
if (template.LevelRequired + template.JobLevelRequired >= 750)
431+
{
432+
continue;
433+
}
434+
435+
filteredDropList.Add(item);
436+
}
437+
438+
return filteredDropList;
418439
}
419440
}

Zolian.Server.Base/GameScripts/Items/Consumable.cs

Lines changed: 6 additions & 198 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ public override void OnUse(Sprite sprite, byte slot)
14391439
#endregion
14401440
#region Rift Chests
14411441

1442-
case "Rift Chest lv. 500":
1442+
case "Rift Boss Chest":
14431443
{
14441444
if (aisling.HasItem("Moonstone Lockpick"))
14451445
{
@@ -1460,207 +1460,15 @@ public override void OnUse(Sprite sprite, byte slot)
14601460

14611461
stockingItem = rand switch
14621462
{
1463-
> 0 and <= 0.20 => stockingItem.Create(aisling, "Cosmic Sabre", quality, variance,
1464-
wVariance),
1465-
> 0.20 and <= 0.40 => stockingItem.Create(aisling, "Slick Shades", quality, variance,
1463+
> 0 and <= 0.20 => stockingItem.Create(aisling, "MewMew Claws", quality, variance,
14661464
wVariance),
1467-
> 0.40 and <= 0.60 => stockingItem.Create(aisling, "Cathonic Shield", quality, variance,
1465+
> 0.20 and <= 0.40 => stockingItem.Create(aisling, "", quality, variance,
14681466
wVariance),
1469-
> 0.60 and <= 0.80 => stockingItem.Create(aisling, "Kalkuri", quality, variance,
1470-
wVariance),
1471-
> 0.80 => stockingItem.Create(aisling, "Queen's Bow", quality, variance,
1467+
> 0.40 and <= 0.60 => stockingItem.Create(aisling, "", quality, variance,
14721468
wVariance),
1473-
_ => stockingItem
1474-
};
1475-
1476-
stockingItem.GiveTo(client.Aisling);
1477-
client.Aisling.Inventory.RemoveFromInventory(client, Item);
1478-
return;
1479-
}
1480-
1481-
var lockpick = aisling.HasItemReturnItem("Moonstone Lockpick");
1482-
aisling.Inventory.RemoveRange(client, lockpick, 1);
1483-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=bLockpick snapped!");
1484-
return;
1485-
}
1486-
1487-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=bIt's Locked!");
1488-
return;
1489-
}
1490-
case "Rift Chest lv. 600":
1491-
{
1492-
if (aisling.HasItem("Moonstone Lockpick"))
1493-
{
1494-
var chance = Generator.RandomPercentPrecise();
1495-
1496-
if (chance <= .80)
1497-
{
1498-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=qClick! Nice, it opened!");
1499-
aisling.SendAnimationNearby(391, aisling.Position);
1500-
client.Aisling.SendTargetedClientMethod(PlayerScope.NearbyAislings, c => c.SendSound(132, false));
1501-
client.Aisling.GiveGold((uint)Random.Shared.Next(25_000_000, 42_000_000));
1502-
1503-
var rand = Generator.RandomPercentPrecise();
1504-
var stockingItem = new Item();
1505-
var quality = ItemQualityVariance.DetermineHighQuality();
1506-
var variance = ItemQualityVariance.DetermineVariance();
1507-
var wVariance = ItemQualityVariance.DetermineWeaponVariance();
1508-
1509-
stockingItem = rand switch
1510-
{
1511-
> 0 and <= 0.20 => stockingItem.Create(aisling, "Cosmic Sabre", quality, variance,
1512-
wVariance),
1513-
> 0.20 and <= 0.40 => stockingItem.Create(aisling, "Slick Shades", quality, variance,
1514-
wVariance),
1515-
> 0.40 and <= 0.60 => stockingItem.Create(aisling, "Cathonic Shield", quality, variance,
1469+
> 0.60 and <= 0.80 => stockingItem.Create(aisling, "", quality, variance,
15161470
wVariance),
1517-
> 0.60 and <= 0.80 => stockingItem.Create(aisling, "Kalkuri", quality, variance,
1518-
wVariance),
1519-
> 0.80 => stockingItem.Create(aisling, "Queen's Bow", quality, variance,
1520-
wVariance),
1521-
_ => stockingItem
1522-
};
1523-
1524-
stockingItem.GiveTo(client.Aisling);
1525-
client.Aisling.Inventory.RemoveFromInventory(client, Item);
1526-
return;
1527-
}
1528-
1529-
var lockpick = aisling.HasItemReturnItem("Moonstone Lockpick");
1530-
aisling.Inventory.RemoveRange(client, lockpick, 1);
1531-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=bLockpick snapped!");
1532-
return;
1533-
}
1534-
1535-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=bIt's Locked!");
1536-
return;
1537-
}
1538-
case "Rift Chest lv. 700":
1539-
{
1540-
if (aisling.HasItem("Moonstone Lockpick"))
1541-
{
1542-
var chance = Generator.RandomPercentPrecise();
1543-
1544-
if (chance <= .80)
1545-
{
1546-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=qClick! Nice, it opened!");
1547-
aisling.SendAnimationNearby(391, aisling.Position);
1548-
client.Aisling.SendTargetedClientMethod(PlayerScope.NearbyAislings, c => c.SendSound(132, false));
1549-
client.Aisling.GiveGold((uint)Random.Shared.Next(25_000_000, 42_000_000));
1550-
1551-
var rand = Generator.RandomPercentPrecise();
1552-
var stockingItem = new Item();
1553-
var quality = ItemQualityVariance.DetermineHighQuality();
1554-
var variance = ItemQualityVariance.DetermineVariance();
1555-
var wVariance = ItemQualityVariance.DetermineWeaponVariance();
1556-
1557-
stockingItem = rand switch
1558-
{
1559-
> 0 and <= 0.20 => stockingItem.Create(aisling, "Cosmic Sabre", quality, variance,
1560-
wVariance),
1561-
> 0.20 and <= 0.40 => stockingItem.Create(aisling, "Slick Shades", quality, variance,
1562-
wVariance),
1563-
> 0.40 and <= 0.60 => stockingItem.Create(aisling, "Cathonic Shield", quality, variance,
1564-
wVariance),
1565-
> 0.60 and <= 0.80 => stockingItem.Create(aisling, "Kalkuri", quality, variance,
1566-
wVariance),
1567-
> 0.80 => stockingItem.Create(aisling, "Queen's Bow", quality, variance,
1568-
wVariance),
1569-
_ => stockingItem
1570-
};
1571-
1572-
stockingItem.GiveTo(client.Aisling);
1573-
client.Aisling.Inventory.RemoveFromInventory(client, Item);
1574-
return;
1575-
}
1576-
1577-
var lockpick = aisling.HasItemReturnItem("Moonstone Lockpick");
1578-
aisling.Inventory.RemoveRange(client, lockpick, 1);
1579-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=bLockpick snapped!");
1580-
return;
1581-
}
1582-
1583-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=bIt's Locked!");
1584-
return;
1585-
}
1586-
case "Rift Chest lv. 800":
1587-
{
1588-
if (aisling.HasItem("Moonstone Lockpick"))
1589-
{
1590-
var chance = Generator.RandomPercentPrecise();
1591-
1592-
if (chance <= .80)
1593-
{
1594-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=qClick! Nice, it opened!");
1595-
aisling.SendAnimationNearby(391, aisling.Position);
1596-
client.Aisling.SendTargetedClientMethod(PlayerScope.NearbyAislings, c => c.SendSound(132, false));
1597-
client.Aisling.GiveGold((uint)Random.Shared.Next(25_000_000, 42_000_000));
1598-
1599-
var rand = Generator.RandomPercentPrecise();
1600-
var stockingItem = new Item();
1601-
var quality = ItemQualityVariance.DetermineHighQuality();
1602-
var variance = ItemQualityVariance.DetermineVariance();
1603-
var wVariance = ItemQualityVariance.DetermineWeaponVariance();
1604-
1605-
stockingItem = rand switch
1606-
{
1607-
> 0 and <= 0.20 => stockingItem.Create(aisling, "Cosmic Sabre", quality, variance,
1608-
wVariance),
1609-
> 0.20 and <= 0.40 => stockingItem.Create(aisling, "Slick Shades", quality, variance,
1610-
wVariance),
1611-
> 0.40 and <= 0.60 => stockingItem.Create(aisling, "Cathonic Shield", quality, variance,
1612-
wVariance),
1613-
> 0.60 and <= 0.80 => stockingItem.Create(aisling, "Kalkuri", quality, variance,
1614-
wVariance),
1615-
> 0.80 => stockingItem.Create(aisling, "Queen's Bow", quality, variance,
1616-
wVariance),
1617-
_ => stockingItem
1618-
};
1619-
1620-
stockingItem.GiveTo(client.Aisling);
1621-
client.Aisling.Inventory.RemoveFromInventory(client, Item);
1622-
return;
1623-
}
1624-
1625-
var lockpick = aisling.HasItemReturnItem("Moonstone Lockpick");
1626-
aisling.Inventory.RemoveRange(client, lockpick, 1);
1627-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=bLockpick snapped!");
1628-
return;
1629-
}
1630-
1631-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=bIt's Locked!");
1632-
return;
1633-
}
1634-
case "Rift Chest lv. 900":
1635-
{
1636-
if (aisling.HasItem("Moonstone Lockpick"))
1637-
{
1638-
var chance = Generator.RandomPercentPrecise();
1639-
1640-
if (chance <= .80)
1641-
{
1642-
client.SendServerMessage(ServerMessageType.ActiveMessage, "{=qClick! Nice, it opened!");
1643-
aisling.SendAnimationNearby(391, aisling.Position);
1644-
client.Aisling.SendTargetedClientMethod(PlayerScope.NearbyAislings, c => c.SendSound(132, false));
1645-
client.Aisling.GiveGold((uint)Random.Shared.Next(25_000_000, 42_000_000));
1646-
1647-
var rand = Generator.RandomPercentPrecise();
1648-
var stockingItem = new Item();
1649-
var quality = ItemQualityVariance.DetermineHighQuality();
1650-
var variance = ItemQualityVariance.DetermineVariance();
1651-
var wVariance = ItemQualityVariance.DetermineWeaponVariance();
1652-
1653-
stockingItem = rand switch
1654-
{
1655-
> 0 and <= 0.20 => stockingItem.Create(aisling, "Cosmic Sabre", quality, variance,
1656-
wVariance),
1657-
> 0.20 and <= 0.40 => stockingItem.Create(aisling, "Slick Shades", quality, variance,
1658-
wVariance),
1659-
> 0.40 and <= 0.60 => stockingItem.Create(aisling, "Cathonic Shield", quality, variance,
1660-
wVariance),
1661-
> 0.60 and <= 0.80 => stockingItem.Create(aisling, "Kalkuri", quality, variance,
1662-
wVariance),
1663-
> 0.80 => stockingItem.Create(aisling, "Queen's Bow", quality, variance,
1471+
> 0.80 => stockingItem.Create(aisling, "", quality, variance,
16641472
wVariance),
16651473
_ => stockingItem
16661474
};

0 commit comments

Comments
 (0)