- Code cleaning, consolidation and bugfixing of special scrolls (powerscroll/statscroll/transcendence/alacrity).
--> Fixed a bug preventing SoT not being spawned in Malas champion spawns (i.e. Bedlam Crypt) (http://www.uodemise.com/discussion/showthread.php?t=135520) - Added contextual menu entries to add players in party, and kicking them from house (friends can be kicked if in ML environment). Timeout to accept party invite is increased to 30 seconds as per OSI (http://www.uodemise.com/discussion/showthread.php?t=120724) - Runebeetles can be angered during taming attempts (http://www.uodemise.com/discussion/showthread.php?t=137677) - You can cook near forges (http://www.uodemise.com/discussion/showthread.php?t=137731)
This commit is contained in:
parent
bab1490105
commit
fe6c18a2d4
14 changed files with 644 additions and 1047 deletions
|
|
@ -388,135 +388,74 @@ namespace Server.Engines.CannedEvil
|
|||
}
|
||||
|
||||
#region Scroll of Transcendence
|
||||
private ScrollofTranscendence CreateRandomTramSoT()
|
||||
private ScrollofTranscendence CreateRandomSoT( bool felucca )
|
||||
{
|
||||
int level;
|
||||
double random = Utility.RandomDouble();
|
||||
|
||||
if (0.2 >= random)
|
||||
level = 5;
|
||||
else if (0.4 >= random)
|
||||
level = 4;
|
||||
else if (0.6 >= random)
|
||||
level = 3;
|
||||
else if (0.8 >= random)
|
||||
level = 2;
|
||||
else
|
||||
level = 1;
|
||||
int level = Utility.RandomMinMax( 1, 5 );
|
||||
|
||||
if ( felucca )
|
||||
level += 5;
|
||||
|
||||
return ScrollofTranscendence.CreateRandom(level, level);
|
||||
}
|
||||
#endregion
|
||||
|
||||
private ScrollofTranscendence CreateRandomFelSoT()
|
||||
public static void GiveScrollTo( Mobile killer, SpecialScroll scroll )
|
||||
{
|
||||
int level;
|
||||
double random = Utility.RandomDouble();
|
||||
|
||||
if (0.2 >= random)
|
||||
level = 10;
|
||||
else if (0.4 >= random)
|
||||
level = 9;
|
||||
else if (0.6 >= random)
|
||||
level = 8;
|
||||
else if (0.8 >= random)
|
||||
level = 7;
|
||||
else
|
||||
level = 6;
|
||||
|
||||
return ScrollofTranscendence.CreateRandom(level, level);
|
||||
}
|
||||
|
||||
private PowerScroll CreateRandomFelPS()
|
||||
{
|
||||
return PowerScroll.CreateRandomNoCraft(5, 5);
|
||||
}
|
||||
|
||||
public static void GiveScrollOfTranscendenceFelTo ( Mobile killer, ScrollofTranscendence SoTF )
|
||||
{
|
||||
if( SoTF == null || killer == null ) //sanity
|
||||
if( scroll == null || killer == null ) //sanity
|
||||
return;
|
||||
|
||||
killer.SendLocalizedMessage( 1094936 ); // You have received a Scroll of Transcendence!
|
||||
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( SoTF );
|
||||
killer.AddToBackpack( scroll );
|
||||
else
|
||||
{
|
||||
if( killer.Corpse != null && !killer.Corpse.Deleted )
|
||||
killer.Corpse.DropItem( SoTF );
|
||||
killer.Corpse.DropItem( scroll );
|
||||
else
|
||||
killer.AddToBackpack( SoTF );
|
||||
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))
|
||||
{
|
||||
prot.SendLocalizedMessage(1049368); // You have been rewarded for your dedication to Justice!
|
||||
ScrollofTranscendence SoTFduplicate = new ScrollofTranscendence ( SoTF.Skill, SoTF.Value );
|
||||
prot.AddToBackpack( SoTFduplicate );
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void GivePowerScrollFelTo ( Mobile killer, PowerScroll PS )
|
||||
{
|
||||
if( PS == null || killer == null ) //sanity
|
||||
return;
|
||||
|
||||
killer.SendLocalizedMessage(1049524); // You have received a scroll of power!
|
||||
|
||||
if ( killer.Alive )
|
||||
killer.AddToBackpack( PS );
|
||||
else
|
||||
{
|
||||
if( killer.Corpse != null && !killer.Corpse.Deleted )
|
||||
killer.Corpse.DropItem( PS );
|
||||
else
|
||||
killer.AddToBackpack( PS );
|
||||
}
|
||||
|
||||
// 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))
|
||||
|
||||
if ( prot.Map != killer.Map || prot.Kills >= 5 || prot.Criminal || !JusticeVirtue.CheckMapRegion( killer, prot ) )
|
||||
continue;
|
||||
|
||||
int chance = 0;
|
||||
|
||||
switch (VirtueHelper.GetLevel(prot, VirtueName.Justice))
|
||||
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))
|
||||
if ( chance > Utility.Random( 100 ) )
|
||||
{
|
||||
prot.SendLocalizedMessage(1049368); // You have been rewarded for your dedication to Justice!
|
||||
PowerScroll PSduplicate = new PowerScroll ( PS.Skill, PS.Value );
|
||||
prot.AddToBackpack( PSduplicate );
|
||||
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{}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public void OnSlice()
|
||||
{
|
||||
|
|
@ -588,23 +527,23 @@ namespace Server.Engines.CannedEvil
|
|||
|
||||
if ( random <= 24 )
|
||||
{
|
||||
ScrollofTranscendence SoTF = CreateRandomFelSoT();
|
||||
GiveScrollOfTranscendenceFelTo ( pm, SoTF );
|
||||
ScrollofTranscendence SoTF = CreateRandomSoT( true );
|
||||
GiveScrollTo( pm, (SpecialScroll)SoTF );
|
||||
}
|
||||
else
|
||||
{
|
||||
PowerScroll PS = CreateRandomFelPS();
|
||||
GivePowerScrollFelTo ( pm, PS );
|
||||
PowerScroll PS = PowerScroll.CreateRandomNoCraft(5, 5);
|
||||
GiveScrollTo( pm, (SpecialScroll)PS );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( Map == Map.Ilshenar || Map == Map.Tokuno )
|
||||
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 = CreateRandomTramSoT();
|
||||
ScrollofTranscendence SoTT = CreateRandomSoT( false );
|
||||
killer.AddToBackpack( SoTT );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -295,7 +295,10 @@ namespace Server.Engines.Craft
|
|||
0x184E, 0x1850, // Heating stand (right)
|
||||
0x398C, 0x399F, // Fire field
|
||||
0x2DDB, 0x2DDC, //Elven stove
|
||||
0x19AA, 0x19BB // Veteran Reward Brazier
|
||||
0x19AA, 0x19BB, // Veteran Reward Brazier
|
||||
0x197A, 0x19A9, // Large Forge
|
||||
0x0FB1, 0x0FB1, // Small Forge
|
||||
0x2DD8, 0x2DD8 // Elven Forge
|
||||
};
|
||||
|
||||
private static int[] m_Ovens = new int[]
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace Server.Engines.PartySystem
|
|||
t.Start();
|
||||
}
|
||||
|
||||
private DeclineTimer( Mobile m, Mobile leader ) : base( TimeSpan.FromSeconds( 10.0 ) )
|
||||
private DeclineTimer( Mobile m, Mobile leader ) : base( TimeSpan.FromSeconds( 30.0 ) )
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_Leader = leader;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue