Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

View File

@@ -0,0 +1,921 @@
using System;
using Server;
using System.Collections.Generic;
using Server.Items;
using Server.Mobiles;
using Server.Gumps;
using System.Globalization;
using Server.Accounting;
using Server.Engines.Points;
using Server.Network;
namespace Server.Engines.ResortAndCasino
{
public enum Section
{
None,
Buying,
Selling,
Error
}
public class PurchaseCasinoChipGump : Gump
{
public int Yellow { get { return C32216(0xFFFF00); } }
public Section Section { get; set; }
public int Message { get; set; }
public int Bought { get; set; }
public int CashedOut { get; set; }
public PlayerMobile User { get; set; }
public PurchaseCasinoChipGump(PlayerMobile pm)
: base(50, 50)
{
User = pm;
AddGumpLayout();
}
public void AddGumpLayout()
{
AddBackground(0, 0, 430, 230, 1460);
AddHtmlLocalized(20, 20, 200, 16, 1153172, Yellow, false, false);
Account a = User.Account as Account;
long total = a == null ? 0 : (long)(a.TotalCurrency * Account.CurrencyThreshold);
int chips = (int)PointsSystem.CasinoData.GetPoints(User);
switch (this.Section)
{
case Section.None:
int y = 50;
if (Bought > 0 || CashedOut > 0)
{
int amount = Bought > 0 ? Bought : CashedOut;
AddHtmlLocalized(20, y, 200, 16, 1153188, Yellow, false, false); // Transaction successful:
y += 20;
AddHtmlLocalized(20, y, 200, 16, Bought > 0 ? 1153189 : 1153190, amount.ToString("N0", CultureInfo.GetCultureInfo("en-US")), Yellow, false, false); // You purchased ~1_AMT~ chips
y += 30;
}
AddHtmlLocalized(20, y, 200, 16, 1153173, Yellow, false, false); // Your Bank Balance:
AddHtml(300, y, 150, 16, Color("#FF69B4", total.ToString("N0", CultureInfo.GetCultureInfo("en-US"))), false, false);
y += 20;
AddHtmlLocalized(20, y, 200, 16, 1153174, Yellow, false, false); // Your Chip Balance:
AddHtml(300, y, 150, 16, Color("#FF69B4", chips.ToString("N0", CultureInfo.GetCultureInfo("en-US"))), false, false);
y += 30;
AddHtmlLocalized(20, y, 200, 16, 1153176, Yellow, false, false); // Buy Chips
AddButton(300, y, 4014, 4016, 1, GumpButtonType.Reply, 0);
y += 20;
AddHtmlLocalized(20, y, 200, 16, 1153175, Yellow, false, false); // Cash Out
AddButton(300, y, 4014, 4016, 2, GumpButtonType.Reply, 0);
break;
case Section.Buying:
AddHtmlLocalized(20, 50, 180, 16, 1153183, Yellow, false, false); // Each casino chip costs 100gp
AddHtmlLocalized(20, 80, 180, 16, 1153186, Yellow, false, false); // Number of chips to buy:
AddBackground(215, 80, 200, 20, 9350);
AddTextEntry(216, 80, 199, 20, 0, 0, "");
AddButton(215, 110, 4005, 4007, 3, GumpButtonType.Reply, 0);
AddHtmlLocalized(20, 110, 150, 16, 1153176, Yellow, false, false);
break;
case Section.Selling:
AddHtmlLocalized(20, 50, 180, 16, 1153184, Yellow, false, false); // You will receive 100gp for each chip
AddHtmlLocalized(20, 80, 180, 16, 1153185, Yellow, false, false); // Number of chips to cash out:
AddBackground(215, 80, 200, 20, 9350);
AddTextEntry(216, 80, 199, 20, 0, 1, "");
AddButton(215, 110, 4005, 4007, 4, GumpButtonType.Reply, 0);
AddHtmlLocalized(20, 110, 150, 16, 1153175, Yellow, false, false); // CASH OUT
break;
case Section.Error:
AddHtmlLocalized(20, 50, 390, 40, 1153177, Yellow, false, false); // There was a problem completing your transaction:
AddHtmlLocalized(20, 90, 390, 150, Message, Yellow, false, false);
break;
}
if (this.Section == Section.None)
{
AddButton(15, 195, 4005, 4007, 0, GumpButtonType.Reply, 0);
AddHtml(55, 193, 150, 16, Color("#FFFF00", "CLOSE"), false, false);
}
else
{
AddButton(15, 195, 4005, 4007, 5, GumpButtonType.Reply, 0);
AddHtml(55, 193, 150, 16, Color("#FFFF00", "BACK"), false, false);
}
}
public override void OnResponse(NetState state, RelayInfo info)
{
switch (info.ButtonID)
{
case 1:
this.Section = Section.Buying;
Refresh();
break;
case 2:
this.Section = Section.Selling;
Refresh();
break;
case 3:
TextRelay tr = info.GetTextEntry(0);
if (tr != null)
{
string text = tr.Text;
int num = Utility.ToInt32(text);
if (num > 0)
{
if (Banker.Withdraw(User, num * CasinoData.ChipCost, true))
{
PointsSystem.CasinoData.AwardPoints(User, num);
Bought = num;
Section = Section.None;
Refresh();
}
else
{
this.Section = Section.Error;
Message = 1153178; // Your bank does not have sufficient gold
Refresh();
}
}
else
{
this.Section = Section.Error;
Message = 1153187; // You entered an invalid value
Refresh();
}
}
else
{
this.Section = Section.Error;
Message = 1153187; // You entered an invalid value
Refresh();
}
break;
case 4:
TextRelay tr2 = info.GetTextEntry(1);
if (tr2 != null)
{
string text2 = tr2.Text;
int num2 = Utility.ToInt32(text2);
if (num2 > 0)
{
if (num2 <= (int)PointsSystem.CasinoData.GetPoints(User))
{
Banker.Deposit(User, num2 * CasinoData.ChipCost);
PointsSystem.CasinoData.DeductPoints(User, num2, false);
User.SendLocalizedMessage(1060397, (num2 * CasinoData.ChipCost).ToString(CultureInfo.GetCultureInfo("en-US"))); // ~1_AMOUNT~ gold has been deposited into your bank box.
Section = Section.None;
CashedOut = num2;
Refresh();
}
else
{
this.Section = Section.Error;
Message = 1153180; // You do not have enough casino chips
Refresh();
}
}
else
{
this.Section = Section.None;
Refresh();
}
}
else
{
this.Section = Section.Error;
Message = 1153187; // You entered an invalid value
Refresh();
}
break;
case 5:
this.Section = Section.None;
Refresh();
break;
}
}
public void Refresh()
{
Entries.Clear();
Entries.TrimExcess();
AddGumpLayout();
User.CloseGump(this.GetType());
User.SendGump(this, false);
}
public static int C16232(int c16)
{
c16 &= 0x7FFF;
int r = (((c16 >> 10) & 0x1F) << 3);
int g = (((c16 >> 05) & 0x1F) << 3);
int b = (((c16 >> 00) & 0x1F) << 3);
return (r << 16) | (g << 8) | (b << 0);
}
public static int C16216(int c16)
{
return c16 & 0x7FFF;
}
public static int C32216(int c32)
{
c32 &= 0xFFFFFF;
int r = (((c32 >> 16) & 0xFF) >> 3);
int g = (((c32 >> 08) & 0xFF) >> 3);
int b = (((c32 >> 00) & 0xFF) >> 3);
return (r << 10) | (g << 5) | (b << 0);
}
protected string Color(string color, string str)
{
return String.Format("<basefont color={0}>{1}", color, str);
}
protected string ColorAndCenter(string color, string str)
{
return String.Format("<basefont color={0}><center>{1}</center>", color, str);
}
}
public class BaseCasinoGump : Gump
{
public virtual int Title { get { return 0; } }
public int Yellow { get { return C32216(Yellow32); } }
public int Yellow32 { get { return 0xFFFF00; } }
public int Width { get; set; }
public int Height { get; set; }
public PlayerMobile User { get; set; }
public BaseDiceGame DiceGame { get; set; }
public BaseCasinoGump(PlayerMobile pm, int width, int height, BaseDiceGame game)
: base(50, 50)
{
User = pm;
Width = width;
Height = height;
DiceGame = game;
AddGumpLayout();
}
public virtual void AddGumpLayout()
{
AddBackground(0, 0, Width, Height, 1460);
if (Title > 0)
AddHtmlLocalized(15, 20, Width - 30, 16, 1154645, "#" + Title, Yellow, false, false);
if (PointsSystem.CasinoData.GetPoints(User) <= 0)
AddHtmlLocalized(15, 150, Width - 30, 40, 1154645, "#1153378", Yellow, false, false); // You have no chips to bet with. Please visit the Casino Cashier to buy chips.
else
{
switch (DiceGame.Stage)
{
case GameStage.Betting: BuildBetting(); break;
case GameStage.Rolling: BuildRolling(); break;
case GameStage.Results: BuildResults(); break;
case GameStage.Error: BuildError(); break;
}
}
}
public virtual void BuildBetting()
{
}
public virtual void BuildRolling()
{
}
public virtual void BuildResults()
{
}
public virtual void BuildError()
{
AddHtmlLocalized(20, 170, 240, 32, 1153380, C32216(0xFF0000), false, false); // Invalid bet amount entered
AddButton(15, Height - 35, 4005, 4007, 250, GumpButtonType.Reply, 0);
AddHtml(55, Height - 32, 150, 16, Color("#FFFF00", "CONTINUE"), false, false);
DiceGame.Remove();
}
public override void OnResponse(NetState state, RelayInfo info)
{
if (info.ButtonID == 250)
{
DiceGame.Reset();
Refresh();
}
}
protected int RandomDyeID(int face)
{
int start = (face - 1) + 19380;
return Utility.RandomList(start, start + 6, start + 12);
}
public void Refresh()
{
Entries.Clear();
Entries.TrimExcess();
AddGumpLayout();
User.CloseGump(this.GetType());
User.SendGump(this, false);
}
public static int C16232(int c16)
{
c16 &= 0x7FFF;
int r = (((c16 >> 10) & 0x1F) << 3);
int g = (((c16 >> 05) & 0x1F) << 3);
int b = (((c16 >> 00) & 0x1F) << 3);
return (r << 16) | (g << 8) | (b << 0);
}
public static int C16216(int c16)
{
return c16 & 0x7FFF;
}
public static int C32216(int c32)
{
c32 &= 0xFFFFFF;
int r = (((c32 >> 16) & 0xFF) >> 3);
int g = (((c32 >> 08) & 0xFF) >> 3);
int b = (((c32 >> 00) & 0xFF) >> 3);
return (r << 10) | (g << 5) | (b << 0);
}
protected string Color(string color, string str)
{
return String.Format("<basefont color={0}>{1}", color, str);
}
protected string ColorAndCenter(string color, string str)
{
return String.Format("<basefont color={0}><center>{1}</center>", color, str);
}
}
public class ChucklesLuckGump : BaseCasinoGump
{
public override int Title { get { return 1153368; } } // CHUCKLES' LUCK
public ChucklesLuck Game { get { return DiceGame as ChucklesLuck; } }
private int _DiceHue = 1931;
public ChucklesLuckGump(PlayerMobile pm, ChucklesLuck game)
: base(pm, 280, 330, game)
{
}
public override void AddGumpLayout()
{
base.AddGumpLayout();
AddHtmlLocalized(15, 50, Width - 30, 80, 1154645, "#1153369", Yellow, false, false); // Place a bet on any number. The dealer will roll three dice. Win back your bet times the number of times your lucky number comes up!
}
public override void BuildBetting()
{
int chips = (int)PointsSystem.CasinoData.GetPoints(User);
AddHtmlLocalized(20, 140, 240, 16, 1153370, chips.ToString(CultureInfo.GetCultureInfo("en-US")), Yellow, false, false); // You have ~1_VAL~ chips
AddHtmlLocalized(20, 170, 240, 40, 1153372, Yellow, false, false); // Enter your bet below and click the die showing your lucky number!
AddHtmlLocalized(20, 230, 240, 16, 1153371, Yellow, false, false); // Amount to bet:
AddBackground(140, 230, 120, 20, 9350);
AddTextEntry(142, 230, 120, 20, 0, 0, "");
for (int i = 0; i < 6; i++)
{
AddButton(25 + (i * 40), 260, 1450 + i, 1450 + i, i + 1, GumpButtonType.Reply, 0);
}
AddButton(15, 295, 4005, 4007, 0, GumpButtonType.Reply, 0);
AddHtml(55, 293, 150, 16, Color("#FFFF00", "CLOSE"), false, false);
}
public override void BuildRolling()
{
AddHtmlLocalized(0, 140, 138, 16, 1114514, "#1153383", Yellow, false, false); // Amount of Bet:
AddHtml(142, 140, 150, 16, Color("#FFFF00", Game.CurrentBet.ToString(CultureInfo.GetCultureInfo("en-US"))), false, false);
AddHtmlLocalized(0, 160, 138, 16, 1114514, "#1153382", Yellow, false, false); // Betting On:
AddHtml(142, 160, 150, 16, Color("#FFFF00", Game.BettingOn.ToString()), false, false);
AddHtmlLocalized(15, 190, Width - 30, 40, 1153381, Yellow, false, false); // The dealer prepares to roll the dice...
}
public override void BuildResults()
{
Game.Remove();
AddHtmlLocalized(0, 140, 138, 16, 1114514, "#1153383", Yellow, false, false); // Amount of Bet:
AddHtml(142, 140, 150, 16, Color("#FFFF00", Game.CurrentBet.ToString(CultureInfo.GetCultureInfo("en-US"))), false, false);
AddHtmlLocalized(0, 160, 138, 16, 1114514, "#1153382", Yellow, false, false); // Betting On:
AddHtml(142, 160, 150, 16, Color("#FFFF00", Game.BettingOn.ToString()), false, false);
AddHtmlLocalized(15, 190, 138, 16, 1153388, Yellow, false, false); // The dealer rolls:
AddItem(90, 210, RandomDyeID(Game.GetRoll(0)), _DiceHue);
AddItem(130, 210, RandomDyeID(Game.GetRoll(1)), _DiceHue);
AddItem(170, 210, RandomDyeID(Game.GetRoll(2)), _DiceHue);
if (!Game.Winner)
AddHtmlLocalized(20, 250, 240, 32, 1153385, Game.CurrentBet.ToString(CultureInfo.GetCultureInfo("en-US")), Yellow, false, false); // The dice did not match your number. You lose your bet of ~1_AMT~.
else
{
int matches = Game.GetMatches();
int win = Game.CurrentBet * matches;
AddHtmlLocalized(20, 250, 240, 32, 1153384, String.Format("{0}\t{1}", matches.ToString(), win.ToString(CultureInfo.GetCultureInfo("en-US"))), Yellow, false, false); // The dice matched your number ~1_COUNT~ times. You win ~2_AMT~ chips!
}
AddHtml(55, 293, 150, 16, Color("#FFFF00", Game.Winner ? "COLLECT" : "CONTINUE"), false, false);
AddButton(15, 295, 4005, 4007, 7, GumpButtonType.Reply, 0);
}
public override void OnResponse(NetState state, RelayInfo info)
{
base.OnResponse(state, info);
switch (info.ButtonID)
{
case 0: break;
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
TextRelay tr = info.GetTextEntry(0);
if (tr != null)
{
string text = tr.Text;
int bet = Utility.ToInt32(text);
int chips = (int)PointsSystem.CasinoData.GetPoints(User);
if (bet > 0 && bet <= chips)
{
PointsSystem.CasinoData.DeductPoints(User, bet, false);
Game.CurrentBet = bet;
Game.BettingOn = info.ButtonID;
Game.BeginRollDice();
}
else
{
Game.Stage = GameStage.Error;
Refresh();
}
}
break;
case 7:
Game.Reset();
Refresh();
break;
}
}
}
public class HiMiddleLowGump : BaseCasinoGump
{
public override int Title { get { return 1153392; } } // HI-MIDDLE-LO
public HiMiddleLow Game { get { return DiceGame as HiMiddleLow; } }
private int _DiceHue = 1928;
public HiMiddleLowGump(PlayerMobile pm, HiMiddleLow game)
: base(pm, 380, 380, game)
{
}
public override void AddGumpLayout()
{
base.AddGumpLayout();
AddHtmlLocalized(15, 50, Width - 30, 90, 1153393, Yellow, false, true);
/*Place a bet on Low, Middle, High, or Outside. The dealer rolls 3 dice. The house always wins on 3-of-a-kind.
* High Bets win on a total of 11 or more. Low Bets win on a total of 10 or less. Middle Bets win on a total of
* 9, 10, 11, or 12. Bets for Low, Middle, and High pay even money. Outside Bets win on totals of 4, 5, 6, 15, 16, or 17 and pay 5:1.*/
}
public override void BuildBetting()
{
int chips = (int)PointsSystem.CasinoData.GetPoints(User);
AddHtmlLocalized(15, 145, 340, 16, 1153370, chips.ToString(CultureInfo.GetCultureInfo("en-US")), Yellow, false, false); // You have ~1_VAL~ chips
AddHtmlLocalized(15, 175, 340, 40, 1153412, Yellow, false, false); // Enter your wager here and select which way you wish to bet:
AddHtmlLocalized(15, 220, 300, 16, 1153371, Yellow, false, false); // Amount to bet:
AddBackground(200, 220, 160, 20, 9350);
AddTextEntry(202, 220, 150, 20, 0, 0, "");
AddHtmlLocalized(55, 250, 150, 16, 1153394, Yellow, false, false); // High
AddButton(20, 250, 4005, 4007, 1, GumpButtonType.Reply, 0);
AddHtmlLocalized(215, 250, 150, 16, 1153395, Yellow, false, false); // Middle
AddButton(180, 250, 4005, 4007, 2, GumpButtonType.Reply, 0);
AddHtmlLocalized(55, 272, 150, 16, 1153396, Yellow, false, false); // Low
AddButton(20, 272, 4005, 4007, 3, GumpButtonType.Reply, 0);
AddHtmlLocalized(215, 272, 150, 16, 1153397, Yellow, false, false); // Outside
AddButton(180, 272, 4005, 4007, 4, GumpButtonType.Reply, 0);
AddButton(15, 345, 4005, 4007, 0, GumpButtonType.Reply, 0);
AddHtml(55, 347, 150, 16, Color("#FFFF00", "CLOSE"), false, false);
}
public override void BuildRolling()
{
AddHtmlLocalized(0, 145, 188, 16, 1114514, "#1153383", Yellow, false, false); // Amount of Bet:
AddHtml(192, 145, 150, 16, Color("#FFFF00", Game.CurrentBet.ToString(CultureInfo.GetCultureInfo("en-US"))), false, false);
AddHtmlLocalized(0, 165, 188, 16, 1114514, "#1153382", Yellow, false, false); // Betting On:
AddHtml(192, 165, 150, 16, Color("#FFFF00", ((HighMiddleLowType)Game.BettingOn).ToString()), false, false);
AddHtmlLocalized(15, 195, Width - 30, 40, 1153381, Yellow, false, false); // The dealer prepares to roll the dice...
}
public override void BuildResults()
{
Game.Remove();
AddHtmlLocalized(15, 145, Width - 30, 16, 1153388, Yellow, false, false); // The dealer rolls:
AddItem(140, 165, RandomDyeID(Game.GetRoll(0)), _DiceHue);
AddItem(180, 165, RandomDyeID(Game.GetRoll(1)), _DiceHue);
AddItem(220, 165, RandomDyeID(Game.GetRoll(2)), _DiceHue);
int total = Game.GetTotal();
AddHtmlLocalized(0, 205, Width / 2, 16, 1154645, Game.WinsHi(total) ? "#1153400" : "#1153399", Yellow, false, false); // Hi wins/lose
AddHtmlLocalized(190, 205, Width / 2, 16, 1154645, Game.WinsLow(total) ? "#1153404" : "#1153403", Yellow, false, false); // Low wins/lose
AddHtmlLocalized(00, 225, Width / 2, 16, 1154645, Game.WinsMiddle(total) ? "#1153402" : "#1153401", Yellow, false, false); // middle wins/lose
AddHtmlLocalized(190, 225, Width / 2, 16, 1154645, Game.WinsOutside(total) ? "#1153406" : "#1153405", Yellow, false, false); // outside wins/lose
AddHtmlLocalized(0, 245, 188, 16, 1114514, "#1153383", Yellow, false, false); // Amount of Bet:
AddHtml(192, 245, 188, 16, Color("#FFFF00", Game.CurrentBet.ToString(CultureInfo.GetCultureInfo("en-US"))), false, false);
AddHtmlLocalized(0, 265, 188, 16, 1114514, "#1153382", Yellow, false, false); // Betting On:
AddHtml(192, 265, 188, 16, Color("#FFFF00", ((HighMiddleLowType)Game.BettingOn).ToString()), false, false);
if (!Game.Winner)
{
int y = 290;
if (Game.ThreeOfAKind)
{
AddHtmlLocalized(20, 295, 340, 16, 1153398, Yellow, false, false);
y += 30;
}
AddHtmlLocalized(20, y, 345, 16, 1153413, Game.CurrentBet.ToString(CultureInfo.GetCultureInfo("en-US")), Yellow, false, false); // You lost ~1_AMT~ chips. Better luck next time!
}
else
{
int winnings = Game.BettingOn == 4 ? Game.CurrentBet * 6 : Game.CurrentBet * 2;
AddHtmlLocalized(20, 295, 340, 16, 1153414, winnings.ToString(CultureInfo.GetCultureInfo("en-US")), Yellow, false, false); // You won ~1_AMT~ chips!
}
AddHtml(55, 347, 150, 16, Color("#FFFF00", Game.Winner ? "COLLECT" : "CONTINUE"), false, false);
AddButton(15, 345, 4005, 4007, 5, GumpButtonType.Reply, 0);
}
public override void OnResponse(NetState state, RelayInfo info)
{
base.OnResponse(state, info);
switch (info.ButtonID)
{
case 0: break;
case 1:
case 2:
case 3:
case 4:
TextRelay tr = info.GetTextEntry(0);
if (tr != null)
{
string text = tr.Text;
int bet = Utility.ToInt32(text);
int chips = (int)PointsSystem.CasinoData.GetPoints(User);
if (bet > 0 && bet <= chips)
{
PointsSystem.CasinoData.DeductPoints(User, bet, false);
Game.CurrentBet = bet;
Game.BettingOn = info.ButtonID;
Game.BeginRollDice();
}
else
{
Game.Stage = GameStage.Error;
Refresh();
}
}
break;
case 5:
Game.Reset();
Refresh();
break;
}
}
}
public class DiceRiderGump : BaseCasinoGump
{
public override int Title { get { return 1153613; } } // DICE RIDER
public DiceRider Game { get { return DiceGame as DiceRider; } }
private int[] _DiceID = new int[5];
private int _DiceHue = 1930;
public DiceRiderGump(PlayerMobile pm, DiceRider game)
: base(pm, 530, 430, game)
{
}
public override void AddGumpLayout()
{
base.AddGumpLayout();
if (PointsSystem.CasinoData.GetPoints(User) <= 0)
return;
AddHtmlLocalized(15, 50, Width - 30, 90, 1154645, "#1153614", Yellow, false, true);
/*HOW TO PLAY<br><br>Place three equal-size bets. Enter the amount you want a single bet to be. Your initial bet will be 3x
* that amount. The dealer will then roll three dice. You may then choose to pull back one of your bets, or to "let it ride".
* The dealer rolls a fourth die. You may then choose to pull back a second bet. Finally, the dealer rolls a fifth die.
* <br><br>Your payout depends on the results of your roll:<br>Five of a kind pays 80-to-1<br>Four of a kind pays 3-to-1<br>
* A straight pays 2-to-1<br>A full house pays 3-to-2<br>Three of a Kind pays 1-to-1<br><br>NOTE: Fractional win amounts for
* 3:2 payouts will be rounded down!*/
AddHtmlLocalized(15, 140, Width - 30, 16, 1154645, "#1153628", Yellow, false, false); // PAY TABLE
AddHtmlLocalized(0, 160, 160, 16, 1114514, "#1153615", Yellow, false, false); // FIVE OF A KIND
AddHtmlLocalized(405, 160, 100, 16, 1153627, "80\t1", Yellow, false, false);
for (int i = 0; i < 6; i++)
AddImage(170 + (i * 40), 160, 1455);
AddHtmlLocalized(0, 187, 160, 16, 1114514, "#1153617", Yellow, false, false); // FIVE OF A KIND
AddHtmlLocalized(405, 187, 100, 16, 1153627, "3\t1", Yellow, false, false);
for (int i = 0; i < 6; i++)
AddImage(170 + (i * 40), 187, i == 5 ? 1453 : 1454);
AddHtmlLocalized(0, 214, 160, 16, 1114514, "#1153619", Yellow, false, false); // STRAIGHT
AddHtmlLocalized(405, 214, 100, 16, 1153627, "3\t1", Yellow, false, false);
for (int i = 0; i < 6; i++)
AddImage(170 + (i * 40), 214, 1455 - i);
AddHtmlLocalized(0, 241, 160, 16, 1114514, "#1153619", Yellow, false, false); // STRAIGHT
AddHtmlLocalized(405, 241, 100, 16, 1153627, "2\t1", Yellow, false, false);
for (int i = 0; i < 6; i++)
AddImage(170 + (i * 40), 241, 1455 - i);
AddHtmlLocalized(0, 268, 160, 16, 1114514, "#1153621", Yellow, false, false); // FULL HOUSE
AddHtmlLocalized(405, 268, 100, 16, 1153627, "3\t2", Yellow, false, false);
for (int i = 0; i < 6; i++)
AddImage(170 + (i * 40), 268, i < 3 ? 1453 : 1452);
AddHtmlLocalized(0, 295, 160, 16, 1114514, "#1153623", Yellow, false, false); // THREE OF A KIND
AddHtmlLocalized(405, 295, 100, 16, 1153627, "1\t1", Yellow, false, false);
for (int i = 0; i < 6; i++)
AddImage(170 + (i * 40), 295, i < 3 ? 1452 : i == 3 ? 1453 : 1455);
}
public override void BuildBetting()
{
int chips = (int)PointsSystem.CasinoData.GetPoints(User);
AddHtmlLocalized(15, 325, 160, 16, 1153370, chips.ToString(CultureInfo.GetCultureInfo("en-US")), Yellow, false, false); // You have ~1_VAL~ chips
AddHtmlLocalized(15, 350, Width - 30, 32, 1153629, Yellow, false, false); // Enter your bet amount below and click the button to play. You will place 3 bets of that amount but you can pull two of them back!
AddHtmlLocalized(170, Height - 35, 150, 16, 1153371, Yellow, false, false); // Amount to bet:
AddBackground(270, Height - 35, 200, 20, 9350);
AddTextEntry(272, Height - 35, 198, 20, 0, 0, "");
AddButton(485, Height - 35, 4005, 4007, 1, GumpButtonType.Reply, 0);
AddButton(15, Height - 35, 4005, 4007, 100, GumpButtonType.Reply, 0);
AddHtml(55, Height - 35, 150, 16, Color("#FFFF00", "CLOSE"), false, false);
}
public override void BuildRolling()
{
AddHtmlLocalized(120, 325, 150, 16, 1153383, Yellow, false, false); // Amount of Bet:
AddHtml(275, 325, 100, 16, Color("#FFFF00", Game.Bet1.ToString(CultureInfo.GetCultureInfo("en-US"))), false, false);
AddHtml(325, 325, 100, 16, Color("#FFFF00", Game.Bet2.ToString(CultureInfo.GetCultureInfo("en-US"))), false, false);
AddHtml(375, 325, 100, 16, Color("#FFFF00", Game.Bet3.ToString(CultureInfo.GetCultureInfo("en-US"))), false, false);
AddHtmlLocalized(100, 345, 100, 16, 1153635, Yellow, false, false); // Your Dice:
if (Game.Roll != null)
{
for (int i = 0; i < Game.Roll.Count; i++)
{
if (_DiceID[i] == 0)
_DiceID[i] = RandomDyeID(Game.GetRoll(i));
AddItem(180 + (i * 45), 345, _DiceID[i], _DiceHue);
}
}
AddHtmlLocalized(15, 385, Width - 30, 40, 1153381, Yellow, false, false); // The dealer prepares to roll the dice...
}
public override void BuildResults()
{
AddHtmlLocalized(120, 325, 150, 16, 1153383, Yellow, false, false); // Amount of Bet:
AddHtml(275, 325, 100, 16, Color("#FFFF00", Game.Bet1.ToString(CultureInfo.GetCultureInfo("en-US"))), false, false);
AddHtml(325, 325, 100, 16, Color("#FFFF00", Game.Bet2.ToString(CultureInfo.GetCultureInfo("en-US"))), false, false);
AddHtml(375, 325, 100, 16, Color("#FFFF00", Game.Bet3.ToString(CultureInfo.GetCultureInfo("en-US"))), false, false);
AddHtmlLocalized(100, 345, 100, 16, 1153635, Yellow, false, false); // Your Dice:
if (Game.Roll != null)
{
for (int i = 0; i < Game.Roll.Count; i++)
{
if (_DiceID[i] == 0)
_DiceID[i] = RandomDyeID(Game.GetRoll(i));
AddItem(180 + (i * 45), 345, _DiceID[i], _DiceHue);
}
}
if (Game.RollNumber <= 3)
{
AddHtmlLocalized(165, 385, 150, 16, 1153636, Yellow, false, false); // PULL BET
AddButton(125, 385, 4005, 4007, 2, GumpButtonType.Reply, 0);
AddHtmlLocalized(315, 385, 150, 16, 1153637, Yellow, false, false); // LET IT RIDE
AddButton(275, 385, 4005, 4007, 3, GumpButtonType.Reply, 0);
}
else
{
Game.Remove();
_DiceID = new int[5];
int totalbet = Game.Bet1 + Game.Bet2 + Game.Bet3;
if (!Game.Winner)
{
AddHtmlLocalized(15, 375, Width - 30, 16, 1153639, totalbet.ToString(CultureInfo.GetCultureInfo("en-US")), Yellow, false, false); // You did not make a winning hand. You lost ~1_AMT~.
}
else
{
AddHtmlLocalized(15, 375, Width - 30, 16, 1153640, String.Format("{0}\t#{1}", Game.WinningTotal, WinningHand()), Yellow, false, false); // You won ~1_AMT~ for making a ~2_HAND_NAME~!
}
AddHtml(55, Height - 35, 150, 16, Color("#FFFF00", Game.Winner ? "COLLECT" : "CONTINUE"), false, false);
AddButton(15, Height - 35, 4005, 4007, 4, GumpButtonType.Reply, 0);
}
}
public override void BuildError()
{
AddHtmlLocalized(20, Height - 62, 240, 32, 1153380, C32216(0xFF0000), false, false); // Invalid bet amount entered
AddButton(15, Height - 35, 4005, 4007, 250, GumpButtonType.Reply, 0);
AddHtml(55, Height - 32, 150, 16, Color("#FFFF00", "CONTINUE"), false, false);
DiceGame.Remove();
}
public override void OnResponse(NetState state, RelayInfo info)
{
switch (info.ButtonID)
{
case 0: break;
case 1:
TextRelay tr = info.GetTextEntry(0);
if (tr != null)
{
string text = tr.Text;
int bet = Utility.ToInt32(text) * 3;
if (bet > 0 && bet <= (int)PointsSystem.CasinoData.GetPoints(User))
{
PointsSystem.CasinoData.DeductPoints(User, bet, false);
Game.CurrentBet = bet;
Game.Bet1 = bet / 3;
Game.Bet2 = bet / 3;
Game.Bet3 = bet / 3;
Game.BeginRollDice();
}
else
{
Game.Stage = GameStage.Error;
Refresh();
}
}
break;
case 2:
if (Game.RollNumber == 2)
{
PointsSystem.CasinoData.AwardPoints(User, Game.Bet2);
Game.Bet2 = 0;
}
else if (Game.RollNumber == 3)
{
PointsSystem.CasinoData.AwardPoints(User, Game.Bet3);
Game.Bet3 = 0;
}
Game.Stage = GameStage.Rolling;
Game.BeginRollDice();
break;
case 3:
Game.Stage = GameStage.Rolling;
Game.BeginRollDice();
break;
case 4:
Game.Reset();
Refresh();
break;
case 250:
DiceGame.Reset();
Refresh();
break;
}
}
private int WinningHand()
{
if (Game.IsFiveOfAKind())
return 1153616;
if (Game.IsFourOfAKind())
return 1153618;
if (Game.IsStraight())
return 1153620;
if (Game.IsFullHouse())
return 1153622;
if (Game.IsThreeOfAKind())
return 1153624;
return 1153626;
}
}
}

