summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/001-2/casino.txt2
-rw-r--r--world/map/npc/021-1/banu.txt8
-rw-r--r--world/map/npc/021-1/hideandseek.txt74
-rw-r--r--world/map/npc/021-1/imec.txt15
-rw-r--r--world/map/npc/021-1/weellos.txt2
-rw-r--r--world/map/npc/021-2/heathin.txt77
-rw-r--r--world/map/npc/021-2/kylian.txt17
-rw-r--r--world/map/npc/021-2/yanis.txt6
-rw-r--r--world/map/npc/022-1/_import.txt1
-rw-r--r--world/map/npc/022-1/adrian.txt4
-rw-r--r--world/map/npc/022-1/anwar.txt15
-rw-r--r--world/map/npc/022-1/tutorial.txt80
-rw-r--r--world/map/npc/024-1/eomie.txt4
-rw-r--r--world/map/npc/024-1/tinris.txt4
-rw-r--r--world/map/npc/042-1/hasan.txt31
-rw-r--r--world/map/npc/042-1/kaan.txt51
-rw-r--r--world/map/npc/042-1/liana.txt16
-rw-r--r--world/map/npc/042-1/tutorial.txt61
-rw-r--r--world/map/npc/042-1/valon.txt70
-rw-r--r--world/map/npc/042-1/zegas.txt31
-rw-r--r--world/map/npc/042-2/barrels.txt15
-rw-r--r--world/map/npc/042-2/barrels_config.txt39
-rw-r--r--world/map/npc/042-2/morgan.txt10
-rw-r--r--world/map/npc/042-2/sorfina.txt43
-rw-r--r--world/map/npc/042-2/stat_reset.txt4
-rw-r--r--world/map/npc/042-2/tanisha.txt30
-rw-r--r--world/map/npc/068-2/latoy.txt2
-rw-r--r--world/map/npc/functions/clear_vars.txt64
-rw-r--r--world/map/npc/functions/mob_points.txt2
29 files changed, 409 insertions, 369 deletions
diff --git a/world/map/npc/001-2/casino.txt b/world/map/npc/001-2/casino.txt
index ea29e9bd..7648190b 100644
--- a/world/map/npc/001-2/casino.txt
+++ b/world/map/npc/001-2/casino.txt
@@ -4,7 +4,7 @@
001-2.gat,32,72,0|script|#CasinoEntrance|32767,1,1,
{
set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@knowCasinoNT;
- set @kylian, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
+ set @kylian, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
if (@kylian != 6)
goto L_End;
message strcharinfo(0), "You wonder if Kylian would like to visit the casino in the evening.";
diff --git a/world/map/npc/021-1/banu.txt b/world/map/npc/021-1/banu.txt
index fac61bc1..e614fcae 100644
--- a/world/map/npc/021-1/banu.txt
+++ b/world/map/npc/021-1/banu.txt
@@ -5,9 +5,7 @@
021-1.gat,102,54,0|script|Banu|154,
{
- set @BanuNT_MASK, 0xC00;
- set @BanuNT_SHIFT, 10;
- set @state, ((QUEST_NorthTulimshar & @BanuNT_MASK) >> @BanuNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & TWOBIT_5_MASK) >> TWOBIT_5_SHIFT);
set @EXP, 30;
set @money_water, 200;
set @money_knife, 60;
@@ -106,11 +104,9 @@ L_Close:
set @EXP, 0;
set @state, 0;
set @rand, 0;
- set @BanuNT_MASK, 0;
- set @BanuNT_SHIFT, 0;
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(@BanuNT_MASK)) | (@state << @BanuNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(TWOBIT_5_MASK)) | (@state << TWOBIT_5_SHIFT);
return;
}
diff --git a/world/map/npc/021-1/hideandseek.txt b/world/map/npc/021-1/hideandseek.txt
index 58095234..4768eef1 100644
--- a/world/map/npc/021-1/hideandseek.txt
+++ b/world/map/npc/021-1/hideandseek.txt
@@ -1,9 +1,10 @@
// Children playing Hide and Seek
-// Quest uses Nibble 0 and 1 of QUEST_NorthTulimshar
+// QUEST_NorthTulimshar
+// BYTE 0
// Bit 0: started quest at Ayasha
// Bit 1 - 5: found one of the kids each
-// bit 6: talked to Ayasha after finding all kids
-// bit 7: unused
+// Bit 6: talked to Ayasha after finding all kids
+// Bit 7: unused
// Author: Jenalya
-|script|#hideandseekNTconfig|-1,
@@ -11,25 +12,60 @@
end;
OnInit:
- set $@hideandseekNT_MASK, BYTE_0_MASK;
- set $@hideandseekNT_SHIFT, BYTE_0_SHIFT;
-
- set $@hideandseekNT_started, 0x00000001;
- set $@hideandseekNT_found1, 0x00000002;
- set $@hideandseekNT_found2, 0x00000004;
- set $@hideandseekNT_found3, 0x00000008;
- set $@hideandseekNT_found4, 0x00000010;
- set $@hideandseekNT_found5, 0x00000020;
- set $@hideandseekNT_ended, 0x00000040;
+ set $@hideandseekNT_started, (1 << 0);
+ set $@hideandseekNT_found1, (1 << 1);
+ set $@hideandseekNT_found2, (1 << 2);
+ set $@hideandseekNT_found3, (1 << 3);
+ set $@hideandseekNT_found4, (1 << 4);
+ set $@hideandseekNT_found5, (1 << 5);
+ set $@hideandseekNT_ended, (1 << 6);
end;
}
+021-1.gat,89,66,0|script|AyashaDebug|258,
+{
+ mes "[Ayasha Debug]";
+ menu
+ "Show", L_Show,
+ "Reset", L_Reset,
+ "Close.", L_Close;
+
+L_Show:
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
+ mes "State: " + @state;
+ if (QUEST_NorthTulimshar & $@hideandseekNT_started)
+ mes "Start set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_found1)
+ mes "Found 1 set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_found2)
+ mes "Found 2 set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_found3)
+ mes "Found 3 set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_found4)
+ mes "Found 4 set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_found5)
+ mes "Found 5 set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_ended)
+ mes "Complete set";
+ goto L_Close;
+L_Reset:
+ set QUEST_NorthTulimshar, 0;
+ goto L_Close;
+
+L_Close:
+ close;
+
+OnInit:
+ if (!debug)
+ disablenpc "AyashaDebug";
+ end;
+}
021-1.gat,87,66,0|script|Ayasha|258,
{
set @child_number, 0;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 75;
@@ -97,7 +133,7 @@ L_Close:
{
set @child_number, 1;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 15;
@@ -159,7 +195,7 @@ L_Close:
{
set @child_number, 2;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 15;
@@ -213,7 +249,7 @@ L_Close:
{
set @child_number, 3;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 25;
@@ -265,7 +301,7 @@ L_Close:
{
set @child_number, 4;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 15;
@@ -306,7 +342,7 @@ L_Close:
{
set @child_number, 5;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 15;
diff --git a/world/map/npc/021-1/imec.txt b/world/map/npc/021-1/imec.txt
index 61e1fca7..07965951 100644
--- a/world/map/npc/021-1/imec.txt
+++ b/world/map/npc/021-1/imec.txt
@@ -2,20 +2,9 @@
// after finishing this, daily quest with scorpion stingers
// Using bit 8 and 9 of QUEST_NorthTulimshar (first half of nibble 2)
// author: Jenalya
-
--|script|#ImecShopConfig|-1,
-{
- end;
-
-OnInit:
- set $@ImecShopNT_MASK, 0x300;
- set $@ImecShopNT_SHIFT, 8;
- end;
-}
-
021-1.gat,120,31,0|script|Imec|162,
{
- set @state, ((QUEST_NorthTulimshar & $@ImecShopNT_MASK) >> $@ImecShopNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & TWOBIT_4_MASK) >> TWOBIT_4_SHIFT);
set @money, 500;
if (@state >= 3) goto L_Stingers;
@@ -117,6 +106,6 @@ L_Close:
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@ImecShopNT_MASK)) | (@state << $@ImecShopNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(TWOBIT_4_MASK)) | (@state << TWOBIT_4_SHIFT);
return;
}
diff --git a/world/map/npc/021-1/weellos.txt b/world/map/npc/021-1/weellos.txt
index cb75bde1..3e6236ea 100644
--- a/world/map/npc/021-1/weellos.txt
+++ b/world/map/npc/021-1/weellos.txt
@@ -4,7 +4,7 @@
021-1.gat,130,125,0|script|Weellos|103,
{
set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@knowWeellosNT;
- set @kylian, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
+ set @kylian, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
if isin("021-1.gat", 130, 120, 140, 125) goto L_In;
diff --git a/world/map/npc/021-2/heathin.txt b/world/map/npc/021-2/heathin.txt
index 45f041c5..5f9f26c7 100644
--- a/world/map/npc/021-2/heathin.txt
+++ b/world/map/npc/021-2/heathin.txt
@@ -6,21 +6,23 @@
set @TARROW_REQ_COAL, 5;
set @TARROW_REQ_GP, 3000;
- if (HEATHIN_QUEST == 14) && (BaseLevel >= 80) goto L_Heathin_Terranite_Arrows_Trade;
- if (HEATHIN_QUEST == 13) && (BaseLevel >= 80) goto L_Heathin_Terranite_Arrows_Ready;
- if (HEATHIN_QUEST == 12) && (BaseLevel >= 80) goto L_Heathin_Terranite_Arrows_Forge;
- if (HEATHIN_QUEST == 11) && (BaseLevel >= 80) goto L_Heathin_Terranite_Arrows;
- if (HEATHIN_QUEST == 10) && (BaseLevel >= 80) goto L_Heathin_Terranite_Chest_Armor_Ready;
- if (HEATHIN_QUEST == 9) && (BaseLevel >= 80) goto L_Heathin_Terranite_Chest_Armor_Forge;
- if (HEATHIN_QUEST == 8) && (BaseLevel >= 80) goto L_Heathin_Terranite_Chest_Armor;
- if (HEATHIN_QUEST == 7) && (BaseLevel >= 80) goto L_Heathin_Terranite_Legs_Ready;
- if (HEATHIN_QUEST == 6) && (BaseLevel >= 80) goto L_Heathin_Terranite_Legs_Forge;
- if (HEATHIN_QUEST == 5) && (BaseLevel >= 80) goto L_Heathin_Terranite_Legs;
- if (HEATHIN_QUEST == 4) && (BaseLevel >= 80) goto L_Heathin_Terranite_Hood_Ready;
- if (HEATHIN_QUEST == 3) && (BaseLevel >= 80) goto L_Heathin_Terranite_Hood_Forge;
- if (HEATHIN_QUEST == 2) && (BaseLevel >= 80) goto L_Heathin_Terranite_Hood;
- if (HEATHIN_QUEST == 2) && (BaseLevel >= 60) goto L_Heathin_Ring_Thanks;
- if (HEATHIN_QUEST == 1) && (BaseLevel >= 60) goto L_Heathin_Ring_Award;
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT);
+
+ if (@state == 14) && (BaseLevel >= 80) goto L_Heathin_Terranite_Arrows_Trade;
+ if (@state == 13) && (BaseLevel >= 80) goto L_Heathin_Terranite_Arrows_Ready;
+ if (@state == 12) && (BaseLevel >= 80) goto L_Heathin_Terranite_Arrows_Forge;
+ if (@state == 11) && (BaseLevel >= 80) goto L_Heathin_Terranite_Arrows;
+ if (@state == 10) && (BaseLevel >= 80) goto L_Heathin_Terranite_Chest_Armor_Ready;
+ if (@state == 9) && (BaseLevel >= 80) goto L_Heathin_Terranite_Chest_Armor_Forge;
+ if (@state == 8) && (BaseLevel >= 80) goto L_Heathin_Terranite_Chest_Armor;
+ if (@state == 7) && (BaseLevel >= 80) goto L_Heathin_Terranite_Legs_Ready;
+ if (@state == 6) && (BaseLevel >= 80) goto L_Heathin_Terranite_Legs_Forge;
+ if (@state == 5) && (BaseLevel >= 80) goto L_Heathin_Terranite_Legs;
+ if (@state == 4) && (BaseLevel >= 80) goto L_Heathin_Terranite_Hood_Ready;
+ if (@state == 3) && (BaseLevel >= 80) goto L_Heathin_Terranite_Hood_Forge;
+ if (@state == 2) && (BaseLevel >= 80) goto L_Heathin_Terranite_Hood;
+ if (@state == 2) && (BaseLevel >= 60) goto L_Heathin_Ring_Thanks;
+ if (@state == 1) && (BaseLevel >= 60) goto L_Heathin_Ring_Award;
if (BaseLevel >= 60) goto L_Heathin_Start;
mes "[Heathin]";
@@ -44,7 +46,8 @@ L_Heathin_Start:
"Wait, what kind of award are we talking about?", L_Heathin_Interested;
L_Heathin_Help:
- set HEATHIN_QUEST, 1;
+ set @state, 1;
+ callsub S_Update_Mask;
mes "[Heathin]";
mes "\"Excellent! I am always glad when someone can be of service not just to me, but to all of Tulimshar. Please get me 50 Coal and 100,000 gold pieces, and you will be compensated for your efforts.\"";
close;
@@ -73,7 +76,8 @@ L_Heathin_Ring_Award:
getinventorylist;
if ((checkweight("SimpleRing", 1) == 0) || (@inventorylist_count == 100))
goto L_InventoryNoSpace;
- set HEATHIN_QUEST, 2;
+ set @state, 2;
+ callsub S_Update_Mask;
set Zeny, Zeny - 100000;
delitem "Coal", 50;
getitem "SimpleRing", 1;
@@ -120,7 +124,8 @@ L_Heathin_Terranite_No:
close;
L_Heathin_Terranite_Yes:
- set HEATHIN_QUEST, 3;
+ set @state, 3;
+ callsub S_Update_Mask;
mes "[Heathin]";
mes "\"Great, this is going to be fun! As I have not had much practice with this armor, I'd like to get started soon.\"";
next;
@@ -136,7 +141,8 @@ L_Heathin_Terranite_Hood_Forge:
|| (countitem("Coal") < 100)
|| (countitem("TerraniteOre") < 10) )
goto L_Heathin_Terranite_Hood_Wait;
- set HEATHIN_QUEST, 4;
+ set @state, 4;
+ callsub S_Update_Mask;
delitem "Coal", 100;
delitem "TerraniteOre", 10;
set Zeny, Zeny - 200000;
@@ -153,14 +159,16 @@ L_Heathin_Terranite_Hood_Ready:
getinventorylist;
if ((checkweight("TerraniteHelmet", 1) == 0) || (@inventorylist_count == 100))
goto L_InventoryNoSpace;
- set HEATHIN_QUEST, 5;
+ set @state, 5;
+ callsub S_Update_Mask;
getitem "TerraniteHelmet", 1;
mes "[Heathin]";
mes "\"I am all done with your terranite hood. I hope you enjoy it! I have some work to wrap up for the Council, but come back later and I might be able to assist you again.\"";
close;
L_Heathin_Terranite_Legs:
- set HEATHIN_QUEST, 6;
+ set @state, 6;
+ callsub S_Update_Mask;
mes "[Heathin]";
mes "\"I am glad you are back! I've just finished up some more of my commission. Now I can get back to making terranite armor for you. This time I will make some pants, but they need more ore, more Coal to heat my forge and of course, more gold for my efforts.\"";
next;
@@ -172,7 +180,8 @@ L_Heathin_Terranite_Legs_Forge:
|| (countitem("Coal") < 200)
|| (countitem("TerraniteOre") < 30) )
goto L_Heathin_Terranite_Legs_Wait;
- set HEATHIN_QUEST, 7;
+ set @state, 7;
+ callsub S_Update_Mask;
delitem "Coal", 200;
delitem "TerraniteOre", 30;
set Zeny, Zeny - 400000;
@@ -189,14 +198,16 @@ L_Heathin_Terranite_Legs_Ready:
getinventorylist;
if ((checkweight("TerraniteLegs", 1) == 0) || (@inventorylist_count == 100))
goto L_InventoryNoSpace;
- set HEATHIN_QUEST, 8;
+ set @state, 8;
+ callsub S_Update_Mask;
getitem "TerraniteLegs", 1;
mes "[Heathin]";
mes "\"I am all done with your terranite pants. Hope you enjoy them! I have some more work to complete for the Council. Come back later and I might be able to assist you again.\"";
close;
L_Heathin_Terranite_Chest_Armor:
- set HEATHIN_QUEST, 9;
+ set @state, 9;
+ callsub S_Update_Mask;
mes "[Heathin]";
mes "\"Good to see you again. I have just finished up some more of my commission. Now I can get back to making terranite armor for you. This time, I will make some terranite chest armor, but it needs more ore, more Coal for my forge and of course, more gold to compensate for my efforts.\"";
next;
@@ -208,7 +219,8 @@ L_Heathin_Terranite_Chest_Armor_Forge:
|| (countitem("Coal") < 250)
|| (countitem("TerraniteOre") < 40) )
goto L_Heathin_Terranite_Chest_Armor_Wait;
- set HEATHIN_QUEST, 10;
+ set @state, 10;
+ callsub S_Update_Mask;
delitem "Coal", 250;
delitem "TerraniteOre", 40;
set Zeny, Zeny - 500000;
@@ -225,7 +237,8 @@ L_Heathin_Terranite_Chest_Armor_Ready:
getinventorylist;
if ((checkweight("TerraniteChestArmor", 1) == 0) || (@inventorylist_count == 100))
goto L_InventoryNoSpace;
- set HEATHIN_QUEST, 11;
+ set @state, 11;
+ callsub S_Update_Mask;
getitem "TerraniteChestArmor", 1;
mes "[Heathin]";
mes "\"I have completed your terranite chest armor. I hope you enjoy it! I have some work to wrap up for the Council again, but come back later and I might be able to assist you once more.\"";
@@ -246,7 +259,8 @@ L_Heathin_Terranite_Arrows_No:
close;
L_Heathin_Terranite_Arrows_Yes:
- set HEATHIN_QUEST, 12;
+ set @state, 12;
+ callsub S_Update_Mask;
mes "[Heathin]";
mes "\"Good, good. I shall begin crafting these arrows as soon as you come back. However, I cannot just make small handfuls as it would not be worth my time and effort to have my concentration interrupted for small tasks. I will make 1,000 Terranite Arrows per request, for which I will need "+@TARROW_REQ_TERRA_ORE+" Terranite Ore, "+@TARROW_REQ_COAL+" Coal and "+@TARROW_REQ_GP+" gold pieces.\"";
next;
@@ -258,7 +272,8 @@ L_Heathin_Terranite_Arrows_Forge:
|| (countitem("Coal") < @TARROW_REQ_COAL)
|| (countitem("TerraniteOre") < @TARROW_REQ_TERRA_ORE) )
goto L_Heathin_Terranite_Arrows_Wait;
- set HEATHIN_QUEST, 13;
+ set @state, 13;
+ callsub S_Update_Mask;
delitem "Coal", @TARROW_REQ_COAL;
delitem "TerraniteOre", @TARROW_REQ_TERRA_ORE;
set Zeny, Zeny - @TARROW_REQ_GP;
@@ -275,7 +290,8 @@ L_Heathin_Terranite_Arrows_Ready:
getinventorylist;
if ((checkweight("TerraniteArrow", 1000) == 0) || (@inventorylist_count == 100))
goto L_InventoryNoSpace;
- set HEATHIN_QUEST, 14;
+ set @state, 14;
+ callsub S_Update_Mask;
getitem "TerraniteArrow", 1000;
mes "[Heathin]";
mes "\"All done, here you go! I hope you like them. I am still working on my commission, but if you ever need any more Terranite Arrows, just come on by with "+@TARROW_REQ_COAL+" Coal, "+@TARROW_REQ_TERRA_ORE+" Terranite Ore and "+@TARROW_REQ_GP+" gold pieces and I will make another 1,000 arrows for you. By now I have enough Terranite Ore in reserve that you can just trade me my requirements to keep my resources up. Thank you for all your efforts!\"";
@@ -320,4 +336,7 @@ L_InventoryNoSpace:
mes "\"Hm no. You can't carry this right now. Make some room and come back.\"";
close;
+S_Update_Mask:
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_6_MASK)) | (@state << NIBBLE_6_SHIFT);
+ return;
}
diff --git a/world/map/npc/021-2/kylian.txt b/world/map/npc/021-2/kylian.txt
index 71dcb896..fc8242c5 100644
--- a/world/map/npc/021-2/kylian.txt
+++ b/world/map/npc/021-2/kylian.txt
@@ -38,16 +38,12 @@
OnInit:
// Nibble 4
- set $@knowYanisNT, 0x10000;
- set $@knowLatoyNT, 0x20000;
- set $@knowWeellosNT, 0x40000;
- set $@knowCasinoNT, 0x80000;
-
- set $@businessmanNT_MASK, NIBBLE_5_MASK;
- set $@businessmanNT_SHIFT, NIBBLE_5_SHIFT;
+ set $@knowYanisNT, (1 << 16);
+ set $@knowLatoyNT, (1 << 17);
+ set $@knowWeellosNT, (1 << 18);
+ set $@knowCasinoNT, (1 << 19);
end;
}
-
021-2.gat,25,67,0|script|#KylianOut|32767,1,1,
{
set @KylianNTLicense, 0;
@@ -55,10 +51,9 @@ OnInit:
set @KylianNTCasino, 0;
end;
}
-
021-2.gat,89,55,0|script|Kylian|193,
{
- set @state, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
set @acorn_amount, 12;
set @suitcase_money, 100;
@@ -307,6 +302,6 @@ L_Close:
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@businessmanNT_MASK)) | (@state << $@businessmanNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_5_MASK)) | (@state << NIBBLE_5_SHIFT);
return;
}
diff --git a/world/map/npc/021-2/yanis.txt b/world/map/npc/021-2/yanis.txt
index bde24ec3..86c40fad 100644
--- a/world/map/npc/021-2/yanis.txt
+++ b/world/map/npc/021-2/yanis.txt
@@ -4,8 +4,8 @@
021-2.gat,33,17,0|script|Yanis|107,
{
set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@knowYanisNT;
- set @kylian, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
- set @imec, ((QUEST_NorthTulimshar & $@ImecShopNT_MASK) >> $@ImecShopNT_SHIFT);
+ set @kylian, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
+ set @imec, ((QUEST_NorthTulimshar & TWOBIT_4_MASK) >> TWOBIT_4_SHIFT);
mes "[Yanis]";
mes "\"Welcome. I'm handling issues with trading licenses for the shop owners in Tulimshar. Can I help you?\"";
@@ -24,7 +24,7 @@ L_Next:
mes "[Yanis]";
mes "\"Here you have a letter of acknowledgement. You can bring that back to Imec. We will have a look at his case.\"";
set @imec, 2;
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@ImecShopNT_MASK)) | (@imec << $@ImecShopNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(TWOBIT_4_MASK)) | (@imec << TWOBIT_4_SHIFT);
goto L_BeforeClose;
L_BeforeClose:
diff --git a/world/map/npc/022-1/_import.txt b/world/map/npc/022-1/_import.txt
index 9695d72f..543a85c0 100644
--- a/world/map/npc/022-1/_import.txt
+++ b/world/map/npc/022-1/_import.txt
@@ -9,4 +9,3 @@ npc: npc/022-1/dock.txt
npc: npc/022-1/ferry_master.txt
npc: npc/022-1/mapflags.txt
npc: npc/022-1/npcs.txt
-npc: npc/022-1/tutorial.txt
diff --git a/world/map/npc/022-1/adrian.txt b/world/map/npc/022-1/adrian.txt
index e4e1e2c6..978c537e 100644
--- a/world/map/npc/022-1/adrian.txt
+++ b/world/map/npc/022-1/adrian.txt
@@ -7,7 +7,7 @@
022-1.gat,58,54,0|script|Adrian|213,
{
- set @state, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
mes "[Adrian]";
mes "\"Hello. Are you here to get the luggage for some of our passengers?\"";
@@ -36,7 +36,7 @@ L_Get:
mes "Adrain hands you a very heavy suitcase.";
getitem "LeatherSuitcase", 1;
set @state, 2;
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@businessmanNT_MASK)) | (@state << $@businessmanNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_5_MASK)) | (@state << NIBBLE_5_SHIFT);
goto L_Close;
L_Inventory:
diff --git a/world/map/npc/022-1/anwar.txt b/world/map/npc/022-1/anwar.txt
index f01089aa..7c031d9c 100644
--- a/world/map/npc/022-1/anwar.txt
+++ b/world/map/npc/022-1/anwar.txt
@@ -16,20 +16,9 @@
// state 13: Anwar asked to bring present to Eomie
// state 14: gave present to Eomie
// state 15: reported back to Anwar and done
-
--|script|#magicfieldNTconfig|-1,
-{
- end;
-
-OnInit:
- set $@magicfieldNT_MASK, NIBBLE_3_MASK;
- set $@magicfieldNT_SHIFT, NIBBLE_3_SHIFT;
- end;
-}
-
022-1.gat,41,46,0|script|Anwar|156,
{
- set @state, ((QUEST_NorthTulimshar & $@magicfieldNT_MASK) >> $@magicfieldNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
set @cloth_amount, 3;
set @silk_amount, 30;
@@ -209,6 +198,6 @@ L_Close:
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@magicfieldNT_MASK)) | (@state << $@magicfieldNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_3_MASK)) | (@state << NIBBLE_3_SHIFT);
return;
}
diff --git a/world/map/npc/022-1/tutorial.txt b/world/map/npc/022-1/tutorial.txt
deleted file mode 100644
index c249d79d..00000000
--- a/world/map/npc/022-1/tutorial.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-// This file is part of the Tutorial
-// Author: Jenalya
-// if you enter the tutorial area from outside, it is set to be already done
-// Tutorial
-// Nibble 0
-// 1-4: Sorfina
-// 5-7: Tanisha
-// 8-13: Kaan & Hasan
-// 14: Hasan Complete
-// 15: Open
-// Nibble 1
-// 4: Sorfina Bit
-// 5: Tanisha Bit
-// 6: Valon Start
-// 7: Valon Done
-// Nibble 2
-// 1: Maggots
-// 2: House Maggots
-// 3: TameScorpion
-// 4: Scorpion
-// 5-15: Open
-// Nibble 3
-// 1-15: Count
-// Nibble 4
-// 16: Start
-// 17: Barrel
-// 18: Barrel
-// 19: Barrel
-// Nibble 5
-// 20: Barrel
-// 21: Barrel
-// 22: Barrel
-// 23: Found
-// Nibble 6
-// 1: Seen
-// 2: Started
-// 3:
-// 24: Magic
-// 25:
-// 26:
-// 27:
-// Nibble 7
-// 28: Magic Start
-// 29: Magic End
-// 30: Zegas Met
-// 31: Hasan Complete
--|script|#TutorialConfig|-1,
-{
- end;
-
-OnInit:
- set $@ScorpionFighter, 0;
- set $@ScorpionTimer, 0;
- set $@ScorpDeath, 0;
- set $@SorfinaHasanBit, (1 << 4);
- set $@TanishaHasanBit, (1 << 5);
- set $@HasanCompleteBit, (1 << 31);
- end;
-}
-function|script|TutorialState|,
-{
- callfunc "ClearVariables";
- set @tutorial, ((TUTORIAL & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
- set @sorfina_hasan, (TUTORIAL & $@SorfinaHasanBit);
- set @tanisha_hasan, (TUTORIAL & $@TanishaHasanBit);
- set @hasan_complete, (TUTORIAL & $@HasanCompleteBit);
- return;
-}
-function|script|SetTutorialMask|,
-{
- set TUTORIAL, (TUTORIAL & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
- set @tutorial_tmp, 0;
- return;
-}
-function|script|TutorialCompleted|,
-{
- set FLAGS, FLAGS | FLAG_TUTORIAL_DONE;
- callfunc "ClearVariables";
- return;
-}
diff --git a/world/map/npc/024-1/eomie.txt b/world/map/npc/024-1/eomie.txt
index 680e77a6..e14a323c 100644
--- a/world/map/npc/024-1/eomie.txt
+++ b/world/map/npc/024-1/eomie.txt
@@ -20,7 +20,7 @@
024-1.gat,72,94,0|script|Eomie|164,
{
- set @state, ((QUEST_NorthTulimshar & $@magicfieldNT_MASK) >> $@magicfieldNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
set @grass_amount, 5;
set @water_amount, 2;
@@ -140,6 +140,6 @@ L_Close:
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@magicfieldNT_MASK)) | (@state << $@magicfieldNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_3_MASK)) | (@state << NIBBLE_3_SHIFT);
return;
}
diff --git a/world/map/npc/024-1/tinris.txt b/world/map/npc/024-1/tinris.txt
index 34352a74..c1d969fd 100644
--- a/world/map/npc/024-1/tinris.txt
+++ b/world/map/npc/024-1/tinris.txt
@@ -19,7 +19,7 @@
024-1.gat,82,64,0|script|Tinris|160,
{
- set @state, ((QUEST_NorthTulimshar & $@magicfieldNT_MASK) >> $@magicfieldNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
set @cake_exp, 50;
set @sweater_exp, 400;
@@ -214,6 +214,6 @@ L_Close:
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@magicfieldNT_MASK)) | (@state << $@magicfieldNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_3_MASK)) | (@state << NIBBLE_3_SHIFT);
return;
}
diff --git a/world/map/npc/042-1/hasan.txt b/world/map/npc/042-1/hasan.txt
index 722c8f62..39e549cd 100644
--- a/world/map/npc/042-1/hasan.txt
+++ b/world/map/npc/042-1/hasan.txt
@@ -8,31 +8,41 @@
042-1.gat,104,49,0|script|Scared Man|160,
{
- if ((@hasan_complete) && ((@tutorial == 12) || (@tutorial == 14)))
+ setarray @npc_loc, 104, 49, 4;
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_End;
+ if (@tutorial >= 13)
goto L_TutDone;
message strcharinfo(0), "He looks too afraid to say anything.";
- end;
+ goto L_End;
L_TutDone:
message strcharinfo(0), "Thanks. Kaan's been much nicer to me now";
+ goto L_End;
+
+L_End:
end;
}
042-1.gat,102,49,0|script|Hasan|189,2,2,
{
+ setarray @npc_loc, 102, 49, 4;
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_Close;
goto L_Main;
L_Main:
callfunc "TutorialState";
if ((getcharid(3) == $@ScorpionFighter) || ($@ScorpionFighter && $@ScorpionFighter != getcharid(3)))
goto L_Afraid;
- if ((@hasan_complete) && ((@tutorial == 12) || (@tutorial == 14)))
+ if (@tutorial == 14)
goto L_TutDone;
- // implicitly, $@ScorpionFighter is nonzero
- if ((@hasan_complete) && (@tutorial == 13))
+ if (@tutorial == 13)
goto L_Thank;
- if (@tutorial == 12)
+ if (@tutorial == 12)
goto L_Trick;
- if ((@tutorial == 10) || (@tutorial == 11))
+ if ((@tutorial == 9) || (@tutorial == 10) || (@tutorial == 11))
goto L_FightAgain;
mes "You over hear some people nearby.";
@@ -58,7 +68,7 @@ L_Main:
next;
mes "Sounds like this person is in trouble.\"";
next;
- set @tutorial_tmp, 10;
+ set @tutorial_tmp, 9;
callfunc "SetTutorialMask";
mes "[Unfriendly Guy]";
mes "\"What are you looking at?\"";
@@ -93,7 +103,8 @@ L_Trick:
L_ScratchHead:
if ($@ScorpionFighter)
goto L_Wait;
- set TUTORIAL, TUTORIAL | $@HasanCompleteBit;
+ set @tutorial_tmp, 14;
+ callfunc "SetTutorialMask";
set $@ScorpionTimer, 0;
set $@ScorpionFighter, getcharid(3);
set $@ScorpDeath, PC_DIE_COUNTER;
@@ -157,7 +168,7 @@ L_Close:
close;
OnTouch:
- if ((@hasan_complete) && ((@tutorial == 12) || (@tutorial == 14)))
+ if (@tutorial >= 13)
end;
goto L_Main;
}
diff --git a/world/map/npc/042-1/kaan.txt b/world/map/npc/042-1/kaan.txt
index 0d71cee3..1444cd67 100644
--- a/world/map/npc/042-1/kaan.txt
+++ b/world/map/npc/042-1/kaan.txt
@@ -3,16 +3,22 @@
042-1.gat,109,87,0|script|Kaan|160,
{
+ setarray @npc_loc, 109, 87, 4;
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_Close;
+
callfunc "TutorialState";
- if ((@hasan_complete) && (@tutorial == 13)) goto L_Hasan_Saved;
- if (@hasan_complete) goto L_TutDone;
+ if (!(@kaan_talked)) goto L_Tanisha;
+ if (@tutorial >= 13) goto L_TutDone;
if (@tutorial == 12) goto L_Plan;
- if ((@tutorial == 11) && ((@sorfina_hasan) || (@tanisha_hasan))) goto L_TrickKnown;
- if (@tutorial == 11) goto L_Trick;
- if (@tutorial == 10) goto L_Hasan;
- if (@tutorial == 9) goto L_Out;
- if (@tutorial == 8) goto L_Tanisha;
+ if (@tutorial == 11) goto L_TrickKnown;
+ if (@tutorial == 10) goto L_Trick;
+ if (@tutorial == 9) goto L_Hasan;
+ goto L_Out;
+L_Tanisha:
+ set STARTAREA, STARTAREA | $@SpokeToKaan;
mes "[Young Man]";
mes "\"You're the person Tanisha brought here, right?";
mes "My name is Kaan, I'm her brother.\"";
@@ -23,17 +29,12 @@
mes "[Kaan]";
mes "\"She hates maggots.\"";
next;
- mes "\"Maybe you should go and see her...she was really upset about what happened to you.\"";
- goto L_Close;
-
-L_Tanisha:
- mes "[Kaan]";
mes "\"Did you already talk to Tanisha?\"";
menu
- "Yes, I helped her with the maggots.",L_Tanisha3,
- "Yeah, and she's done with the maggots.",L_Tanisha3;
+ "Yes, I helped her with the maggots.",L_Tanisha1,
+ "Yeah, and she's done with the maggots.",L_Tanisha1;
-L_Tanisha3:
+L_Tanisha1:
mes "[Kaan]";
mes "\"Ah, that is good news.";
mes "You know, we have a lot of problems with bugs here.\"";
@@ -58,17 +59,7 @@ L_Next:
mes "\"Are you going to visit Tulimshar?";
mes "The bazaar there is a wondeful place! Traders, entertainers, adventurers - it's very exciting.\"";
next;
- mes "\"Ah, I forgot. Without some money the bazaar is less fun I suppose.";
- mes "Here, take this.\"";
- set Zeny, Zeny + 15;
- next;
mes "\"And Ian the trainer is hanging around there often. You should talk to him, he's a smart guy.\"";
- set @tutorial_tmp, 9;
- callfunc "SetTutorialMask";
- if (hasan)
- menu
- "A guy named Hasan is bullying someone.",L_Hasan,
- "Thanks for the advice.",L_Close;
goto L_Out;
L_Out:
@@ -92,7 +83,7 @@ L_Next1:
mes "He might listen to one of the adult men, but they're all off to work in Tulimshar during the day.\"";
next;
mes "\"We should think about some kind of trick. Ah, if only I knew his weak point.\"";
- set @tutorial_tmp, 11;
+ set @tutorial_tmp, 10;
callfunc "SetTutorialMask";
next;
goto L_Trick;
@@ -142,14 +133,6 @@ L_Plan:
"Yes please.",L_Explain,
"No, everything's alright.",L_Close;
-L_Hasan_Saved:
- mes "[Kaan]";
- mes "\"You did not to fight the scorpion.";
- mes "But maybe Hasan is more thankful now?\"";
- next;
- mes "\"Why don't you talk to him again and see what he says.\"";
- goto L_Close;
-
L_TutDone:
mes "[Kaan]";
mes "\"Hi there. I hope you enjoy your time in Tulimshar.";
diff --git a/world/map/npc/042-1/liana.txt b/world/map/npc/042-1/liana.txt
index 6eb9972b..f1e5a4f9 100644
--- a/world/map/npc/042-1/liana.txt
+++ b/world/map/npc/042-1/liana.txt
@@ -2,11 +2,23 @@
042-1.gat,82,96,0|script|Liana|205,
{
- set @npcname$, "Liana";
+ setarray @npc_loc, 82, 96, 4;
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_End;
+ goto L_Talk;
- mes "[" + @npcname$ + "]";
+L_Talk:
+ mes "[Liana]";
mes "\"Tulimshar is a large city. I'm sure glad I live in the suburbs because I know where everything's at.\"";
next;
mes "\"I think Tanisha is in the building to the right. That girl is growing up fast.\"";
+ goto L_Close;
+
+L_End:
+ mes "You'll have to move closer";
+ goto L_Close;
+
+L_Close:
close;
}
diff --git a/world/map/npc/042-1/tutorial.txt b/world/map/npc/042-1/tutorial.txt
index 3129faaa..d51c30be 100644
--- a/world/map/npc/042-1/tutorial.txt
+++ b/world/map/npc/042-1/tutorial.txt
@@ -1,10 +1,67 @@
// This file is part of the Tutorial
// Author: Jenalya
-// if you enter the tutorial area, it is set to be already done
+// if you enter the tutorial area from outside, it is set to be already done
+-|script|#TutorialConfig|-1,
+{
+ end;
+OnInit:
+ set $@ScorpionFighter, 0;
+ set $@ScorpionTimer, 0;
+ set $@ScorpDeath, 0;
+ set $@SpokeToKaan, (1 << 31);
+ end;
+}
+function|script|TutorialState|,
+{
+ callfunc "ClearVariables";
+ set @tutorial, ((STARTAREA & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
+ set @kaan_talked, (STARTAREA & $@SpokeToKaan);
+ return;
+}
+function|script|SetTutorialMask|,
+{
+ set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
+ set @tutorial_tmp, 0;
+ return;
+}
+042-2.gat,21,26,0|script|TutDebug|154,
+{
+ mes "[TutDebug]";
+ mes "Reset?";
+ menu
+ "Yes.",L_Reset,
+ "No.",L_End;
+
+L_Reset:
+ set TUT_var, 0;
+ set @tutorial_tmp, 0;
+ set STARTAREA, (STARTAREA & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
+ set STARTAREA, STARTAREA &~ $@SpokeToKaan;
+ mes "Reset!";
+ goto L_End;
+
+L_End:
+ end;
+
+OnInit:
+ if(!debug)
+ disablenpc "TutDebug";
+ end;
+}
042-1.gat,63,47,0|script|#tutorialoutside|45,0,0
{
- callfunc "TutorialCompleted";
+ callfunc "TutorialState";
+ if (@tutorial >= 8)
+ goto L_Warp;
+ goto L_ResetTutorial;
+
+L_ResetTutorial:
+ set @tutorial_tmp, 8;
+ callfunc "SetTutorialMask";
+ goto L_Warp;
+
+L_Warp:
warp "042-2.gat", 114, 92;
end;
}
diff --git a/world/map/npc/042-1/valon.txt b/world/map/npc/042-1/valon.txt
index a844f861..f4296af9 100644
--- a/world/map/npc/042-1/valon.txt
+++ b/world/map/npc/042-1/valon.txt
@@ -5,8 +5,6 @@
end;
OnInit:
- set $@ValonStartBit, (1 << 6);
- set $@ValonEndBit, (1 << 7);
setarray $@ValonMob, 1002,1050,1046,1003;
setarray $@ValonMobName$, "Maggots","House Maggots","Tame Scorpions","Scorpion";
setarray $@ValonMobCnt, 10,5,3,1;
@@ -14,32 +12,30 @@ OnInit:
}
function|script|ValonState|,
{
- set @valon_mob, ((TUTORIAL & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
- set @valon_count, ((TUTORIAL & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
- set @valon_start, (TUTORIAL & $@ValonStartBit);
- set @valon_end, (TUTORIAL & $@ValonEndBit);
+ set @valon_state, ((STARTAREA & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
+ set @valon_mob, 0;
+ if (@valon_state >= 2)
+ set @valon_mob, (@valon_state - 2);
+ set @valon_count, ((STARTAREA & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
return;
}
-function|script|AddValonMobMask|,
+function|script|setValonMask|,
{
- set @valon_tmp, (@valon_mob + 1);
- if (@valon_tmp > 15)
- set @valon_tmp, 15;
- set TUTORIAL, (TUTORIAL & ~(NIBBLE_2_MASK) | (@valon_tmp << NIBBLE_2_SHIFT));
+ set STARTAREA, (STARTAREA & ~(NIBBLE_1_MASK) | (@valon_tmp << NIBBLE_1_SHIFT));
set @valon_tmp, 0;
return;
}
function|script|ResetValonCntMask|,
{
- set TUTORIAL, (TUTORIAL & ~(NIBBLE_3_MASK) | (0 << NIBBLE_3_SHIFT));
+ set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT));
return;
}
function|script|AddValonCntMask|,
{
set @valon_tmp, (@valon_count + 1);
- if (@valon_tmp > 15)
- set @valon_tmp, 15;
- set TUTORIAL, (TUTORIAL & ~(NIBBLE_3_MASK) | (@valon_tmp << NIBBLE_3_SHIFT));
+ if (@valon_tmp > $@ValonMobCnt[@valon_mob])
+ set @valon_tmp, $@ValonMobCnt[@valon_mob];
+ set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (@valon_tmp << NIBBLE_2_SHIFT));
set @valon_tmp, 0;
callfunc "ValonProgress";
return;
@@ -47,7 +43,7 @@ function|script|AddValonCntMask|,
function|script|ValonProgress|,
{
callfunc "ValonState";
- if ((@valon_start) && (!(@valon_end)))
+ if ((@valon_state > 1) && (@valon_state < 6))
message strcharinfo(0), $@ValonMobName$[@valon_mob] + ": " + @valon_count + "/" + $@ValonMobCnt[@valon_mob];
return;
}
@@ -60,10 +56,8 @@ function|script|ValonProgress|,
"No.", L_End;
L_Reset:
- set TUTORIAL, (TUTORIAL & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT));
- set TUTORIAL, (TUTORIAL & ~(NIBBLE_3_MASK) | (0 << NIBBLE_3_SHIFT));
- set TUTORIAL, TUTORIAL &~ $@ValonStartBit;
- set TUTORIAL, TUTORIAL &~ $@ValonEndBit;
+ set STARTAREA, (STARTAREA & ~(NIBBLE_1_MASK) | (0 << NIBBLE_1_SHIFT));
+ set STARTAREA, (STARTAREA & ~(NIBBLE_2_MASK) | (0 << NIBBLE_2_SHIFT));
mes "Reset!";
goto L_End;
@@ -77,14 +71,18 @@ OnInit:
}
042-1.gat,48,111,0|script|Valon|156,
{
+ setarray @npc_loc, 48, 111, 4;
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_Close;
callfunc "ValonState";
- if (@valon_end)
+ if (@valon_state >= 6)
goto L_QuestComplete;
- if (!(@valon_start) && (@valon_count))
+ if (@valon_start == 1)
goto L_QuestAskAgain;
- if (((@valon_start) && (!(@valon_end))) && (@valon_count >= $@ValonMobCnt[@valon_mob]))
+ if (@valon_count >= $@ValonMobCnt[@valon_mob])
goto L_NextMob;
- if ((@valon_start) && (!(@valon_end)))
+ if ((@valon_state >= 2) && (@valon_state < 6))
goto L_QuestStarted;
goto L_QuestAsk;
@@ -93,7 +91,7 @@ L_QuestAskAgain:
mes "\"Hello, Adventurer! Have you come back to help?\"";
menu
"Yes. I will help with the desert beasts.", L_Accept,
- "Maybe some other time.", L_NoThanks;
+ "Maybe some other time.", L_Close;
L_QuestAsk:
mes "[Valon]";
@@ -109,17 +107,17 @@ L_QuestAsk:
mes "\"Maybe you would like help and earn your stripes?\"";
next;
mes "\"The Council of Wizard's does offer a reward for helping...\"";
+ set @valon_tmp, 1;
+ callfunc "setValonMask";
+ callfunc "ResetValonCntMask";
menu
"YES!!! let me at them!", L_Accept,
- "Maybe some other time.", L_NoThanks;
-
-L_NoThanks:
- callfunc "AddValonCntMask";
- goto L_Close;
+ "Maybe some other time.", L_Close;
L_Accept:
- callfunc "ResetValonCntMask";
- set TUTORIAL, TUTORIAL | $@ValonStartBit;
+ set @valon_tmp, 2;
+ callfunc "setValonMask";
+ callfunc "ValonState";
goto L_NewMob;
L_NextMob:
@@ -128,10 +126,11 @@ L_NextMob:
next;
mes "\"The Wizard's thank thee as well.\"";
set Zeny, Zeny + 25;
- next;
+ set @valon_tmp, (@valon_state + 1);
+ callfunc "setValonMask";
callfunc "ResetValonCntMask";
- callfunc "AddValonMobMask";
callfunc "ValonState";
+ next;
if (@valon_mob == getarraysize($@ValonMob))
goto L_QuestOver;
goto L_NewMob;
@@ -155,7 +154,8 @@ L_QuestOver:
mes "[Valon]";
mes "\"Thanks once again for helping with the monsters in the desert.\"";
getexp 50, 0;
- set TUTORIAL, TUTORIAL | $@ValonEndBit;
+ set @valon_tmp, (@valon_state + 1);
+ callfunc "setValonMask";
goto L_Close;
L_QuestComplete:
diff --git a/world/map/npc/042-1/zegas.txt b/world/map/npc/042-1/zegas.txt
index d3dc118c..36443a91 100644
--- a/world/map/npc/042-1/zegas.txt
+++ b/world/map/npc/042-1/zegas.txt
@@ -32,7 +32,8 @@ L_Meet:
mes "\"Wouldn't you know it, the bug bomb Eomie gave us is in one of the store room barrels.\"";
next;
mes "\"Can you search the barrels for the bug bomb and set it off when you find it?\"";
- set TUTORIAL, TUTORIAL | $@ZegasMetBit;
+ set @barrel_tmp, 1;
+ callfunc "SetBarrelMask";
menu
"Sure.",L_Start,
"Maybe some other time.",L_Close;
@@ -48,7 +49,8 @@ L_Find:
L_Start:
mes "[Zegas]";
- set TUTORIAL, TUTORIAL | $@BarrelStartBit;
+ set @barrel_tmp, 2;
+ callfunc "SetBarrelMask";
mes "\"Thanks, come back and see me once you found the bug bomb and set it off.\"";
goto L_Close;
@@ -60,11 +62,12 @@ L_Looking:
L_QuestEnd:
mes "[Zegas]";
mes "\"From the smell I can see you found the bug bomb!\"";
- getexp 50, 0;
- next;
mes "\"Thanks once again, I know it's not much but here is 50 GP for your troubles.\"";
+ getexp 50, 0;
set Zeny, (Zeny + 50);
- set TUTORIAL, TUTORIAL | $@BarrelEndBit;
+ set @barrel_tmp, 4;
+ callfunc "SetBarrelMask";
+ next;
goto L_Close;
L_Thanks:
@@ -84,15 +87,15 @@ L_Close:
"No.", L_End;
L_Reset:
- set TUTORIAL, TUTORIAL &~ $@BarrelStartBit;
- set TUTORIAL, TUTORIAL &~ $@BarrelEndBit;
- set TUTORIAL, TUTORIAL &~ (1 << 17);
- set TUTORIAL, TUTORIAL &~ (1 << 18);
- set TUTORIAL, TUTORIAL &~ (1 << 19);
- set TUTORIAL, TUTORIAL &~ (1 << 20);
- set TUTORIAL, TUTORIAL &~ (1 << 21);
- set TUTORIAL, TUTORIAL &~ (1 << 22);
- set TUTORIAL, TUTORIAL &~ (1 << 30);
+ set STARTAREA, (STARTAREA & ~(NIBBLE_4_MASK) | (0 << NIBBLE_4_SHIFT));
+ set STARTAREA, STARTAREA &~ (1 << 20);
+ set STARTAREA, STARTAREA &~ (1 << 21);
+ set STARTAREA, STARTAREA &~ (1 << 22);
+ set STARTAREA, STARTAREA &~ (1 << 23);
+ set STARTAREA, STARTAREA &~ (1 << 24);
+ set STARTAREA, STARTAREA &~ (1 << 25);
+ set STARTAREA, STARTAREA &~ (1 << 26);
+ set STARTAREA, STARTAREA &~ (1 << 27);
mes "Reset!";
goto L_End;
diff --git a/world/map/npc/042-2/barrels.txt b/world/map/npc/042-2/barrels.txt
index 43d4444e..540027ac 100644
--- a/world/map/npc/042-2/barrels.txt
+++ b/world/map/npc/042-2/barrels.txt
@@ -1,6 +1,5 @@
// Barrels
// Author: Wushin
-// Barrels
042-2.gat,23,86,0|script|Barrel#0|400,
{
setarray @npc_loc, 23, 86, 2;
@@ -46,3 +45,17 @@ OnMaggotDeath:
callfunc "CheckBarrel";
end;
}
+042-2.gat,29,92,0|script|Barrel#6|400,
+{
+ setarray @npc_loc, 29, 92, 2;
+ set @barrel, 6;
+ callfunc "CheckBarrel";
+ end;
+}
+042-2.gat,24,91,0|script|Barrel#7|400,
+{
+ setarray @npc_loc, 24, 91, 2;
+ set @barrel, 7;
+ callfunc "CheckBarrel";
+ end;
+}
diff --git a/world/map/npc/042-2/barrels_config.txt b/world/map/npc/042-2/barrels_config.txt
index 85c78e41..0b45af21 100644
--- a/world/map/npc/042-2/barrels_config.txt
+++ b/world/map/npc/042-2/barrels_config.txt
@@ -6,40 +6,34 @@
end;
OnInit:
- set $@BarrelStartBit, (1 << 16);
- set $@BarrelEndBit, (1 << 23);
- set $@ZegasMetBit, (1 << 30);
- setarray $@BarrelBits, (1 << 17), (1 << 18), (1 << 19), (1 << 20), (1 << 21), (1 << 22);
+ setarray $@BarrelBits, (1 << 20), (1 << 21), (1 << 22), (1 << 23), (1 << 24), (1 << 25), (1 << 26), (1 << 27);
setarray $@BarrelRewards, 533, 507, 505, 518, 537, 526;
set $@BarrelSpawnCnt, 1;
set $@BarrelSpawnId, 1050;
set $@BarrelSpawnName$, "House Maggot";
set $@BarrelMax, getarraysize($@BarrelBits);
end;
-
+}
+function|script|SetBarrelMask|,
+{
+ set STARTAREA, (STARTAREA & ~(NIBBLE_4_MASK) | (@barrel_tmp << NIBBLE_4_SHIFT));
+ set @barrel_tmp, 0;
+ return;
}
function|script|CheckBarrelQuest|,
{
callfunc "CountBarrels";
- set @barrel_quest, 0;
- if (TUTORIAL & $@ZegasMetBit)
- set @barrel_quest, 1;
- if (TUTORIAL & $@BarrelStartBit)
- set @barrel_quest, 2;
- if (!(TUTORIAL & $@BarrelStartBit) && (@barrel_count))
- set @barrel_quest, 3;
- if (TUTORIAL & $@BarrelEndBit)
- set @barrel_quest, 4;
+ set @barrel_quest, ((STARTAREA & NIBBLE_4_MASK) >> NIBBLE_4_SHIFT);
return;
}
function|script|CountBarrels|,
{
set @barrel_count, 0;
- set @barrel_tmp, 0;
+ set @count_tmp, 0;
goto L_Loop;
L_Loop:
- if (TUTORIAL & $@BarrelBits[@barrel_tmp])
+ if (STARTAREA & $@BarrelBits[@barrel_tmp])
goto L_AddOne;
goto L_LoopAgain;
@@ -48,8 +42,8 @@ L_AddOne:
goto L_LoopAgain;
L_LoopAgain:
- set @barrel_tmp, (@barrel_tmp + 1);
- if (@barrel_tmp == getarraysize($@BarrelBits))
+ set @count_tmp, (@count_tmp + 1);
+ if (@count_tmp == getarraysize($@BarrelBits))
goto L_BarrelTally;
goto L_Loop;
@@ -62,11 +56,11 @@ function|script|CheckBarrel|,
if (@npc_check)
goto L_Range;
callfunc "CheckBarrelQuest";
- if (!(@barrel_quest))
+ if (!(@barrel_quest == 2))
goto L_NoI;
- if (TUTORIAL & $@BarrelBits[@barrel])
+ if (STARTAREA & $@BarrelBits[@barrel])
goto L_Empty;
- set TUTORIAL, TUTORIAL | $@BarrelBits[@barrel];
+ set STARTAREA, STARTAREA | $@BarrelBits[@barrel];
callfunc "CountBarrels";
if (@barrel_count == $@BarrelMax)
@@ -92,7 +86,8 @@ L_Empty:
L_QuestReward:
message strcharinfo(0), "You found the bug bomb.";
misceffect 33;
- set TUTORIAL, TUTORIAL &~ $@BarrelStartBit;
+ set @barrel_tmp, 3;
+ callfunc "SetBarrelMask";
killmonster getmap() + ".gat", "Barrel#0::OnMaggotDeath";
goto L_Return;
diff --git a/world/map/npc/042-2/morgan.txt b/world/map/npc/042-2/morgan.txt
index 3ea1a2e8..20cc34c1 100644
--- a/world/map/npc/042-2/morgan.txt
+++ b/world/map/npc/042-2/morgan.txt
@@ -6,12 +6,12 @@
function|script|MorganState|,
{
callfunc "ClearVariables";
- set @morgan, ((TUTORIAL & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT);
+ set @morgan, ((STARTAREA & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
return;
}
function|script|SetMorganMask|,
{
- set TUTORIAL, (TUTORIAL & ~(NIBBLE_6_MASK) | (@morgan_tmp << NIBBLE_6_SHIFT));
+ set STARTAREA, (STARTAREA & ~(NIBBLE_3_MASK) | (@morgan_tmp << NIBBLE_3_SHIFT));
set @morgan_tmp, 0;
return;
}
@@ -23,7 +23,7 @@ function|script|SetMorganMask|,
"Yes.", L_Reset,
"No.", L_End;
L_Reset:
- set TUTORIAL, (TUTORIAL & ~(NIBBLE_6_MASK) | (0 << NIBBLE_6_SHIFT));
+ set STARTAREA, (STARTAREA & ~(NIBBLE_3_MASK) | (0 << NIBBLE_3_SHIFT));
mes "Reset!";
goto L_End;
@@ -37,6 +37,10 @@ OnInit:
}
042-2,101,57,0|script|Morgan|355,
{
+ setarray @npc_loc, 101, 57, 4;
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_Close;
callfunc "MorganState";
if (readparam(bInt) >= 5)
goto L_Learn;
diff --git a/world/map/npc/042-2/sorfina.txt b/world/map/npc/042-2/sorfina.txt
index 2bad44d5..22216327 100644
--- a/world/map/npc/042-2/sorfina.txt
+++ b/world/map/npc/042-2/sorfina.txt
@@ -1,34 +1,12 @@
// This file is part of the Tutorial
// Author: Jenalya
-042-2.gat,21,26,0|script|TutDebug|154,
-{
- mes "[TutDebug]";
- mes "Reset?";
- menu
- "Yes.",L_Reset,
- "No.",L_End;
-
-L_Reset:
- set TUT_var, 0;
- set @tutorial_tmp, 0;
- set TUTORIAL, (TUTORIAL & ~(NIBBLE_0_MASK) | (@tutorial_tmp << NIBBLE_0_SHIFT));
- set TUTORIAL, TUTORIAL &~ $@SorfinaHasanBit;
- set TUTORIAL, TUTORIAL &~ $@TanishaHasanBit;
- set TUTORIAL, TUTORIAL &~ $@HasanCompleteBit;
- set FLAGS, FLAGS &~ FLAG_TUTORIAL_DONE;
- mes "Reset!";
- goto L_End;
-
-L_End:
- end;
-
-OnInit:
- if(!debug)
- disablenpc "TutDebug";
- end;
-}
042-2.gat,28,26,0|script|Sorfina|154,1,4
{
+ setarray @npc_loc, 28, 26, 4;
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_Close;
+
callfunc "TutorialState";
if ((Hp != MaxHp) && (@tutorial >= 4))
@@ -43,8 +21,7 @@ L_Heal:
goto L_Main;
L_Main:
- if ((@tutorial == 11) && !(@sorfina_hasan)) goto L_Hasan;
- if (FLAGS & FLAG_TUTORIAL_DONE) goto L_Again;
+ if (@tutorial == 10) goto L_Hasan;
if (@tutorial >= 4) goto L_Again;
if (@tutorial == 3) goto L_Clothes;
if (@tutorial == 2) goto L_Chest;
@@ -262,7 +239,8 @@ L_Next:
next;
mes "\"However, the scorpions poison caused a bad fever and once Hasan had recovered from that, he was even more malicious than before.\"";
mes "She sighs.";
- set TUTORIAL, TUTORIAL | $@SorfinaHasanBit;
+ set @tutorial_tmp, 11;
+ callfunc "SetTutorialMask";
goto L_Close;
L_SkipTut:
@@ -275,7 +253,6 @@ L_SkipTut:
L_Bye:
mes "[Sorfina]";
mes "\"Alright, if you say so. But take at least this.";
- callfunc "TutorialCompleted";
getitem "Knife", 1;
getitem "SlingShot", 1;
getitem "SlingBullet", 100;
@@ -283,6 +260,8 @@ L_Bye:
getitem "CottonShirt", 1;
getitem "RaggedShorts", 1;
set Zeny, Zeny + 50;
+ set @tutorial_tmp, 8;
+ callfunc "SetTutorialMask";
mes "Good luck.\"";
goto L_Close;
@@ -356,7 +335,7 @@ L_Empty:
OnTouch:
callfunc "TutorialState";
- if ((@tutorial < 4) && !(FLAGS & FLAG_TUTORIAL_DONE))
+ if (@tutorial < 4)
goto L_Block;
warp "042-1.gat", 51, 44;
end;
diff --git a/world/map/npc/042-2/stat_reset.txt b/world/map/npc/042-2/stat_reset.txt
index c033fcb2..a6b61378 100644
--- a/world/map/npc/042-2/stat_reset.txt
+++ b/world/map/npc/042-2/stat_reset.txt
@@ -2,6 +2,10 @@
042-2.gat,98,91,0|script|Jessie|159,
{
+ setarray @npc_loc, 98, 91, 4;
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_Close;
if (BaseLevel >= 10)
goto L_Sorry;
diff --git a/world/map/npc/042-2/tanisha.txt b/world/map/npc/042-2/tanisha.txt
index 77a02948..77e95ab7 100644
--- a/world/map/npc/042-2/tanisha.txt
+++ b/world/map/npc/042-2/tanisha.txt
@@ -4,13 +4,17 @@
042-2.gat,110,88,0|script|Tanisha|114,
{
+ setarray @npc_loc, 110, 88, 4;
+ callfunc "PCtoNPCRange";
+ if (@npc_check)
+ goto L_Close;
+
if (isin("042-2.gat", 98, 84, 106, 89))
goto L_Fighting;
-
callfunc "TutorialState";
- if ((@tutorial == 11) && !(@tanisha_hasan)) goto L_Hasan;
- if ((@tutorial >= 8) || (FLAGS & FLAG_TUTORIAL_DONE)) goto L_Tut_Done;
+ if (@tutorial == 10) goto L_Hasan;
+ if (@tutorial >= 8) goto L_Tut_Done;
if (@tutorial == 7) goto L_Stats;
if (@tutorial == 6) goto L_Fail;
if (@tutorial == 5) goto L_Maggots;
@@ -146,7 +150,6 @@ L_Money:
mes "You can have my pocket money. Here.\"";
set @tutorial_tmp, 8;
callfunc "SetTutorialMask";
- callfunc "TutorialCompleted";
set Zeny, Zeny + 5;
next;
goto L_Advice;
@@ -204,7 +207,8 @@ L_Next3:
mes "\"The only thing he's afraid of are scorpions.";
mes "I'm not sure why, some bad experience when he was a child.";
mes "That was before I was born.\"";
- set TUTORIAL, TUTORIAL | $@TanishaHasanBit;
+ set @tutorial_tmp, 11;
+ callfunc "SetTutorialMask";
goto L_Close;
L_Tut_Done:
@@ -311,7 +315,6 @@ OnMaggotDeath:
end;
L_Close:
- set @menu, 0;
close;
OnInit:
@@ -325,18 +328,9 @@ OnInit:
OnTouch:
callfunc "TutorialState";
- if ((@tutorial >= 8) && !(FLAGS & FLAG_TUTORIAL_DONE))
- goto L_Complete;
- goto L_Check;
-
-L_Complete:
- callfunc "TutorialCompleted";
- goto L_Warp;
-
-L_Check:
- if (!(FLAGS & FLAG_TUTORIAL_DONE))
- goto L_Block;
- goto L_Warp;
+ if (@tutorial >= 8)
+ goto L_Warp;
+ goto L_Block;
L_Warp:
warp "042-1.gat", 63, 48;
diff --git a/world/map/npc/068-2/latoy.txt b/world/map/npc/068-2/latoy.txt
index b1dca208..9031979f 100644
--- a/world/map/npc/068-2/latoy.txt
+++ b/world/map/npc/068-2/latoy.txt
@@ -7,7 +7,7 @@
068-2.gat,92,83,0|script|Latoy|106,
{
set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@knowLatoyNT;
- set @kylian, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
+ set @kylian, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
mes "[Latoy]";
mes "\"Is there something I can help you with?\"";
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;