@@ -84,7 +84,6 @@ if(%itwatchtower_progress = ^itwatchtower_not_started) {
8484 ~chatplayer("<p,happy>Hmmm, nothing here.");
8585}
8686
87-
8887[oploc1,loc_2833]
8988if(%itwatchtower_progress = ^itwatchtower_not_started) {
9089 ~chatnpc_specific(nc_name(tower_guard), tower_guard, "<p,angry>You can't go up there.|That's private that is.");
@@ -94,28 +93,95 @@ if(%itwatchtower_progress = ^itwatchtower_not_started) {
9493 @climb_ladder(movecoord(coord, 0, 1, 0), true);
9594}
9695
96+ // checks if the player has a map, lightsource, and tinderbox. possible outcomes are:
97+ // 0 = no map, not allowed to enter cave
98+ // 1 = good to enter cave
99+ // 2 = either no lightsource OR no tinderbox and player chose to come back later
100+ [proc,check_map_lightsource_tinderbox]()(int)
101+ if(inv_total(inv, skavid_map) > 0) {
102+ if(inv_totalcat(inv, light_source_lit) < 1) {
103+ ~mesbox("The cave is very dark, you cannot go in without a light source."); // complete guess
104+ return(2);
105+ } else if (inv_total(inv, tinderbox) < 1) {
106+ ~mesbox("If your light source goes out down there you'll be in trouble! Are|you sure you want to go in without a tinderbox?");
107+ def_int $option = ~p_choice2("I'll be fine without a tinderbox.", 1, "I'll come back with a tinderbox.", 2);
108+ if($option = 1) {
109+ return(1);
110+ } else {
111+ return(2);
112+ }
113+ }
114+ return(1);
115+ } else {
116+ mes("There's no way I can find my way through without a map of some kind.");
117+ return(0);
118+ }
119+
97120[oploc1,loc_2805]
98- mes("There's no way I can find my way through without a map of some kind.");
99- p_teleport(0_39_47_27_62);
121+ def_int $outcome = ~check_map_lightsource_tinderbox;
122+ switch_int($outcome) {
123+ case 0 : p_teleport(0_39_47_27_62);
124+ case 1 : p_teleport(0_39_147_2_10);
125+ case default : return;
126+ }
127+
128+ [oploc1,loc_2817]
129+ p_teleport(0_40_47_2_16);
100130
101131[oploc1,loc_2806]
102- mes("There's no way I can find my way through without a map of some kind.");
103- p_teleport(0_39_47_44_47);
132+ def_int $outcome = ~check_map_lightsource_tinderbox;
133+ switch_int($outcome) {
134+ case 0 : p_teleport(0_39_47_44_47);
135+ case 1 : p_teleport(0_39_147_36_61);
136+ case default : return;
137+ }
138+
139+ [oploc1,loc_2818]
140+ p_teleport(0_39_47_28_62);
104141
105142[oploc1,loc_2807]
106- mes("There's no way I can find my way through without a map of some kind.");
107- p_teleport(0_39_47_57_47);
143+ def_int $outcome = ~check_map_lightsource_tinderbox;
144+ switch_int($outcome) {
145+ case 0 : p_teleport(0_39_47_57_47);
146+ case 1 : p_teleport(0_39_147_22_47);
147+ case default : return;
148+ }
149+
150+ [oploc1,loc_2819]
151+ p_teleport(0_39_47_44_46);
108152
109153[oploc1,loc_2808]
110- mes("There's no way I can find my way through without a map of some kind.");
111- p_teleport(0_39_47_56_26);
154+ def_int $outcome = ~check_map_lightsource_tinderbox;
155+ switch_int($outcome) {
156+ case 0 : p_teleport(0_39_47_56_26);
157+ case 1 : p_teleport(0_39_147_2_43);
158+ case default : return;
159+ }
160+
161+ [oploc1,loc_2820]
162+ p_teleport(0_39_47_57_46);
112163
113164[oploc1,loc_2809]
114- mes("There's no way I can find my way through without a map of some kind.");
115- p_teleport(0_40_47_3_16);
165+ def_int $outcome = ~check_map_lightsource_tinderbox;
166+ switch_int($outcome) {
167+ case 0 : p_teleport(0_40_47_3_16);
168+ case 1 : p_teleport(0_39_147_8_33);
169+ case default : return;
170+ }
171+
172+ [oploc1,loc_2821]
173+ p_teleport(0_39_47_56_26);
116174
117175[oploc1,loc_2810]
118- p_teleport(0_39_47_27_62);
176+ def_int $outcome = ~check_map_lightsource_tinderbox;
177+ switch_int($outcome) {
178+ case 0 : p_teleport(0_39_47_27_62);
179+ case 1 : p_teleport(0_39_147_26_3);
180+ case default : return;
181+ }
182+
183+ [oploc1,loc_2822]
184+ p_teleport(0_39_47_33_5);
119185
120186[oploc1,loc_2790]
121187if(inv_total(inv, toban_key) > 0) {
0 commit comments