Exemple #1
0
 public static void UpdateBids(Client client, int newBid)
 {
     if (client.Player.MapID == AUCTION_MAP)
     {
         if (State == AuctionState.Started)
         {
             if (newBid > MinBid)
             {
                 if (newBid > highestBid + BidIncrement)
                 {
                     highestBid    = newBid;
                     highestBidder = client.Player.Name;
                     IMap map = client.Player.Map;
                     foreach (Client i in map.GetClients())
                     {
                         Messenger.BattleMsg(i, client.Player.Name + " has made a bid of " + newBid.ToString() + " Poké for " + SetItem, Text.Yellow);
                     }
                 }
                 else
                 {
                     Messenger.PlayerMsg(client, "You must make a bid of at least " + (highestBid + BidIncrement).ToString() + " Poké!", Text.BrightRed);
                 }
             }
             else
             {
                 Messenger.PlayerMsg(client, "Your bid must be higher than " + MinBid.ToString() + " Poké!", Text.BrightRed);
             }
         }
         else
         {
             Messenger.PlayerMsg(client, "The auction hasn't started yet!", Text.BrightRed);
         }
     }
 }
Exemple #2
0
 public static void StartAuction(Client client)
 {
     if (client.Player.CharID == AuctionMaster)
     {
         if (client.Player.MapID == AUCTION_MAP)
         {
             State         = AuctionState.Started;
             highestBidder = null;
             highestBid    = -1;
             IMap playerMap = client.Player.Map;
             foreach (Client i in playerMap.GetClients())
             {
                 Messenger.BattleMsg(i, "The auction for a " + SetItem + " has begun! Say /bid bidinpoke to make a bid!", Text.Yellow);
                 Messenger.PlayerMsg(i, "The auction for a " + SetItem + " has begun! Say /bid bidinpoke to make a bid!", Text.Yellow);
             }
         }
     }
 }
Exemple #3
0
 public static void ReachedSublevelGoal(Client client, SteppedOnTileTriggerEvent tEvent)
 {
     DisplayInvisibleSublevelGoalTile(client, client.Player.Map, tEvent.X, tEvent.Y, null);
     string[] split = tEvent.ID.Split('-');
     if (split[1].IsNumeric())
     {
         int id = split[1].ToInt();
         if (exPlayer.Get(client).ElectrolockSublevel.Contains(id) == false)
         {
             exPlayer.Get(client).ElectrolockSublevel.Add(id);
             Messenger.BattleMsg(client, "The light of the crystal enters into your shock flask!", Text.BrightGreen);
             Messenger.BattleMsg(client, "Your shock flask feels heavier...", Text.WhiteSmoke);
         }
         if (VerifyMapKeyTiles(client, client.Player.Map, null))
         {
             Messenger.BattleMsg(client, "An electrolock has been opened nearby!", Text.BrightGreen);
         }
     }
 }
Exemple #4
0
 public static void OnPlayerStep(Client client)
 {
     if (IsInTower(client.Player.Map))
     {
         if (exPlayer.Get(client).ElectrolockCharge == -1)
         {
             exPlayer.Get(client).ElectrolockCharge = 0;
             Messenger.BattleMsg(client, "Your shock flask seems empty...", Text.BrightRed);
             VerifyMapKeyTiles(client, client.Player.Map, null);
         }
         if (client.Player.HasItemHeldBy(385, Enums.PokemonType.Electric))
         {
             exPlayer.Get(client).ElectrolockCharge++;
             int chargesNeeded = ChargesNeededForLevel(exPlayer.Get(client).ElectrolockLevel);
             if (chargesNeeded > -1)
             {
                 if (exPlayer.Get(client).ElectrolockCharge == 1)
                 {
                     Messenger.BattleMsg(client, "Your shock flask is charging!", Text.BrightGreen);
                 }
                 else if (exPlayer.Get(client).ElectrolockCharge == chargesNeeded / 2)
                 {
                     Messenger.BattleMsg(client, "Your shock flask is half-charged!", Text.BrightGreen);
                 }
                 else if (exPlayer.Get(client).ElectrolockCharge == chargesNeeded - 10)
                 {
                     Messenger.BattleMsg(client, "Your shock flask is almost charged!", Text.BrightGreen);
                 }
                 else if (exPlayer.Get(client).ElectrolockCharge == chargesNeeded)
                 {
                     Messenger.BattleMsg(client, "Your shock flask is fully charged!", Text.BrightGreen);
                     if (VerifyMapKeyTiles(client, client.Player.Map, null))
                     {
                         Messenger.BattleMsg(client, "An electrolock has been opened nearby!", Text.BrightGreen);
                     }
                 }
             }
         }
     }
 }
Exemple #5
0
 public static void CheckBidder(Client client)
 {
     //if (client.Player.CharID == AuctionMaster) {
     Messenger.BattleMsg(client, "The highest bidder is " + ClientManager.FindClient(highestBidder).Player.Name + ", with a bid of " + highestBid.ToString() + " Poké! (" + SetItem + ")", Text.BrightGreen);
     //}
 }