The while will continually loop, giving the player no chance to get the protection.
Use if instead, like so:
function room_c() {
// script for room: Walk off left screen edge
if (player.inv[3] != 1){
DisplaySpeech (1, "I can't go out there without protection.");
}
else {
NewRoom(5);
}
}
Use if instead, like so:
function room_c() {
// script for room: Walk off left screen edge
if (player.inv[3] != 1){
DisplaySpeech (1, "I can't go out there without protection.");
}
else {
NewRoom(5);
}
}