// TMW2 Script // Author: // Jesusalva // Description: // Job Classes manager 003-0,29,42,0 script Fejda Reader NPC_SITTED_NINJA,{ // CurrentClasses() MaxClasses() TotalBaseLevel() CLASS_CHANGE and JobClass mesn; mesq l("Heya. I am Fejda Reader, in charge of proofreading the application forms."); // aka. Fedja Beader, but with a couple typos :3 next; if (TotalBaseLevel() < 100) { mesn; mesq l("Once you reach 100 total levels, you'll be eligible for a job class."); mesc l("* You still need to earn %d levels.", (100-TotalBaseLevel())); close; } mesn; mesq l("According to these forms, you have %d total levels and may have up to %d job class(es). Their effects increase as your total levels increases.", TotalBaseLevel(), MaxClasses()); next; mesn; mesq l("The first job class you select is free, and it is also free to change after every rebirth. Otherwise, you can only change every %d days for the small fee of %s GP.", .Dayem, fnum(.GpFee)); mesc l("Your current job class(es): %s", CurrentClasses()), 3; if (CLASS_CHANGE > gettimetick(2)) close; next; mesc l("Do you want to change your job class(es)?"), 1; // 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 JobClass = 0; do { mesc l("Which classes do you wish to pick?"), 3; /* O CLASS_WARRIOR: 1 // Bonus on melee damage X CLASS_RANGER: 2 // Bonus on ranged damage (or accuracy?) O CLASS_WIZARD: 4 // Bonus on magic damage CLASS_BLACKSMITH: 8 // Bonus on crafting / brewing / cooking O CLASS_HUNTER: 16 // Bonus on MobPt gain and discount on Grants CLASS_MERCHANT: 32 // Bonus on GP earning (+all mobs drop GP) O CLASS_TANKER: 64 // Bonus on defense/hp CLASS_RAGGER: 128 // Bonus on crit (berserker) O CLASS_PALADIN: 256 // Bonus on attack speed O CLASS_NINJA: 512 // Bonus on evasion CLASS_SAGE: 1024 // Bonus on potions/effects O CLASS_CARRY: 2048 // Bonus on max weight */ menuint l("Warrior (atk+)"), CLASS_WARRIOR, l("Wizard (matk+/mp+)"), CLASS_WIZARD, l("Hunter (mobpt+)"), CLASS_HUNTER, l("Tanker (def+/hp+)"), CLASS_TANKER, l("Paladin (aspd+)"), CLASS_PALADIN, l("Ninja (eva+)"), CLASS_NINJA, 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 JobClass = JobClass ^ @menuret; } while (bitmask_count(JobClass) < MaxClasses()); // Wrap up class change CLASS_CHANGE = gettimetick(2) + (.Dayem * 86400); mesc l("Success!"), 2; mesc l("Your current job class(es): %s", CurrentClasses()), 3; close; OnInit: .sex = G_MALE; .distance = 5; .GpFee = 1000000; .Dayem = 20; end; }