summaryrefslogtreecommitdiff
path: root/npc/021-4/doors.txt
blob: c97aec317f7252f72ee8302f48b6893710adecd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Cave logic

021-4,67,27,0	script	#Leave0214	NPC_NO_SPRITE,0,0,{
    if ($@CINDY_STATE % 2 == 1 && $@CINDY_STATE < 150000) goto L_Blocked;
    if ($@CINDY_STATE > 150000) goto L_Check;
L_Warp:
    warp "021-3", 24, 123;
    end;

L_Blocked:
    dispbottom l("You cannot leave this room until either ALL yetis are dead, or you are dead yourself.");
    end;

L_Check:
    .@pl = getmapusers("021-4");
    if (.@pl <= 1) { // Because we must include the one who triggered this script wasn't warped yet
        $@CINDY_HERO="";
        setnpcdisplay "Cindy#Outside", NPC_CINDY_CAGE;
    }
    goto L_Warp;
}