Esempio n. 1
0
 public void ShowMuninMessage(string msg)
 {
     if (m_message == "" || msg == null)
     {
         return;
     }
     m_message.Replace('\n', ' ');
     Tweakers.QuestHintHugin(m_message, msg);
 }
Esempio n. 2
0
        public void UpdateQuestList()
        {
            string n = "";

            foreach (var quest in MyQuests.Values)
            {
                n += quest.PrintData();
            }
            Tweakers.addHints(n);
        }
Esempio n. 3
0
        public void PrintQuestList()
        {
            string n = "";

            foreach (var quest in MyQuests.Values)
            {
                n += quest.PrintData();
            }
            Tweakers.QuestTopicHugin("Quest List", n);
        }
        public static bool GetLocationInstance(string id, out ZoneSystem.LocationInstance li)
        {
            var a   = Traverse.Create(ZoneSystem.instance).Field <Dictionary <Vector2i, ZoneSystem.LocationInstance> >("m_locationInstances").Value;
            var key = Tweakers.Pak(id);

            if (a.ContainsKey(key))
            {
                li = a[key];
                return(true);
            }
            li = default(ZoneSystem.LocationInstance);
            return(false);
        }
        public static bool CanFinish(string item)
        {
            var    inv   = Player.m_localPlayer.GetInventory();
            int    count = OdinData.Data.SearchTaskList[item];
            string iname = Tweakers.GetItemData(item).m_shared.m_name;

            Debug.LogWarning(count);
            if (inv.CountItems(iname) >= count)
            {
                inv.RemoveItem(iname, count);
                var quest = QuestManager.instance.MyQuests[item];
                quest.Finish();
                OdinMunin.Reward(quest.Key, quest.Level);
                return(true);
            }
            return(false);
        }
Esempio n. 6
0
        private void Start()
        {
            var zdo = m_nview.GetZDO();

            if (ID != "")
            {
                zdo.Set("TaskID", ID);
                zdo.Set("HuntLevel", Level);
                zdo.Set("HuntKey", Key);
                zdo.Set("OwnerName", m_ownerName);
                Tweakers.ValSpawn("vfx_GodExplosion", transform.position);
            }
            else
            {
                ID          = zdo.GetString("TaskID");
                Level       = zdo.GetInt("HuntLevel");
                Key         = zdo.GetInt("HuntKey");
                m_ownerName = zdo.GetString("OwnerName", "");
            }
            m_mai.SetPatrolPoint();
            Traverse.Create(m_hum).Field <SEMan>("m_seman").Value.AddStatusEffect(OdinSE.MonsterSEList.ElementAt(Level).Key);
        }
Esempio n. 7
0
        public void OnDeath()
        {
            if (Player.GetClosestPlayer(transform.position, 100).GetHoverName() == m_ownerName)
            {
                QuestManager.instance.GetQuest(ID).Finish();
            }
            else
            {
                if (m_ownerName == "")
                {
                }
                else
                {
                    string n = string.Format("Hey you found the chest belong to <color=yellow><b>{0}</b></color>", m_ownerName);                    //trans
                    DBG.InfoCT(n);
                }
            }
            Tweakers.ValSpawn("vfx_GodExplosion", transform.position);
            var r = Instantiate(ZNetScene.instance.GetPrefab("OdinLegacy"), transform.localPosition, Quaternion.identity);

            r.GetComponent <ItemDrop>().m_itemData.m_quality = Key;
            r.GetComponent <ItemDrop>().m_itemData.m_stack   = Level;
        }
        public override bool UseItem(Humanoid user, ItemDrop.ItemData item)
        {
            if (!IsQuestReady())
            {
                return(false);
            }
            var    inv   = Player.m_localPlayer.GetInventory();
            string iname = Tweakers.GetItemData(m_item).m_shared.m_name;
            int    count = Tweakers.GetItemData(m_item).m_shared.m_maxStackSize;

            if (inv.CountItems(iname) >= count)
            {
                inv.RemoveItem(iname, count);
                OdinData.AddCredits(30, true);
                Say("$op_human_thx");
                ResetQuestCD();
                return(true);
            }
            else
            {
                Say("$op_human_noteought");
                return(true);
            }
        }