Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [NpcAttribute(NpcID.GreatMerchant)]
- public static void GreatMerchant(Client.GameClient client, ServerSockets.Packet stream, byte Option, string Input, uint id)
- {
- Dialog data = new Dialog(client, stream);
- var ActiveQuest = Database.QuestInfo.GetFinishQuest((uint)NpcID.GreatMerchant, client.Player.Class, 706);
- switch (Option)
- {
- case 0:
- {
- if (!client.Player.QuestGUI.CheckQuest(ActiveQuest.MissionId, MsgQuestList.QuestListItem.QuestStatus.Finished))
- {
- data.AddText("We have various kinds of stores in the market. But if you are interested in some rare items with special effect, I will be the")
- .AddText("~perfect one to help you with your needs.")
- .AddOption("Well,~impress~me.", 1)
- .AddOption("Purchase~Item.", 20)
- .AddAvatar(174).FinalizeDialog();
- }
- else
- goto case 20;
- break;
- }
- case 20:
- {
- ActionQuery action = new ActionQuery()
- {
- ObjId = client.Player.UID,
- dwParam = (uint)Role.Flags.NpcType.DialogAndGui,
- Type = ActionType.OpenGuiNpc,
- Timestamp = (int)client.ActiveNpc,
- wParam1 = client.Player.X,
- wParam2 = client.Player.Y,
- dwParam3 = client.Player.Map
- };
- client.Send(stream.ActionCreate(&action));
- break;
- }
- case 1:
- {
- if (client.Inventory.Contain(722700, 1) && client.Player.QuestGUI.CheckQuest(ActiveQuest.MissionId, MsgQuestList.QuestListItem.QuestStatus.Accepted) || client.Player.QuestGUI.CheckObjectives(ActiveQuest.MissionId, 1))
- {
- if (client.Player.QuestGUI.CheckObjectives(ActiveQuest.MissionId, 1))
- {
- data.AddText("How do you like it? I have lots of those items. When you need them, don`t hesitate to let me know!")
- .AddOption("Brilliant.", 5)
- .AddAvatar(174).FinalizeDialog();
- }
- else
- {
- data.AddText("Just right click this EXP Potion to activate a 10 minute double EXP bonus. Talk to me again when you`re done.")
- .AddOption("Okay.", 255)
- .AddAvatar(174).FinalizeDialog();
- }
- break;
- }
- data.AddText("You can buy some unusual items in the Shopping Mall. To enter it, talk to the Great Merchant")
- .AddText("~in the Market, or click the Shopping Mall Button on the lower left of your screen when you are level 70 or have some CPs on you")
- .AddOption("CPs?", 2)
- .AddAvatar(174).FinalizeDialog();
- break;
- }
- case 2:
- {
- data.AddText("I guess you don`t know what that is yet, right?")
- .AddText("~CP is short for Conquer Points, which are used to purchase special items from the Shopping Mall.")
- .AddOption("I~see.", 3)
- .AddAvatar(174).FinalizeDialog();
- break;
- }
- case 3:
- {
- data.AddText("Please take this EXP Potion as a present, you will obtain a 10 mins double EXP bonus when using it.")
- .AddOption("Thank~you!", 4)
- .AddAvatar(174).FinalizeDialog();
- break;
- }
- case 4:
- {
- if (!client.Inventory.HaveSpace(1))
- {
- data.AddText("Please make 1 more space in your inventory.")
- .AddOption("Let me check.", 255)
- .AddAvatar(174).FinalizeDialog();
- break;
- }
- client.Inventory.Add(stream, 722700);
- client.CreateBoxDialog("You`ve~received~an~EXP~Potion.~Right~click~it~to~use~it.");
- client.Player.QuestGUI.Accept(ActiveQuest, 0);
- break;
- }
- case 5:
- {
- if (client.Player.QuestGUI.FinishQuest(ActiveQuest.MissionId))
- {
- client.GainExpBall(100, true, Role.Flags.ExperienceEffect.angelwing);
- client.Player.SendString(stream, MsgStringPacket.StringID.Effect, true, "recovery");
- client.CreateBoxDialog("You`ve~learned~about~CPs~and~the~Shopping~Mall,~and~received~EXP~worth~1/12~of~an~EXP~Ball!");
- }
- break;
- }
- }
- }
- [NpcAttribute(NpcID.MerchantClerk)]
- public static void MerchantClerk(Client.GameClient client, ServerSockets.Packet stream, byte Option, string Input, uint id)
- {
- Dialog data = new Dialog(client, stream);
- switch (Option)
- {
- case 0:
- {
- if (client.Player.Merchant == 255)
- {
- data.AddText("You have been a merchant now. All of your equipment and items are not protected by the Forbidden Sale system")
- .AddText("~in the game, and TQ Digital is not responsible for any loss related.")
- .AddText("Click the Cancel button to reset your merchant account to be normal. A normal account will be protected by all the")
- .AddText("~trading protection measures in case of equipment loss resulted from accounts being hacked.")
- .AddOption("I~want~to~cancel~my~merchant~account.", 3)
- .AddOption("Let~me~think~it~over.", 255)
- .AddAvatar(94).FinalizeDialog();
- //client.SendSysMesage("You have canceled merchant account.");
- }
- else if (client.Player.Merchant == 1)
- {
- data.AddText("Your merchant application is being processed. Please wait for 5 days. All of your equipment and items")
- .AddText("~are not protected by the Forbidden Sale system in the game, and TQ Digital is not responsible for any loss related.")
- .AddText("Click the Cancel button to reset your merchant account to be normal. A normal account will be protected by all the")
- .AddText("~trading protection measures in case of equipment loss resulted from accounts being hacked.")
- .AddOption("Cancel~my~application,~please.", 2)
- .AddOption("Let~me~think~it~over.", 255)
- .AddAvatar(94).FinalizeDialog();
- //client.SendSysMesage("You have canceled the application.");
- }
- else
- {
- data.AddText("A merchant account is for any who frequently engages in commercial activities. A merchant account is not protected")
- .AddText("~by the virtual property protection measures. So TQ Digital will be not responsible for any loss related.")
- .AddText("After you apply to be a merchant account, tt will take you 5 days to censor your application. You can reset it to be a normal account at any time.")
- .AddText("Are you ready to be a merchant? i can make u merchant in instant")
- .AddOption("I~want~to~be~a~merchant.", 1)
- .AddOption("Let~me~think~it~over.", 255)
- .AddAvatar(94).FinalizeDialog();
- // client.SendSysMesage("You have applied for a merchant.");
- }
- break;
- }
- case 3:
- {
- client.Player.Merchant = 0;
- client.SendSysMesage("You have canceled merchant account.");
- break;
- }
- case 2:
- {
- client.Player.Merchant = 0;
- client.SendSysMesage("You have canceled the application.");
- break;
- }
- case 1:
- {
- client.Player.Merchant = 1;
- client.Player.MerchantApplicationEnd = DateTime.Now.AddSeconds(1);
- client.SendSysMesage("You have applied for a merchant.");
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement