summaryrefslogtreecommitdiff
path: root/world/map/npc/functions
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2014-08-24 22:09:43 -0500
committerwushin <pasekei@gmail.com>2014-08-24 22:40:01 -0500
commit2c07459b6d045f7a510811c507533e204319473a (patch)
treeeea6c599f268ecfd86cb95aecdb19c4a2ef87805 /world/map/npc/functions
parentd8e03d3b02cd6c2964b94e3c4bc3f40dad9e9888 (diff)
downloadserverdata-2c07459b6d045f7a510811c507533e204319473a.tar.gz
serverdata-2c07459b6d045f7a510811c507533e204319473a.tar.bz2
serverdata-2c07459b6d045f7a510811c507533e204319473a.tar.xz
serverdata-2c07459b6d045f7a510811c507533e204319473a.zip
Quest Log Fixed STARTAREA
Diffstat (limited to 'world/map/npc/functions')
-rw-r--r--world/map/npc/functions/clear_vars.txt56
-rw-r--r--world/map/npc/functions/mob_points.txt2
2 files changed, 47 insertions, 11 deletions
diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt
index a0c5e787..8bae5481 100644
--- a/world/map/npc/functions/clear_vars.txt
+++ b/world/map/npc/functions/clear_vars.txt
@@ -3,25 +3,61 @@
function|script|ClearVariables|,
{
// Tutorial
- if (sorfina)
- goto L_SetAllTut;
+ if ((TUTORIAL) || (sorfina))
+ goto L_ResetTut;
goto L_Easter;
-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;
- goto L_ResetAllTut;
+ 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;
+ 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_Easter;
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_Easter;
L_Easter:
@@ -92,7 +128,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;