- 0
Sign in to follow this
Followers
0
Which should I use "break" / "continue" ? Snapping out of while and check var again
Asked by
Zirius
-
Recently Browsing 0 members
No registered users viewing this page.

Hello! I got this script:
prontera,155,180,4 script This eynt working#2 1_ETC_01,{ if (da_var < 3 ) { while (da_var < 3) { switch(da_var) { case 0: mes "you hit 0"; da_var = 1; next; break; case 1: mes "you hit 1"; da_var = 2; next; break; case 2: mes "you hit 2"; da_var = 3; mes "Do you want to proceed?"; next; break; case 3: mes "you hit 3"; da_var = 4; next; break; } } } else { mes "you hit rock bottom"; close; }}basically, what it does is: a player talks to it and sets the variable "da_var" window by window until it reach "da_var" = 4. What I wish is once it goes to "da_var =4", the NPC would say: "you hit rock bottom" without re-talking to it again. If you test the script, it would get stuck at "you hit 3" and will never go to "you hit rock bottom", unless you re-talk to it.Hope somebody can help.
Thanks!
Edited by ZiriusShare this post
Link to post
Share on other sites