Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: some cleanup and refactoring #4

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ if(stat(agility) < 18) {
return;
}
mes("You climb up the wall...");
mes("...and squeeze in through the window.");
xVye marked this conversation as resolved.
Show resolved Hide resolved
~agility_climb_up(310, 1_39_48_52_45);
mes("...and squeeze in through the window.");

[oploc1,loc_2798]
if(%itwatchtower_progress = ^itwatchtower_not_started) {
Expand All @@ -15,75 +15,39 @@ if(%itwatchtower_progress = ^itwatchtower_not_started) {
}

[oploc1,loc_2799]
if(%itwatchtower_progress = ^itwatchtower_not_started) {
say("I am not sure why I am searching this bush.");
} else if(%itwatchtower_progress = ^itwatchtower_started) {
if(inv_total(inv, fingernails) > 0) {
~chatplayer("<p,quiz>I have already searched this place.");
return;
}
inv_add(inv, fingernails, 1);
~chatplayer("<p,quiz>What's this? Disgusting! Some fingernails. They may be a clue though... I'd better take them.");
} else {
~chatplayer("<p,happy>I have already searched this place.");
}
@itwatchtower_search_bush(fingernails, "<p,quiz>What's this? Disgusting! Some fingernails. They may be a clue though... I'd better take them.");
xVye marked this conversation as resolved.
Show resolved Hide resolved

[oploc1,loc_2800]
if(%itwatchtower_progress = ^itwatchtower_not_started) {
~chatplayer("<p,happy>I am not sure why I am searching this bush.");
} if(%itwatchtower_progress = ^itwatchtower_started) {
if(inv_total(inv, damaged_dagger) > 0) {
~chatplayer("<p,quiz>I have already searched this place.");
return;
}
inv_add(inv, damaged_dagger, 1);
~chatplayer("<p,happy>Aha a dagger!|I wonder if this is evidence...");
} else {
~chatplayer("<p,happy>Hmmm, nothing here.");
}
@itwatchtower_search_bush(damaged_dagger, "<p,happy>Aha a dagger!|I wonder if this is evidence...");

[oploc1,loc_2801]
if(%itwatchtower_progress = ^itwatchtower_not_started) {
~chatplayer("<p,happy>I am not sure why I am searching this bush.");
} if(%itwatchtower_progress = ^itwatchtower_started) {
if(inv_total(inv, tattered_eye_patch) > 0) {
~chatplayer("<p,quiz>I have already searched this place.");
@itwatchtower_search_bush(tattered_eye_patch, "<p,happy>I've found an eye patch; I had better show this to the Watchtower Wizard.");

[oploc1,loc_2802]
@itwatchtower_search_bush(old_robe, "<p,happy>Aha! A robe.|This could be a clue...");

[oploc1,loc_2803]
@itwatchtower_search_bush(unusual_armour, "<p,happy>Here's some armour; it could be evidence...");

[label,itwatchtower_search_bush](namedobj $obj, string $str0) {
if(%itwatchtower_progress = ^itwatchtower_not_started) {
~chatplayer("<p,happy>I am not sure why I am searching this bush.");
return;
}
inv_add(inv, tattered_eye_patch, 1);
~chatplayer("<p,happy>I've found an eye patch; I had better show this to the Watchtower Wizard.");
} else {
~chatplayer("<p,happy>Hmmm, nothing here.");
}

[oploc1,loc_2802]
if(%itwatchtower_progress = ^itwatchtower_not_started) {
~chatplayer("<p,happy>I am not sure why I am searching this bush.");
} if(%itwatchtower_progress = ^itwatchtower_started) {
if(inv_total(inv, old_robe) > 0) {
~chatplayer("<p,quiz>I have already searched this place.");
if (%itwatchtower_progress > ^itwatchtower_started) {
~chatplayer("<p,happy>Hmmm, nothing here.");
return;
}
inv_add(inv, old_robe, 1);
~chatplayer("<p,happy>Aha! A robe.|This could be a clue...");
} else {
~chatplayer("<p,happy>Hmmm, nothing here.");
}

[oploc1,loc_2803]
if(%itwatchtower_progress = ^itwatchtower_not_started) {
say("I am not sure why I am searching this bush.");
} else if(%itwatchtower_progress = ^itwatchtower_started) {
if(inv_total(inv, unusual_armour) > 0) { // no bank check for any of them
if (inv_total(inv, $obj) > 0) {
~chatplayer("<p,quiz>I have already searched this place.");
return;
}
inv_add(inv, unusual_armour, 1);
~chatplayer("<p,happy>Here's some armour; it could be evidence...");
} else {
~chatplayer("<p,happy>Hmmm, nothing here.");
}

inv_add(inv, $obj, 1);
~chatplayer($str0);
}

[oploc1,loc_2833]
if(%itwatchtower_progress = ^itwatchtower_not_started) {
Expand All @@ -95,25 +59,28 @@ if(%itwatchtower_progress = ^itwatchtower_not_started) {
}

[oploc1,loc_2805]
mes("There's no way I can find my way through without a map of some kind.");
@no_map_message;
xVye marked this conversation as resolved.
Show resolved Hide resolved
p_teleport(0_39_47_27_62);

[oploc1,loc_2806]
mes("There's no way I can find my way through without a map of some kind.");
@no_map_message;
p_teleport(0_39_47_44_47);

[oploc1,loc_2807]
mes("There's no way I can find my way through without a map of some kind.");
@no_map_message;
p_teleport(0_39_47_57_47);

[oploc1,loc_2808]
mes("There's no way I can find my way through without a map of some kind.");
@no_map_message;
p_teleport(0_39_47_56_26);

[oploc1,loc_2809]
mes("There's no way I can find my way through without a map of some kind.");
@no_map_message;
p_teleport(0_40_47_3_16);

[label,no_map_message]
mes("There's no way I can find my way through without a map of some kind.");

[oploc1,loc_2810]
p_teleport(0_39_47_27_62);

Expand Down
Loading