summaryrefslogtreecommitdiff
path: root/world/map/npc/042-2
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/042-2
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/042-2')
-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
6 files changed, 65 insertions, 76 deletions
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;