#region changepassword case 10561: //repack-co sooon { switch (npcrequest.optionid) { case 0: { dialog.text("hello. I'm the one that was choosen to set/change your account password .you can change you password for 14 letters nubmer or characters. Conquer ghost world v1 v1"); dialog.option("i want to change the password.", 2); dialog.option("forget it.", 255); dialog.send(); break; } #region change password case 2: { if (client.account.password != "") { dialog.text("please insert the old password you have now."); dialog.input("here:", 6, 14); dialog.option("forget it.", 255); } else { dialog.text("you don't have a password set."); dialog.option("alright.", 255); } dialog.send(); break; } case 6: { if (client.account.password != "") { if (npcrequest.input.length <= 14) { if (client.account.password == npcrequest.input) { dialog.text("please insert the new password again."); dialog.input("here:", 7, 14); dialog.option("forget it.", 255); } else { dialog.text("wrong password. Try again?"); dialog.input("here:", 6, 14); dialog.option("alright.", 255); } } else { dialog.text("invalid password, please try again."); dialog.input("here:", 6, 14); dialog.option("alright.", 255); } } else { dialog.text("you don't have a password set."); dialog.option("alright.", 255); } dialog.send(); break; } case 7: { if (client.account.password != "") { if (npcrequest.input.length <= 14) { client.temppassword = npcrequest.input; dialog.text("please insert the new password again."); dialog.input("here:", 8, 14); dialog.option("forget it.", 255); } else { dialog.text("invalid password, please try again."); dialog.input("here:", 7, 14); dialog.option("alright.", 255); } } else { dialog.text("you don't have a password set."); dialog.option("alright.", 255); } dialog.send(); break; } case 8: { if (client.account.password != "") { if (npcrequest.input.length <= 14) { if (client.temppassword == npcrequest.input) { client.temppassword = ""; client.account.password = npcrequest.input; client.account.save(); dialog.text("password changed!"); dialog.option("thank you.", 255); } else { dialog.text("wrong password."); dialog.input("here:", 8, 14); dialog.option("alright.", 255); } } else { dialog.text("invalid password, please try again."); dialog.input("here:", 8, 14); dialog.option("alright.", 255); } } else { dialog.text("you don't have a password set."); dialog.option("alright.", 255); } dialog.send(); break; } #endregion change password } break; }