Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CloseCaseTimer : Timer
|
||||
{
|
||||
private Item item;
|
||||
private Mobile mobile;
|
||||
|
||||
public CloseCaseTimer( Mobile m, Item i ) : base( TimeSpan.FromSeconds( 1 ) )
|
||||
{
|
||||
mobile = m;
|
||||
item = i;
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
PlayerMobile pm = mobile as PlayerMobile;
|
||||
|
||||
if ( pm == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
DoNDGameDeed gd = item as DoNDGameDeed;
|
||||
|
||||
if ( gd == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if( gd.Deleted )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
gd.CloseCase = true;
|
||||
|
||||
if (pm.HasGump( typeof( DoNDMainGump )))
|
||||
pm.CloseGump( typeof( DoNDMainGump ) );
|
||||
pm.SendGump( new DoNDMainGump( pm, gd ) );
|
||||
this.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CloseGameTimer : Timer
|
||||
{
|
||||
private Item item;
|
||||
private Mobile pmobile;
|
||||
private Mobile bmobile;
|
||||
|
||||
public CloseGameTimer( Mobile m, Mobile bm, Item i ) : base( TimeSpan.FromSeconds( 3 ) )
|
||||
{
|
||||
pmobile = m;
|
||||
bmobile = bm;
|
||||
item = i;
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
PlayerMobile pm = pmobile as PlayerMobile;
|
||||
|
||||
if ( pm == null || pm.Backpack == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
Howey bc = bmobile as Howey;
|
||||
|
||||
if ( bc == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
DoNDGameDeed gd = item as DoNDGameDeed;
|
||||
|
||||
if ( gd == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if( gd.Deleted )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gd.GameOver == false && gd.NoTrade == true )
|
||||
{
|
||||
bc.Say( pm.Name + ", Your case had....!");
|
||||
GameSystem.PrizeCheck( pm, bc );
|
||||
|
||||
if ( bc.DeBugger == true )
|
||||
Console.WriteLine( "DeBug : System, Close Game Timer, NoTrade OK" );
|
||||
this.Stop();
|
||||
}
|
||||
|
||||
bc.DealOn = false;
|
||||
bc.AL = 0;
|
||||
bc.cnt = 0;
|
||||
pm.Frozen = false;
|
||||
|
||||
bc.CD1 = false;
|
||||
bc.CD2 = false;
|
||||
bc.CD3 = false;
|
||||
bc.CD4 = false;
|
||||
bc.CD5 = false;
|
||||
bc.CD6 = false;
|
||||
bc.CD7 = false;
|
||||
bc.CD8 = false;
|
||||
bc.CD9 = false;
|
||||
bc.CD10 = false;
|
||||
bc.CD11 = false;
|
||||
bc.CD12 = false;
|
||||
bc.CD13 = false;
|
||||
bc.CD14 = false;
|
||||
bc.CD15 = false;
|
||||
bc.CD16 = false;
|
||||
bc.CD17 = false;
|
||||
bc.CD18 = false;
|
||||
bc.CD19 = false;
|
||||
bc.CD20 = false;
|
||||
bc.CD21 = false;
|
||||
bc.CD22 = false;
|
||||
bc.CD23 = false;
|
||||
bc.CD24 = false;
|
||||
bc.CD25 = false;
|
||||
bc.CD26 = false;
|
||||
|
||||
if (pm.HasGump( typeof( DoNDMainGump )))
|
||||
pm.CloseGump( typeof( DoNDMainGump ) );
|
||||
|
||||
bc.Say( pm.Name + ", Thanks for playing Deal or No Deal!");
|
||||
bc.Hidden = true;
|
||||
|
||||
bc.FixedParticles( 0x37CC, 1, 40, 97, 3, 9917, EffectLayer.Waist );
|
||||
bc.FixedParticles( 0x374A, 1, 15, 9502, 97, 3, (EffectLayer)255 );
|
||||
|
||||
Console.WriteLine( "A Player has Ended Deal or No Deal : Game Over" );
|
||||
|
||||
Item ri = pm.Backpack.FindItemByType(typeof(DoNDReplayDeed) );
|
||||
|
||||
if ( ri != null )
|
||||
{
|
||||
if ( bc.DeBugger == true )
|
||||
Console.WriteLine( "DeBug : System, Close Game Timer, Found Replay Deed OK" );
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( pm.AccessLevel < AccessLevel.GameMaster )
|
||||
pm.AddToBackpack( new DoNDReplayDeed( pm, gd ) );
|
||||
|
||||
gd.Delete();
|
||||
|
||||
if ( pm.AccessLevel < AccessLevel.GameMaster )
|
||||
{
|
||||
pm.SendMessage( 33, pm.Name + ", You'll need to wait in order to play again!");
|
||||
|
||||
Timer p_timer = new PlayerReplayTimer( pm );
|
||||
p_timer.Start();
|
||||
}
|
||||
if ( bc.DeBugger == true )
|
||||
Console.WriteLine( "DeBug : System, Close Game Timer, End Game OK" );
|
||||
this.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HoweyResetTimer : Timer
|
||||
{
|
||||
private Item item;
|
||||
private Mobile bmobile;
|
||||
|
||||
public HoweyResetTimer( Item i, Mobile m ) : base( TimeSpan.FromSeconds( 5 ) )
|
||||
{
|
||||
item = i;
|
||||
bmobile = m;
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
DoNDAdminStone si = item as DoNDAdminStone;
|
||||
|
||||
if ( si == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
Howey bc = bmobile as Howey;
|
||||
|
||||
if ( bc == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
DoNDAdminStone.SpawnHowey( si );
|
||||
|
||||
if ( bc.DeBugger == true )
|
||||
Console.WriteLine( "DeBug : System, Howey Reset Timer OK" );
|
||||
this.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ItemDeleteTimer : Timer
|
||||
{
|
||||
private Item item;
|
||||
private Mobile pmobile;
|
||||
private Mobile bmobile;
|
||||
|
||||
public ItemDeleteTimer( Mobile m, Mobile bm, Item i ) : base( TimeSpan.FromSeconds( 1 ) )
|
||||
{
|
||||
pmobile = m;
|
||||
bmobile = bm;
|
||||
item = i;
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
DoNDGameDeed gd = item as DoNDGameDeed;
|
||||
|
||||
if ( gd == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if( gd.Deleted )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerMobile pm = pmobile as PlayerMobile;
|
||||
|
||||
if ( pm == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
Howey bc = bmobile as Howey;
|
||||
|
||||
if ( bc == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gd.GameOver == false )
|
||||
{
|
||||
this.Start();
|
||||
return;
|
||||
}
|
||||
|
||||
GameSystem.EndDDGame( pm, bc );
|
||||
|
||||
if ( bc.DeBugger == true )
|
||||
Console.WriteLine( "DeBug : System, Item Delete Timer OK" );
|
||||
this.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class MobileDeleteTimer : Timer
|
||||
{
|
||||
private Mobile pmobile;
|
||||
private Mobile bmobile;
|
||||
private Mobile m_DG;
|
||||
|
||||
public Mobile DG
|
||||
{
|
||||
get{ return m_DG; }
|
||||
set{ m_DG = value; }
|
||||
}
|
||||
|
||||
public MobileDeleteTimer( Mobile pmm, Mobile bcc ) : base( TimeSpan.FromSeconds( 1 ) )
|
||||
{
|
||||
pmobile = pmm;
|
||||
bmobile = bcc;
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
Howey bc = bmobile as Howey;
|
||||
|
||||
if ( bc == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerMobile pm = pmobile as PlayerMobile;
|
||||
|
||||
if ( pm == null || pm.Backpack == null )
|
||||
{
|
||||
GameSystem.EndDDGame( pm, bc );
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
Item check = pm.Backpack.FindItemByType(typeof(DoNDGameDeed) );
|
||||
|
||||
DoNDGameDeed gd = check as DoNDGameDeed;
|
||||
|
||||
if ( gd == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gd.Commercial == true )
|
||||
{
|
||||
if (pm.HasGump( typeof( DoNDCommercialGump )))
|
||||
pm.CloseGump( typeof( DoNDCommercialGump ) );
|
||||
pm.SendGump( new DoNDCommercialGump( pm ) );
|
||||
}
|
||||
|
||||
if ( gd.GameOver == false )
|
||||
{
|
||||
this.Start();
|
||||
return;
|
||||
}
|
||||
|
||||
GameSystem.EndDDGame( pm, bc );
|
||||
|
||||
if ( bc.DeBugger == true )
|
||||
Console.WriteLine( "DeBug : System, Mobile Delete Timer OK" );
|
||||
this.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PlayerReplayTimer : Timer
|
||||
{
|
||||
private Mobile pmobile;
|
||||
|
||||
public PlayerReplayTimer( Mobile m ) : base( TimeSpan.FromMinutes( 1 ) )
|
||||
{
|
||||
pmobile = m;
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
PlayerMobile pm = pmobile as PlayerMobile;
|
||||
|
||||
if ( pm == null || pm.Backpack == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
Item check = pm.Backpack.FindItemByType(typeof(DoNDReplayDeed) );
|
||||
|
||||
if ( check == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
DoNDReplayDeed gd = check as DoNDReplayDeed;
|
||||
|
||||
if ( gd == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
gd.RPM1 +=1;
|
||||
|
||||
if ( gd.RPM1 == 60 )
|
||||
{
|
||||
gd.RP1 +=1;
|
||||
gd.RPM1 = 0;
|
||||
this.Start();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gd.RP1 == gd.RReplay )
|
||||
{
|
||||
pm.SendMessage( pm.Name + ", You can now play Deal or No Deal!");
|
||||
gd.Delete();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gd.RP1 < gd.RReplay )
|
||||
{
|
||||
this.Start();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PlayerResetTimer : Timer
|
||||
{
|
||||
private Mobile pmobile;
|
||||
private Mobile bmobile;
|
||||
|
||||
public PlayerResetTimer( Mobile m, Mobile bm ) : base( TimeSpan.FromMinutes( 1 ) )
|
||||
{
|
||||
pmobile = m;
|
||||
bmobile = bm;
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
PlayerMobile pm = pmobile as PlayerMobile;
|
||||
|
||||
if ( pm == null || pm.Backpack == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
Howey bc = bmobile as Howey;
|
||||
|
||||
if ( bc == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
Item check = pm.Backpack.FindItemByType(typeof(DoNDGameDeed) );
|
||||
|
||||
if ( check == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
DoNDGameDeed gd = check as DoNDGameDeed;
|
||||
|
||||
if ( gd == null )
|
||||
{
|
||||
this.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
gd.TL +=1;
|
||||
|
||||
if ( gd.TL < 5 )
|
||||
{
|
||||
this.Start();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gd.TL == 5 )
|
||||
{
|
||||
pm.SendMessage( 33,pm.Name + ", You only have limited time to play");
|
||||
gd.TL = 20 - gd.TL;
|
||||
pm.SendMessage( 33,gd.TL + " Minutes Left to Play!");
|
||||
gd.TL = 20 - gd.TL;
|
||||
this.Start();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gd.TL != 5 && gd.TL < 10 )
|
||||
{
|
||||
this.Start();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gd.TL == 10 )
|
||||
{
|
||||
pm.SendMessage( 33,pm.Name + ", You only have limited time to play");
|
||||
gd.TL = 20 - gd.TL;
|
||||
pm.SendMessage( 33,gd.TL + " Minutes Left to Play!");
|
||||
gd.TL = 20 - gd.TL;
|
||||
this.Start();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gd.TL != 10 && gd.TL < 15 )
|
||||
{
|
||||
this.Start();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gd.TL < 20 )
|
||||
{
|
||||
pm.SendMessage( 33,pm.Name + ", You only have limited time to play");
|
||||
gd.TL = 20 - gd.TL;
|
||||
pm.SendMessage( 33,gd.TL + " Minutes Left to Play!");
|
||||
gd.TL = 20 - gd.TL;
|
||||
this.Start();
|
||||
return;
|
||||
}
|
||||
pm.SendMessage( 33,pm.Name + ", Times up, Game Over!");
|
||||
|
||||
if( gd != null )
|
||||
{
|
||||
if (pm.HasGump( typeof( DoNDMainGump )))
|
||||
pm.CloseGump( typeof( DoNDMainGump ) );
|
||||
|
||||
gd.GameOver = true;
|
||||
GameSystem.EndDDGame( pm, bc );
|
||||
|
||||
if ( bc.DeBugger == true )
|
||||
Console.WriteLine( "DeBug : System, Player Reset Timer OK" );
|
||||
gd.TL = 0;
|
||||
this.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user