From 1623d7da9290f57bcd0dfe41f61a9581b5a78198 Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Wed, 9 Jan 2013 18:12:52 +0100 Subject: Katze quest: use bitmasking to be able to remove the variable LastHiss. Nibble 0: Progress of quest Nibble 1: what was saved previously in LastHiss Add LastHiss to clear_vars Since the value in LastHiss is only needed to get some hint from Alice, taking over the value from LastHiss to Nibble 1 of Katze isn't needed. --- world/map/npc/015-3/barrier.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'world/map/npc/015-3/barrier.txt') diff --git a/world/map/npc/015-3/barrier.txt b/world/map/npc/015-3/barrier.txt index d0603c6c..5919fc2d 100644 --- a/world/map/npc/015-3/barrier.txt +++ b/world/map/npc/015-3/barrier.txt @@ -3,6 +3,7 @@ 015-3.gat,31,42,0|script|#CatCaveBarrier|45,1,1,{ + set @Hiss, ((Katze & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT); if (getequipid(equip_head) != 1217 && (getequipid(equip_head) > 0 || getequipid(equip_shield) > 0 @@ -16,15 +17,21 @@ || getequipid(equip_legs) > 0)) goto L_Not_Naked; - if (LastHiss != 2) + if (@Hiss != 2) mes "\"Hissss...\""; - set LastHiss, 2; + set @Hiss, 2; + callsub S_Update_Hiss; close; L_Not_Naked: warp "015-1.gat", 60, 32; - set LastHiss, 1; + set @Hiss, 1; + callsub S_Update_Hiss; mes "\"GRAAUWL! Hissss...\""; mes "Scared of what you hear, you flee back outside."; close; + +S_Update_Hiss: + set Katze, (Katze & ~(NIBBLE_1_MASK)) | (@Hiss << NIBBLE_1_SHIFT); + return; } -- cgit v1.2.3-70-g09d2