Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
421
Scripts/SubSystem/Miner Madness/MinerBonusGump.cs
Normal file
421
Scripts/SubSystem/Miner Madness/MinerBonusGump.cs
Normal file
@@ -0,0 +1,421 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class MinerBonusGump : Gump
|
||||
{
|
||||
private MinerSlotStone m_Stone;
|
||||
|
||||
private int m_c1;
|
||||
private int m_c2;
|
||||
private int m_c3;
|
||||
private int m_c4;
|
||||
private int m_c5;
|
||||
private int m_c6;
|
||||
private int m_c7;
|
||||
private int m_c8;
|
||||
private int m_c9;
|
||||
|
||||
private bool m_b1;
|
||||
private bool m_b2;
|
||||
private bool m_b3;
|
||||
private bool m_b4;
|
||||
private bool m_b5;
|
||||
private bool m_b6;
|
||||
private bool m_b7;
|
||||
private bool m_b8;
|
||||
private bool m_b9;
|
||||
|
||||
public MinerBonusGump( MinerSlotStone stone, bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7, bool b8, bool b9, int num1, int num2, int num3, int num4, int num5, int num6, int num7, int num8, int num9 ) : base( 25, 25 )
|
||||
{
|
||||
m_Stone = stone;
|
||||
|
||||
|
||||
m_Stone.IsInUse = true;
|
||||
|
||||
int c1 = 0;
|
||||
int c2 = 0;
|
||||
int c3 = 0;
|
||||
int c4 = 0;
|
||||
int c5 = 0;
|
||||
int c6 = 0;
|
||||
int c7 = 0;
|
||||
int c8 = 0;
|
||||
int c9 = 0;
|
||||
|
||||
if ( b1 == false && b2 == false && b3 == false && b4 == false && b5 == false && b6 == false && b7 == false && b8 == false && b9 == false )
|
||||
{
|
||||
c1 = Utility.RandomList( 50000, 10000, 10000, 5000, 5000, 5000, 1000, 1000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
|
||||
c2 = Utility.RandomList( 50000, 10000, 10000, 5000, 5000, 5000, 1000, 1000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
|
||||
c3 = Utility.RandomList( 50000, 10000, 10000, 5000, 5000, 5000, 1000, 1000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
|
||||
c4 = Utility.RandomList( 50000, 10000, 10000, 5000, 5000, 5000, 1000, 1000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
|
||||
c5 = Utility.RandomList( 50000, 10000, 10000, 5000, 5000, 5000, 1000, 1000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
|
||||
c6 = Utility.RandomList( 50000, 10000, 10000, 5000, 5000, 5000, 1000, 1000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
|
||||
c7 = Utility.RandomList( 50000, 10000, 10000, 5000, 5000, 5000, 1000, 1000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
|
||||
c8 = Utility.RandomList( 50000, 10000, 10000, 5000, 5000, 5000, 1000, 1000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
|
||||
c9 = Utility.RandomList( 50000, 10000, 10000, 5000, 5000, 5000, 1000, 1000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
c1 = num1;
|
||||
c2 = num2;
|
||||
c3 = num3;
|
||||
c4 = num4;
|
||||
c5 = num5;
|
||||
c6 = num6;
|
||||
c7 = num7;
|
||||
c8 = num8;
|
||||
c9 = num9;
|
||||
}
|
||||
|
||||
m_c1 = c1;
|
||||
m_c2 = c2;
|
||||
m_c3 = c3;
|
||||
m_c4 = c4;
|
||||
m_c5 = c5;
|
||||
m_c6 = c6;
|
||||
m_c7 = c7;
|
||||
m_c8 = c8;
|
||||
m_c9 = c9;
|
||||
|
||||
m_b1 = b1;
|
||||
m_b2 = b2;
|
||||
m_b3 = b3;
|
||||
m_b4 = b4;
|
||||
m_b5 = b5;
|
||||
m_b6 = b6;
|
||||
m_b7 = b7;
|
||||
m_b8 = b8;
|
||||
m_b9 = b9;
|
||||
|
||||
|
||||
|
||||
if ( b1 == true && b2 == true && b2 == true && b3 == true && b4 == true && b5 == true && b6 == true && b7 == true && b8 == true && b9 == true )
|
||||
{
|
||||
Disposable=true;
|
||||
Dragable=true;
|
||||
Closable=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Disposable=false;
|
||||
Dragable=false;
|
||||
Closable=false;
|
||||
}
|
||||
|
||||
Resizable=false;
|
||||
AddPage(0);
|
||||
AddBackground(52, 25, 393, 430, 5120);
|
||||
AddImage(59, 63, 5528);
|
||||
AddImage(60, 30, 5573);
|
||||
AddLabel(123, 26, 1149, @"Pick a location to mine, If you mine up coal you lose.");
|
||||
AddLabel(123, 42, 1149, @"You keep mining till you find coal or all are gone.");
|
||||
|
||||
if ( b1 == false )
|
||||
{
|
||||
AddButton(86, 198, 2117, 2118, 1, GumpButtonType.Reply, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(86, 198, 5231);
|
||||
|
||||
if ( c1 != 0 )
|
||||
AddLabel(86, 198, 1160, c1.ToString() );
|
||||
else
|
||||
AddLabel(86, 198, 1160, @"!! Coal !!");
|
||||
}
|
||||
|
||||
if ( b2 == false )
|
||||
{
|
||||
AddButton(156, 158, 2117, 2118, 2, GumpButtonType.Reply, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(156, 158, 5231);
|
||||
|
||||
if ( c2 != 0 )
|
||||
AddLabel(156, 158, 1160, c2.ToString() );
|
||||
else
|
||||
AddLabel(156, 158, 1160, @"!! Coal !!" );
|
||||
}
|
||||
|
||||
if ( b3 == false )
|
||||
{
|
||||
AddButton(140, 236, 2117, 2118, 3, GumpButtonType.Reply, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(140, 236, 5231);
|
||||
|
||||
if ( c3 != 0 )
|
||||
AddLabel(140, 236, 1160, c3.ToString() );
|
||||
else
|
||||
AddLabel(140, 236, 1160, @"!! Coal !!");
|
||||
}
|
||||
|
||||
if ( b4 == false )
|
||||
{
|
||||
AddButton(205, 85, 2117, 2118, 4, GumpButtonType.Reply, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(205, 85, 5231);
|
||||
|
||||
if ( c4 != 0 )
|
||||
AddLabel(205, 85, 1160, c4.ToString() );
|
||||
else
|
||||
AddLabel(205, 85, 1160, @"!! Coal !!");
|
||||
}
|
||||
|
||||
if ( b5 == false )
|
||||
{
|
||||
AddButton(242, 142, 2117, 2118, 5, GumpButtonType.Reply, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(242, 142, 5231);
|
||||
|
||||
if ( c5 != 0 )
|
||||
AddLabel(242, 142, 1160, c5.ToString() );
|
||||
else
|
||||
AddLabel(242, 142, 1160, @"!! Coal !!");
|
||||
}
|
||||
|
||||
if ( b6 == false )
|
||||
{
|
||||
AddButton(359, 98, 2117, 2118, 6, GumpButtonType.Reply, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(359, 98, 5231);
|
||||
|
||||
if ( c6 != 0 )
|
||||
AddLabel(359, 98, 1160, c6.ToString() );
|
||||
else
|
||||
AddLabel(359, 98, 1160, @"!! Coal !!");
|
||||
}
|
||||
|
||||
if ( b7 == false )
|
||||
{
|
||||
AddButton(158, 309, 2117, 2118, 7, GumpButtonType.Reply, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(158, 309, 5231);
|
||||
|
||||
if ( c7 != 0 )
|
||||
AddLabel(158, 309, 1160, c7.ToString() );
|
||||
else
|
||||
AddLabel(158, 309, 1160, @"!! Coal !!");
|
||||
}
|
||||
|
||||
if ( b8 == false )
|
||||
{
|
||||
AddButton(245, 107, 2117, 2118, 8, GumpButtonType.Reply, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(245, 107, 5231);
|
||||
|
||||
if ( c8 != 0 )
|
||||
AddLabel(245, 107, 1160, c8.ToString() );
|
||||
else
|
||||
AddLabel(245, 107, 1160, @"!! Coal !!");
|
||||
}
|
||||
|
||||
if ( b9 == false )
|
||||
{
|
||||
AddButton(399, 363, 2117, 2118, 9, GumpButtonType.Reply, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(399, 363, 5231);
|
||||
|
||||
if ( c9 != 0 )
|
||||
AddLabel(399, 363, 1160, c9.ToString() );
|
||||
else
|
||||
AddLabel(399, 363, 1160, @"!! Coal !!");
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState state, RelayInfo info )
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
if ( from == null )
|
||||
return;
|
||||
|
||||
if ( info.ButtonID == 0 )
|
||||
{
|
||||
from.CloseGump( typeof( MinerMadnessSlotGump ) );
|
||||
from.SendGump( new MinerMadnessSlotGump( m_Stone ) );
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 1 )
|
||||
{
|
||||
if ( m_c1 == 0 )
|
||||
{
|
||||
from.SendMessage( "You found coal!" );
|
||||
from.SendMessage( "You may now close this menu out to contiune playing." );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Stone.Won += m_c1;
|
||||
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c1 );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, true, m_b2, m_b3, m_b4, m_b5, m_b6, m_b7, m_b8, m_b9, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
m_Stone.LastPay += m_c1;
|
||||
m_Stone.TotalCollected -= m_c1;
|
||||
}
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 2 )
|
||||
{
|
||||
if ( m_c2 == 0 )
|
||||
{
|
||||
from.SendMessage( "You found coal!" );
|
||||
from.SendMessage( "You may now close this menu out to contiune playing." );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Stone.Won += m_c2;
|
||||
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c2 );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, m_b1, true, m_b3, m_b4, m_b5, m_b6, m_b7, m_b8, m_b9, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
m_Stone.LastPay += m_c2;
|
||||
m_Stone.TotalCollected -= m_c2;
|
||||
}
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 3 )
|
||||
{
|
||||
if ( m_c3 == 0 )
|
||||
{
|
||||
from.SendMessage( "You found coal!" );
|
||||
from.SendMessage( "You may now close this menu out to contiune playing." );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Stone.Won += m_c3;
|
||||
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c3 );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, m_b1, m_b2, true, m_b4, m_b5, m_b6, m_b7, m_b8, m_b9, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
m_Stone.LastPay += m_c3;
|
||||
m_Stone.TotalCollected -= m_c3;
|
||||
}
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 4 )
|
||||
{
|
||||
if ( m_c4 == 0 )
|
||||
{
|
||||
from.SendMessage( "You found coal!" );
|
||||
from.SendMessage( "You may now close this menu out to contiune playing." );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Stone.Won += m_c4;
|
||||
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c4 );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, m_b1, m_b2, m_b3, true, m_b5, m_b6, m_b7, m_b8, m_b9, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
m_Stone.LastPay += m_c4;
|
||||
m_Stone.TotalCollected -= m_c4;
|
||||
}
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 5 )
|
||||
{
|
||||
if ( m_c5 == 0 )
|
||||
{
|
||||
from.SendMessage( "You found coal!" );
|
||||
from.SendMessage( "You may now close this menu out to contiune playing." );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Stone.Won += m_c5;
|
||||
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c5 );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, m_b1, m_b2, m_b3, m_b4, true, m_b6, m_b7, m_b8, m_b9, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
m_Stone.LastPay += m_c5;
|
||||
m_Stone.TotalCollected -= m_c5;
|
||||
}
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 6 )
|
||||
{
|
||||
if ( m_c6 == 0 )
|
||||
{
|
||||
from.SendMessage( "You found coal!" );
|
||||
from.SendMessage( "You may now close this menu out to contiune playing." );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Stone.Won += m_c6;
|
||||
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c6 );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, m_b1, m_b2, m_b3, m_b4, m_b5, true, m_b7, m_b8, m_b9, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
m_Stone.LastPay += m_c6;
|
||||
m_Stone.TotalCollected -= m_c6;
|
||||
}
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 7 )
|
||||
{
|
||||
if ( m_c7 == 0 )
|
||||
{
|
||||
from.SendMessage( "You found coal!" );
|
||||
from.SendMessage( "You may now close this menu out to contiune playing." );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Stone.Won += m_c7;
|
||||
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c7 );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, m_b1, m_b2, m_b3, m_b4, m_b5, m_b6, true, m_b8, m_b9, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
m_Stone.LastPay += m_c7;
|
||||
m_Stone.TotalCollected -= m_c7;
|
||||
}
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 8 )
|
||||
{
|
||||
if ( m_c8 == 0 )
|
||||
{
|
||||
from.SendMessage( "You found coal!" );
|
||||
from.SendMessage( "You may now close this menu out to contiune playing." );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Stone.Won += m_c8;
|
||||
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c8 );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, m_b1, m_b2, m_b3, m_b4, m_b5, m_b6, m_b7, true, m_b9, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
m_Stone.LastPay += m_c8;
|
||||
m_Stone.TotalCollected -= m_c8;
|
||||
}
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 9 )
|
||||
{
|
||||
if ( m_c9 == 0 )
|
||||
{
|
||||
from.SendMessage( "You found coal!" );
|
||||
from.SendMessage( "You may now close this menu out to contiune playing." );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, true, true, true, true, true, true, true, true, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Stone.Won += m_c9;
|
||||
from.SendMessage( "You have won {0}, Pick another spot to mine.", m_c9 );
|
||||
from.SendGump( new MinerBonusGump( m_Stone, m_b1, m_b2, m_b3, m_b4, m_b5, m_b6, m_b7, m_b8, true, m_c1, m_c2, m_c3, m_c4, m_c5, m_c6, m_c7, m_c8, m_c9 ) );
|
||||
m_Stone.LastPay += m_c9;
|
||||
m_Stone.TotalCollected -= m_c9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
124
Scripts/SubSystem/Miner Madness/MinerMadessSlotGump.cs
Normal file
124
Scripts/SubSystem/Miner Madness/MinerMadessSlotGump.cs
Normal file
@@ -0,0 +1,124 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class MinerMadnessSlotGump : Gump
|
||||
{
|
||||
private MinerSlotStone m_Stone;
|
||||
|
||||
public MinerMadnessSlotGump( MinerSlotStone stone ) : base( 25, 25 )
|
||||
{
|
||||
m_Stone = stone;
|
||||
|
||||
m_Stone.IsInUse = true;
|
||||
|
||||
// Gold Bars = 7147
|
||||
// Silver Bars = 7159
|
||||
// Bronze Bars = 7141
|
||||
// Iron Bars = 7153
|
||||
// Sledge Hammer = 4020
|
||||
// Smith Hammer = 5091
|
||||
// Iron Wire = 6262
|
||||
// Pickaxe = 3717
|
||||
|
||||
Closable=true;
|
||||
Disposable=true;
|
||||
Dragable=true;
|
||||
Resizable=false;
|
||||
AddPage(0);
|
||||
AddBackground(18, 64, 371, 278, 5120);
|
||||
AddBackground(32, 193, 345, 100, 2620);
|
||||
AddImageTiled(23, 298, 363, 10, 5121);
|
||||
AddHtml( 26, 70, 356, 23, @"<BASEFONT COLOR=#FFFFFF><CENTER>Miner Madness</CENTER></BASEFONT>", (bool)false, (bool)false);
|
||||
AddImageTiled(37, 200, 335, 86, 9354);
|
||||
AddImageTiled(150, 202, 2, 83, 9353);
|
||||
AddLabel(30, 100, 1160, @"Cost: " + m_Stone.Cost.ToString() );
|
||||
AddLabel(30, 120, 1160, @"Credits: " + m_Stone.Won.ToString() );
|
||||
AddLabel(30, 140, 1160, @"Last Pay: " + m_Stone.LastPay.ToString() );
|
||||
AddButton(30, 163, 4026, 4027, 1, GumpButtonType.Reply, 0);
|
||||
AddLabel(65, 164, 1149, @"View Pay Table");
|
||||
AddButton(30, 307, 4020, 4021, 2, GumpButtonType.Reply, 0);
|
||||
AddLabel(65, 307, 1149, @"Spin");
|
||||
AddButton(118, 307, 4029, 4030, 3, GumpButtonType.Reply, 0);
|
||||
AddLabel(153, 307, 1149, @"Cash Out");
|
||||
AddImageTiled(60, 205, 75, 75, 9304);
|
||||
AddImageTiled(167, 205, 75, 75, 9304);
|
||||
AddImageTiled(274, 205, 75, 75, 9304);
|
||||
AddImageTiled(258, 202, 2, 83, 9353);
|
||||
|
||||
if ( m_Stone != null )
|
||||
{
|
||||
if ( m_Stone.ReelOne != 0 )
|
||||
AddItem(75, 220, m_Stone.ReelOne );
|
||||
else
|
||||
AddItem(75, 220, 7147 );
|
||||
|
||||
if ( m_Stone.ReelTwo != 0 )
|
||||
AddItem(183, 220, m_Stone.ReelTwo );
|
||||
else
|
||||
AddItem(183, 220, 7147 );
|
||||
|
||||
if ( m_Stone.ReelThree != 0 )
|
||||
AddItem(290, 220, m_Stone.ReelThree );
|
||||
else
|
||||
AddItem(290, 220, 7147);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState state, RelayInfo info )
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
if ( from == null )
|
||||
return;
|
||||
|
||||
if ( info.ButtonID == 0 ) // Close
|
||||
{
|
||||
m_Stone.IsInUse = false;
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 1 ) // Pay Table
|
||||
{
|
||||
from.SendGump( new MinerMadnessSlotGump( m_Stone ) );
|
||||
from.SendGump( new MinerPayTableGump( m_Stone ) );
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 2 ) // Spin
|
||||
{
|
||||
Item[] Gold = from.Backpack.FindItemsByType( typeof( Gold ) );
|
||||
int amount = m_Stone.Cost * 10000;
|
||||
|
||||
if ( from.Backpack.ConsumeTotal( typeof( Gold ), m_Stone.Cost ) )
|
||||
{
|
||||
m_Stone.DoSpin( from );
|
||||
m_Stone.LastPay = 0;
|
||||
m_Stone.TotalCollected += m_Stone.Cost;
|
||||
}
|
||||
else if ( m_Stone.Won >= m_Stone.Cost )
|
||||
{
|
||||
m_Stone.Won -= m_Stone.Cost;
|
||||
m_Stone.DoSpin( from );
|
||||
m_Stone.LastPay = 0;
|
||||
m_Stone.TotalCollected += m_Stone.Cost;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "You must have at least {0} gold, or credits on the machine to play.", m_Stone.Cost );
|
||||
from.SendGump( new MinerMadnessSlotGump( m_Stone ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( info.ButtonID == 3 ) // Cash Out
|
||||
{
|
||||
if ( m_Stone.Won != 0 )
|
||||
m_Stone.DoCashOut( from );
|
||||
|
||||
from.SendGump( new MinerMadnessSlotGump( m_Stone ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
87
Scripts/SubSystem/Miner Madness/MinerPayTableGump.cs
Normal file
87
Scripts/SubSystem/Miner Madness/MinerPayTableGump.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class MinerPayTableGump : Gump
|
||||
{
|
||||
private MinerSlotStone m_Stone;
|
||||
|
||||
public MinerPayTableGump( MinerSlotStone stone ) : base( 25, 25 )
|
||||
{
|
||||
m_Stone = stone;
|
||||
|
||||
int p1 = stone.Cost * 10000;
|
||||
int p2 = stone.Cost * 5000;
|
||||
int p3 = stone.Cost * 1000;
|
||||
int p4 = stone.Cost * 500;
|
||||
int p5 = stone.Cost * 10;
|
||||
int p6 = stone.Cost * 5;
|
||||
int p7 = stone.Cost * 3;
|
||||
int p8 = stone.Cost * 2;
|
||||
|
||||
int p9 = stone.Cost / 2;
|
||||
int p10 = stone.Cost / 3;
|
||||
|
||||
Closable=true;
|
||||
Disposable=true;
|
||||
Dragable=true;
|
||||
Resizable=false;
|
||||
AddPage(0);
|
||||
AddBackground(37, 34, 287, 459, 5120);
|
||||
AddImageTiled(45, 351, 101, 64, 2524);
|
||||
AddImageTiled(45, 84, 101, 235, 2524);
|
||||
AddLabel(45, 64, 1160, @"Pay Table");
|
||||
AddLabel(45, 330, 1160, @"Scatter Pay");
|
||||
AddItem(45, 85, 7147);
|
||||
AddItem(45, 115, 7159);
|
||||
AddItem(45, 145, 7141);
|
||||
AddItem(45, 175, 7153);
|
||||
AddItem(45, 205, 7147);
|
||||
AddItem(45, 235, 4020);
|
||||
AddItem(75, 85, 7147);
|
||||
AddItem(105, 85, 7147);
|
||||
AddItem(75, 115, 7159);
|
||||
AddItem(105, 115, 7159);
|
||||
AddItem(75, 145, 7141);
|
||||
AddItem(105, 145, 7141);
|
||||
AddItem(75, 175, 7153);
|
||||
AddItem(105, 175, 7153);
|
||||
AddItem(105, 205, 7153);
|
||||
AddLabel(61, 208, 1149, @"Any 3 Bars");
|
||||
AddItem(75, 235, 4020);
|
||||
AddItem(105, 235, 4020);
|
||||
AddItem(45, 265, 5091);
|
||||
AddItem(45, 295, 6262);
|
||||
AddItem(75, 265, 5091);
|
||||
AddItem(105, 265, 5091);
|
||||
AddItem(75, 295, 6262);
|
||||
AddItem(105, 295, 6262);
|
||||
AddItem(45, 355, 3717);
|
||||
AddItem(45, 385, 3717);
|
||||
AddLabel(45, 426, 1160, @"Bonus Round");
|
||||
AddItem(75, 385, 3717);
|
||||
AddLabel(80, 353, 1149, @"Any One");
|
||||
AddLabel(80, 383, 1149, @"Any Two");
|
||||
AddLabel(155, 85, 1160, p1.ToString() );
|
||||
AddLabel(155, 115, 1160, p2.ToString() );
|
||||
AddLabel(155, 145, 1160, p3.ToString() );
|
||||
AddLabel(155, 175, 1160, p4.ToString() );
|
||||
AddLabel(155, 205, 1160, p5.ToString() );
|
||||
AddLabel(155, 235, 1160, p6.ToString() );
|
||||
AddLabel(155, 265, 1160, p7.ToString() );
|
||||
AddHtml( 45, 41, 269, 22, @"<BASEFONT COLOR=#FFFFFF><CENTER>Miner Madness</CENTER></BASEFONT>", (bool)false, (bool)false);
|
||||
AddLabel(155, 295, 1160, p8.ToString() );
|
||||
AddLabel(155, 355, 1160, p10.ToString() );
|
||||
AddLabel(155, 385, 1160, p9.ToString() );
|
||||
AddImageTiled(44, 448, 101, 35, 2524);
|
||||
AddItem(45, 452, 3717);
|
||||
AddItem(75, 452, 3717);
|
||||
AddItem(105, 452, 3717);
|
||||
AddLabel(155, 452, 1160, @"Mining Bonus Round");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
550
Scripts/SubSystem/Miner Madness/MinerSlotStone.cs
Normal file
550
Scripts/SubSystem/Miner Madness/MinerSlotStone.cs
Normal file
@@ -0,0 +1,550 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MinerSlotStone : Item
|
||||
{
|
||||
private int m_ReelOne = 0;
|
||||
private int m_ReelTwo = 0;
|
||||
private int m_ReelThree = 0;
|
||||
|
||||
private int m_Cost = 100;
|
||||
private int m_Won;
|
||||
private int m_TotalCollected;
|
||||
|
||||
private bool m_IsInUse;
|
||||
|
||||
private int m_LastPay;
|
||||
|
||||
public static int[] m_Bars = new int[]
|
||||
{
|
||||
7147,
|
||||
7159,
|
||||
7141,
|
||||
7153
|
||||
};
|
||||
|
||||
public int ReelOne
|
||||
{
|
||||
get{ return m_ReelOne; }
|
||||
set{ m_ReelOne = value; }
|
||||
}
|
||||
|
||||
public int ReelTwo
|
||||
{
|
||||
get{ return m_ReelTwo; }
|
||||
set{ m_ReelTwo = value; }
|
||||
}
|
||||
|
||||
public int ReelThree
|
||||
{
|
||||
get{ return m_ReelThree; }
|
||||
set{ m_ReelThree = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Cost
|
||||
{
|
||||
get{ return m_Cost; }
|
||||
|
||||
set
|
||||
{
|
||||
if ( value == 4 || value <= 4 )
|
||||
m_Cost = 5;
|
||||
else
|
||||
m_Cost = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Won
|
||||
{
|
||||
get{ return m_Won; }
|
||||
set{ m_Won = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int TotalCollected
|
||||
{
|
||||
get{ return m_TotalCollected; }
|
||||
set{ m_TotalCollected = value; }
|
||||
}
|
||||
|
||||
public int LastPay
|
||||
{
|
||||
get{ return m_LastPay; }
|
||||
set{ m_LastPay = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsInUse
|
||||
{
|
||||
get{ return m_IsInUse; }
|
||||
set{ m_IsInUse = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MinerSlotStone() : base( 3804 )
|
||||
{
|
||||
Movable = false;
|
||||
Name = "Miner Madness";
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( m_IsInUse == false )
|
||||
{
|
||||
from.CloseGump( typeof( MinerMadnessSlotGump ) );
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "Someone else is playing this machine." );
|
||||
}
|
||||
}
|
||||
|
||||
public void DoSpin( Mobile from )
|
||||
{
|
||||
SpinReelOne();
|
||||
SpinReelTwo();
|
||||
SpinReelThree();
|
||||
|
||||
from.PlaySound ( 739 );
|
||||
|
||||
if ( m_ReelOne == m_ReelTwo && m_ReelOne == m_ReelThree ) // Winner
|
||||
{
|
||||
if ( m_ReelOne == 7147 )
|
||||
{
|
||||
int p = m_Cost * 10000;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
from.PlaySound ( 61 );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
|
||||
if ( m_ReelOne == 7159 )
|
||||
{
|
||||
int p = m_Cost * 5000;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
from.PlaySound ( 61 );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
|
||||
if ( m_ReelOne == 7141 )
|
||||
{
|
||||
int p = m_Cost * 1000;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
from.PlaySound ( 61 );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
|
||||
if ( m_ReelOne == 7153 )
|
||||
{
|
||||
int p = m_Cost * 500;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
from.PlaySound ( 61 );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
|
||||
if ( m_ReelOne == 3717 )
|
||||
{
|
||||
from.SendMessage( 38, "You have hit the bonus round." );
|
||||
from.SendGump( new MinerBonusGump( this, false, false, false, false, false, false, false, false, false, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) );
|
||||
}
|
||||
|
||||
if ( m_ReelOne == 4020 )
|
||||
{
|
||||
int p = m_Cost * 5;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
from.PlaySound ( 61 );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
|
||||
if ( m_ReelOne == 5091 )
|
||||
{
|
||||
int p = m_Cost * 3;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
from.PlaySound ( 61 );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
|
||||
if ( m_ReelOne == 6262 )
|
||||
{
|
||||
int p = m_Cost * 2;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
from.PlaySound ( 61 );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool r1isbar = false;
|
||||
bool r2isbar = false;
|
||||
bool r3isbar = false;
|
||||
|
||||
foreach ( int reel1 in m_Bars )
|
||||
{
|
||||
if ( m_ReelOne == reel1 )
|
||||
r1isbar = true;
|
||||
}
|
||||
|
||||
foreach ( int reel2 in m_Bars )
|
||||
{
|
||||
if ( m_ReelTwo == reel2 )
|
||||
r2isbar = true;
|
||||
}
|
||||
|
||||
foreach ( int reel3 in m_Bars )
|
||||
{
|
||||
if ( m_ReelThree == reel3 )
|
||||
r3isbar = true;
|
||||
}
|
||||
|
||||
if ( r1isbar == true && r2isbar == true && r3isbar == true )
|
||||
{
|
||||
int p = m_Cost * 10;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
from.PlaySound ( 61 );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
else if ( m_ReelOne == 3717 && m_ReelTwo != 3717 && m_ReelThree != 3717 )
|
||||
{
|
||||
int p = m_Cost / 3;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
else if ( m_ReelOne != 3717 && m_ReelTwo == 3717 && m_ReelThree != 3717 )
|
||||
{
|
||||
int p = m_Cost / 3;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
else if ( m_ReelOne != 3717 && m_ReelTwo != 3717 && m_ReelThree == 3717 )
|
||||
{
|
||||
int p = m_Cost / 3;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
else if ( m_ReelOne == 3717 && m_ReelTwo == 3717 )
|
||||
{
|
||||
int p = m_Cost / 2;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
else if ( m_ReelTwo == 3717 && m_ReelThree == 3717 )
|
||||
{
|
||||
int p = m_Cost / 2;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
else if ( m_ReelOne == 3717 && m_ReelThree == 3717 )
|
||||
{
|
||||
int p = m_Cost / 2;
|
||||
|
||||
m_Won += p;
|
||||
from.SendMessage( 38, "You win {0} Gold!", p );
|
||||
m_LastPay = p;
|
||||
m_TotalCollected -= p;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "Sorry you didnt win, Try Again!" );
|
||||
m_LastPay = 0;
|
||||
from.SendGump( new MinerMadnessSlotGump( this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void DoCashOut( Mobile from )
|
||||
{
|
||||
from.AddToBackpack( new BankCheck( m_Won ) );
|
||||
from.SendMessage( "You collect all your winnings." );
|
||||
from.PlaySound( 52 );
|
||||
from.PlaySound( 53 );
|
||||
from.PlaySound( 54 );
|
||||
from.PlaySound( 55 );
|
||||
m_Won = 0;
|
||||
}
|
||||
|
||||
public void SpinReelOne()
|
||||
{
|
||||
int [] icon1 = { 1, 9 }; // Gold Bars
|
||||
int [] icon2 = { 2, 10, 17 }; // Silver Bars
|
||||
int [] icon3 = { 3, 11, 18, 24 }; // Bronze Bars
|
||||
int [] icon4 = { 4, 12, 19, 25, 30 }; // Iron Bars
|
||||
int [] icon8 = { 5, 13, 20, 26, 31, 35, 39, 43 }; // Pickaxe
|
||||
int [] icon5 = { 6, 14, 21, 27, 32, 36, 40, 44, 47, 50, 53 }; // Sledge Hammer
|
||||
int [] icon6 = { 7, 15, 22, 28, 33, 37, 41, 45, 48, 51, 54, 56, 58, 60, 62 }; // Smith Hammer
|
||||
int [] icon7 = { 8, 16, 23, 29, 34, 38, 42, 46, 49, 52, 55, 57, 59, 61, 63, 64, 65, 66 }; // Iron Wire
|
||||
|
||||
int spin = Utility.Random( 66 );
|
||||
|
||||
foreach ( int reel in icon1 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelOne = 7147;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon2 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelOne = 7159;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon3 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelOne = 7141;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon4 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelOne = 7153;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon5 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelOne = 4020;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon6 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelOne = 5091;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon7 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelOne = 6262;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon8 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelOne = 3717;
|
||||
}
|
||||
}
|
||||
|
||||
public void SpinReelTwo()
|
||||
{
|
||||
int [] icon1 = { 1, 9 }; // Gold Bars
|
||||
int [] icon2 = { 2, 10, 17 }; // Silver Bars
|
||||
int [] icon3 = { 3, 11, 18, 24 }; // Bronze Bars
|
||||
int [] icon4 = { 4, 12, 19, 25, 30 }; // Iron Bars
|
||||
int [] icon8 = { 5, 13, 20, 26, 31, 35, 39, 43 }; // Pickaxe
|
||||
int [] icon5 = { 6, 14, 21, 27, 32, 36, 40, 44, 47, 50, 53 }; // Sledge Hammer
|
||||
int [] icon6 = { 7, 15, 22, 28, 33, 37, 41, 45, 48, 51, 54, 56, 58, 60, 62 }; // Smith Hammer
|
||||
int [] icon7 = { 8, 16, 23, 29, 34, 38, 42, 46, 49, 52, 55, 57, 59, 61, 63, 64, 65, 66 }; // Iron Wire
|
||||
|
||||
int spin = Utility.Random( 66 );
|
||||
|
||||
foreach ( int reel in icon1 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelTwo = 7147;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon2 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelTwo = 7159;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon3 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelTwo = 7141;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon4 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelTwo = 7153;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon5 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelTwo = 4020;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon6 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelTwo = 5091;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon7 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelTwo = 6262;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon8 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelTwo = 3717;
|
||||
}
|
||||
}
|
||||
|
||||
public void SpinReelThree()
|
||||
{
|
||||
int [] icon1 = { 1, 9 }; // Gold Bars
|
||||
int [] icon2 = { 2, 10, 17 }; // Silver Bars
|
||||
int [] icon3 = { 3, 11, 18, 24 }; // Bronze Bars
|
||||
int [] icon4 = { 4, 12, 19, 25, 30 }; // Iron Bars
|
||||
int [] icon8 = { 5, 13, 20, 26, 31, 35, 39, 43 }; // Pickaxe
|
||||
int [] icon5 = { 6, 14, 21, 27, 32, 36, 40, 44, 47, 50, 53 }; // Sledge Hammer
|
||||
int [] icon6 = { 7, 15, 22, 28, 33, 37, 41, 45, 48, 51, 54, 56, 58, 60, 62 }; // Smith Hammer
|
||||
int [] icon7 = { 8, 16, 23, 29, 34, 38, 42, 46, 49, 52, 55, 57, 59, 61, 63, 64, 65, 66 }; // Iron Wire
|
||||
|
||||
int spin = Utility.Random( 66 );
|
||||
|
||||
foreach ( int reel in icon1 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelThree = 7147;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon2 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelThree = 7159;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon3 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelThree = 7141;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon4 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelThree = 7153;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon5 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelThree = 4020;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon6 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelThree = 5091;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon7 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelThree = 6262;
|
||||
}
|
||||
|
||||
foreach ( int reel in icon8 )
|
||||
{
|
||||
if ( reel == spin )
|
||||
m_ReelThree = 3717;
|
||||
}
|
||||
}
|
||||
|
||||
public MinerSlotStone( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
// Release 0
|
||||
writer.Write( m_ReelOne );
|
||||
writer.Write( m_ReelTwo );
|
||||
writer.Write( m_ReelThree );
|
||||
writer.Write( m_Cost );
|
||||
writer.Write( m_Won );
|
||||
writer.Write( TotalCollected );
|
||||
writer.Write( m_LastPay );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0: // Release 0
|
||||
{
|
||||
m_ReelOne = reader.ReadInt();
|
||||
m_ReelTwo = reader.ReadInt();
|
||||
m_ReelThree = reader.ReadInt();
|
||||
m_Cost = reader.ReadInt();
|
||||
m_Won = reader.ReadInt();
|
||||
m_TotalCollected = reader.ReadInt();
|
||||
m_LastPay = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user