View File

@@ -0,0 +1,476 @@
using System;
using Server;
using System.Collections.Generic;
using Server.Items;
using Server.Mobiles;
using System.Linq;
using Server.Network;
using System.Globalization;
using Server.Gumps;
using Server.Engines.Points;
using Server.Engines.Quests;
namespace Server.Engines.ResortAndCasino
{
public enum GameStage
{
Betting,
Rolling,
Results,
Error
}
public class BaseDiceGame
{
public PlayerMobile Player { get; set; }
public CasinoDealer Dealer { get; set; }
public int CurrentBet { get; set; }
public int BettingOn { get; set; }
public List<int> Roll { get; set; }
public GameStage Stage { get; set; }
public bool Winner { get; set; }
public BaseDiceGame(PlayerMobile player, CasinoDealer dealer)
{
Player = player;
Dealer = dealer;
}
public virtual void BeginRollDice()
{
Stage = GameStage.Rolling;
SendGump();
Timer.DelayCall(TimeSpan.FromSeconds(3), RollDice);
}
public virtual void RollDice(int numofdice)
{
List<int> dice = new List<int>();
for (int i = 0; i < numofdice; i++)
{
dice.Add(Utility.RandomMinMax(1, 6));
}
Roll = dice;
}
public virtual int GetRoll(int index)
{
if (Roll == null || index > Roll.Count)
return 0;
return Roll[index];
}
public virtual int GetMatches()
{
if (Roll == null)
return 0;
return Roll.Where(i => i == BettingOn).Count();
}
public virtual int GetTotal()
{
if (Roll == null)
return 0;
int total = 0;
Roll.ForEach(i => total += i);
return total;
}
public void RollDice()
{
OnDiceRolled();
Timer.DelayCall(TimeSpan.FromSeconds(1), SendGump);
}
public virtual void OnDiceRolled()
{
Stage = GameStage.Results;
}
public virtual void SendGump()
{
}
public virtual void Remove()
{
if (Dealer != null)
Dealer.RemoveGame(Player, this);
}
public virtual void OnWin()
{
if (Player != null)
{
GettingEvenQuest q = QuestHelper.GetQuest(Player, typeof(GettingEvenQuest)) as GettingEvenQuest;
if (q != null)
q.Update(this.GetType());
}
}
public virtual void Reset()
{
Winner = false;
Roll = null;
CurrentBet = 0;
BettingOn = -1;
Stage = GameStage.Betting;
Dealer.AddGame(Player, this);
SendGump();
}
}
public class ChucklesLuck : BaseDiceGame
{
public ChucklesLuck(PlayerMobile player, CasinoDealer dealer) : base(player, dealer)
{
}
public override void BeginRollDice()
{
base.BeginRollDice();
Player.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153375, String.Format("{0}\t{1}", CurrentBet.ToString(), BettingOn.ToString()), Player.NetState); // *bets ~1_AMT~ chips on ~2_PROP~*
}
public override void OnDiceRolled()
{
base.OnDiceRolled();
RollDice(3);
int matches = GetMatches();
Dealer.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153391, String.Format("{0}\t{1}\t{2}", Roll[0], Roll[1], Roll[2]), Player.NetState); // *rolls the dice; they land on ~1_FIRST~ ~2_SECOND~ ~3_THIRD~*
if (matches == 0)
{
Dealer.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153376, String.Format("{0}\t{1}", Player.Name, CurrentBet.ToString(CultureInfo.GetCultureInfo("en-US"))), Player.NetState); // *rakes in ~1_NAME~'s ~2_VAL~-chip bet*
}
else
{
int winnings = CurrentBet * matches;
PointsSystem.CasinoData.AwardPoints(Player, winnings);
Winner = true;
OnWin();
Dealer.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153377, String.Format("{0}\t{1}", Player.Name, winnings.ToString(CultureInfo.GetCultureInfo("en-US"))), Player.NetState); // *pays out ~2_VAL~ chips to ~1_NAME~*
}
}
public override void SendGump()
{
ChucklesLuckGump g = Player.FindGump(typeof(ChucklesLuckGump)) as ChucklesLuckGump;
if (g != null)
g.Refresh();
else
{
Player.SendGump(new ChucklesLuckGump(Player, this));
}
}
}
public enum HighMiddleLowType
{
High = 1,
Middle,
Low,
Outside
}
public class HiMiddleLow : BaseDiceGame
{
public bool ThreeOfAKind { get; set; }
public HighMiddleLowType BetType
{
get
{
return (HighMiddleLowType)BettingOn;
}
}
public HiMiddleLow(PlayerMobile player, CasinoDealer dealer)
: base(player, dealer)
{
}
public override void BeginRollDice()
{
base.BeginRollDice();
Player.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153375, String.Format("{0}\t{1}", CurrentBet.ToString(), ((HighMiddleLowType)BettingOn).ToString()), Player.NetState); // *bets ~1_AMT~ chips on ~2_PROP~*
}
public override void OnDiceRolled()
{
base.OnDiceRolled();
RollDice(3);
if (Roll[0] == Roll[1] && Roll[0] == Roll[2])
{
ThreeOfAKind = true;
}
else
{
int total = Roll[0] + Roll[1] + Roll[2];
int winnings = 0;
Dealer.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153391, String.Format("{0}\t{1}\t{2}", Roll[0], Roll[1], Roll[2]), Player.NetState); // *rolls the dice; they land on ~1_FIRST~ ~2_SECOND~ ~3_THIRD~*
switch (BetType)
{
default:
case HighMiddleLowType.High:
if (WinsHi(total)) winnings = CurrentBet * 2; break;
case HighMiddleLowType.Middle:
if (WinsMiddle(total)) winnings = CurrentBet * 2; break;
case HighMiddleLowType.Low:
if (WinsLow(total)) winnings = CurrentBet * 2; break;
case HighMiddleLowType.Outside:
if (WinsOutside(total)) winnings = CurrentBet * 5; break;
}
if (winnings > 0)
{
PointsSystem.CasinoData.AwardPoints(Player, winnings);
Winner = true;
OnWin();
Dealer.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153377, String.Format("{0}\t{1}", Player.Name, winnings.ToString(CultureInfo.GetCultureInfo("en-US"))), Player.NetState); // *pays out ~2_VAL~ chips to ~1_NAME~*
}
else
{
Dealer.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153376, String.Format("{0}\t{1}", Player.Name, CurrentBet.ToString(CultureInfo.GetCultureInfo("en-US"))), Player.NetState); // *rakes in ~1_NAME~'s ~2_VAL~-chip bet*
}
}
}
public override void Reset()
{
ThreeOfAKind = false;
base.Reset();
}
public override void SendGump()
{
HiMiddleLowGump g = Player.FindGump(typeof(HiMiddleLowGump)) as HiMiddleLowGump;
if (g != null)
g.Refresh();
else
{
Player.SendGump(new HiMiddleLowGump(Player, this));
}
}
public bool WinsHi(int total)
{
return total >= 11;
}
public bool WinsMiddle(int total)
{
return total >= 9 && total <= 12;
}
public bool WinsLow(int total)
{
return total <= 10;
}
public bool WinsOutside(int total)
{
return (total >= 4 && total <= 6) || (total >= 15 && total <= 17);
}
}
public class DiceRider : BaseDiceGame
{
public int RollNumber { get; set; }
public int Bet1 { get; set; }
public int Bet2 { get; set; }
public int Bet3 { get; set; }
public int WinningTotal { get; set; }
public int TotalBet { get { return Bet1 + Bet2 + Bet3; } }
private Timer _RollTimer;
public DiceRider(PlayerMobile player, CasinoDealer dealer)
: base(player, dealer)
{
RollNumber = 1;
}
public override void BeginRollDice()
{
base.BeginRollDice();
if (_RollTimer != null)
{
_RollTimer.Stop();
_RollTimer = null;
}
if(RollNumber == 1)
Player.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153631, (CurrentBet / 3).ToString(CultureInfo.GetCultureInfo("en-US")), Player.NetState); // *bets ~1_AMT~ chips on ~2_PROP~*
}
public override void OnDiceRolled()
{
if (RollNumber == 1)
{
RollDice(3);
Dealer.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153391, String.Format("{0}\t{1}\t{2}", GetRoll(0), GetRoll(1), GetRoll(2)), Player.NetState); // *rolls the dice; they land on ~1_FIRST~ ~2_SECOND~ ~3_THIRD~*
}
else
{
Roll.Add(Utility.RandomMinMax(1, 6));
Dealer.PrivateOverheadMessage(MessageType.Regular, 0x35, RollNumber == 2 ? 1153633 : 1153634, RollNumber == 2 ? GetRoll(3).ToString() : GetRoll(4).ToString(), Player.NetState); // *rolls the fourth die: ~1_DIE4~*
}
if (RollNumber == 3)
{
int winnings = 0;
if (IsFiveOfAKind())
winnings = TotalBet * 80;
else if (IsFourOfAKind())
winnings = TotalBet * 3;
else if (IsStraight())
winnings = TotalBet * 2;
else if (IsFullHouse())
winnings = (int)((double)TotalBet * 1.5);
else if (IsThreeOfAKind())
winnings = TotalBet;
if (winnings > 0)
{
Winner = true;
OnWin();
WinningTotal = winnings;
PointsSystem.CasinoData.AwardPoints(Player, winnings);
Dealer.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153377, String.Format("{0}\t{1}", Player.Name, winnings.ToString(CultureInfo.GetCultureInfo("en-US"))), Player.NetState); // *pays out ~2_VAL~ chips to ~1_NAME~*
}
else
{
Dealer.PrivateOverheadMessage(MessageType.Regular, 0x35, 1153376, String.Format("{0}\t{1}", Player.Name, TotalBet.ToString(CultureInfo.GetCultureInfo("en-US"))), Player.NetState); // *rakes in ~1_NAME~'s ~2_VAL~-chip bet*
}
}
else
{
_RollTimer = Timer.DelayCall(TimeSpan.FromSeconds(30), () =>
{
Stage = GameStage.Rolling;
BeginRollDice();
});
}
Stage = GameStage.Results;
RollNumber++;
}
public override void Reset()
{
Bet1 = 0;
Bet2 = 0;
Bet3 = 0;
WinningTotal = 0;
RollNumber = 1;
if (_RollTimer != null)
{
_RollTimer.Stop();
_RollTimer = null;
}
base.Reset();
}
public override void SendGump()
{
DiceRiderGump g = Player.FindGump(typeof(DiceRiderGump)) as DiceRiderGump;
if (g != null)
g.Refresh();
else
{
Player.SendGump(new DiceRiderGump(Player, this));
}
}
public bool IsFiveOfAKind()
{
return Roll != null && Roll.Count == 5 && Roll[0] == Roll[1] && Roll[0] == Roll[2] && Roll[0] == Roll[3] && Roll[0] == Roll[4];
}
public bool IsFourOfAKind()
{
if (Roll == null || Roll.Count < 4)
return false;
int[] roll = Roll.ToArray();
Array.Sort(roll);
return (roll[0] == roll[1] && roll[0] == roll[2] && roll[0] == roll[3])
|| (roll[1] == roll[2] && roll[1] == roll[3] && roll[1] == roll[4]);
}
public bool IsStraight()
{
if (Roll == null || Roll.Count < 5)
return false;
int[] roll = Roll.ToArray();
Array.Sort(roll);
return (roll[0] == 1 && roll[1] == 2 && roll[2] == 3 && roll[3] == 4 && roll[4] == 5) ||
(roll[0] == 2 && roll[1] == 3 && roll[2] == 4 && roll[3] == 5 && roll[4] == 6);
}
public bool IsFullHouse()
{
if (Roll == null || Roll.Count < 5)
return false;
int[] roll = Roll.ToArray();
Array.Sort(roll);
return (roll[0] == roll[1] && roll[0] == roll[2] && roll[3] == roll[4]) ||
(roll[0] == roll[1] && roll[2] == roll[3] && roll[2] == roll[4]);
}
public bool IsThreeOfAKind()
{
if (Roll == null || Roll.Count < 3)
return false;
int[] roll = Roll.ToArray();
Array.Sort(roll);
return (roll[0] == roll[1] && roll[0] == roll[2])
|| (roll[1] == roll[2] && roll[1] == roll[3])
|| (roll[2] == roll[3] && roll[2] == roll[4]);
}
}
}

