Wow johndonkid, that was very helpful. I'm so glad you chimed in with your words of wisdom.
uogenerals, here's what you're looking for in ChampionSpawn.cs (Scripts->Engines->CannedEvil)
Code:
public static void GiveScrollTo(Mobile killer, SpecialScroll scroll)
{
if (scroll == null || killer == null) //sanity
return;
if (scroll is ScrollofTranscendence)
killer.SendLocalizedMessage(1094936); // You have received a Scroll of Transcendence!
else
killer.SendLocalizedMessage(1049524); // You have received a scroll of power!
if (killer.Alive)
killer.AddToBackpack(scroll);
else
{
if (killer.Corpse != null && !killer.Corpse.Deleted)
killer.Corpse.DropItem(scroll);
else
killer.AddToBackpack(scroll);
}
// Justice reward
PlayerMobile pm = (PlayerMobile)killer;
for (int j = 0; j < pm.JusticeProtectors.Count; ++j)
{
Mobile prot = (Mobile)pm.JusticeProtectors[j];
if (prot.Map != killer.Map || prot.Kills >= 5 || prot.Criminal || !JusticeVirtue.CheckMapRegion(killer, prot))
continue;
int chance = 0;
switch (VirtueHelper.GetLevel(prot, VirtueName.Justice))
{
case VirtueLevel.Seeker: chance = 60; break;
case VirtueLevel.Follower: chance = 80; break;
case VirtueLevel.Knight: chance = 100; break;
}
if (chance > Utility.Random(100))
{
try
{
prot.SendLocalizedMessage(1049368); // You have been rewarded for your dedication to Justice!
SpecialScroll scrollDupe = Activator.CreateInstance(scroll.GetType()) as SpecialScroll;
if (scrollDupe != null)
{
scrollDupe.Skill = scroll.Skill;
scrollDupe.Value = scroll.Value;
prot.AddToBackpack(scrollDupe);
}
}
catch { }
}
}
}
Also this, which you can find just a few lines down from the above code in the OnSlice method:
Code:
if (killer is PlayerMobile)
{
#region Scroll of Transcendence
if (Core.ML)
{
if (Map == Map.Felucca || Map == Map.Trammel)
{
if (Utility.RandomDouble() < 0.001)
{
PlayerMobile pm = (PlayerMobile)killer;
double random = Utility.Random(49);
if (random <= 24)
{
pm.SendLocalizedMessage(1094936); // You have received a Scroll of Transcendence!
ScrollofTranscendence SoTF = CreateRandomSoT(true);
GiveScrollTo(pm, (SpecialScroll)SoTF);
}
else
{
pm.SendLocalizedMessage(1049524); // You have received a scroll of power!
PowerScroll PS = PowerScroll.CreateRandomNoCraft(5, 5);
GiveScrollTo(pm, (SpecialScroll)PS);
}
}
}
if (Map == Map.Ilshenar || Map == Map.Tokuno || Map == Map.Malas)
{
if (Utility.RandomDouble() < 0.0015)
{
killer.SendLocalizedMessage(1094936); // You have received a Scroll of Transcendence!
ScrollofTranscendence SoTT = CreateRandomSoT(false);
killer.AddToBackpack(SoTT);
}
}
}
You may or may not have the Scrolls of Transcendence, if not, you can ignore those sections. Hope that helps