Advertisement
johnlol

Jobmaster 19

Aug 2nd, 2023
842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VeriLog 19.21 KB | Gaming | 0 0
  1. //===== rAthena Script =======================================
  2. //= Job Master
  3. //===== Description: =========================================
  4. //= A fully functional job changer.
  5. //===== Additional Comments: =================================
  6. //= 1.0 Initial script. [Euphy]
  7. //= 1.1 Fixed reset on Baby job change.
  8. //= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support.
  9. //= 1.3 Kagerou/Oboro added.
  10. //= 1.4 Rebellion added.
  11. //= 1.5 Added option to disable RebirthClass. [mazvi]
  12. //= 1.6 Added option to get job related equipment on change. [Braniff]
  13. //= 1.7 Readability changes. Also added BabyExpanded and BabySummoner classes. [Jey]
  14. //= 1.8 Added option to disable Baby Novice Only but Baby Class can be Enabled [mazvi]
  15. //= 1.9 Migrate/Integrate to Global Functions Platinum Skills. [mazvi]
  16. //============================================================
  17.  
  18. prontera,157,193,6  script  Job Master  123,{
  19. function Get_Job_Equip;
  20. // Checks if the Player has the required level.
  21. // closes if not, returns if yes
  22. function    Require_Level   {
  23.     if (BaseLevel < getarg(0) || JobLevel < getarg(1)) {
  24.         .@blvl = getarg(0) - BaseLevel;
  25.         .@jlvl = getarg(1) - JobLevel;
  26.         mes "Level requirement:";
  27.         mes ((getarg(0)>1)?
  28.             "^bb0000"+getarg(0)+"^000000 (^bb0000Base^000000) / ":"")+"^00bb00"+
  29.             getarg(1)+"^000000 (^00bb00Job^000000)";
  30.         mes "You need " +
  31.             ((.@blvl > 0) ? "^bb0000"+.@blvl+"^000000 more base levels " +
  32.                 ((.@jlvl > 0) ? "and " : "") : "") +
  33.             ((.@jlvl > 0) ? "^00bb00"+.@jlvl+"^000000 more job levels " : "") +
  34.             "to continue.";
  35.         close;
  36.     }
  37.     return;
  38. }
  39.  
  40. // Checks if the given eac is a baby class
  41. function Is_Baby    {
  42.     return ((getarg(0, eaclass())&EAJL_BABY)>0);
  43. }
  44.  
  45. // Checks if the player can change to third class.
  46. // Note: This does not include the level checks.
  47. function    Can_Change_Third    {
  48.     // To change to third class you either need to be:
  49.     // * Second Class
  50.     // * Transcendent Second Class
  51.     // * Baby Second Class
  52.     if( !.ThirdClass )
  53.         return false; // Third job change disabled
  54.     if( !(eaclass()&EAJL_2) )
  55.         return false; // Not second Class
  56.     if( eaclass()&EAJL_THIRD )
  57.         return false; // Already Third Class
  58.     if( roclass(eaclass()|EAJL_THIRD) < 0 )
  59.         return false; // Job has no third Class
  60.     if( (eaclass()&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE )
  61.         return false; // Exp. Super Novice equals 3rd Cls, but has it's own case
  62.     if( Is_Baby() && (!.BabyClass || !.BabyThird) )
  63.         return false; // No Baby (Third) change allowed
  64.     return true;
  65. }
  66.  
  67. function    Can_Rebirth {
  68.     // To rebirth, you need to be:
  69.     // * Second Class
  70.     if( !.RebirthClass )
  71.         return false; // Rebirth disabled
  72.     if( !(eaclass()&EAJL_2) )
  73.         return false; // Not second Class
  74.     if( eaclass()&(EAJL_UPPER|EAJL_THIRD) )
  75.         return false; // Already Rebirthed/ Third Class
  76.     if( roclass(eaclass()|EAJL_UPPER) < 0 )
  77.         return false; // Job has no transcended class
  78.     if( Is_Baby() && !.BabyClass )
  79.         return false; // No Baby changes allowed
  80.     return true;
  81. }
  82.  
  83. // Checks if the given eac is a first class
  84. function    Is_First_Cls    {
  85.     return (getarg(0) <= EAJ_TAEKWON);
  86. }
  87.  
  88. function    Check_Riding    {
  89.     // Note: Why we should always check for Riding:
  90.     // Mounts are considered as another class, which
  91.     // would make this NPC bigger just to handle with
  92.     // those special cases.
  93.     if (checkfalcon() || checkcart() || checkriding() || ismounting()) {
  94.         mes "Please remove your ^ff0000" +
  95.             ((checkfalcon()) ? "falcon" : "") +
  96.             ((checkcart()) ? "cart" : "") +
  97.             ((checkriding()) ? "Peco" : "") +
  98.             ((ismounting()) ? "mount" : "") +
  99.             "^000000 before proceeding.";
  100.         close;
  101.     }
  102.     return;
  103. }
  104. function    Check_SkillPoints   {
  105.     if (.SkillPointCheck && SkillPoint) {
  106.         mes "Please use all your ^ff0000skill points^000000 before proceeding.";
  107.         close;
  108.     }
  109.     return;
  110. }
  111.  
  112. // addJobOptions is essentially the same like
  113. // setarray .@array[getarraysize(.@array)],opt1,opt2,...;
  114. // It's just easier to read, since we're using it very often
  115. function    Job_Options {
  116.     .@argcount = getargcount();
  117.     .@arr_size = getarraysize(getarg(0));
  118.     for( .@i = 1; .@i < .@argcount; .@i++) {
  119.         setarray getelementofarray(getarg(0), .@arr_size++),getarg(.@i);
  120.     }
  121. }
  122.  
  123. // Begin of the NPC
  124.     mes .NPCName$;
  125.     Check_Riding();
  126.     Check_SkillPoints();
  127.  
  128.     // initialisation
  129.     .@eac = eaclass();
  130.     .@third_possible = Can_Change_Third();
  131.     .@rebirth_possible = Can_Rebirth();
  132.     .@first_eac = .@eac&EAJ_BASEMASK;
  133.     .@second_eac = .@eac&EAJ_UPPERMASK;
  134.     // Note: These are already set in pc.cpp
  135.     // BaseClass = roclass(.@eac&EAJ_BASEMASK) which is the players First Class
  136.     // BaseJob = roclass(.@eac&EAJ_UPPERMASK) which is the players Second Class
  137.     //dispbottom "Debug: eac ("+.@eac+"), third ("+.@third_possible+"), rebirth("+.@rebirth_possible+"), BaseClass ("+BaseClass+"), BaseJob ("+BaseJob+")";
  138.        
  139.     // From here on the jobmaster checks the current class
  140.     // and fills the the array `.@job_opt` with possible
  141.     // job options for the player.
  142.    
  143.     if( .@rebirth_possible ) {
  144.         // Rebirth option (displayed on the top of the menu)
  145.         Require_Level(.Req_Rebirth[0], .Req_Rebirth[1]);
  146.         Job_Options(.@job_opt, Job_Novice_High);
  147.     }
  148.     if( .@third_possible ) {
  149.         // Third Job change (displayed below rebirth)
  150.         Require_Level(.Req_Third[0], .Req_Third[1]);
  151.         Job_Options(.@job_opt, roclass(.@eac|EAJL_THIRD));
  152.     }
  153.      
  154.     if (.SecondExpanded &&
  155.        (.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE && // is Super Novice
  156.        !(eaclass()&EAJL_THIRD) ) {                  // not already Expanded SN
  157.         // (Baby) Super Novice to Expanded (Baby) Super Novice
  158.         if( !Is_Baby(.@eac) || (.BabyClass && .BabyExpanded) ) {
  159.             // .BabyClass & .BabyExpanded must be enabled if the is a baby
  160.             Require_Level(.Req_Exp_SNOVI[0], .Req_Exp_SNOVI[1]);
  161.             Job_Options(.@job_opt,roclass(.@eac|EAJL_THIRD)); // Expanded SN is "third" cls
  162.         }
  163.     }
  164.    
  165.     if (.SecondExpanded &&
  166.         ((.@eac&(~EAJL_BABY)) == EAJ_NINJA ||       // is (Baby) Ninja
  167.         (.@eac&(~EAJL_BABY)) == EAJ_GUNSLINGER)) {  // is (Baby) Gunslinger
  168.         // (Baby) Ninja to (Baby) Kagerou / Oboro
  169.         // (Baby) Gunslinger to (Baby) Rebellion
  170.         if( !Is_Baby(.@eac) || (.BabyClass && .BabyExpanded) ) {
  171.             // .BabyClass & .BabyExpanded must be enabled if the is a baby
  172.             Require_Level(.Req_Exp_NJ_GS[0], .Req_Exp_NJ_GS[1]);
  173.             // Kagerou, Oboro, Rebellion are considered as a 2-1 class
  174.             Job_Options(.@job_opt, roclass(.@eac|EAJL_2_1));
  175.         }
  176.     }
  177.    
  178.     // Player is Job_Novice, Job_Novice_High or Job_Baby
  179.     if (.@first_eac == EAJ_NOVICE && .@second_eac != EAJ_SUPER_NOVICE) {
  180.         // MAPID_NOVICE, MAPID_SUPER_NOVICE, MAPID_NOVICE_HIGH, MAPID_BABY
  181.         Require_Level(.Req_First[0], .Req_First[1]);
  182.         switch(Class) {
  183.             case Job_Novice:
  184.                 // First job change
  185.                 Job_Options(.@job_opt,Job_Swordman,
  186.                     Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief,
  187.                     Job_Super_Novice, Job_Taekwon, Job_Gunslinger, Job_Ninja);
  188.                 if( .BabyNovice )
  189.                     Job_Options(.@job_opt, Job_Baby);
  190.                 break;
  191.             case Job_Novice_High:
  192.                 // Job change after rebirth
  193.                 if( .LastJob && lastJob )
  194.                     Job_Options(.@job_opt,
  195.                         roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
  196.                 else
  197.                     Job_Options(.@job_opt,
  198.                         Job_Swordman_High, Job_Mage_High, Job_Archer_High,
  199.                         Job_Acolyte_High, Job_Merchant_High, Job_Thief_High);
  200.                 break;
  201.             case Job_Baby:
  202.                 if( !.BabyClass )
  203.                     break;
  204.                 // First job change as a baby
  205.                 Job_Options(.@job_opt, Job_Baby_Swordman, Job_Baby_Mage,
  206.                     Job_Baby_Archer,Job_Baby_Acolyte, Job_Baby_Merchant,
  207.                     Job_Baby_Thief);
  208.                 if( .BabyExpanded )
  209.                     Job_Options(.@job_opt, Job_Super_Baby, Job_Baby_Taekwon,
  210.                         Job_Baby_Gunslinger, Job_Baby_Ninja);
  211.                 if( .BabySummoner )
  212.                     Job_Options(.@job_opt, Job_Baby_Summoner);
  213.                 break;
  214.             default:
  215.                 mes "An error has occurred.";
  216.                 close;
  217.         }
  218.     } else if( Is_First_Cls(.@eac) ||               // First Class
  219.                Is_First_Cls(.@eac&(~EAJL_UPPER)) || // Trans. First Cls
  220.                (.BabyClass && Is_First_Cls(.@eac&(~EAJL_BABY))) ) { // Baby First Cls
  221.         // Player is First Class (not Novice)
  222.         // most jobs should have two options here  (2-1 and 2-2)
  223.         .@class1 = roclass(.@eac|EAJL_2_1); // 2-1
  224.         .@class2 = roclass(.@eac|EAJL_2_2); // 2-2
  225.         // dispbottom "Debug: Classes: class1 ("+.@class1+"), class2 ("+.@class2+")";
  226.         if(.LastJob && lastJob && (.@eac&EAJL_UPPER)) {
  227.             // Player is rebirth Cls and linear class changes are enforced
  228.             Require_Level(.Req_Second[0], .Req_Second[1]);
  229.             Job_Options(.@job_opt, lastJob + Job_Novice_High);
  230.         } else {
  231.             // Class is not enforced, player can decide.
  232.             if( .@class1 > 0 ) { // 2-1
  233.                 Require_Level(.Req_Second[0], .Req_Second[1]);
  234.                 Job_Options(.@job_opt, .@class1);
  235.             }
  236.             if( .@class2 > 0 ) { // 2-2
  237.                 Require_Level(.Req_Second[0], .Req_Second[1]);
  238.                 Job_Options(.@job_opt, .@class2);
  239.             }
  240.         }
  241.     }
  242.    
  243.     // Displaying the Job Menu defined by .@job_opt.
  244.     // .@job_opt should not be changed below this line.
  245.     function Job_Menu;
  246.     Job_Menu(.@job_opt);
  247.     close;
  248.  
  249. // Displays the job menu
  250. function    Job_Menu    {
  251.     function Confirm_Change;
  252.     while(true) {
  253.             mes "I can train you to get stronger ^008aff"+strcharinfo(0)+"^000000!.";
  254.             mes "You don't even have to complete a quest!";
  255.             mes "...";
  256.             next;
  257.             mes .NPCName$;
  258.             mes "^DAA520Prices^000000:^ff0000$^000000";
  259.             mes "- ^8FBC8FFirst Class^000000 = ^ff0000"+.cost[0]+"^000000z";
  260.             mes "- ^3CB371Second Class^000000 = ^ff0000"+.cost[1]+"^000000z";
  261.             //mes "- ^2E8B57Third Class^000000 = ^ff0000"+.cost[2]+"^000000z";
  262.             mes "- ^2E8B57Rebirth^000000 = ^008B8B"+getitemname(.rebirthRequiredItemId[0])+"^000000 & ^ff0000"+.cost[3]+"^000000z.";
  263.             next;
  264.     Check_Riding();
  265.     Check_SkillPoints();
  266.     // getarg(0) is the .@job_opt array holding all available job changes.
  267.         .@opt_cnt =  getarraysize(getarg(0));
  268.         if( .@opt_cnt <= 0 ) {
  269.             mes .NPCName$;
  270.             mes "No more ^ff0000jobs^000000 are ^ff0000available^000000.";
  271.             close;
  272.         }
  273.  
  274.         .@selected = 0; // Just a single job class given, no select needed
  275.         if (.@opt_cnt > 1) {
  276.             // Multiple job classes given. Select one and save it to .@class
  277.             // After that confirm .@class
  278.             mes .NPCName$;
  279.             mes "Select a job.";
  280.             .@menu$ = "";
  281.             for (.@i = 0; .@i < .@opt_cnt; .@i++) {
  282.                 if( getelementofarray(getarg(0), .@i) == Job_Novice_High)
  283.                     .@jobname$ = "^0055FFRebirth^000000";
  284.                 else
  285.                     .@jobname$ = jobname(getelementofarray(getarg(0), .@i));
  286.                 .@menu$ = .@menu$ + .bcor$+" " + .@jobname$ + ":";
  287.             }
  288.             .@menu$ = .@menu$+ .rcor$+" ^777777Cancel^000000";
  289.             .@selected = select(.@menu$) - 1;
  290.             if( .@selected < 0 || .@selected >= .@opt_cnt )
  291.                 close;
  292.             next;
  293.  
  294.         }
  295.         .@class = getelementofarray(getarg(0), .@selected);
  296.         if ((.@class == Job_Super_Novice || .@class == Job_Super_Baby) &&
  297.                 BaseLevel < .SNovice) {
  298.             // Special Level Requirement because Super Novice and
  299.             // Super Baby can both be selected in one of the first class
  300.             // changes. That's why the Level Requirement is after and not before
  301.             // the selection.
  302.             mes .NPCName$;
  303.             mes "A base level of ^ff0000" + .SNovice +
  304.                 "^000000 is required to turn into a ^008aff" + jobname(.@class) + "^000000.";
  305.             return;
  306.         }
  307.         // Confirm the Class
  308.         Confirm_Change(.@class, .@opt_cnt > 1);
  309.         next;
  310.         mes .NPCName$;
  311.     }
  312.     return;
  313. }
  314.  
  315.  
  316. // Executes the actual jobchange and closes.
  317. function    Job_Change  {
  318.  
  319.     .@previous_class = Class;
  320.     .@to_cls = getarg(0);
  321.    
  322.     if ( (.@to_cls >= Job_Swordman && .@to_cls <= Job_Thief) || (.@to_cls >= Job_Gunslinger && .@to_cls <= Job_Ninja) || .@to_cls == Job_Taekwon || (.@to_cls >= Job_Swordman_High && .@to_cls <= Job_Thief_High) || (.@to_cls >= Job_Baby && .@to_cls <= Job_Baby_Thief) || .@to_cls == Job_Baby_Gunslinger || .@to_cls == Job_Baby_Ninja || .@to_cls == Job_Baby_Taekwon )    {
  323.         .costamount = .cost[0];
  324.     } else if ( (.@to_cls >= Job_Knight && .@to_cls <= Job_Crusader2) || (.@to_cls >= Job_Lord_Knight && .@to_cls <= Job_Paladin2) || (.@to_cls >= Job_Star_Gladiator && .@to_cls <= Job_Soul_Linker) || (.@to_cls >= Job_Kagerou && .@to_cls <= Job_Rebellion) || .@to_cls == Job_SuperNovice || (.@to_cls >= Job_Baby_Knight && .@to_cls <= Job_Super_Baby) ) {
  325.         .costamount = .cost[1];
  326.     } else {
  327.         .costamount = .cost[2];
  328.     }
  329.     if ( (.@to_cls == Job_Novice_High && .LastJob) )  {
  330.         .costamount = .cost[3];
  331.     }
  332.    
  333.     if ( Zeny < .costamount )   {
  334.         next;
  335.         mes .NPCName$;
  336.         mes "You don't have ^ff0000"+.costamount+"^000000 Zeny!";
  337.         close;
  338.     }
  339.    
  340.     next;
  341.     mes .NPCName$;
  342.     mes "You are now ^008aff" + callfunc("F_InsertArticle", jobname(.@to_cls)) + "^000000!";
  343.    
  344.     if (.@to_cls == Job_Novice_High && .LastJob) {
  345.         lastJob = Class;        // Saves the lastJob for rebirth
  346.         }
  347.         Zeny -= .costamount;
  348.         jobchange .@to_cls;
  349.     if (.@to_cls == Job_Novice_High)
  350.         resetlvl(1);
  351.     else if (.@to_cls == Job_Baby) {
  352.         resetstatus;
  353.         resetskill;
  354.         set SkillPoint,0;
  355.     }
  356.     specialeffect2 EF_ANGEL2;
  357.     specialeffect2 EF_ELECTRIC;
  358.     if (.@previous_class != Class) {
  359.         if (.Platinum)
  360.             callfunc "F_GetPlatinumSkills";
  361.         if (.GetJobEquip)
  362.             Get_Job_Equip();
  363.     }
  364.     close; // Always closes after the change
  365. }
  366.  
  367. function    Confirm_Change  {
  368.     // Player confirms he want to change into .@class
  369.     .@class = getarg(0, -1);
  370.     .@back = getarg(1, false);
  371.     if( .@class < 0 || eaclass(.@class) == -1 ) {
  372.         mes .NPCName$;
  373.         mes "Unknown Class Error.";
  374.         close;
  375.     }
  376.     mes .NPCName$;
  377.     mes "Do you want to change into ^0055FF"+jobname(.@class)+"^000000 class?";
  378.     .@job_option$ = .bcor$+" Change into ^0055FF"+jobname(.@class)+"^000000 class";
  379.     if( .@class == Job_Novice_High)
  380.         .@job_option$ = .bcor$+" ^0055FFRebirth^000000";
  381.    
  382.     if (select(.@job_option$+ ":" +
  383.             ((.@back) ?.rcor$+"^777777Go back^000000" : .rcor$+"^777777Cancel^000000") + "") == 1) {
  384.         if( .@class == Job_Novice_High)
  385.         {
  386.             if(getarraysize(.rebirthRequiredItemId) > (Class - 7)) //check if required item id have been provided
  387.             {
  388.                 if ( Zeny < .cost[3] )  {
  389.                     next;
  390.                     mes .NPCName$;
  391.                     mes "You don't have ^ff0000" + callfunc("F_InsertComma",.cost[3]) + "^000000z!";
  392.                     close;
  393.                 }
  394.                 if(countitem(.rebirthRequiredItemId[Class - 7]) > 0)
  395.                 {
  396.                     next;
  397.                     mes .NPCName$;
  398.                     mes "I see if you have ^008B8B" + getitemname(.rebirthRequiredItemId[0]) + "^000000 + ^ff0000" + callfunc("F_InsertComma",.cost[3]) + "^000000z. ^0055FFGood^000000.";
  399.                     delitem .rebirthRequiredItemId[Class - 7], 1;
  400.                     Job_Change(.@class);
  401.                 }
  402.                 else
  403.                 {
  404.                     next;
  405.                     mes .NPCName$;
  406.                     mes "You don't have ^008B8B" + getitemname(.rebirthRequiredItemId[0]) + "^000000. Come back with it before asking for ^0055FFRebirth^000000.";
  407.                     close;
  408.                 }
  409.  
  410.             }
  411.         }
  412.         Job_Change(.@class);
  413.     }
  414.     if (!.@back)
  415.         close; // "Cancel" pressed
  416.     return;
  417. }
  418.  
  419. // Function which gives a job related item to the player
  420. // the items are the rewards from the original job change quests
  421. function    Get_Job_Equip   {
  422.     // Note: The item is dropping, when the player can't hold it.
  423.     // But that's better than not giving the item at all.
  424.     .@eac = eaclass();
  425.     if( .@eac&EAJL_THIRD ) {
  426.         // Third Class Items
  427.         getitem 2795,1; //  Green Apple Ring for every 3rd Class
  428.         switch(BaseJob) {
  429.             // BaseJob of Third Cls
  430.             // For Normal Third, Baby Third and Transcended Third Cls
  431.             case Job_Knight:
  432.                 getitem 5746,1; break;  //  Rune Circlet [1]
  433.             case Job_Wizard:
  434.                 getitem 5753,1; break;  //  Magic Stone Hat [1]
  435.             case Job_Hunter:
  436.                 getitem 5748,1; break;  //  Sniper Goggle [1]
  437.             case Job_Priest:
  438.                 getitem 5747,1; break;  //  Mitra [1]
  439.             case Job_Blacksmith:
  440.                 getitem 5749,1; break;  //  Driver Band [1]
  441.             case Job_Assassin:
  442.                 getitem 5755,1; break;  //  Silent Executor [1]
  443.             case Job_Crusader:
  444.                 getitem 5757,1; break;  //  Dip Schmidt Helm [1]
  445.             case Job_Sage:
  446.                 getitem 5756,1; break;  //  Wind Whisper [1]
  447.             case Job_Bard:
  448.                 getitem 5751,1; break;  //  Maestro Song's Hat [1]
  449.             case Job_Dancer:
  450.                 getitem 5758,1; break;  //  Dying Swan [1]
  451.             case Job_Monk:
  452.                 getitem 5754,1; break;  //  Blazing Soul [1]
  453.             case Job_Alchemist:
  454.                 getitem 5752,1; break;  //  Midas Whisper[1]
  455.             case Job_Rogue:
  456.                 getitem 5750,1;         //  Shadow Handicraft [1]
  457.                 getitem 6121,1;         //  Makeover Brush
  458.                 getitem 6122,1; break;  //  Paint Brush
  459.         }
  460.     } else if ( !(.@eac&EAJL_2) && !(.@eac&EAJL_UPPER) ) {
  461.         // Not Second Job AND not Rebirth/Third
  462.         if ( (.@eac&EAJ_UPPERMASK) == EAJ_SWORDMAN ) {
  463.             getitem 1101,1;
  464.             getitem 2101,1;
  465.         } else if ( (.@eac&EAJ_UPPERMASK) == EAJ_MAGE ) {
  466.             getitem 1601,1;
  467.             getitem 2101,1;
  468.         } else if ( (.@eac&EAJ_UPPERMASK) == EAJ_ARCHER ) {
  469.             getitem 1701,1;
  470.             getitem 1750,500;
  471.         } else if ( (.@eac&EAJ_UPPERMASK) == EAJ_ACOLYTE ) {
  472.             getitem 1501,1;
  473.             getitem 2101,1;
  474.         } else if ( (.@eac&EAJ_UPPERMASK) == EAJ_MERCHANT ) {
  475.             getitem 1301,1;
  476.             getitem 2101,1;
  477.         } else if ( (.@eac&EAJ_UPPERMASK) == EAJ_THIEF ) {
  478.             getitem 1201,1;
  479.             getitem 2101,1;
  480.         } else if ( (.@eac&EAJ_UPPERMASK) == EAJ_GUNSLINGER ) {
  481.             getitem 13100,1;
  482.             getitem 13200,500;
  483.         } else if ( (.@eac&EAJ_UPPERMASK) == EAJ_NINJA ) {
  484.             getitem 13010,1;
  485.             getitem 2101,1;
  486.         } else if ( (.@eac&EAJ_UPPERMASK) == EAJ_TAEKWON ) {
  487.             getitem 2101,1;
  488.         }
  489.     }
  490.     return;
  491. }
  492.  
  493. OnInit:
  494.     // Initialisation, do not edit these
  495.     .NPCName$ = "^FF7F00[ Job Master ]^000000";
  496.     .bcor$ = "^008aff[>]^000000 ";      // Option Button Symbol;
  497.     .rcor$ = "^ff0000[>]^000000 ";      // Cancel button symbol;
  498.    
  499.     // Settings
  500.     .ThirdClass = false;            // Enable third classes?
  501.     .RebirthClass = true;           // Enable rebirth classes?
  502.     .SecondExpanded = false;        // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion?
  503.     .BabyNovice = true;         // Enable Baby novice classes? Disable it if you like player must have parent to get job baby.
  504.     .BabyClass = true;          // Enable Baby classes?
  505.     .BabyThird = false;         // Enable Baby third classes?
  506.     .BabyExpanded = false;          // Enable Baby Expanded classes: Ex. Baby Ninja, Baby Taekwon, etc.
  507.     .BabySummoner = false;          // Enable Baby Summoner?
  508.     .LastJob = true;            // Enforce linear class changes?
  509.     .SkillPointCheck = true;        // Force player to use up all skill points?
  510.     .Platinum = false;          // Get platinum skills automatically?
  511.     .GetJobEquip = true;            // Get job equipment (mostly weapons) on job change?
  512.  
  513.     // Level Requirements
  514.     setarray .Req_First[0],1,10;        // Minimum base level, job level to turn into 1st class
  515.     setarray .Req_Second[0],1,40;       // Minimum base level, job level to turn into 2nd class
  516.     setarray .Req_Rebirth[0],99,50;     // Minimum base level, job level to rebirth
  517.     setarray .Req_Third[0],99,50;       // Minimum base level, job level to change to third class
  518.     setarray .Req_Exp_NJ_GS[0],99,70;   // Minimum base level, job level to turn into Expanded Ninja and Gunslinger
  519.     setarray .Req_Exp_SNOVI[0],99,99;   // Minimum base level, job level to turn into Expanded Super Novice
  520.     .SNovice = 45;              // Minimum base level to turn into Super Novice
  521.     setarray .cost,             // Cost for Jobchange
  522.     15000,                  // To First Job
  523.     25000,                  // To Second Job
  524.     1000000,                // To Third Job
  525.     1285000;                // To Rebirth
  526.     setarray .rebirthRequiredItemId[0],7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825; // Item Requeriment for Rebirth. "Heroic Emblem"
  527.    
  528.     // Setting adjustments by PACKETVER
  529.     if( PACKETVER < 20161207 ) {
  530.         if( .BabyExpanded )
  531.             debugmes "jobmaster: BabyExpanded is disabled due to outdated PACKETVER.";
  532.         if( .BabySummoner )
  533.             debugmes "jobmaster: BabySummoner is disabled due to outdated PACKETVER.";
  534.         .BabyExpanded = false;
  535.         .BabySummoner = false;
  536.     }
  537.     end;
  538. }
  539.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement