private void Process_skilldata_txt(string dir)
        {
            Log.log("Processing skilldata.txt - Started");
            TxtFileParser dp = new TxtFileParser(dir + "l2offscript\\skilldata.txt", "skill");

            for (int i = 0; i < dp.getRecordsCount(); i++)
            {
                SkillInfo it = new SkillInfo();
                it.id = processInt(dp.getValue(i, "skill_id"));
                it.level = processInt(dp.getValue(i, "level"));

                if (it.getRecord())
                {
                    it.is_magic = 1==processInt(dp.getValue(i, "is_magic"));
                    if (it.is_magic) it.is_physic = false;
                    it.mp_consume = processInt(dp.getValue(i, "mp_consume1"))+processInt(dp.getValue(i, "mp_consume2"));
                    it.hp_consume = processInt(dp.getValue(i, "hp_consume"));
                    it.cast_range = processInt(dp.getValue(i, "cast_range"));
                    it.effect_range = processInt(dp.getValue(i, "effective_range"));

                    it.updateOrInsertRecord();
                }
                Log.log2(i + 1, dp.getRecordsCount());
            }
            Log.log("Processing skilldata.txt - Finished");
        }
        private void Process_skill_scripts(string dir)
        {
            Log.log("Processing skill scripts - Started");
            string[] files = Directory.GetFiles(dir + "l2jscript\\stats\\skills", "*.xml", SearchOption.AllDirectories);
            List<SkillTableItem> list = new List<SkillTableItem>();
                int i = 0;
                foreach (string fi in files)
                {
                    list.AddRange(SkillTableItem.parseXml(fi));
                    Log.log2(i++, files.Length);
                }

            Log.log("Processing skill scripts - Adding");
            i = 0;
            foreach (SkillTableItem s in list)
            {
                SkillInfo si = new SkillInfo();
                si.id = s.getSkillId();
                si.level = s.getSkillLvl();
                if (si.getRecord())
                {
                    if (si.name.Length == 0)
                        si.name = s.getName();
                    if (processInt(s.getValue("mpConsume")) > si.mp_consume)
                        si.mp_consume = processInt(s.getValue("mpConsume"));
                    if (processInt(s.getValue("hpConsume")) > si.hp_consume)
                        si.hp_consume = processInt(s.getValue("hpConsume"));
                    if ((processInt(s.getValue("castRange")) > 0) && (processInt(s.getValue("castRange")) < si.cast_range))
                        si.cast_range = processInt(s.getValue("castRange"));
                    si.effect_range = processInt(s.getValue("effectRange"));
                    if (!si.is_passive && s.getValue("operateType") != null && s.getValue("operateType").Contains("PASSIVE"))
                    {
                        si.is_passive = true;
                        si.is_active = false;
                        si.is_toogle = false;
                    }
                    if (!si.is_active && s.getValue("operateType") != null && s.getValue("operateType").Contains("ACTIVE"))
                    {
                        si.is_passive = false;
                        si.is_active = true;
                        si.is_toogle = false;
                    }
                    if (!si.is_toogle && s.getValue("operateType") != null && s.getValue("operateType").Contains("TOGGLE"))
                    {
                        si.is_passive = false;
                        si.is_active = false;
                        si.is_toogle = true;
                    }

            /*
            0 -

            TARGET_AREA
            TARGET_AREA_CORPSE_MOB
            TARGET_AREA_SUMMON
            TARGET_AREA_UNDEAD
            TARGET_AURA
            TARGET_BEHIND_AURA
            TARGET_CLAN
            TARGET_CLAN_MEMBER
            TARGET_CORPSE
            TARGET_CORPSE_CLAN
            TARGET_CORPSE_MOB
            TARGET_CORPSE_PET
            TARGET_CORPSE_PLAYER
            TARGET_ENEMY_SUMMON
            TARGET_FLAGPOLE
            TARGET_FRONT_AREA
            TARGET_FRONT_AURA
            TARGET_GROUND
            TARGET_HOLY
            TARGET_NONE
            TARGET_ONE
            TARGET_OWNER_PET
            TARGET_PARTY
            TARGET_PARTY_CLAN
            TARGET_PARTY_MEMBER
            TARGET_PARTY_NOTME
            TARGET_PARTY_OTHER
            TARGET_PET
            TARGET_SELF
            TARGET_SUMMON
            TARGET_UNDEAD
            TARGET_UNLOCKABLE*/

                    si.updateOrInsertRecord();
                }
                Log.log2(i++, list.Count);
            }

            Log.log("Processing skill scripts - Finished");
        }