Esempio n. 1
0
        public CoxxionInitiation()
        {
            CreateQuest(25, "Coxxion Initiation", "caxx_init")

            .AddObjectiveTalkToNPC(1)
            .AddObjectiveTalkToNPC(2)

            .AddRewardGold(150)
            .AddRewardFame(4, 20)

            .OnAccepted((player, questSource) =>
            {
                var obj = AppCache.VisibilityObjects.Single(x => x.Key == "FF65A192706B40A6A97474B935796B82").Value;
                ObjectVisibilityService.AdjustVisibility(player, obj, true);
            })

            .OnAdvanced((player, questSource, state) =>
            {
                ObjectVisibilityService.AdjustVisibility(player, questSource, false);
            })

            .OnCompleted((player, questSource) =>
            {
                var obj = AppCache.VisibilityObjects.Single(x => x.Key == "D4C44145731048F1B7DA23D974E59FCE").Value;
                ObjectVisibilityService.AdjustVisibility(player, obj, true);
            });
        }
Esempio n. 2
0
        public void Main()
        {
            NWPlayer player = _.GetLastUsedBy();

            if (!player.IsPlayer)
            {
                return;
            }

            NWPlaceable placeable = _.OBJECT_SELF;
            int         keyItemID = placeable.GetLocalInt("KEY_ITEM_ID");

            if (keyItemID <= 0)
            {
                return;
            }

            if (KeyItemService.PlayerHasKeyItem(player, keyItemID))
            {
                player.SendMessage("You already have this key item.");
                return;
            }

            KeyItemService.GivePlayerKeyItem(player, keyItemID);

            string visibilityGUID = placeable.GetLocalString("VISIBILITY_OBJECT_ID");

            if (!string.IsNullOrWhiteSpace(visibilityGUID))
            {
                ObjectVisibilityService.AdjustVisibility(player, placeable, false);
            }
        }
Esempio n. 3
0
        public DatapadRetrieval()
        {
            CreateQuest(13, "Datapad Retrieval", "datapad_retrieval")
            .AddObjectiveTalkToNPC(1)

            .EnableRewardSelection()
            .AddRewardFame(2, 100, true)
            .AddRewardGold(50, true)

            .OnAccepted((player, questGiver) =>
            {
                ObjectVisibilityService.AdjustVisibility(player, questGiver, false);
            });
        }
Esempio n. 4
0
        public void Main()
        {
            const int   QuestID = 30;
            NWPlaceable crystal = _.OBJECT_SELF;
            NWPlayer    player  = _.GetLastUsedBy();

            // Check player's current quest state. If they aren't on stage 2 of the quest only show a message.
            var status = DataService.PCQuestStatus.GetByPlayerAndQuestID(player.GlobalID, QuestID);

            if (status.QuestState != 2)
            {
                player.SendMessage("The crystal glows quietly...");
                return;
            }

            // Player is on stage 2, so they're able to click the crystal, get a cluster, complete the quest, and teleport back to the cavern.
            int    type = crystal.GetLocalInt("CRYSTAL_COLOR_TYPE");
            string cluster;

            switch (type)
            {
            case 1: cluster = "c_cluster_blue"; break;    // Blue

            case 2: cluster = "c_cluster_red"; break;     // Red

            case 3: cluster = "c_cluster_green"; break;   // Green

            case 4: cluster = "c_cluster_yellow"; break;  // Yellow

            default: throw new Exception("Invalid crystal color type.");
            }

            _.CreateItemOnObject(cluster, player);

            var quest = QuestService.GetQuestByID(QuestID);

            quest.Advance(player, crystal);

            // Hide the "Source of Power?" placeable so the player can't use it again.
            ObjectVisibilityService.AdjustVisibility(player, "81533EBB-2084-4C97-B004-8E1D8C395F56", false);

            NWObject tpWP = _.GetObjectByTag("FORCE_QUEST_LANDING");

            player.AssignCommand(() => _.ActionJumpToLocation(tpWP.Location));

            // Notify the player that new lightsaber perks have unlocked.
            player.FloatingText("You have unlocked the Lightsaber Blueprints perk. Find this under the Engineering category in your perks menu.");
        }
Esempio n. 5
0
        public void Run(NWPlayer player, NWObject questSource, int questID, string[] args)
        {
            int count = args.Length;

            for (int index = 0; index < count; index++)
            {
                if (string.IsNullOrWhiteSpace(args[index]))
                {
                    return;
                }

                string visibilityObjectID = args[index];

                var obj = AppCache.VisibilityObjects.Single(x => x.Key == visibilityObjectID).Value;
                ObjectVisibilityService.AdjustVisibility(player, obj, true);
            }
        }
Esempio n. 6
0
        public FindCaptainNguth()
        {
            CreateQuest(17, "Find Captain N'Guth", "find_cap_nguth")
            .AddPrerequisiteQuest(16)

            .AddObjectiveUseObject(1)
            .AddObjectiveTalkToNPC(2)

            .AddRewardGold(300)
            .AddRewardFame(3, 15)

            .OnAccepted((player, questSource) =>
            {
                var obj = AppCache.VisibilityObjects.Single(x => x.Key == "A61BB617B2D34E2F863C6301A4A04143").Value;
                ObjectVisibilityService.AdjustVisibility(player, obj, true);
            });
        }
