summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2025-08-12 19:31:14 -0300
committerJesusaves <cpntb1@ymail.com>2025-08-12 19:31:14 -0300
commita7159627a9c35fbfb0b5101168393748d633f055 (patch)
treebb0367aadc2081b3919e987474dd789164115d57
parent0d776c30181654cf830b49e82bc8b42df96425d5 (diff)
downloadserverdata-a7159627a9c35fbfb0b5101168393748d633f055.tar.gz
serverdata-a7159627a9c35fbfb0b5101168393748d633f055.tar.bz2
serverdata-a7159627a9c35fbfb0b5101168393748d633f055.tar.xz
serverdata-a7159627a9c35fbfb0b5101168393748d633f055.zip
Allow you to cancel class selection in the middle.
Doing so will revert selection and reimburse the money. Still no handling if you close the dialogue in the middle.
-rw-r--r--npc/003-0/fejda.txt28
1 files changed, 23 insertions, 5 deletions
diff --git a/npc/003-0/fejda.txt b/npc/003-0/fejda.txt
index 61ef1381e..a92e464fc 100644
--- a/npc/003-0/fejda.txt
+++ b/npc/003-0/fejda.txt
@@ -24,18 +24,25 @@
if (CLASS_CHANGE > gettimetick(2)) close;
next;
mesc l("Do you want to change your job class(es)?"), 1;
- if (askyesnosafe() == ASK_NO) {
- closeclientdialog;
- close;
- }
// Do you need to pay the fee?
if (CLASS_CHANGE) {
+ if (askyesnosafe() == ASK_NO) {
+ closeclientdialog;
+ close;
+ }
+ // Pay the fee
if (Zeny < .GpFee) {
mesc l("Not enough money."), 1;
close;
} else {
Zeny -= .GpFee;
}
+ } else {
+ // First class change, so no need for safe confirm
+ if (askyesno() == ASK_NO) {
+ closeclientdialog;
+ close;
+ }
}
// Reset class
@@ -66,8 +73,19 @@ O CLASS_CARRY: 2048 // Bonus on max weight
l("Tanker (def+/hp+)"), CLASS_TANKER,
l("Paladin (aspd+)"), CLASS_PALADIN,
l("Ninja (eva+)"), CLASS_NINJA,
- l("Carry (weight+)"), CLASS_CARRY;
+ l("Carry (weight+)"), CLASS_CARRY,
+ l("[Cancel]"), -1;
+ // Cancel selection, reverting class again and recovering money.
+ if (@menuret == -1) {
+ JobClass = 0;
+ if (CLASS_CHANGE) {
+ Zeny += .GpFee;
+ //CLASS_CHANGE += 86400;
+ }
+ closeclientdialog;
+ close;
+ }
// If you pick a class you already selected, it'll be unselected
// Otherwise, it'll be added