summaryrefslogtreecommitdiff
path: root/npc/other
diff options
context:
space:
mode:
Diffstat (limited to 'npc/other')
-rw-r--r--npc/other/Global_Functions.txt43
1 files changed, 42 insertions, 1 deletions
diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
index 798416a66..666f1fa43 100644
--- a/npc/other/Global_Functions.txt
+++ b/npc/other/Global_Functions.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Lupus, kobra_k88
//===== Current Version: =====================================
-//= 1.9
+//= 1.91
//===== Compatible With: =====================================
//= eAthena 1.0
//===== Description: =========================================
@@ -20,6 +20,7 @@
//= 1.7 Added "F_ItemName" function, added a great sample for "F_ItemName"
//= 1.8 Added Job Vars clear for Extended classes: TK,SL,SG [Lupus]
//= 1.9 Added "F_ClearGarbage" func that clears outdated, wasted variables [Lupus]
+//= 1.91 Added "F_SaveQuestSkills","F_Load?Skills" functions [Lupus]
//============================================================
@@ -70,6 +71,7 @@ function script F_ClearGarbage {
if(nif_q_done) {set nif_q_done,0; set MISC_QUEST,MISC_QUEST | 64;}
if(MORGEN >= 2) {set MISC_QUEST,MISC_QUEST | 4;}
set MORGEN,0; set nif_t,0;
+ //set QSK1,0; set QSK2,0; set QSK3,0; set QSK4,0;
return;
}
@@ -410,3 +412,42 @@ function script getJobName {
return "omghaxor";
}
}
+
+//////////////////////////////////////////////////////////////////////////////////
+// *** Function "F_SaveQuestSkills": Store learnt quest skills
+//////////////////////////////////////////////////////////////////////////////////
+function script F_SaveQuestSkills {
+ set ADV_QSK,0;
+ //1st classes quest skills
+ for(set @i, 0; @i < 14; set @i, @i + 1){
+ if(getskilllv(144+@i)) set ADV_QSK,ADV_QSK|pow(2,@i);
+ }
+ //2nd classes quest skills
+ for(set @i, 0; @i < 19; set @i, @i + 1){
+ if(getskilllv(1001+@i)) set ADV_QSK,ADV_QSK|pow(2,14+@i);
+ }
+ return;
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+// *** Function "F_Load1Skills": Restore learnt 1st class quest skills
+//////////////////////////////////////////////////////////////////////////////////
+function script F_Load1Skills {
+ //1st classes quest skills
+ for(set @i, 0; @i < 14; set @i, @i + 1){
+ if(ADV_QSK|pow(2,@i) == ADV_QSK) skill 144+@i,1,0;
+ }
+ return;
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+// *** Function "F_Load2Skills": Restore learnt 2nd class quest skills
+//////////////////////////////////////////////////////////////////////////////////
+function script F_Load2Skills {
+ //2nd classes quest skills
+ for(set @i, 0; @i < 19; set @i, @i + 1){
+ if(ADV_QSK|pow(2,14+@i) == ADV_QSK) skill 1001+@i,1,0;
+ }
+ set ADV_QSK,0; //Clear var
+ return;
+} \ No newline at end of file