diff options
author | Lupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-07 10:23:30 +0000 |
---|---|---|
committer | Lupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-07 10:23:30 +0000 |
commit | 0d2dd3980827fa6bd3a53526d4dfe740c9ecf2a9 (patch) | |
tree | 3fb2622be64f7d390cb4c6e93e33bf05bff0b1c6 | |
parent | 3449f67a5458e8ec87027e3bfc50af30ac7b5397 (diff) | |
download | hercules-0d2dd3980827fa6bd3a53526d4dfe740c9ecf2a9.tar.gz hercules-0d2dd3980827fa6bd3a53526d4dfe740c9ecf2a9.tar.bz2 hercules-0d2dd3980827fa6bd3a53526d4dfe740c9ecf2a9.tar.xz hercules-0d2dd3980827fa6bd3a53526d4dfe740c9ecf2a9.zip |
added functions to completely save/load of quest skills
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7028 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | npc/Changelog.txt | 4 | ||||
-rw-r--r-- | npc/other/Global_Functions.txt | 43 |
2 files changed, 46 insertions, 1 deletions
diff --git a/npc/Changelog.txt b/npc/Changelog.txt index 7bf0421cf..293f93741 100644 --- a/npc/Changelog.txt +++ b/npc/Changelog.txt @@ -36,6 +36,10 @@ Musashiden Date Added
======
+07/05
+ * Added Save/Load Quest Skills (1st/2nd Class quest skills!) global functions. To test and
+ insert into Valhalla NPC. They use ONE variable for all skills [Lupus]
+
06/06
* Fixed missing function problems for Kafra, also now using cleararray instead of assigning blank variables to every other array [Evera]
* Implemented the Shinokas quest, thanks to Dj-Yhn for scripting it. [MasterOfMuppets]
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 |