View File

@@ -0,0 +1,45 @@
using System;
using Server;
namespace Server.Items
{
public class FortunesFireGrog : BaseBeverage
{
public override int MaxQuantity { get { return 1; } }
[Constructable]
public FortunesFireGrog() : base(BeverageType.Liquor)
{
}
public override int ComputeItemID()
{
if(Quantity > 0)
return Utility.RandomBool() ? 2542 : 2543;
return ItemID = ItemID == 2543 ? 8067 : 8065;
}
public override void AddNameProperties(ObjectPropertyList list)
{
list.Add(1049515, "#1153415"); // a mug of forune fires grog
}
public FortunesFireGrog(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,118 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Commands;
namespace Server.Engines.ResortAndCasino
{
public static class FireCasinoGenerator
{
public static readonly string EntityName = "casino";
public static void Initialize()
{
CommandSystem.Register("GenerateCasino", AccessLevel.Administrator, Generate);
CommandSystem.Register("DeleteCasino", AccessLevel.GameMaster, Delete);
}
public static void Generate(CommandEventArgs e)
{
Delete(e);
Point3D[] list = Siege.SiegeShard ? GetMalasPoints() : GetTramPoints();
Map map = Siege.SiegeShard ? Map.Malas : Map.Trammel;
Item item = new tent_whiteAddon();
WeakEntityCollection.Add(EntityName, item);
item.MoveToWorld(list[0], map);
item = new tent_brownAddon();
WeakEntityCollection.Add(EntityName, item);
item.MoveToWorld(list[1], map);
Mobile mob = new CasinoCashier();
WeakEntityCollection.Add(EntityName, mob);
mob.MoveToWorld(list[2], map);
mob = new CasinoCashier();
WeakEntityCollection.Add(EntityName, mob);
mob.MoveToWorld(list[3], map);
mob = new CasinoCashier();
WeakEntityCollection.Add(EntityName, mob);
mob.MoveToWorld(list[4], map);
mob = new ChucklesLuckDealer();
WeakEntityCollection.Add(EntityName, mob);
mob.MoveToWorld(list[5], map);
mob = new HiMiddleLowDealer();
WeakEntityCollection.Add(EntityName, mob);
mob.MoveToWorld(list[6], map);
mob = new DiceRiderDealer();
WeakEntityCollection.Add(EntityName, mob);
mob.MoveToWorld(list[7], map);
var xmlspawner = new XmlSpawner(8, 1, 2, 0, 25, "CasinoWaitress");
WeakEntityCollection.Add(EntityName, xmlspawner);
xmlspawner.MoveToWorld(list[8], map);
xmlspawner.MaxCount = 8;
xmlspawner.SpawnRange = 25;
xmlspawner.SpawnRange = 25;
xmlspawner.DoRespawn = true;
e.Mobile.SendMessage("Fortune Fire Casino Generated in {0}!", map);
}
private static Point3D[] GetTramPoints()
{
return new Point3D[]
{
new Point3D(4062, 3313, 1),
new Point3D(4050, 3332, 0),
new Point3D(4047, 3329, 0),
new Point3D(4049, 3329, 0),
new Point3D(4049, 3327, 0),
new Point3D(4060, 3313, 4),
new Point3D(4062, 3310, 4),
new Point3D(4065, 3312, 4),
new Point3D(4055, 3319, 0)
};
}
private static Point3D[] GetMalasPoints()
{
var list = GetTramPoints();
return new Point3D[]
{
new Point3D(list[0].X - _MalasXOffset, list[0].Y - _MalasYOffset, list[0].Z - _MalasZOffset),
new Point3D(list[1].X - _MalasXOffset, list[1].Y - _MalasYOffset, list[1].Z - _MalasZOffset),
new Point3D(list[2].X - _MalasXOffset, list[2].Y - _MalasYOffset, list[2].Z - _MalasZOffset),
new Point3D(list[3].X - _MalasXOffset, list[3].Y - _MalasYOffset, list[3].Z - _MalasZOffset),
new Point3D(list[4].X - _MalasXOffset, list[4].Y - _MalasYOffset, list[4].Z - _MalasZOffset),
new Point3D(list[5].X - _MalasXOffset, list[5].Y - _MalasYOffset, list[5].Z - _MalasZOffset),
new Point3D(list[6].X - _MalasXOffset, list[6].Y - _MalasYOffset, list[6].Z - _MalasZOffset),
new Point3D(list[7].X - _MalasXOffset, list[7].Y - _MalasYOffset, list[7].Z - _MalasZOffset),
new Point3D(list[8].X - _MalasXOffset, list[8].Y - _MalasYOffset, list[8].Z - _MalasZOffset),
};
}
private static readonly int _MalasXOffset = 3396;
private static readonly int _MalasYOffset = 2203;
private static readonly int _MalasZOffset = 90;
public static void Delete(CommandEventArgs e)
{
WeakEntityCollection.Delete(EntityName);
}
}
}

View File

@@ -0,0 +1,446 @@
using System;
using Server;
using System.Collections.Generic;
using Server.Items;
using Server.Mobiles;
using Server.Gumps;
namespace Server.Engines.ResortAndCasino
{
public class CasinoCashier : Banker
{
[Constructable]
public CasinoCashier()
{
Title = "the casino cashier";
CantWalk = true;
}
public override void InitOutfit()
{
SetWearable(new FancyShirt(), 2498);
SetWearable(new Shoes(), 2413);
Item pants = new LongPants();
pants.ItemID = 0x2FC3;
pants.Name = "Elven Pants";
SetWearable(pants, 1910);
}
public override void OnDoubleClick(Mobile m)
{
if (m is PlayerMobile && m.InRange(this.Location, 3))
{
m.SendGump(new PurchaseCasinoChipGump(m as PlayerMobile));
}
}
public CasinoCashier(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class CasinoDealer : BaseVendor
{
public Dictionary<PlayerMobile, BaseDiceGame> Players { get; set; }
public override bool IsInvulnerable { get { return true; } }
public override bool IsActiveVendor { get { return false; } }
private List<SBInfo> m_SBInfos = new List<SBInfo>();
protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
public override void InitSBInfo()
{
}
public CasinoDealer(string title)
: base(title)
{
CantWalk = true;
}
public override void InitBody()
{
SetStr(100);
SetInt(125);
SetDex(100);
if (Utility.RandomDouble() > 0.5)
{
Female = true;
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Female = false;
Body = 0x190;
Name = NameList.RandomName("male");
}
HairItemID = Race.RandomHair(Female);
FacialHairItemID = Race.RandomFacialHair(Female);
Hue = Race.RandomSkinHue();
}
public override void InitOutfit()
{
SetWearable(new FancyShirt(), 1169);
SetWearable(new Shoes(), 1169);
Item pants = new LongPants();
pants.ItemID = 0x2FC3;
pants.Name = "Elven Pants";
SetWearable(pants, 1910);
}
public override void OnDoubleClick(Mobile m)
{
if (m is PlayerMobile && InRange(m.Location, 3))
{
SendGump((PlayerMobile)m);
}
}
public void AddGame(PlayerMobile pm, BaseDiceGame game)
{
if (Players == null)
Players = new Dictionary<PlayerMobile, BaseDiceGame>();
Players[pm] = game;
}
public void RemoveGame(PlayerMobile pm, BaseDiceGame game)
{
if (Players == null || !Players.ContainsKey(pm))
return;
Players.Remove(pm);
}
public bool HasGame(PlayerMobile pm)
{
return GetGame(pm) != null;
}
public BaseDiceGame GetGame(PlayerMobile pm)
{
if (Players == null || !Players.ContainsKey(pm) || Players[pm] == null)
return null;
return Players[pm];
}
public virtual void SendGump(PlayerMobile pm)
{
}
public override bool CanBeDamaged()
{
return false;
}
public CasinoDealer(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class ChucklesLuckDealer : CasinoDealer
{
[Constructable]
public ChucklesLuckDealer()
: base("The Chuckles' Luck Dealer")
{
}
public override void SendGump(PlayerMobile pm)
{
ChucklesLuck game = GetGame(pm) as ChucklesLuck;
if (game == null)
{
game = new ChucklesLuck(pm, this);
AddGame(pm, game);
}
ChucklesLuckGump g = pm.FindGump(typeof(ChucklesLuckGump)) as ChucklesLuckGump;
if(g != null)
g.Refresh();
else
{
pm.SendGump(new ChucklesLuckGump(pm, game));
}
}
public ChucklesLuckDealer(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class HiMiddleLowDealer : CasinoDealer
{
[Constructable]
public HiMiddleLowDealer()
: base("The Hi-Middle-Low Dealer")
{
}
public override void SendGump(PlayerMobile pm)
{
HiMiddleLow game = GetGame(pm) as HiMiddleLow;
if (game == null)
{
game = new HiMiddleLow(pm, this);
AddGame(pm, game);
}
HiMiddleLowGump g = pm.FindGump(typeof(HiMiddleLowGump)) as HiMiddleLowGump;
if (g != null)
g.Refresh();
else
{
pm.SendGump(new HiMiddleLowGump(pm, game));
}
}
public HiMiddleLowDealer(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class DiceRiderDealer : CasinoDealer
{
[Constructable]
public DiceRiderDealer()
: base("The Dice Rider Dealer")
{
}
public override void SendGump(PlayerMobile pm)
{
DiceRider game = GetGame(pm) as DiceRider;
if (game == null)
{
game = new DiceRider(pm, this);
AddGame(pm, game);
}
DiceRiderGump g = pm.FindGump(typeof(DiceRiderGump)) as DiceRiderGump;
if (g != null)
g.Refresh();
else
{
pm.SendGump(new DiceRiderGump(pm, game));
}
}
public DiceRiderDealer(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class CasinoWaitress : BaseVendor
{
public override bool IsActiveVendor { get { return false; } }
public override double GetMoveDelay { get { return (double)Utility.RandomMinMax(2, 6); } }
private List<SBInfo> m_SBInfos = new List<SBInfo>();
protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
public Dictionary<Mobile, int> _Drinks { get; set; }
private DateTime _NextAdvertise;
public override void InitSBInfo()
{
}
[Constructable]
public CasinoWaitress()
: base("The drinks girl")
{
}
public override void InitBody()
{
InitStats(125, 100, 25);
SpeechHue = 1276;
Hue = Utility.RandomSkinHue();
if (IsInvulnerable && !Core.AOS)
NameHue = 0x35;
Female = true;
Body = 0x191;
HairItemID = Race.RandomHair(true);
HairHue = Race.RandomHairHue();
Name = NameList.RandomName("female");
}
public override void InitOutfit()
{
SetWearable(new StuddedBustierArms(), 1927);
SetWearable(new LeatherSkirt(), 1930);
SetWearable(new Sandals(), 1927);
SetWearable(new GoldBracelet(), 1931);
SetWearable(new GoldRing(), 1931);
SetWearable(new Necklace(), 1931);
SetWearable(new GoldEarrings(), 1931);
}
public override void OnDoubleClick(Mobile m)
{
if(!m.InRange(this.Location, 3))
return;
if (_Drinks == null)
_Drinks = new Dictionary<Mobile, int>();
if (!_Drinks.ContainsKey(m) || _Drinks[m] < 2)
{
GiveDrink(m);
if (_Drinks.ContainsKey(m))
_Drinks[m]++;
else
_Drinks[m] = 1;
}
}
public void GiveDrink(Mobile m)
{
FortunesFireGrog grog = new FortunesFireGrog();
m.AddToBackpack(grog);
int cliloc = 1153416 + Utility.RandomMinMax(0, 2);
SayTo(m, cliloc); // Here you are, hun. - Drink up! - Enjoy the drink. Tips are appreciated!
}
public override void OnThink()
{
base.OnThink();
IPooledEnumerable eable = this.Map.GetMobilesInRange(this.Location, 8);
bool canspeak = _NextAdvertise < DateTime.UtcNow;
if (!canspeak)
return;
canspeak = false;
foreach (Mobile m in eable)
{
if (m is PlayerMobile)
{
canspeak = true;
break;
}
}
if (canspeak)
Say(1153419);
_NextAdvertise = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(60, 120));
}
public override bool OnGoldGiven(Mobile from, Gold dropped)
{
Direction = GetDirectionTo(from);
SayTo(from, 1153420); // Oh, thank you dearie!
dropped.Delete();
return true;
}
public CasinoWaitress(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
if(_Drinks != null)
_Drinks.Clear();
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,193 @@
////////////////////////////////////////
// //
// Generated by CEO's YAAAG - V1.2 //
// (Yet Another Arya Addon Generator) //
// //
////////////////////////////////////////
using System;
using Server;
using Server.Items;
namespace Server.Items
{
public class tent_brownAddon : BaseAddon
{
private static int[,] m_AddOnSimpleComponents = new int[,] {
{2967, 5, 2, 0}, {2881, 5, 1, 0}, {2882, 5, 2, 0}// 8 9 11
, {3221, 4, 5, 0}, {3221, -3, 4, 0}, {3206, 5, 1, 4}// 14 15 34
, {3083, 5, 2, 0}, {3208, 5, 2, 4}, {3209, 5, 2, 4}// 40 41 44
, {2168, 0, -5, 8}, {2881, 5, -4, 0}, {2882, 5, -3, 0}// 54 57 60
, {2123, -2, -2, 8}, {2122, 0, -2, 8}, {3206, 5, -4, 4}// 61 62 63
, {2167, -1, -2, 8}, {6424, 0, -3, 0}, {3209, 5, -3, 4}// 64 68 69
, {3221, 5, -5, 0}, {6419, 0, -2, 0}, {3208, 5, -3, 2}// 70 77 80
, {6427, -3, -2, 0}, {2168, 0, -3, 8}, {6426, -2, -2, 0}// 82 89 93
, {6424, 0, -4, 0}, {2121, 0, -4, 8}, {6425, 0, -5, 0}// 94 95 99
, {6426, -1, -2, 0}, {2167, -3, -2, 8}// 100 102
};
public override BaseAddonDeed Deed
{
get
{
return new tent_brownAddonDeed();
}
}
[ Constructable ]
public tent_brownAddon()
{
for (int i = 0; i < m_AddOnSimpleComponents.Length / 4; i++)
AddComponent( new AddonComponent( m_AddOnSimpleComponents[i,0] ), m_AddOnSimpleComponents[i,1], m_AddOnSimpleComponents[i,2], m_AddOnSimpleComponents[i,3] );
AddComplexComponent( (BaseAddon) this, 496, 4, 3, 0, 1118, -1, "", 1);// 1
AddComplexComponent( (BaseAddon) this, 2778, 0, 1, 0, 0, -1, "decorative golden rug", 1);// 2
AddComplexComponent( (BaseAddon) this, 2786, 0, 2, 0, 0, -1, "decorative golden rug", 1);// 3
AddComplexComponent( (BaseAddon) this, 2778, 0, 0, 0, 0, -1, "decorative golden rug", 1);// 4
AddComplexComponent( (BaseAddon) this, 500, -4, 3, 0, 1118, -1, "", 1);// 5
AddComplexComponent( (BaseAddon) this, 2786, 1, 2, 0, 0, -1, "decorative golden rug", 1);// 6
AddComplexComponent( (BaseAddon) this, 2778, -1, 1, 0, 0, -1, "decorative golden rug", 1);// 7
AddComplexComponent( (BaseAddon) this, 2785, 3, -1, 0, 0, -1, "decorative golden rug", 1);// 10
AddComplexComponent( (BaseAddon) this, 503, -4, 2, 0, 1118, -1, "", 1);// 12
AddComplexComponent( (BaseAddon) this, 2783, -3, -1, 0, 0, -1, "decorative golden rug", 1);// 13
AddComplexComponent( (BaseAddon) this, 2783, -3, 0, 0, 0, -1, "decorative golden rug", 1);// 16
AddComplexComponent( (BaseAddon) this, 2778, 1, 0, 0, 0, -1, "decorative golden rug", 1);// 17
AddComplexComponent( (BaseAddon) this, 2783, -3, 1, 0, 0, -1, "decorative golden rug", 1);// 18
AddComplexComponent( (BaseAddon) this, 2778, 1, -1, 0, 0, -1, "decorative golden rug", 1);// 19
AddComplexComponent( (BaseAddon) this, 2781, -3, 2, 0, 0, -1, "decorative golden rug", 1);// 20
AddComplexComponent( (BaseAddon) this, 2785, 3, 1, 0, 0, -1, "decorative golden rug", 1);// 21
AddComplexComponent( (BaseAddon) this, 503, -4, -1, 0, 1118, -1, "", 1);// 22
AddComplexComponent( (BaseAddon) this, 497, -1, 3, 0, 1118, -1, "", 1);// 23
AddComplexComponent( (BaseAddon) this, 2778, 1, 1, 0, 0, -1, "decorative golden rug", 1);// 24
AddComplexComponent( (BaseAddon) this, 2786, 2, 2, 0, 0, -1, "decorative golden rug", 1);// 25
AddComplexComponent( (BaseAddon) this, 497, 0, 3, 0, 1118, -1, "", 1);// 26
AddComplexComponent( (BaseAddon) this, 2778, -2, -1, 0, 0, -1, "decorative golden rug", 1);// 27
AddComplexComponent( (BaseAddon) this, 497, 2, 3, 0, 1118, -1, "", 1);// 28
AddComplexComponent( (BaseAddon) this, 2778, -2, 0, 0, 0, -1, "decorative golden rug", 1);// 29
AddComplexComponent( (BaseAddon) this, 497, 1, 3, 0, 1118, -1, "", 1);// 30
AddComplexComponent( (BaseAddon) this, 2786, -2, 2, 0, 0, -1, "decorative golden rug", 1);// 31
AddComplexComponent( (BaseAddon) this, 2778, -1, 0, 0, 0, -1, "decorative golden rug", 1);// 32
AddComplexComponent( (BaseAddon) this, 497, -2, 3, 0, 1118, -1, "", 1);// 33
AddComplexComponent( (BaseAddon) this, 2778, -2, 1, 0, 0, -1, "decorative golden rug", 1);// 35
AddComplexComponent( (BaseAddon) this, 2779, 3, 2, 0, 0, -1, "decorative golden rug", 1);// 36
AddComplexComponent( (BaseAddon) this, 2778, 0, -1, 0, 0, -1, "decorative golden rug", 1);// 37
AddComplexComponent( (BaseAddon) this, 2786, -1, 2, 0, 0, -1, "decorative golden rug", 1);// 38
AddComplexComponent( (BaseAddon) this, 2778, 2, -1, 0, 0, -1, "decorative golden rug", 1);// 39
AddComplexComponent( (BaseAddon) this, 497, 3, 3, 0, 1118, -1, "", 1);// 42
AddComplexComponent( (BaseAddon) this, 498, 4, 2, 0, 1118, -1, "", 1);// 43
AddComplexComponent( (BaseAddon) this, 2785, 3, 0, 0, 0, -1, "decorative golden rug", 1);// 45
AddComplexComponent( (BaseAddon) this, 498, 4, 1, 0, 1118, -1, "", 1);// 46
AddComplexComponent( (BaseAddon) this, 503, -4, 0, 0, 1118, -1, "", 1);// 47
AddComplexComponent( (BaseAddon) this, 2778, 2, 0, 0, 0, -1, "decorative golden rug", 1);// 49
AddComplexComponent( (BaseAddon) this, 2778, 2, 1, 0, 0, -1, "decorative golden rug", 1);// 50
AddComplexComponent( (BaseAddon) this, 497, -3, 3, 0, 1118, -1, "", 1);// 51
AddComplexComponent( (BaseAddon) this, 2778, -1, -1, 0, 0, -1, "decorative golden rug", 1);// 52
AddComplexComponent( (BaseAddon) this, 503, -4, 1, 0, 1118, -1, "", 1);// 53
AddComplexComponent( (BaseAddon) this, 2784, 2, -4, 0, 0, -1, "decorative golden rug", 1);// 55
AddComplexComponent( (BaseAddon) this, 2784, 1, -4, 0, 0, -1, "decorative golden rug", 1);// 56
AddComplexComponent( (BaseAddon) this, 2778, 1, -2, 0, 0, -1, "decorative golden rug", 1);// 59
AddComplexComponent( (BaseAddon) this, 2778, -1, -3, 0, 0, -1, "decorative golden rug", 1);// 65
AddComplexComponent( (BaseAddon) this, 2778, -1, -2, 0, 0, -1, "decorative golden rug", 1);// 66
AddComplexComponent( (BaseAddon) this, 2778, -2, -2, 0, 0, -1, "decorative golden rug", 1);// 67
AddComplexComponent( (BaseAddon) this, 501, 4, -5, 0, 1118, -1, "", 1);// 71
AddComplexComponent( (BaseAddon) this, 498, 4, -4, 0, 1118, -1, "", 1);// 72
AddComplexComponent( (BaseAddon) this, 503, -4, -4, 0, 1118, -1, "", 1);// 73
AddComplexComponent( (BaseAddon) this, 2784, -1, -4, 0, 0, -1, "decorative golden rug", 1);// 74
AddComplexComponent( (BaseAddon) this, 498, 4, -3, 0, 1118, -1, "", 1);// 75
AddComplexComponent( (BaseAddon) this, 2785, 3, -2, 0, 0, -1, "decorative golden rug", 1);// 76
AddComplexComponent( (BaseAddon) this, 2778, 2, -3, 0, 0, -1, "decorative golden rug", 1);// 78
AddComplexComponent( (BaseAddon) this, 2778, 1, -3, 0, 0, -1, "decorative golden rug", 1);// 79
AddComplexComponent( (BaseAddon) this, 2778, 2, -2, 0, 0, -1, "decorative golden rug", 1);// 81
AddComplexComponent( (BaseAddon) this, 2784, -2, -4, 0, 0, -1, "decorative golden rug", 1);// 83
AddComplexComponent( (BaseAddon) this, 499, -4, -5, 0, 1118, -1, "", 1);// 84
AddComplexComponent( (BaseAddon) this, 2780, -3, -4, 0, 0, -1, "decorative golden rug", 1);// 85
AddComplexComponent( (BaseAddon) this, 2778, 0, -2, 0, 0, -1, "decorative golden rug", 1);// 86
AddComplexComponent( (BaseAddon) this, 2783, -3, -2, 0, 0, -1, "decorative golden rug", 1);// 87
AddComplexComponent( (BaseAddon) this, 2784, 0, -4, 0, 0, -1, "decorative golden rug", 1);// 88
AddComplexComponent( (BaseAddon) this, 503, -4, -3, 0, 1118, -1, "", 1);// 90
AddComplexComponent( (BaseAddon) this, 2785, 3, -3, 0, 0, -1, "decorative golden rug", 1);// 91
AddComplexComponent( (BaseAddon) this, 2778, -2, -3, 0, 0, -1, "decorative golden rug", 1);// 92
AddComplexComponent( (BaseAddon) this, 503, -4, -2, 0, 1118, -1, "", 1);// 96
AddComplexComponent( (BaseAddon) this, 2783, -3, -3, 0, 0, -1, "decorative golden rug", 1);// 97
AddComplexComponent( (BaseAddon) this, 2782, 3, -4, 0, 0, -1, "decorative golden rug", 1);// 98
AddComplexComponent( (BaseAddon) this, 2778, 0, -3, 0, 0, -1, "decorative golden rug", 1);// 101
}
public tent_brownAddon( Serial serial ) : base( serial )
{
}
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource)
{
AddComplexComponent(addon, item, xoffset, yoffset, zoffset, hue, lightsource, null, 1);
}
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
{
AddonComponent ac;
ac = new AddonComponent(item);
if (name != null && name.Length > 0)
ac.Name = name;
if (hue != 0)
ac.Hue = hue;
if (amount > 1)
{
ac.Stackable = true;
ac.Amount = amount;
}
if (lightsource != -1)
ac.Light = (LightType) lightsource;
addon.AddComponent(ac, xoffset, yoffset, zoffset);
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( 0 ); // Version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class tent_brownAddonDeed : BaseAddonDeed
{
public override BaseAddon Addon
{
get
{
return new tent_brownAddon();
}
}
[Constructable]
public tent_brownAddonDeed()
{
Name = "tent_brown";
}
public tent_brownAddonDeed( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( 0 ); // Version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,206 @@
////////////////////////////////////////
// //
// Generated by CEO's YAAAG - V1.2 //
// (Yet Another Arya Addon Generator) //
// //
////////////////////////////////////////
using System;
using Server;
using Server.Items;
namespace Server.Items
{
public class tent_whiteAddon : BaseAddon
{
private static int[,] m_AddOnSimpleComponents = new int[,] {
{3206, -1, 5, 5}, {3206, 3, 5, 5}, {1985, -2, 2, 1}// 1 2 3
, {2968, -1, 5, 1}, {3207, -2, 5, 3}, {3222, -4, 4, 1}// 4 5 6
, {3207, 3, 5, 3}, {3222, 5, 5, 1}, {1981, 2, 2, 1}// 7 8 9
, {2884, 4, 5, 1}, {2884, -1, 5, 1}, {2883, -2, 5, 1}// 14 18 23
, {1981, 1, 2, 1}, {1981, -1, 2, 1}, {3206, -2, 5, 5}// 24 29 31
, {3206, 4, 5, 5}, {3010, -1, 5, 1}, {1986, 3, 2, 1}// 33 35 37
, {2883, 3, 5, 1}, {1981, 0, 2, 1}, {1981, -1, -3, 1}// 39 40 47
, {1981, 0, -3, 1}, {1981, 1, -3, 1}, {1981, 2, -3, 1}// 48 49 53
, {1983, -2, -3, 1}, {1982, 3, 0, 1}, {1982, 3, 1, 1}// 65 67 68
, {1982, 3, -2, 1}, {1982, 3, -1, 1}, {1982, -2, 1, 1}// 74 76 79
, {1984, 3, -3, 1}, {1982, -2, -1, 1}, {1982, -2, 0, 1}// 100 106 110
, {1982, -2, -2, 1}// 111
};
public override BaseAddonDeed Deed
{
get
{
return new tent_whiteAddonDeed();
}
}
[ Constructable ]
public tent_whiteAddon()
{
for (int i = 0; i < m_AddOnSimpleComponents.Length / 4; i++)
AddComponent( new AddonComponent( m_AddOnSimpleComponents[i,0] ), m_AddOnSimpleComponents[i,1], m_AddOnSimpleComponents[i,2], m_AddOnSimpleComponents[i,3] );
AddComplexComponent( (BaseAddon) this, 497, 3, 4, 1, 1150, -1, "", 1);// 10
AddComplexComponent( (BaseAddon) this, 2778, 0, 2, 1, 0, -1, "decorative golden rug", 1);// 11
AddComplexComponent( (BaseAddon) this, 2786, 0, 3, 1, 0, -1, "decorative golden rug", 1);// 12
AddComplexComponent( (BaseAddon) this, 500, -3, 4, 1, 1150, -1, "", 1);// 13
AddComplexComponent( (BaseAddon) this, 2785, 3, 2, 1, 0, -1, "decorative golden rug", 1);// 15
AddComplexComponent( (BaseAddon) this, 2786, 1, 3, 1, 0, -1, "decorative golden rug", 1);// 16
AddComplexComponent( (BaseAddon) this, 2778, 1, 2, 1, 0, -1, "decorative golden rug", 1);// 17
AddComplexComponent( (BaseAddon) this, 503, -3, 2, 1, 1150, -1, "", 1);// 19
AddComplexComponent( (BaseAddon) this, 497, -2, 4, 1, 1150, -1, "", 1);// 20
AddComplexComponent( (BaseAddon) this, 2778, -1, 2, 1, 0, -1, "decorative golden rug", 1);// 21
AddComplexComponent( (BaseAddon) this, 2781, -2, 3, 1, 0, -1, "decorative golden rug", 1);// 22
AddComplexComponent( (BaseAddon) this, 2779, 3, 3, 1, 0, -1, "decorative golden rug", 1);// 25
AddComplexComponent( (BaseAddon) this, 497, -1, 4, 1, 1150, -1, "", 1);// 26
AddComplexComponent( (BaseAddon) this, 2786, -1, 3, 1, 0, -1, "decorative golden rug", 1);// 27
AddComplexComponent( (BaseAddon) this, 498, 5, 3, 1, 1150, -1, "", 1);// 28
AddComplexComponent( (BaseAddon) this, 2786, 2, 3, 1, 0, -1, "decorative golden rug", 1);// 30
AddComplexComponent( (BaseAddon) this, 503, -3, 3, 1, 1150, -1, "", 1);// 32
AddComplexComponent( (BaseAddon) this, 2778, 2, 2, 1, 0, -1, "decorative golden rug", 1);// 34
AddComplexComponent( (BaseAddon) this, 496, 5, 4, 1, 1150, -1, "", 1);// 36
AddComplexComponent( (BaseAddon) this, 498, 5, 2, 1, 1150, -1, "", 1);// 38
AddComplexComponent( (BaseAddon) this, 497, 4, 4, 1, 1150, -1, "", 1);// 41
AddComplexComponent( (BaseAddon) this, 2783, -2, 2, 1, 0, -1, "decorative golden rug", 1);// 42
AddComplexComponent( (BaseAddon) this, 502, 4, -4, 1, 1150, -1, "", 1);// 43
AddComplexComponent( (BaseAddon) this, 4611, -1, 0, 1, 1193, -1, "", 1);// 44
AddComplexComponent( (BaseAddon) this, 4611, -1, -1, 1, 1193, -1, "", 1);// 45
AddComplexComponent( (BaseAddon) this, 4612, 2, 0, 0, 1193, -1, "", 1);// 46
AddComplexComponent( (BaseAddon) this, 498, 5, 0, 1, 1150, -1, "", 1);// 50
AddComplexComponent( (BaseAddon) this, 2778, 2, -1, 1, 0, -1, "decorative golden rug", 1);// 51
AddComplexComponent( (BaseAddon) this, 4612, 2, -1, 0, 1193, -1, "", 1);// 52
AddComplexComponent( (BaseAddon) this, 4609, -1, 1, 1, 1193, -1, "", 1);// 54
AddComplexComponent( (BaseAddon) this, 2778, -1, 0, 1, 0, -1, "decorative golden rug", 1);// 55
AddComplexComponent( (BaseAddon) this, 503, -3, -3, 1, 1150, -1, "", 1);// 56
AddComplexComponent( (BaseAddon) this, 4611, 0, -2, 1, 1193, -1, "", 1);// 57
AddComplexComponent( (BaseAddon) this, 4612, 2, -2, 0, 1193, -1, "", 1);// 58
AddComplexComponent( (BaseAddon) this, 4609, 0, 1, 1, 1193, -1, "", 1);// 59
AddComplexComponent( (BaseAddon) this, 2778, 0, 1, 1, 0, -1, "decorative golden rug", 1);// 60
AddComplexComponent( (BaseAddon) this, 2784, 2, -3, 1, 0, -1, "decorative golden rug", 1);// 61
AddComplexComponent( (BaseAddon) this, 4609, 1, 1, 1, 1193, -1, "", 1);// 64
AddComplexComponent( (BaseAddon) this, 2778, 1, 0, 1, 0, -1, "decorative golden rug", 1);// 66
AddComplexComponent( (BaseAddon) this, 2785, 3, 1, 1, 0, -1, "decorative golden rug", 1);// 69
AddComplexComponent( (BaseAddon) this, 2778, 2, 1, 1, 0, -1, "decorative golden rug", 1);// 70
AddComplexComponent( (BaseAddon) this, 502, 0, -4, 1, 1150, -1, "", 1);// 71
AddComplexComponent( (BaseAddon) this, 2784, -1, -3, 1, 0, -1, "decorative golden rug", 1);// 72
AddComplexComponent( (BaseAddon) this, 2785, 3, 0, 1, 0, -1, "decorative golden rug", 1);// 73
AddComplexComponent( (BaseAddon) this, 2778, -1, 1, 1, 0, -1, "decorative golden rug", 1);// 75
AddComplexComponent( (BaseAddon) this, 4609, 2, 1, 1, 1193, -1, "", 1);// 77
AddComplexComponent( (BaseAddon) this, 2778, 0, 0, 1, 0, -1, "decorative golden rug", 1);// 78
AddComplexComponent( (BaseAddon) this, 2778, -1, -2, 1, 0, -1, "decorative golden rug", 1);// 80
AddComplexComponent( (BaseAddon) this, 2778, 0, -1, 1, 0, -1, "decorative golden rug", 1);// 81
AddComplexComponent( (BaseAddon) this, 2778, 1, 1, 1, 0, -1, "decorative golden rug", 1);// 82
AddComplexComponent( (BaseAddon) this, 4611, -1, -2, 1, 1193, -1, "", 1);// 83
AddComplexComponent( (BaseAddon) this, 502, 3, -4, 1, 1150, -1, "", 1);// 84
AddComplexComponent( (BaseAddon) this, 499, -3, -4, 1, 1150, -1, "", 1);// 85
AddComplexComponent( (BaseAddon) this, 4611, 1, -2, 1, 1193, -1, "", 1);// 86
AddComplexComponent( (BaseAddon) this, 2785, 3, -1, 1, 0, -1, "decorative golden rug", 1);// 87
AddComplexComponent( (BaseAddon) this, 2778, 0, -2, 1, 0, -1, "decorative golden rug", 1);// 88
AddComplexComponent( (BaseAddon) this, 502, 1, -4, 1, 1150, -1, "", 1);// 89
AddComplexComponent( (BaseAddon) this, 2784, 1, -3, 1, 0, -1, "decorative golden rug", 1);// 90
AddComplexComponent( (BaseAddon) this, 2785, 3, -2, 1, 0, -1, "decorative golden rug", 1);// 91
AddComplexComponent( (BaseAddon) this, 503, -3, 1, 1, 1150, -1, "", 1);// 92
AddComplexComponent( (BaseAddon) this, 2784, 0, -3, 1, 0, -1, "decorative golden rug", 1);// 93
AddComplexComponent( (BaseAddon) this, 2778, -1, -1, 1, 0, -1, "decorative golden rug", 1);// 95
AddComplexComponent( (BaseAddon) this, 502, 2, -4, 1, 1150, -1, "", 1);// 96
AddComplexComponent( (BaseAddon) this, 2778, 1, -1, 1, 0, -1, "decorative golden rug", 1);// 97
AddComplexComponent( (BaseAddon) this, 498, 5, -1, 1, 1150, -1, "", 1);// 98
AddComplexComponent( (BaseAddon) this, 503, -3, -2, 1, 1150, -1, "", 1);// 99
AddComplexComponent( (BaseAddon) this, 498, 5, 1, 1, 1150, -1, "", 1);// 101
AddComplexComponent( (BaseAddon) this, 2782, 3, -3, 1, 0, -1, "decorative golden rug", 1);// 102
AddComplexComponent( (BaseAddon) this, 2778, 1, -2, 1, 0, -1, "decorative golden rug", 1);// 103
AddComplexComponent( (BaseAddon) this, 498, 5, -3, 1, 1150, -1, "", 1);// 104
AddComplexComponent( (BaseAddon) this, 503, -3, -1, 1, 1150, -1, "", 1);// 105
AddComplexComponent( (BaseAddon) this, 502, -1, -4, 1, 1150, -1, "", 1);// 107
AddComplexComponent( (BaseAddon) this, 2778, 2, -2, 1, 0, -1, "decorative golden rug", 1);// 108
AddComplexComponent( (BaseAddon) this, 498, 5, -2, 1, 1150, -1, "", 1);// 109
AddComplexComponent( (BaseAddon) this, 2778, 2, 0, 1, 0, -1, "decorative golden rug", 1);// 112
AddComplexComponent( (BaseAddon) this, 503, -3, 0, 1, 1150, -1, "", 1);// 113
AddComplexComponent( (BaseAddon) this, 2783, -2, 0, 1, 0, -1, "decorative golden rug", 1);// 114
AddComplexComponent( (BaseAddon) this, 2783, -2, 1, 1, 0, -1, "decorative golden rug", 1);// 115
AddComplexComponent( (BaseAddon) this, 2783, -2, -1, 1, 0, -1, "decorative golden rug", 1);// 116
AddComplexComponent( (BaseAddon) this, 2783, -2, -2, 1, 0, -1, "decorative golden rug", 1);// 117
AddComplexComponent( (BaseAddon) this, 502, -2, -4, 1, 1150, -1, "", 1);// 118
AddComplexComponent( (BaseAddon) this, 2780, -2, -3, 1, 0, -1, "decorative golden rug", 1);// 119
}
public tent_whiteAddon( Serial serial ) : base( serial )
{
}
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource)
{
AddComplexComponent(addon, item, xoffset, yoffset, zoffset, hue, lightsource, null, 1);
}
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
{
AddonComponent ac;
ac = new AddonComponent(item);
if (name != null && name.Length > 0)
ac.Name = name;
if (hue != 0)
ac.Hue = hue;
if (amount > 1)
{
ac.Stackable = true;
ac.Amount = amount;
}
if (lightsource != -1)
ac.Light = (LightType) lightsource;
addon.AddComponent(ac, xoffset, yoffset, zoffset);
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( 0 ); // Version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class tent_whiteAddonDeed : BaseAddonDeed
{
public override BaseAddon Addon
{
get
{
return new tent_whiteAddon();
}
}
[Constructable]
public tent_whiteAddonDeed()
{
Name = "tent_white";
}
public tent_whiteAddonDeed( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( 0 ); // Version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}