diff options
author | Wushin <pasekei@gmail.com> | 2014-10-10 15:27:07 -0500 |
---|---|---|
committer | Wushin <pasekei@gmail.com> | 2014-10-10 15:27:07 -0500 |
commit | 3179aed603b68d34443b718a130e4a392d4c5ae5 (patch) | |
tree | 550656ed2a414b07b5af5c1e47b602e348d551a1 /world/map/npc/functions | |
parent | ffe40be3361652fc509291fa2f4c814554341957 (diff) | |
parent | 0cc087b9fd3b70706ecd5bd2b96ab14c7c1295ab (diff) | |
download | serverdata-3179aed603b68d34443b718a130e4a392d4c5ae5.tar.gz serverdata-3179aed603b68d34443b718a130e4a392d4c5ae5.tar.bz2 serverdata-3179aed603b68d34443b718a130e4a392d4c5ae5.tar.xz serverdata-3179aed603b68d34443b718a130e4a392d4c5ae5.zip |
Merge pull request #152 from wushin/quest-log-variable-clean-up
Quest log variable clean up
Diffstat (limited to 'world/map/npc/functions')
-rw-r--r-- | world/map/npc/functions/clear_vars.txt | 64 | ||||
-rw-r--r-- | world/map/npc/functions/mob_points.txt | 2 |
2 files changed, 54 insertions, 12 deletions
diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt index a0c5e787..289b7a75 100644 --- a/world/map/npc/functions/clear_vars.txt +++ b/world/map/npc/functions/clear_vars.txt @@ -3,25 +3,67 @@ function|script|ClearVariables|, { // Tutorial - if (sorfina) - goto L_SetAllTut; - goto L_Easter; + if ((TUTORIAL) || (sorfina)) + goto L_ResetTut; + goto L_Heathin; -L_SetAllTut: - if (FLAGS & FLAG_TUTORIAL_DONE) +L_ResetTut: + //TUTORIAL to STARTAREA + if ((sorfina) || (kaan) || (hasan) || (tanisha)) goto L_ResetAllTut; - if ((FLAGS & FLAG_TUTORIAL_DONE) && (!(TUTORIAL & $@HasanCompleteBit))) - set TUTORIAL, TUTORIAL | $@HasanCompleteBit; - set @tutorial_tmp, (sorfina + tanisha + hasan + kaan); - set TUTORIAL, (TUTORIAL & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT)); + set @tutorial_tmp, ((TUTORIAL & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT); + // Tutorial + // Nibble 0 (sorfina, tanisha, kaan & hasan) + set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT)); + // Nibble 1 (valon) + set @tutorial_tmp, ((TUTORIAL & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + set @valon_done, (TUTORIAL & (1 << 7)); + set @valon_start, (TUTORIAL & (1 << 6)); + if (@valon_start) + set @tutorial_tmp, (@tutorial_tmp + 2); + if (@valon_done) + set @tutorial_tmp, 7; + set STARTAREA, (STARTAREA & ~(NIBBLE_1_MASK) | (@tutorial_tmp << NIBBLE_1_SHIFT)); + // Nibble 2 (Counts) + set @tutorial_tmp, ((TUTORIAL & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (@tutorial_tmp << NIBBLE_2_SHIFT)); + // Nibble 3 (Morgan) + set @tutorial_tmp, ((TUTORIAL & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT); + set STARTAREA, (STARTAREA & ~(NIBBLE_3_MASK) | (@tutorial_tmp << NIBBLE_3_SHIFT)); + // Nibble 4 (Zegas) Barrels shuffled + set @zegas_done, (TUTORIAL & (1 << 23)); + set @zegas_start, (TUTORIAL & (1 << 16)); + set @zegas_met, (TUTORIAL & (1 << 30)); + set @tutorial_tmp, 0; + if (@zegas_met) + set @tutorial_tmp, 1; + if (@zegas_start) + set @tutorial_tmp, 2; + if (@zegas_done) + set @tutorial_tmp, 4; + set STARTAREA, (STARTAREA & ~(NIBBLE_4_MASK) | (@tutorial_tmp << NIBBLE_4_SHIFT)); + // Nibble 5 (Barrels) set @tutorial_tmp, 0; - goto L_ResetAllTut; + set STARTAREA, (STARTAREA & ~(NIBBLE_5_MASK) | (@tutorial_tmp << NIBBLE_5_SHIFT)); + // Nibble 6 (Barrels) + set STARTAREA, (STARTAREA & ~(NIBBLE_6_MASK) | (@tutorial_tmp << NIBBLE_6_SHIFT)); + set TUTORIAL, 0; + goto L_Heathin; L_ResetAllTut: set sorfina, 0; set tanisha, 0; set hasan, 0; set kaan, 0; + set TUTORIAL, 0; + set STARTAREA, 0; + set FLAGS, FLAGS &~ FLAG_TUTORIAL_DONE; + goto L_Heathin; + +L_Heathin: + if (HEATHIN_QUEST > 0) + set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_6_MASK)) | (HEATHIN_QUEST << NIBBLE_6_SHIFT); + set HEATHIN_QUEST, 0; goto L_Easter; L_Easter: @@ -92,7 +134,7 @@ L_Easter: set QUEST_Christmas09_state, 0; - set QUEST_Easter09_slots, 0; + set QUEST_Easter09_slots, 0; // easter 2010 // This must not be cleared: since some people would like to go to the easter island! diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt index eb5aeff7..6e0744c3 100644 --- a/world/map/npc/functions/mob_points.txt +++ b/world/map/npc/functions/mob_points.txt @@ -138,7 +138,7 @@ function|script|MobPoints|, set Mobpt, Mobpt + @points[@mobID - 1002]; callfunc "ValonState"; - if (((@valon_start) && (!(@valon_end))) && (@mobID == $@ValonMob[@valon_mob])) + if (((@valon_state >= 2) && (@valon_state < 6)) && (@mobID == $@ValonMob[@valon_mob])) goto L_ValonMobKill; goto L_NatureKarma; |