Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region ExchangeOfficer
- case 13547:// OTP`s
- {
- dialog.Avatar(254);
- switch (npcRequest.OptionID)
- {
- case 0:
- {
- dialog.Text("Hello sir, i've been called by the authority to help the active people with the speical gifts I carry in my bag. So let's see how active you are.. your online ");
- dialog.Text("training points are " + client.OnlinePoints.ToString("0,0") + " What would you like to claim with your points " + client.OnlinePoints.ToString("0,0") + " OTP's?");
- dialog.Option("increase my VIP", 8);
- dialog.Option("Exchange to CPs", 2);
- dialog.Option("Exchange to ChampionPoints", 3);
- dialog.Option("Tournaments~Exchange", 60);
- dialog.Option("just passing by", 255);
- dialog.Send();
- break;
- }
- case 3:
- {
- dialog.Text("How~many~OTP's~would~you~like~to~exchange?");
- dialog.Option("10~OTP~=~2~ChampionPoints", 4);
- dialog.Option("100~OTP~=~25~ChampionPoints", 5);
- dialog.Option("I'll~choose~another~offer", 255);
- dialog.Send();
- break;
- }
- case 60:
- {
- var shop = new ProtoExchangeShop()
- {
- ShopID = 19424,
- Action = 1,
- TimeIn = 1714178,
- TimeInSeconds = 46389,
- };
- client.Send(CMsgExchangeShop.FinalizeProtoBuf(shop));
- break;
- }
- case 4:
- {
- if (client.OnlinePoints >= 10)
- {
- client.OnlinePoints -= 10;
- client.ChampionPoints += 2;
- client.Champion.Send(client);
- Database.EntityTable.UpdateOtp(client);
- client.Send("You've~successfully~swapped~10~OTP~with~2~ChampionPoints");
- }
- else
- {
- dialog.Text("You~don't~have~enough~OnlineTraningPoints~to~continue..");
- dialog.Option("Oh,~Sorry!", 255);
- dialog.Send();
- }
- break;
- }
- case 5:
- {
- if (client.OnlinePoints >= 100)
- {
- client.OnlinePoints -= 100;
- client.ChampionPoints += 25;
- client.Champion.Send(client);
- Database.EntityTable.UpdateOtp(client);
- client.Send("You've~successfully~swapped~100~OTP~with~25~ChampionPoints");
- }
- else
- {
- dialog.Text("You~don't~have~enough~OnlineTraningPoints~to~continue..");
- dialog.Option("Oh,~Sorry!", 255);
- dialog.Send();
- }
- break;
- }
- case 8:
- {
- if (client.Entity.VIPLevel < 6)
- {
- uint Points = Program.MaxVIPPoints;
- if (client.Entity.VIPLevel >= 0 && client.Entity.VIPLevel <= 3)
- Points = 1500;
- else if (client.Entity.VIPLevel == 4)
- Points = 3000;
- else if (client.Entity.VIPLevel == 5)
- Points = 4000;
- if (client.OnlinePoints >= Points)
- {
- client.Entity.VIPLevel++;
- VipStatus vip = new VipStatus();
- client.Send(vip.ToArray());
- if (client.Entity.VIPLevel >= 1 && client.Entity.VIPLevel <= 3)
- client.VIPDays = 30;
- else if (client.Entity.VIPLevel == 4)
- client.VIPDays = 40;
- else if (client.Entity.VIPLevel == 5)
- client.VIPDays = 45;
- else if (client.Entity.VIPLevel == 6)
- client.VIPDays = 50;
- Database.PremiumTable.activateVip(client);
- client.OnlinePoints -= Points;
- Database.EntityTable.UpdateOtp(client);
- client.MessageBox("You`ve Successfuly upgrade your vip to level " + client.Entity.VIPLevel + " and got " + client.VIPDays + " Days!");
- client.Send(new Network.GamePackets.Message("You`ve Successfuly upgrade your vip to level " + client.Entity.VIPLevel + "", System.Drawing.Color.Red, Message.Talk));
- }
- else
- {
- client.Send(new Network.GamePackets.Message("You need " + Points.ToString("0,0") + " OTP's to be upgrade your VIP Level, You stand now with " + client.OnlinePoints.ToString("0,0") + "", System.Drawing.Color.Red, Message.Talk));
- }
- }
- else
- {
- client.Send(new Network.GamePackets.Message("You aready have Max Vip " + client.Entity.VIPLevel + "", System.Drawing.Color.Red, Message.Talk));
- }
- break;
- }
- case 2:
- {
- uint input;
- if (uint.TryParse(npcRequest.Input, out input))
- {
- if (input < 1)
- {
- dialog.Text("How many OTP's would you like to exchange? 1 OTP = " + Program.ExchangeCPs.ToString("0,0") + " CPs");
- dialog.Input("OTP's: (Max=5000)", 2, 9);
- return;
- }
- if (client.OnlinePoints >= input)
- {
- client.OTPsInput = input;
- if (client.OnlinePoints >= client.OTPsInput && client.OTPsInput != 0 && client.OTPsInput <= 5000)
- {
- client.OnlinePoints -= client.OTPsInput;
- client.Entity.ConquerPoints += client.OTPsInput * Program.ExchangeCPs;
- uint Convert = client.OTPsInput * Program.ExchangeCPs;
- client.Send(new Network.GamePackets.Message("You`ve Successfuly " + client.OTPsInput.ToString("0,0") + " OPT with " + Convert.ToString("0,0") + " CPs!", System.Drawing.Color.Tan, Message.Talk));
- client.OTPsInput = 0;
- Convert = 0;
- Database.EntityTable.UpdateOtp(client);
- }
- }
- else
- {
- client.Send(new Network.GamePackets.Message("You don`t have OTP's, You stand now with " + client.OnlinePoints.ToString("0,0") + "", System.Drawing.Color.Red, Message.Talk));
- }
- }
- else
- {
- dialog.Text("How many OTP's would you like to exchange? 1 OTP = " + Program.ExchangeCPs.ToString("0,0") + " CPs");
- dialog.Input("OTP's: (Max=5000)", 2, 9);
- }
- break;
- }
- }
- break;
- }
- #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement