/* This is our callback hook that will be called when the player clicks * on any button in the quest offer dialog. We check if he accepts or * declines here... */ private static void CheckPlayerAbortQuest(GamePlayer player, byte response) { GreetingsArmsman quest = player.IsDoingQuest(typeof(GreetingsArmsman)) as GreetingsArmsman; if (quest == null) { return; } if (response == 0x00) { SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.CheckPlayerAbortQuest.Text1")); } else { SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.CheckPlayerAbortQuest.Text2", questTitle)); quest.AbortQuest(); } }
protected static void TalkToCaptainKinzee(DOLEvent e, object sender, EventArgs args) { // We get the player from the event arguments and check if he qualifies GamePlayer player = ((SourceEventArgs)args).Source as GamePlayer; if (player == null) { return; } if (player.CharacterClass.ID != (byte)eCharacterClass.Armsman) { return; } GreetingsArmsman quest = player.IsDoingQuest(typeof(GreetingsArmsman)) as GreetingsArmsman; captainKinzee.TurnTo(player); if (e == GameObjectEvent.Interact) { if (quest == null) { quest = new GreetingsArmsman(); quest.OfferQuest(player); } else { if (quest.Step == 1) { captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description1")); } else if (quest.Step == 2) { quest.ChooseRewards(player); } } } else if (e == GameLivingEvent.WhisperReceive) { if (quest.Step == 2) { return; } WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args; switch (wArgs.Text) { case "Crush": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Crush")); break; case "Slash": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Slash")); break; case "Thrust": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Thrust")); break; case "Shield": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Shield")); break; case "Polearm": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Polearm")); break; case "done": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Done")); quest.Step = 2; break; default: break; } } }
protected static void TalkToCaptainKinzee(DOLEvent e, object sender, EventArgs args) { //We get the player from the event arguments and check if he qualifies GamePlayer player = ((SourceEventArgs)args).Source as GamePlayer; if (player == null) return; if (player.CharacterClass.ID != (byte)eCharacterClass.Armsman) return; GreetingsArmsman quest = player.IsDoingQuest(typeof(GreetingsArmsman)) as GreetingsArmsman; captainKinzee.TurnTo(player); if (e == GameObjectEvent.Interact) { if (quest == null) { quest = new GreetingsArmsman(); quest.OfferQuest(player); } else { if (quest.Step == 1) { captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description1")); } else if (quest.Step == 2) { quest.ChooseRewards(player); } } } else if (e == GameLivingEvent.WhisperReceive) { if (quest.Step == 2) return; WhisperReceiveEventArgs wArgs = (WhisperReceiveEventArgs)args; switch (wArgs.Text) { case "Crush": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Crush")); break; case "Slash": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Slash")); break; case "Thrust": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Thrust")); break; case "Shield": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Shield")); break; case "Polearm": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Polearm")); break; case "done": captainKinzee.SayTo(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.GreetingsArmsman.Description.Done")); quest.Step = 2; break; default:break; } } }