This github repository contains three Java classes for the analysis of official L2 scripts.
HTMLCleaner:
- Allows you to format a folder containing HTML files and stores the result in another folder.
- Removes duplicate spaces and newlines.
- Add newline after
<br>
<br1>
.- Removes
<head>
and</head>
.- Add
</html>
if missing.
FreyaAiClean: needs the file
ai-freya-symbol.txt
- Allows you to find the name of all NPCs who are in the quest you want (
getQuestNpcs
).- Allows you to find the name of all items which are unsed in the quest you want (
getQuestItems
).- Allows you to rewrite parts of the file
ai-freya-symbol.txt
corresponding to specific NPCs. Then stores the results in a file, where each NPC will have its own file. (aiByName
)
*PchFinder: needs files _pch.txt
- Allows you to find the name or the id of any NPCs, items or quests. (
getNamesByIds
andgetIdsByNames
)- You can display the output in the form
name = id
in your terminal. (printNamesAndIds
)- You can use FreyaAiClean methods to retrieve NPCs and items then use
printNamesAndIds
to display their ids.
Example of item_pch.txt
[earing_of_strength] = 114
[earing_of_wisdom] = 115
[magic_ring] = 116
[ring_of_mana] = 117
[necklace_of_magic] = 118
[necklace_of_binding] = 119
[sword_of_reflexion] = 120
// Code
printNamesAndIds("item_pch.txt", "necklace_of_magic", "earing_of_wisdom", "120");
Output:
earing_of_wisdom = 115
necklace_of_magic = 118
sword_of_reflexion = 120
// Code
final String Q0025name = PchFinder.getNameById(freya_quest_pch, "25");
System.out.println("The name of Q0025 is " + Q0025name);
// print all items of Q0025
System.out.println("All items of Q0025 : ");
final ArrayList<String> items = FreyaAiClean.getItemsIdsByQuest(freya_aiScript, Q0025name);
PchFinder.printNamesAndIds(freya_item_pch, items);
// print all npc of Q0025
System.out.println("All npcs of Q0025 : ");
final ArrayList<String> npcs = FreyaAiClean.getQuestNpcs(freya_aiScript, Q0025name);
PchFinder.printNamesAndIds(freya_npc_pch, npcs);
// write on disk all ai for quest Q0025 in the folder Q0025_[name]
System.out.println("Names of NPCs that I am writing on the disc : ");
FreyaAiClean.aiByName(freya_aiScript, freya_srcipt_dir + "Q0025_" + Q0025name, npcs);
Output:
The name of Q0025 is man_behind_the_truth
All items of Q0025 :
earing_of_blessing = 874
ring_of_blessing = 905
necklace_of_blessing = 936
q_lost_map = 7063
q_lost_contract = 7066
q_ridias_dress = 7155
q_triols_totem2 = 7156
q_lost_jewel_key = 7157
q_triols_totem3 = 7158
> **All npcs of Q0025 :**
triyol_zzolda = 1027218
falsepriest_agripel = 1031348
falsepriest_benedict = 1031349
shadow_hardin = 1031522
q_forest_stone2 = 1031531
maid_of_ridia = 1031532
broken_desk2 = 1031533
broken_desk3 = 1031534
broken_desk4 = 1031535
q_forest_box1 = 1031536
> **Names of NPCs that I am writing on the disc :**
triyol_zzolda
falsepriest_agripel
falsepriest_benedict
shadow_hardin
q_forest_stone2
maid_of_ridia
broken_desk2
broken_desk3
broken_desk4
q_forest_box1