Browse Source

Fix loop issue on Ice Cream Maker NPC (#4127)

* Fixed infinity loop issue if user input any number except 0.
Tuan Anh Nguyen 6 năm trước cách đây
mục cha
commit
67e1583f9f
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      npc/merchants/icecream.txt

+ 3 - 1
npc/merchants/icecream.txt

@@ -36,7 +36,7 @@
 	mes "but we have a limited amount,";
 	mes "but we have a limited amount,";
 	mes "so you can only purchase 5 at a time!!";
 	mes "so you can only purchase 5 at a time!!";
 	next;
 	next;
-	while(1) {
+	while(true) {
 		input .@input;
 		input .@input;
 		if(.@input < 1) {
 		if(.@input < 1) {
 			mes "[Ice Cream Maker]";
 			mes "[Ice Cream Maker]";
@@ -55,7 +55,9 @@
 			mes "If you might haveto make a lot of trips";
 			mes "If you might haveto make a lot of trips";
 			mes "to the bathroom tonight.";
 			mes "to the bathroom tonight.";
 			next;
 			next;
+			continue;
 		}
 		}
+		break;
 	}
 	}
 	if(Zeny<.@input*100) {
 	if(Zeny<.@input*100) {
 		mes "[Ice Cream Maker]";
 		mes "[Ice Cream Maker]";