Esempio n. 7
0
        public FirstRites()
        {
            CreateQuest(30, "First Rites", "first_rites")
            .AddObjectiveUseObject(1)
            .AddObjectiveUseObject(2)

            .AddRewardFame(1, 10)

            .OnAccepted((player, questSource) =>
            {
                var obj = AppCache.VisibilityObjects.Single(x => x.Key == "81533EBB-2084-4C97-B004-8E1D8C395F56").Value;
                ObjectVisibilityService.AdjustVisibility(player, obj, true);
            })

            .OnAdvanced((player, questSource, state) =>
            {
                ObjectVisibilityService.AdjustVisibility(player, questSource, false);
            });
        }
        public SlicingTheMandalorianFacility()
        {
            CreateQuest(22, "Slicing the Mandalorian Facility", "mandalorian_slicing")
            .AddPrerequisiteQuest(20)
            .AddPrerequisiteQuest(21)

            .AddObjectiveUseObject(1)

            .AddRewardGold(550)
            .AddRewardFame(3, 25)
            .AddRewardItem("xp_tome_1", 1)

            .OnAccepted((player, questSource) =>
            {
                string[] visibilityObjectIDs =
                {
                    "C1888BC5BBBC45F28B40293D7C6E76EC",
                    "C3F31641D4F34D6AAEA51295CBE9014D",
                    "6FABDF6EDF4F47A4A9684E6224700A78",
                    "5B56B9EF160D4B078E28C775723BA95F",
                    "141D32140AA847B18AD5896C82223C8D",
                    "B0839B0F597140EEAEC567C22FFD1A86"
                };

                foreach (var objID in visibilityObjectIDs)
                {
                    var obj = AppCache.VisibilityObjects.Single(x => x.Key == objID).Value;
                    ObjectVisibilityService.AdjustVisibility(player, obj, true);
                }
            })

            .OnCompleted((player, questSource) =>
            {
                KeyItemService.RemovePlayerKeyItem(player, 12);
                KeyItemService.RemovePlayerKeyItem(player, 13);
                KeyItemService.RemovePlayerKeyItem(player, 14);
                KeyItemService.RemovePlayerKeyItem(player, 15);
                KeyItemService.RemovePlayerKeyItem(player, 16);
                KeyItemService.RemovePlayerKeyItem(player, 17);
            });
        }
Esempio n. 9
0
        public void Main()
        {
            const int   QuestID = 30;
            NWPlaceable crystal = _.OBJECT_SELF;
            NWPlayer    player  = _.GetLastUsedBy();

            player.SendMessage("You pick up the strange looking cube which seemingly opens itself at your touch. A stream of swirling blue light" +
                               " shifts into what seems to be a recording of a robed humanoid assembling a weapon. With time, you think you may be able to do this yourself.");

            var quest = QuestService.GetQuestByID(QuestID);

            quest.Advance(player, crystal);
            quest.Advance(player, crystal);

            // Hide the "Source of Power?" placeable so the player can't use it again.
            ObjectVisibilityService.AdjustVisibility(player, "81533EBB-2084-4C97-B004-8E1D8C395F56", false);

            _.PlaySound("dt_ordi_11");
            // Notify the player that new lightsaber perks have unlocked.
            player.FloatingText("You have unlocked the Lightsaber Blueprints perk. Find this under the Engineering category in your perks menu.");
        }
Esempio n. 10
0
        private void DoSlice()
        {
            NWPlaceable self      = Object.OBJECT_SELF;
            int         keyItemID = self.GetLocalInt("KEY_ITEM_ID");

            if (keyItemID <= 0)
            {
                GetPC().SendMessage("ERROR: Improperly configured key item. ID is not set. Notify an admin.");
                return;
            }

            KeyItemService.GivePlayerKeyItem(GetPC(), keyItemID);

            string visibilityObjectID = self.GetLocalString("VISIBILITY_OBJECT_ID");

            if (!string.IsNullOrWhiteSpace(visibilityObjectID))
            {
                ObjectVisibilityService.AdjustVisibility(GetPC(), self, false);
            }

            EndConversation();
        }
Esempio n. 11
0
        public HutlarPowerInvestigation()
        {
            CreateQuest(1003, "Hutlar Power Investigation", "hut_power_invest")
            .AddPrerequisiteQuest(1000)
            .AddPrerequisiteQuest(1001)
            .AddPrerequisiteQuest(1002)

            .AddObjectiveUseObject(1)
            .AddObjectiveUseObject(2)
            .AddObjectiveUseObject(3)
            .AddObjectiveUseObject(4)
            .AddObjectiveUseObject(5)
            .AddObjectiveTalkToNPC(6)
            .AddObjectiveUseObject(7)
            .AddObjectiveTalkToNPC(8)

            .AddRewardGold(1200)
            .AddRewardItem("xp_tome_4", 1)

            .OnAccepted((player, questSource) =>
            {
                // Southeast
                ObjectVisibilityService.AdjustVisibility(player, "9CD9E7D9-4F10-4A0E-B67D-293CE6EA8EF5", true);
            })

            .OnAdvanced((player, questSource, state) =>
            {
                string visibilityObject;

                switch (state)
                {
                // Central
                case 2:
                    visibilityObject = "989B8C42-B4EE-48B7-8426-9D5C20016AEB";
                    break;

                // Northern
                case 3:
                    visibilityObject = "4C5721F2-9241-4A6F-9A62-F28CF0525682";
                    break;

                // Southwestern
                case 4:
                    visibilityObject = "E9C705B1-2AC9-4F9A-B481-FF3E5E99D8FF";
                    break;

                // Northwestern
                case 5:
                    visibilityObject = "83652C7A-7D38-4304-AD4B-92D5783AB279";
                    break;

                // Northwestern again, Actuator
                case 7:
                    visibilityObject = "AA0E6798-38E4-4E50-8F0A-C3177FBF2717";
                    break;

                default: return;
                }

                ObjectVisibilityService.AdjustVisibility(player, visibilityObject, true);
            });
        }
Esempio n. 12
0
 public void Run(NWPlayer player, NWObject questSource, int questID, string[] args)
 {
     ObjectVisibilityService.AdjustVisibility(player, questSource, false);
 }