summaryrefslogtreecommitdiff
path: root/npc/027-1_Graveyard
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2011-01-27 23:13:19 +0100
committerJessica Tölke <jtoelke@mail.upb.de>2011-01-27 23:13:19 +0100
commitfca55b24d912c46929ea88b7851faf16869b3158 (patch)
treeb206da75ea4dbd7257297997849d971904e266a8 /npc/027-1_Graveyard
parent59b8add30ccc1efdddf9dee5888f3d6334800a32 (diff)
downloadserverdata-fca55b24d912c46929ea88b7851faf16869b3158.tar.gz
serverdata-fca55b24d912c46929ea88b7851faf16869b3158.tar.bz2
serverdata-fca55b24d912c46929ea88b7851faf16869b3158.tar.xz
serverdata-fca55b24d912c46929ea88b7851faf16869b3158.zip
using bitmasking in the crying child quest
Diffstat (limited to 'npc/027-1_Graveyard')
-rw-r--r--npc/027-1_Graveyard/_mobs.txt28
1 files changed, 24 insertions, 4 deletions
diff --git a/npc/027-1_Graveyard/_mobs.txt b/npc/027-1_Graveyard/_mobs.txt
index 118ce586..24d60cb2 100644
--- a/npc/027-1_Graveyard/_mobs.txt
+++ b/npc/027-1_Graveyard/_mobs.txt
@@ -78,26 +78,46 @@ On1047:
break;
_MOBCOUNT_ZOMBIES:
- if (QUEST_GYINN != 1) return;
+
+ set @Graveyard_Inn_MASK, NIBBLE_2_MASK;
+ set @Graveyard_Inn_SHIFT, NIBBLE_2_SHIFT;
+
+ set @state, ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT);
+
+ if (@state != 1) return;
// You have to kill 50?(or more?) zombies OR 50?(or more?) fallens. If you close the client, the @zombies count go back to zero.
set @zombies, @zombies + 1;
// This is in DEBUG mode. That is the reason for the message.
message strcharinfo(0), "I killed " +@zombies+ " zombies. Now I need to kill only " +(50-@zombies)+ ".";
if (@zombies < 50) return;
message strcharinfo(0), "You found a strange bracelet hidden in the zombie's rotten rags. Maybe this is what the Crying child was looking for...";
- set QUEST_GYINN, 2;
+ set @state, 2;
+ callsub S_Update_Mask;
return;
_MOBCOUNT_FALLENS:
- if (QUEST_GYINN != 1) return;
+
+ set @Graveyard_Inn_MASK, NIBBLE_2_MASK;
+ set @Graveyard_Inn_SHIFT, NIBBLE_2_SHIFT;
+
+ set @state, ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT);
+
+ if (@state != 1) return;
// You have to kill 50?(or more?) fallens OR 50?(or more?) zombies. If you close the client, the @fallens count go back to zero.
set @fallens, @fallens + 1;
// This is in DEBUG mode. That is the reason for the message.
message strcharinfo(0), "I killed " +@fallens+ " fallens. Now I need to kill only " +(50-@fallens)+ ".";
if (@fallens < 50) return;
message strcharinfo(0), "You found a strange bracelet inside the fallen's broken helmet. Maybe this is what the Crying child was looking for...";
- set QUEST_GYINN, 2;
+ set @state, 2;
+ callsub S_Update_Mask;
return;
+
+S_Update_Mask:
+ set QUEST_Graveyard_Inn,
+ (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK))
+ | (@state << @Graveyard_Inn_SHIFT);
+ return;
end;
}