summaryrefslogtreecommitdiff
path: root/npc/027-2_Caretakers_House/crying_child.txt
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-2_Caretakers_House/crying_child.txt
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-2_Caretakers_House/crying_child.txt')
-rw-r--r--npc/027-2_Caretakers_House/crying_child.txt45
1 files changed, 29 insertions, 16 deletions
diff --git a/npc/027-2_Caretakers_House/crying_child.txt b/npc/027-2_Caretakers_House/crying_child.txt
index a42be868..e7207064 100644
--- a/npc/027-2_Caretakers_House/crying_child.txt
+++ b/npc/027-2_Caretakers_House/crying_child.txt
@@ -1,6 +1,4 @@
027-2.gat,50,92,0 script Crying Child 314,{
- end;
-
// Crying Child subquest (Still need to change it to Bitmask)
// Variable states:
@@ -12,14 +10,19 @@
// 6 = The mother/wife told you what he thinks of the bracelet
// 7 = The kid decided that the bracelet has no value to their parents, so you can have it.
+ 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 (Sex == 0) set @madamsir$, "Madam";
if (Sex == 1) set @madamsir$, "Sir";
- if (QUEST_GYINN == 7) goto L_return5;
- if (QUEST_GYINN == 6) goto L_return4;
- if (QUEST_GYINN == 4 || QUEST_GYINN == 5) goto L_return3;
- if (QUEST_GYINN == 3) goto L_return2;
- if (QUEST_GYINN == 2) goto L_return1;
- if (QUEST_GYINN == 1) goto L_return;
+ if (@state == 7) goto L_return5;
+ if (@state == 6) goto L_return4;
+ if (@state == 4 || @state == 5) goto L_return3;
+ if (@state == 3) goto L_return2;
+ if (@state == 2) goto L_return1;
+ if (@state == 1) goto L_return;
if (BaseLevel >= 80) goto L_intro;
@@ -63,7 +66,8 @@ L_intro:
mes "[Aldred]";
mes "\"Thank you " +strcharinfo(0)+"! I hope you find it soon! It is not like it is worth a lot of money... It looks like a simple thing, but I really don't know what would be my dad's reaction when he finds out I lost something that belongs to him!\"";
- set QUEST_GYINN, 1;
+ set @state, 1;
+ callsub S_Update_Mask;
close;
L_return:
@@ -87,7 +91,8 @@ L_return1:
next;
mes "[Aldred]";
mes "\"Now I will put this thing in its right place... Thank you!\"";
- set QUEST_GYINN, 3;
+ set @state, 3;
+ callsub S_Update_Mask;
close;
@@ -105,7 +110,8 @@ L_return2:
"Sounds interesting... But who are your parents?",-,
"Bad idea, it will only bring more problems...",L_close;
next;
- set QUEST_GYINN, 4;
+ set @state, 4;
+ callsub S_Update_Mask;
mes "[Aldred]";
mes "\"Ok, great... But please, try to be discrete about it. I don't want my parents to know I was playing with their stuff. My Father owns this place. He is always carying a lantern... I guess he is still afraid of the dark. My mother is the Innkeeper. She is very beautiful and today is using a red dress.\"";
close;
@@ -133,7 +139,8 @@ L_return4:
getinventorylist;
if (@inventorylist_count == 100) goto L_full;
getitem "ScarabArmlet", 1;
- set QUEST_GYINN, 7;
+ set @state, 7;
+ callsub S_Update_Mask;
mes "\"I will tell my parents how good and helpfull you are... Maybe they can even offer you a discount in your expenses here at Reid's Inn...\"";
close;
@@ -150,6 +157,12 @@ L_full:
L_close:
close;
+
+S_Update_Mask:
+ set QUEST_Graveyard_Inn,
+ (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK))
+ | (@state << @Graveyard_Inn_SHIFT);
+ return;
}
@@ -157,7 +170,7 @@ L_close:
// Participation of the Wife/Mother in the crying child subquest. Merge later with the apropriate NPC
-// if (QUEST_GYINN == 5) goto L_asking_child;
+// if (@state == 5) goto L_asking_child;
// end;
//L_asking_child:
@@ -175,13 +188,13 @@ L_close:
// next;
// mes "[Innkeeper's Ghost]";
// mes "\"No, no. It is not that I don't like it. I just don't like the feelings it causes on me... It is... Complicated. Please, take this bracelet away. I don't want it... You can have it, or just give to someone else.\"";
-// set QUEST_GYINN, 6;
+// set @state, 6;
// close;
// Participation of the Husband/Father in the crying child subquest. Merge later with the apropriate NPC
-// if (QUEST_GYINN == 4) goto L_asking_child;
+// if (@state == 4) goto L_asking_child;
// end;
//L_asking_child:
@@ -203,6 +216,6 @@ L_close:
// mes "\"Anyway, you can easily find one of these in a lot of small shops in this town. I am pretty sure that whoever lost it won't bother coming all the way back to get it. \"";
// menu
// "Thank you sir, that is all I wanted to ask.",-;
-// set QUEST_GYINN, 5;
+// set @state, 5;
// close;