Files
abysmal-isle/Scripts/Scripts-master/Games/DealorNoDeal-2010/DealorNoDeal/Misc/DoNDLogin.cs
Unstable Kitsune b918192e4e Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
2023-11-28 23:20:26 -05:00

55 lines
1009 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
namespace Server.Mobiles
{
public class DoNDLogin
{
public static void Initialize()
{
EventSink.Login += new LoginEventHandler( OnLogin );
}
private static void OnLogin( LoginEventArgs e )
{
if ( e.Mobile is PlayerMobile )
{
PlayerMobile pm = (PlayerMobile)e.Mobile;
if (pm == null || pm.Backpack == null)
return;
Item check = pm.Backpack.FindItemByType(typeof(DoNDGameDeed) );
if ( check != null )
check.Delete();
if ( pm.Frozen == true )
pm.Frozen = false;
Item check2 = pm.Backpack.FindItemByType(typeof(DoNDReplayDeed) );
if ( check2 == null )
return;
DoNDReplayDeed rd = check2 as DoNDReplayDeed;
if ( rd == null )
return;
if ( rd.RP1 < 24 )
{
Timer i_timer = new PlayerReplayTimer( pm );
i_timer.Start();
}
if ( rd.RP1 >= 24 )
rd.Delete();
}
}
}
}