public override void OnAttack(BaseCreature creature) { HaochisTrialsQuest htq = System as HaochisTrialsQuest; if (htq == null) { return; } if (creature is FierceDragon) { Complete(); htq.Opponent = OpponentType.FierceDragon; System.AddObjective(new SecondTrialCompleteObjective()); } if (creature is DeadlyImp) { Complete(); htq.Opponent = OpponentType.DeadlyImp; System.AddObjective(new SecondTrialCompleteObjective()); } }
public override bool OnMoveOver(Mobile m) { PlayerMobile pm = m as PlayerMobile; if (pm == null) { return(false); } QuestSystem qs = pm.Quest; if (qs != null && qs is HaochisTrialsQuest) { HaochisTrialsQuest htq = qs as HaochisTrialsQuest; if (!htq.EnterBridge) { htq.EnterBridge = true; qs.AddConversation(new RadarSEConversation()); } } return(true); }
public override bool OnDragDrop(Mobile from, Item dropped) { PlayerMobile player = from as PlayerMobile; if (player != null) { QuestSystem qs = player.Quest; if (qs is HaochisTrialsQuest) { if (dropped is Gold) { QuestObjective obj = qs.FindObjective(typeof(GiveGypsyGoldOrHuntCatsObjective)); if (obj != null) { obj.Complete(); } HaochisTrialsQuest htq = qs as HaochisTrialsQuest; htq.Choice = ChoiceType.Gold; Say(1063241); // I thank thee. This gold will be a great help to me and mine! qs.AddObjective(new MadeChoiceObjective()); return(false); } } } return(base.OnDragDrop(from, dropped)); }
public override void OnKill(BaseCreature creature, Container corpse) { HaochisTrialsQuest htq = System as HaochisTrialsQuest; if (htq == null) { return; } if (creature is YoungRonin) { htq.KilledRonins++; htq.From.SendLocalizedMessage(1063039, htq.KilledRonins.ToString()); // Young Ronin killed: ~1_COUNT~ if (!htq.SendRoninKarma) { htq.AddConversation(new GainKarmaForRoninConversation()); htq.SendRoninKarma = true; } if (htq.KilledRonins == 3) { htq.KilledSouls = 0; Complete(); htq.AddObjective(new FirstTrialCompleteObjective()); } } else if (creature is CursedSoul) { htq.KilledSouls++; htq.From.SendLocalizedMessage(1063038, htq.KilledSouls.ToString()); // Cursed Souls killed: ~1_COUNT~ if (!htq.SendSoulsKarma) { htq.AddConversation(new GainKarmaForSoulsConversation()); htq.SendSoulsKarma = true; } if (htq.KilledSouls == 3) { htq.KilledRonins = 0; Complete(); htq.AddObjective(new FirstTrialCompleteObjective()); } } }
public override void OnKill(BaseCreature creature, Container corpse) { HaochisTrialsQuest htq = System as HaochisTrialsQuest; if (htq == null) { return; } if (creature is DiseasedCat) { Complete(); htq.Choice = ChoiceType.Cats; System.AddObjective(new MadeChoiceObjective()); } }
public override bool OnMoveOver(Mobile m) { PlayerMobile pm = m as PlayerMobile; if (pm != null && pm.Profession == 6 && pm.AccessLevel == AccessLevel.Player) { QuestSystem qs = pm.Quest; if (qs == null) { QuestSystem newQuest = new HaochisTrialsQuest(pm); bool inRestartPeriod = false; if (QuestSystem.CanOfferQuest(pm, typeof(HaochisTrialsQuest), out inRestartPeriod)) { newQuest.SendOffer(); } } } else if (pm != null && pm.Profession == 7 && pm.AccessLevel == AccessLevel.Player) { QuestSystem qs = pm.Quest; if (qs == null) { QuestSystem newQuest = new EminosUndertakingQuest(pm); bool inRestartPeriod = false; if (QuestSystem.CanOfferQuest(pm, typeof(EminosUndertakingQuest), out inRestartPeriod)) { newQuest.SendOffer(); } } } return(base.OnMoveOver(m)); }
public override bool OnMoveOver( Mobile m ) { PlayerMobile pm = m as PlayerMobile; if ( pm != null && pm.Profession == 6 && pm.AccessLevel == AccessLevel.Player ) { QuestSystem qs = pm.Quest; if ( qs == null ) { QuestSystem newQuest = new HaochisTrialsQuest( pm ); bool inRestartPeriod = false; if ( QuestSystem.CanOfferQuest( pm, typeof( HaochisTrialsQuest ), out inRestartPeriod ) ) { newQuest.SendOffer(); } } } else if ( pm != null && pm.Profession == 7 && pm.AccessLevel == AccessLevel.Player ) { QuestSystem qs = pm.Quest; if ( qs == null ) { QuestSystem newQuest = new EminosUndertakingQuest( pm ); bool inRestartPeriod = false; if ( QuestSystem.CanOfferQuest( pm, typeof( EminosUndertakingQuest ), out inRestartPeriod ) ) { newQuest.SendOffer(); } } } return base.OnMoveOver( m ); }
public override void OnTalk(PlayerMobile player, bool contextMenu) { Direction = GetDirectionTo(player); QuestSystem qs = player.Quest; if (qs is HaochisTrialsQuest) { HaochisTrialsQuest htq = qs as HaochisTrialsQuest; if (qs.IsObjectiveInProgress(typeof(SpeakToDaimyoHaochiObjective))) { QuestObjective obj = qs.FindObjective(typeof(SpeakToDaimyoHaochiObjective)); if (obj != null) { obj.Complete(); } qs.AddConversation(new DaimyoHaochiBeginConversation()); qs.AddObjective(new FollowGreenPathObjective()); } if (qs.IsObjectiveInProgress(typeof(KillRoninsOrSoulsObjective))) { bool ronins = false; if (htq.KilledRonins > htq.KilledSouls) { ronins = true; } if (ronins) { qs.AddConversation(new ContinueSlayingRoninsConversation()); } else if (htq.KilledSouls > 0) { qs.AddConversation(new ContinueSlayingSoulsConversation()); } } if (qs.IsObjectiveInProgress(typeof(FirstTrialCompleteObjective))) { QuestObjective obj = qs.FindObjective(typeof(FirstTrialCompleteObjective)); if (obj != null) { obj.Complete(); } if (htq.KilledRonins == 3) { qs.AddConversation(new ThanksForRoninsConversation()); } if (htq.KilledSouls == 3) { qs.AddConversation(new ThanksForSoulsConversation()); } player.AddToBackpack(new LeatherDo()); qs.AddObjective(new FollowYellowPathObjective()); } if (qs.IsObjectiveInProgress(typeof(SecondTrialCompleteObjective))) { QuestObjective obj = qs.FindObjective(typeof(SecondTrialCompleteObjective)); if (obj != null) { obj.Complete(); } if (htq.Opponent == OpponentType.FierceDragon) { qs.AddConversation(new DragonConversation()); } if (htq.Opponent == OpponentType.DeadlyImp) { qs.AddConversation(new ImpConversation()); } player.AddToBackpack(new LeatherSuneate()); qs.AddObjective(new FollowBluePathObjective()); } if (qs.IsObjectiveInProgress(typeof(ThirdTrialCompleteObjective))) { QuestObjective obj = qs.FindObjective(typeof(ThirdTrialCompleteObjective)); if (obj != null) { obj.Complete(); } qs.AddConversation(new HaochiSmilesConversation()); player.AddToBackpack(new LeatherHiroSode()); qs.AddObjective(new FollowRedPathObjective()); } if (qs.IsObjectiveInProgress(typeof(MadeChoiceObjective))) { QuestObjective obj = qs.FindObjective(typeof(MadeChoiceObjective)); if (obj != null) { obj.Complete(); } if (htq.Choice == ChoiceType.Gold) { qs.AddConversation(new RespectForGoldConversation()); } if (htq.Choice == ChoiceType.Cats) { qs.AddConversation(new RespectForCatsConversation()); } Bag bag = new Bag(); bag.Hue = 0x660; bag.DropItem(new LeatherHiroSode()); bag.DropItem(new JinBaori()); player.AddToBackpack(bag); qs.AddObjective(new RetrieveKatanaObjective()); } if (qs.IsObjectiveInProgress(typeof(GiveSwordDaimyoObjective))) { ArrayList list = player.Backpack.Items; DaimyoHaochisKatana katana = null; for (int i = 0; i < list.Count; i++) { if ((Item)list[i] is DaimyoHaochisKatana) { katana = list[i] as DaimyoHaochisKatana; break; } } if (katana == null) { qs.AddConversation(new WithoutSwordConversation()); } else { katana.Delete(); QuestObjective obj = qs.FindObjective(typeof(GiveSwordDaimyoObjective)); if (obj != null) { obj.Complete(); } qs.AddConversation(new ThanksForSwordConversation()); qs.AddObjective(new LightCandleObjective()); } } if (qs.IsObjectiveInProgress(typeof(CandleCompleteObjective))) { QuestObjective obj = qs.FindObjective(typeof(CandleCompleteObjective)); if (obj != null) { obj.Complete(); } qs.AddConversation(new WellDoneConversation()); qs.AddObjective(new KillNinjaObjective()); } if (qs.IsObjectiveInProgress(typeof(ExecutionsCompleteObjective))) { QuestObjective obj = qs.FindObjective(typeof(ExecutionsCompleteObjective)); if (obj != null) { obj.Complete(); } qs.AddConversation(new FirewellConversation()); BaseWeapon weapon = new Daisho(); BaseRunicTool.ApplyAttributesTo(weapon, Utility.Random(1, 3), 10, 30); player.AddToBackpack(weapon); BaseArmor armor = new LeatherDo(); BaseRunicTool.ApplyAttributesTo(armor, Utility.Random(1, 3), 10, 20); player.AddToBackpack(armor); qs.Complete(); } } }