Jump to content
  • 0

[ Solved ] M>Job Changer NPC


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

hello as the title says i would like to know how to give free basic weapons for each job changed based on their jobs this npc is only for 99/50

 

Quote

//===== rAthena Script =======================================
//= Job Master
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: =========================================
//= A fully functional job changer.
//===== Additional Comments: =================================
//= 1.0 Initial script.
//= 1.1 Fixed reset on Baby job change.
//= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support.
//= 1.3 Kagerou/Oboro added.
//= 1.4 Rebellion added.
//============================================================

payon,171,210,8    script    Job Changer NPC    4_M_ROYALGUARD,{
function Job_Menu;

    mes "[Job Master]";
    if (Class > Job_Soul_Linker) {
        mes "No more jobs are available.";
        close;
    }
    if (checkfalcon() || checkcart() || checkriding() || ismounting()) {
        mes "Please remove your " +
            ((checkfalcon()) ? "falcon" : "") +
            ((checkcart()) ? "cart" : "") +
            ((checkriding()) ? "Peco" : "") +
            ((ismounting()) ? "mount" : "") +
            " before proceeding.";
        close;
    }
    if (.SkillPointCheck && SkillPoint) {
        mes "Please use all your skill points before proceeding.";
        close;
    }

    .@eac = eaclass();
    .@i = ((.ThirdClass) ? roclass(.@eac&EAJ_UPPERMASK) : Class);
    if (.@i >= Job_Knight && .@i <= Job_Crusader2) {
        if (Class > Job_Crusader2) {
            mes "Switch to third class?";
            next;
            Job_Menu(roclass(.@eac|EAJL_THIRD));
            close;
        }
    }
    .@j1 = roclass(.@eac|EAJL_2_1);
    .@j2 = roclass(.@eac|EAJL_2_2);
    if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE)
        setarray .@exp[0], roclass(.@eac|EAJL_THIRD), 99;
    if (Class == Job_Ninja || Class == Job_Gunslinger)
        setarray .@exp[0], .@j1, 70;
    if (.@exp[0] && .SecondExpanded) {
        if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) {
            .@blvl = .Rebirth[0] - BaseLevel;
            .@jlvl = .@exp[1] - JobLevel;
            mes "You need " +
                ((.@blvl > 0) ? .@blvl + " more base levels " + ((.@jlvl > 0) ? "/ " : "") : "") +
                ((.@jlvl > 0) ? .@jlvl + " more job levels " : "") + "to continue.";
            close;
        }
        mes "Switch to " + jobname(.@exp[0]) + "?";
        next;
        Job_Menu(.@exp[0]);
        close;
    }
    if (.@eac&EAJL_2)
        if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) {
            mes "No more jobs are available.";
            close;
        }
    if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) {
        if (JobLevel < .JobReq[0])
            mes "A job level of " + .JobReq[0] + " is required to change into the 1st Class.";
        else if (Class == Job_Novice_High && .LastJob && lastJob) {
            mes "Switch classes now?";
            next;
            Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
        } else {
            switch(Class) {
            case Job_Novice:
                Job_Menu(
//                    Job_Super_Novice,
                    Job_Swordman,
                    Job_Mage,
                    Job_Archer,
                    Job_Acolyte,
                    Job_Merchant,
                    Job_Thief
                );
                break;
            default:
                mes "An error has occurred.";
                break;
            }
        }
        close;
    }
    if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1)
        mes "No more jobs are available.";
    else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1])
        mes "A job level of " + .JobReq[1] + " is required to change into the 2nd Class.";
    else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) {
        mes "Switch classes now?";
        next;
        Job_Menu(lastJob + Job_Novice_High);
    } else
        Job_Menu(.@j1, .@j2);
    close;

function Job_Menu {
    while(1) {
        if (getargcount() > 1) {
            mes "Select a job.";
            .@menu$ = "";
            for (.@i = 0; .@i < getargcount(); .@i++)
                .@menu$ = .@menu$ + " ~ " + jobname(getarg(.@i)) + ":";
            .@menu$ = .@menu$+" ~ ^777777Cancel^000000";
            next;
            .@i = getarg(select(.@menu$) - 1, 0);
            if (!.@i)
                close;
            if ((.@i == Job_SuperNovice || .@i == Job_Super_Baby) && BaseLevel < .SNovice) {
                mes "[Job Master]";
                mes "A base level of " + .SNovice + " is required to turn into a " + jobname(.@i) + ".";
                close;
            }
            mes "[Job Master]";
            mes "Are you sure?";
            next;
        } else
            .@i = getarg(0);
        if (select(" ~ Change into ^0055FF" + jobname(.@i) + "^000000 class: ~ ^777777" + ((getargcount() > 1) ? "Go back" : "Cancel") + "^000000") == 1) {
            //mes "You are now " + callfunc("F_InsertArticle", jobname(.@i)) + "!";
            announce "Congratulations "+strcharinfo(0)+" you are " +callfunc("F_InsertArticle", jobname(.@i)) + " now!",bc_all,0xFFFF00;
            if (.@i == Job_Novice_High && .LastJob)
                lastJob = Class;
            jobchange .@i;
            if (.@i == Job_Novice_High)
                resetlvl(1);
            else if (.@i == Job_Baby) {
                resetstatus;
                resetskill;
                set SkillPoint,0;
            }
            specialeffect2 EF_ANGEL2;
            specialeffect2 EF_ELECTRIC;
            if (.Platinum)
                callsub Get_Platinum;
            close;
        }
        if (getargcount() == 1)
            return;
        mes "[Job Master]";
    }
    end;
}

Get_Platinum:
    skill "NV_FIRSTAID",1,SKILL_PERM;
    switch (BaseClass) {
    case Job_Novice:
        if (Class != Job_SuperNovice)
            skill "NV_TRICKDEAD",1,SKILL_PERM;
        break;
    case Job_Swordman:
        skill "SM_MOVINGRECOVERY",1,SKILL_PERM;
        skill "SM_FATALBLOW",1,SKILL_PERM;
        skill "SM_AUTOBERSERK",1,SKILL_PERM;
        break;
    case Job_Mage:
        skill "MG_ENERGYCOAT",1,SKILL_PERM;
        break;
    case Job_Archer:
        skill "AC_MAKINGARROW",1,SKILL_PERM;
        skill "AC_CHARGEARROW",1,SKILL_PERM;
        break;
    case Job_Acolyte:
        skill "AL_HOLYLIGHT",1,SKILL_PERM;
        break;
    case Job_Merchant:
        skill "MC_CARTREVOLUTION",1,SKILL_PERM;
        skill "MC_CHANGECART",1,SKILL_PERM;
        skill "MC_LOUD",1,SKILL_PERM;
        break;
    case Job_Thief:
        skill "TF_SPRINKLESAND",1,SKILL_PERM;
        skill "TF_BACKSLIDING",1,SKILL_PERM;
        skill "TF_PICKSTONE",1,SKILL_PERM;
        skill "TF_THROWSTONE",1,SKILL_PERM;
        break;
    default:
        break;
    }
    switch (BaseJob) {
    case Job_Knight:
        skill "KN_CHARGEATK",1,SKILL_PERM;
        break;
    case Job_Priest:
        skill "PR_REDEMPTIO",1,SKILL_PERM;
        break;
    case Job_Wizard:
        skill "WZ_SIGHTBLASTER",1,SKILL_PERM;
        break;
    case Job_Blacksmith:
        skill "BS_UNFAIRLYTRICK",1,SKILL_PERM;
        skill "BS_GREED",1,SKILL_PERM;
        break;
    case Job_Hunter:
        skill "HT_PHANTASMIC",1,SKILL_PERM;
        break;
    case Job_Assassin:
        skill "AS_SONICACCEL",1,SKILL_PERM;
        skill "AS_VENOMKNIFE",1,SKILL_PERM;
        break;
    case Job_Crusader:
        skill "CR_SHRINK",1,SKILL_PERM;
        break;
    case Job_Monk:
        skill "MO_KITRANSLATION",1,SKILL_PERM;
        skill "MO_BALKYOUNG",1,SKILL_PERM;
        break;
    case Job_Sage:
        skill "SA_CREATECON",1,SKILL_PERM;
        skill "SA_ELEMENTWATER",1,SKILL_PERM;
        skill "SA_ELEMENTGROUND",1,SKILL_PERM;
        skill "SA_ELEMENTFIRE",1,SKILL_PERM;
        skill "SA_ELEMENTWIND",1,SKILL_PERM;
        break;
    case Job_Rogue:
        skill "RG_CLOSECONFINE",1,SKILL_PERM;
        break;
    case Job_Alchemist:
        skill "AM_BIOETHICS",1,SKILL_PERM;
        break;
    case Job_Bard:
        skill "BA_PANGVOICE",1,SKILL_PERM;
        break;
    case Job_Dancer:
        skill "DC_WINKCHARM",1,SKILL_PERM;
        break;
    default:
        break;
    }
    return;

OnInit:
    setarray .Rebirth[0],99,50;    // Minimum base level, job level to rebirth OR change to third class
    setarray .JobReq[0],10,40;    // Minimum job level to turn into 1st class, 2nd class
    .ThirdClass = 0;            // Enable third classes? (1: yes / 0: no)
    .SecondExpanded = 0;        // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? (1: yes / 0: no)
    .SNovice = 45;                // Minimum base level to turn into Super Novice
    .LastJob = 1;                // Enforce linear class changes? (1: yes / 0: no)
    .SkillPointCheck = 1;        // Force player to use up all skill points? (1: yes / 0: no)
    .Platinum = 0;                // Get platinum skills automatically? (1: yes / 0: no)
        initnpctimer;
        end;
OnTimer0050:
        showscript "Job Changer", getnpcid(0);
        initnpctimer;
        end;
}

payon,185,104,4    duplicate(Job Changer NPC)    Job Changer NPC#pay    4_M_ROYALGUARD,{

 

Edited by GM Winter
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  102
  • Reputation:   6
  • Joined:  03/02/18
  • Last Seen:  

just add getitem every job..

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

On 5/1/2023 at 10:06 AM, GM Winter said:

hello as the title says i would like to know how to give free basic weapons for each job changed based on their jobs this npc is only for 99/50

 

 

create function for give weapon reward for each job

for reference you can check using this script click

at this part

Spoiler
// Function which gives a job related item to the player
// the items are the rewards from the original job change quests
function	Get_Job_Equip	{
	// Note: The item is dropping, when the player can't hold it.
	// But that's better than not giving the item at all.
	.@eac = eaclass();
	if( .@eac&EAJL_FOURTH ) {
		// Fourth Class Items
		getitem 490087,1; // Hourglass Necklace
	} else if( .@eac&EAJL_THIRD ) {
		// Third Class Items
		getitem 2795,1;	//	Green Apple Ring for every 3rd Class
		switch(BaseJob) {
			// BaseJob of Third Cls
			// For Normal Third, Baby Third and Transcended Third Cls
			case Job_Knight:
				getitem 5746,1;	break;	//	Rune Circlet [1]
			case Job_Wizard:
				getitem 5753,1;	break;	//	Magic Stone Hat [1]
			case Job_Hunter:
				getitem 5748,1;	break;	//	Sniper Goggle [1]
			case Job_Priest:
				getitem 5747,1;	break;	//	Mitra [1]
			case Job_Blacksmith:
				getitem 5749,1;	break;	//	Driver Band [1]
			case Job_Assassin:
				getitem 5755,1;	break;	//	Silent Executor [1]
			case Job_Crusader:
				getitem 5757,1;	break;	//	Dip Schmidt Helm [1]
			case Job_Sage:
				getitem 5756,1;	break;	//	Wind Whisper [1]
			case Job_Bard:
				getitem 5751,1;	break;	//	Maestro Song's Hat [1]
			case Job_Dancer:
				getitem 5758,1;	break;	//	Dying Swan [1]
			case Job_Monk:
				getitem 5754,1;	break;	//	Blazing Soul [1]
			case Job_Alchemist:
				getitem 5752,1;	break;	//	Midas Whisper[1]
			case Job_Rogue:
				getitem 5750,1; 		//	Shadow Handicraft [1]
				getitem 6121,1;			//	Makeover Brush
				getitem 6122,1;	break;	//	Paint Brush
		}
	} else if (.@eac&EAJL_2) {
		// Second Class (And not Third Class)
		switch(BaseJob) {
			// Second Class
			case Job_Knight:
				getitem 1163,1;	break;	//	Claymore [0]
			case Job_Priest:
				getitem 1522,1;	break;	//	Stunner [0]
			case Job_Wizard:
				getitem 1617,1;	break;	//	Survivor's Rod [0]
			case Job_Blacksmith:
				getitem 1360,1;	break;	//	Two-Handed-Axe [1]
			case Job_Hunter:
				getitem 1718,1;	break;	//	Hunter Bow [0]
			case Job_Assassin:
				getitem 1254,1;	break;	//	Jamadhar [0]
			case Job_Crusader:
				getitem 1410,1;	break;	//	Lance [0]
			case Job_Monk:
				getitem 1807,1;	break;	//	Fist [0]
			case Job_Sage:
				getitem 1550,1;	break;	//	Book [3]
			case Job_Rogue:
				getitem 1222,1;	break;	//	Damascus [1]
			case Job_Alchemist:
				getitem 1126,1;	break;	//	Saber [2]
			case Job_Bard:
				getitem 1907,1;	break;	//	Guitar [0]
			case Job_Dancer:
				getitem 1960,1;	break;	//	Whip [1]
			case Job_Super_Novice:
				getitem 1208,1;	break;	//	Main Gauche [4]
			case Job_Star_Gladiator:
				getitem 1550,1;	break;	//	Book [3]
			case Job_Soul_Linker:
				getitem 1617,1;	break;	//	Survivor's Rod [0]
		}
	} else {
		// Neither Second or Third Cls
		// => First Cls or not covered by the switch
		switch(BaseClass) {
			// First Class
			case Job_Swordman:
				getitem 1108,1;	break;	//	Blade [4]
			case Job_Mage:
				getitem 1602,1;	break;	//	Rod [4]
			case Job_Archer:
				getitem 1705,1;	break;	//	Composite Bow [4]
			case Job_Acolyte:
				getitem 1505,1;	break;	//	Mace [4]
			case Job_Merchant:
				getitem 1302,1;	break;	//	Axe [4]
			case Job_Thief:
				getitem 1208,1;	break;	//	Main Gauche [4]
			case Job_Gunslinger:
				getitem 13101,1; break;	//	Six Shooter [2]
			case Job_Ninja:
				getitem 13010,1; break;	//	Asura [2]
		}
	}
	return;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

On 5/3/2023 at 1:16 PM, hendra814 said:

create function for give weapon reward for each job

for reference you can check using this script click

at this part

  Hide contents
// Function which gives a job related item to the player
// the items are the rewards from the original job change quests
function	Get_Job_Equip	{
	// Note: The item is dropping, when the player can't hold it.
	// But that's better than not giving the item at all.
	.@eac = eaclass();
	if( .@eac&EAJL_FOURTH ) {
		// Fourth Class Items
		getitem 490087,1; // Hourglass Necklace
	} else if( .@eac&EAJL_THIRD ) {
		// Third Class Items
		getitem 2795,1;	//	Green Apple Ring for every 3rd Class
		switch(BaseJob) {
			// BaseJob of Third Cls
			// For Normal Third, Baby Third and Transcended Third Cls
			case Job_Knight:
				getitem 5746,1;	break;	//	Rune Circlet [1]
			case Job_Wizard:
				getitem 5753,1;	break;	//	Magic Stone Hat [1]
			case Job_Hunter:
				getitem 5748,1;	break;	//	Sniper Goggle [1]
			case Job_Priest:
				getitem 5747,1;	break;	//	Mitra [1]
			case Job_Blacksmith:
				getitem 5749,1;	break;	//	Driver Band [1]
			case Job_Assassin:
				getitem 5755,1;	break;	//	Silent Executor [1]
			case Job_Crusader:
				getitem 5757,1;	break;	//	Dip Schmidt Helm [1]
			case Job_Sage:
				getitem 5756,1;	break;	//	Wind Whisper [1]
			case Job_Bard:
				getitem 5751,1;	break;	//	Maestro Song's Hat [1]
			case Job_Dancer:
				getitem 5758,1;	break;	//	Dying Swan [1]
			case Job_Monk:
				getitem 5754,1;	break;	//	Blazing Soul [1]
			case Job_Alchemist:
				getitem 5752,1;	break;	//	Midas Whisper[1]
			case Job_Rogue:
				getitem 5750,1; 		//	Shadow Handicraft [1]
				getitem 6121,1;			//	Makeover Brush
				getitem 6122,1;	break;	//	Paint Brush
		}
	} else if (.@eac&EAJL_2) {
		// Second Class (And not Third Class)
		switch(BaseJob) {
			// Second Class
			case Job_Knight:
				getitem 1163,1;	break;	//	Claymore [0]
			case Job_Priest:
				getitem 1522,1;	break;	//	Stunner [0]
			case Job_Wizard:
				getitem 1617,1;	break;	//	Survivor's Rod [0]
			case Job_Blacksmith:
				getitem 1360,1;	break;	//	Two-Handed-Axe [1]
			case Job_Hunter:
				getitem 1718,1;	break;	//	Hunter Bow [0]
			case Job_Assassin:
				getitem 1254,1;	break;	//	Jamadhar [0]
			case Job_Crusader:
				getitem 1410,1;	break;	//	Lance [0]
			case Job_Monk:
				getitem 1807,1;	break;	//	Fist [0]
			case Job_Sage:
				getitem 1550,1;	break;	//	Book [3]
			case Job_Rogue:
				getitem 1222,1;	break;	//	Damascus [1]
			case Job_Alchemist:
				getitem 1126,1;	break;	//	Saber [2]
			case Job_Bard:
				getitem 1907,1;	break;	//	Guitar [0]
			case Job_Dancer:
				getitem 1960,1;	break;	//	Whip [1]
			case Job_Super_Novice:
				getitem 1208,1;	break;	//	Main Gauche [4]
			case Job_Star_Gladiator:
				getitem 1550,1;	break;	//	Book [3]
			case Job_Soul_Linker:
				getitem 1617,1;	break;	//	Survivor's Rod [0]
		}
	} else {
		// Neither Second or Third Cls
		// => First Cls or not covered by the switch
		switch(BaseClass) {
			// First Class
			case Job_Swordman:
				getitem 1108,1;	break;	//	Blade [4]
			case Job_Mage:
				getitem 1602,1;	break;	//	Rod [4]
			case Job_Archer:
				getitem 1705,1;	break;	//	Composite Bow [4]
			case Job_Acolyte:
				getitem 1505,1;	break;	//	Mace [4]
			case Job_Merchant:
				getitem 1302,1;	break;	//	Axe [4]
			case Job_Thief:
				getitem 1208,1;	break;	//	Main Gauche [4]
			case Job_Gunslinger:
				getitem 13101,1; break;	//	Six Shooter [2]
			case Job_Ninja:
				getitem 13010,1; break;	//	Asura [2]
		}
	}
	return;
}

 

Quote

//===== rAthena Script =======================================
//= Job Master
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: =========================================
//= A fully functional job changer.
//===== Additional Comments: =================================
//= 1.0 Initial script.
//= 1.1 Fixed reset on Baby job change.
//= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support.
//= 1.3 Kagerou/Oboro added.
//= 1.4 Rebellion added.
//============================================================

payon,171,210,8    script    Job Changer NPC    4_M_ROYALGUARD,{
function Job_Menu;

    mes "[Job Master]";
    if (Class > Job_Soul_Linker) {
        mes "No more jobs are available.";
        close;
    }
    if (checkfalcon() || checkcart() || checkriding() || ismounting()) {
        mes "Please remove your " +
            ((checkfalcon()) ? "falcon" : "") +
            ((checkcart()) ? "cart" : "") +
            ((checkriding()) ? "Peco" : "") +
            ((ismounting()) ? "mount" : "") +
            " before proceeding.";
        close;
    }
    if (.SkillPointCheck && SkillPoint) {
        mes "Please use all your skill points before proceeding.";
        close;
    }

    .@eac = eaclass();
    .@i = ((.ThirdClass) ? roclass(.@eac&EAJ_UPPERMASK) : Class);
    if (.@i >= Job_Knight && .@i <= Job_Crusader2) {
        if (Class > Job_Crusader2) {
            mes "Switch to third class?";
            next;
            Job_Menu(roclass(.@eac|EAJL_THIRD));
            close;
        }
    }
    .@j1 = roclass(.@eac|EAJL_2_1);
    .@j2 = roclass(.@eac|EAJL_2_2);
    if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE)
        setarray .@exp[0], roclass(.@eac|EAJL_THIRD), 99;
    if (Class == Job_Ninja || Class == Job_Gunslinger)
        setarray .@exp[0], .@j1, 70;
    if (.@exp[0] && .SecondExpanded) {
        if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) {
            .@blvl = .Rebirth[0] - BaseLevel;
            .@jlvl = .@exp[1] - JobLevel;
            mes "You need " +
                ((.@blvl > 0) ? .@blvl + " more base levels " + ((.@jlvl > 0) ? "/ " : "") : "") +
                ((.@jlvl > 0) ? .@jlvl + " more job levels " : "") + "to continue.";
            close;
        }
        mes "Switch to " + jobname(.@exp[0]) + "?";
        next;
        Job_Menu(.@exp[0]);
        close;
    }
    if (.@eac&EAJL_2)
        if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) {
            mes "No more jobs are available.";
            close;
        }
    if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) {
        if (JobLevel < .JobReq[0])
            mes "A job level of " + .JobReq[0] + " is required to change into the 1st Class.";
        else if (Class == Job_Novice_High && .LastJob && lastJob) {
            mes "Switch classes now?";
            next;
            Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
        } else {
            switch(Class) {
            case Job_Novice:
                Job_Menu(
//                    Job_Super_Novice,
                    Job_Swordman,
                    Job_Mage,
                    Job_Archer,
                    Job_Acolyte,
                    Job_Merchant,
                    Job_Thief
                );
                break;
            default:
                mes "An error has occurred.";
                break;
            }
        }
        close;
    }
    if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1)
        mes "No more jobs are available.";
    else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1])
        mes "A job level of " + .JobReq[1] + " is required to change into the 2nd Class.";
    else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) {
        mes "Switch classes now?";
        next;
        Job_Menu(lastJob + Job_Novice_High);
    } else
        Job_Menu(.@j1, .@j2);
    close;

function Job_Menu {
    while(1) {
        if (getargcount() > 1) {
            mes "Select a job.";
            .@menu$ = "";
            for (.@i = 0; .@i < getargcount(); .@i++)
                .@menu$ = .@menu$ + " ~ " + jobname(getarg(.@i)) + ":";
            .@menu$ = .@menu$+" ~ ^777777Cancel^000000";
            next;
            .@i = getarg(select(.@menu$) - 1, 0);
            if (!.@i)
                close;
            if ((.@i == Job_SuperNovice || .@i == Job_Super_Baby) && BaseLevel < .SNovice) {
                mes "[Job Master]";
                mes "A base level of " + .SNovice + " is required to turn into a " + jobname(.@i) + ".";
                close;
            }
            mes "[Job Master]";
            mes "Are you sure?";
            next;
        } else
            .@i = getarg(0);
        if (select(" ~ Change into ^0055FF" + jobname(.@i) + "^000000 class: ~ ^777777" + ((getargcount() > 1) ? "Go back" : "Cancel") + "^000000") == 1) {
            //mes "You are now " + callfunc("F_InsertArticle", jobname(.@i)) + "!";
            announce "Congratulations "+strcharinfo(0)+" you are " +callfunc("F_InsertArticle", jobname(.@i)) + " now!",bc_all,0xFFFF00;
            if (.@i == Job_Novice_High && .LastJob)
                lastJob = Class;
            jobchange .@i;
            if (.@i == Job_Novice_High)
                resetlvl(1);
            else if (.@i == Job_Baby) {
                resetstatus;
                resetskill;
                set SkillPoint,0;
            }
            specialeffect2 EF_ANGEL2;
            specialeffect2 EF_ELECTRIC;
            if (.Platinum)
                callsub Get_Platinum;
            close;
        }
        if (getargcount() == 1)
            return;
        mes "[Job Master]";
    }
    end;
}

Get_Platinum:
    skill "NV_FIRSTAID",1,SKILL_PERM;
    switch (BaseClass) {
    case Job_Novice:
        if (Class != Job_SuperNovice)
            skill "NV_TRICKDEAD",1,SKILL_PERM;
        break;
    case Job_Swordman:
        skill "SM_MOVINGRECOVERY",1,SKILL_PERM;
        skill "SM_FATALBLOW",1,SKILL_PERM;
        skill "SM_AUTOBERSERK",1,SKILL_PERM;
        break;
    case Job_Mage:
        skill "MG_ENERGYCOAT",1,SKILL_PERM;
        break;
    case Job_Archer:
        skill "AC_MAKINGARROW",1,SKILL_PERM;
        skill "AC_CHARGEARROW",1,SKILL_PERM;
        break;
    case Job_Acolyte:
        skill "AL_HOLYLIGHT",1,SKILL_PERM;
        break;
    case Job_Merchant:
        skill "MC_CARTREVOLUTION",1,SKILL_PERM;
        skill "MC_CHANGECART",1,SKILL_PERM;
        skill "MC_LOUD",1,SKILL_PERM;
        break;
    case Job_Thief:
        skill "TF_SPRINKLESAND",1,SKILL_PERM;
        skill "TF_BACKSLIDING",1,SKILL_PERM;
        skill "TF_PICKSTONE",1,SKILL_PERM;
        skill "TF_THROWSTONE",1,SKILL_PERM;
        break;
    default:
        break;
    }
    switch (BaseJob) {
    case Job_Knight:
        skill "KN_CHARGEATK",1,SKILL_PERM;
        break;
    case Job_Priest:
        skill "PR_REDEMPTIO",1,SKILL_PERM;
        break;
    case Job_Wizard:
        skill "WZ_SIGHTBLASTER",1,SKILL_PERM;
        break;
    case Job_Blacksmith:
        skill "BS_UNFAIRLYTRICK",1,SKILL_PERM;
        skill "BS_GREED",1,SKILL_PERM;
        break;
    case Job_Hunter:
        skill "HT_PHANTASMIC",1,SKILL_PERM;
        break;
    case Job_Assassin:
        skill "AS_SONICACCEL",1,SKILL_PERM;
        skill "AS_VENOMKNIFE",1,SKILL_PERM;
        break;
    case Job_Crusader:
        skill "CR_SHRINK",1,SKILL_PERM;
        break;
    case Job_Monk:
        skill "MO_KITRANSLATION",1,SKILL_PERM;
        skill "MO_BALKYOUNG",1,SKILL_PERM;
        break;
    case Job_Sage:
        skill "SA_CREATECON",1,SKILL_PERM;
        skill "SA_ELEMENTWATER",1,SKILL_PERM;
        skill "SA_ELEMENTGROUND",1,SKILL_PERM;
        skill "SA_ELEMENTFIRE",1,SKILL_PERM;
        skill "SA_ELEMENTWIND",1,SKILL_PERM;
        break;
    case Job_Rogue:
        skill "RG_CLOSECONFINE",1,SKILL_PERM;
        break;
    case Job_Alchemist:
        skill "AM_BIOETHICS",1,SKILL_PERM;
        break;
    case Job_Bard:
        skill "BA_PANGVOICE",1,SKILL_PERM;
        break;
    case Job_Dancer:
        skill "DC_WINKCHARM",1,SKILL_PERM;
        break;
    default:
        break;
    }
    return;
// Function which gives a job related item to the player
// the items are the rewards from the original job change quests
function    Get_Job_Equip    {
    // Note: The item is dropping, when the player can't hold it.
    // But that's better than not giving the item at all.
    .@eac = eaclass();
    if( .@eac&EAJL_FOURTH ) {
        // Fourth Class Items
        getitem 490087,1; // Hourglass Necklace
    } else if( .@eac&EAJL_THIRD ) {
        // Third Class Items
        getitem 2795,1;    //    Green Apple Ring for every 3rd Class
        switch(BaseJob) {
            // BaseJob of Third Cls
            // For Normal Third, Baby Third and Transcended Third Cls
            case Job_Knight:
                getitem 5746,1;    break;    //    Rune Circlet [1]
            case Job_Wizard:
                getitem 5753,1;    break;    //    Magic Stone Hat [1]
            case Job_Hunter:
                getitem 5748,1;    break;    //    Sniper Goggle [1]
            case Job_Priest:
                getitem 5747,1;    break;    //    Mitra [1]
            case Job_Blacksmith:
                getitem 5749,1;    break;    //    Driver Band [1]
            case Job_Assassin:
                getitem 5755,1;    break;    //    Silent Executor [1]
            case Job_Crusader:
                getitem 5757,1;    break;    //    Dip Schmidt Helm [1]
            case Job_Sage:
                getitem 5756,1;    break;    //    Wind Whisper [1]
            case Job_Bard:
                getitem 5751,1;    break;    //    Maestro Song's Hat [1]
            case Job_Dancer:
                getitem 5758,1;    break;    //    Dying Swan [1]
            case Job_Monk:
                getitem 5754,1;    break;    //    Blazing Soul [1]
            case Job_Alchemist:
                getitem 5752,1;    break;    //    Midas Whisper[1]
            case Job_Rogue:
                getitem 5750,1;         //    Shadow Handicraft [1]
                getitem 6121,1;            //    Makeover Brush
                getitem 6122,1;    break;    //    Paint Brush
        }
    } else if (.@eac&EAJL_2) {
        // Second Class (And not Third Class)
        switch(BaseJob) {
            // Second Class
            case Job_Knight:
                getitem 1163,1;    break;    //    Claymore [0]
            case Job_Priest:
                getitem 1522,1;    break;    //    Stunner [0]
            case Job_Wizard:
                getitem 1617,1;    break;    //    Survivor's Rod [0]
            case Job_Blacksmith:
                getitem 1360,1;    break;    //    Two-Handed-Axe [1]
            case Job_Hunter:
                getitem 1718,1;    break;    //    Hunter Bow [0]
            case Job_Assassin:
                getitem 1254,1;    break;    //    Jamadhar [0]
            case Job_Crusader:
                getitem 1410,1;    break;    //    Lance [0]
            case Job_Monk:
                getitem 1807,1;    break;    //    Fist [0]
            case Job_Sage:
                getitem 1550,1;    break;    //    Book [3]
            case Job_Rogue:
                getitem 1222,1;    break;    //    Damascus [1]
            case Job_Alchemist:
                getitem 1126,1;    break;    //    Saber [2]
            case Job_Bard:
                getitem 1907,1;    break;    //    Guitar [0]
            case Job_Dancer:
                getitem 1960,1;    break;    //    Whip [1]
            case Job_Super_Novice:
                getitem 1208,1;    break;    //    Main Gauche [4]
            case Job_Star_Gladiator:
                getitem 1550,1;    break;    //    Book [3]
            case Job_Soul_Linker:
                getitem 1617,1;    break;    //    Survivor's Rod [0]
        }
    } else {
        // Neither Second or Third Cls
        // => First Cls or not covered by the switch
        switch(BaseClass) {
            // First Class
            case Job_Swordman:
                getitem 1108,1;    break;    //    Blade [4]
            case Job_Mage:
                getitem 1602,1;    break;    //    Rod [4]
            case Job_Archer:
                getitem 1705,1;    break;    //    Composite Bow [4]
            case Job_Acolyte:
                getitem 1505,1;    break;    //    Mace [4]
            case Job_Merchant:
                getitem 1302,1;    break;    //    Axe [4]
            case Job_Thief:
                getitem 1208,1;    break;    //    Main Gauche [4]
            case Job_Gunslinger:
                getitem 13101,1; break;    //    Six Shooter [2]
            case Job_Ninja:
                getitem 13010,1; break;    //    Asura [2]
        }
    }
    return;
}

OnInit:
    setarray .Rebirth[0],99,50;    // Minimum base level, job level to rebirth OR change to third class
    setarray .JobReq[0],10,40;    // Minimum job level to turn into 1st class, 2nd class
    .ThirdClass = 0;            // Enable third classes? (1: yes / 0: no)
    .SecondExpanded = 0;        // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? (1: yes / 0: no)
    .SNovice = 45;                // Minimum base level to turn into Super Novice
    .LastJob = 1;                // Enforce linear class changes? (1: yes / 0: no)
    .SkillPointCheck = 1;        // Force player to use up all skill points? (1: yes / 0: no)
    .Platinum = 0;                // Get platinum skills automatically? (1: yes / 0: no)
    .GetJobEquip = 1;                // Get job equipment (mostly weapons) on job change?
        initnpctimer;
        end;
OnTimer0050:
        showscript "Job Changer", getnpcid(0);
        initnpctimer;
        end;
}

payon,185,104,4    duplicate(Job Changer NPC)    Job Changer NPC#pay    4_M_ROYALGUARD,{

ive tried to add the function theres no error but still it didnt give free weapons 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

4 minutes ago, GM Winter said:

ive tried to add the function theres no error but still it didnt give free weapons 

try put

function Job_Menu; 

into like this

function Job_Menu; 
function Get_Job_Equip;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

2 hours ago, hendra814 said:

try put

function Job_Menu; 

into like this

function Job_Menu; 
function Get_Job_Equip;

 

[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/thor/JobChanger.txt', line '19'. Stopping...
 * w1=payon,171,210,8    script    Job Changer NPC    4_M_ROYALGUARD,{

 

1.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

16 minutes ago, GM Winter said:

[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/thor/JobChanger.txt', line '19'. Stopping...
 * w1=payon,171,210,8    script    Job Changer NPC    4_M_ROYALGUARD,{

 

1.png

male script at line 19 into 18

and replace it using this

payon,171,210,8	script	Job Changer NPC	4_M_ROYALGUARD,{
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

15 hours ago, hendra814 said:

male script at line 19 into 18

and replace it using this

payon,171,210,8	script	Job Changer NPC	4_M_ROYALGUARD,{

no error but still it doesn't give any weapons by the way thank you for your time

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

21 minutes ago, GM Winter said:

no error but still it doesn't give any weapons by the way thank you for your time

try use this script



//===== rAthena Script =======================================
//= Job Master
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: =========================================
//= A fully functional job changer.
//===== Additional Comments: =================================
//= 1.0 Initial script.
//= 1.1 Fixed reset on Baby job change.
//= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support.
//= 1.3 Kagerou/Oboro added.
//= 1.4 Rebellion added.
//============================================================

payon,171,210,8    script    Job Changer NPC    4_M_ROYALGUARD,{
function Job_Menu;

    mes "[Job Master]";
    if (Class > Job_Soul_Linker) {
        mes "No more jobs are available.";
        close;
    }
    if (checkfalcon() || checkcart() || checkriding() || ismounting()) {
        mes "Please remove your " +
            ((checkfalcon()) ? "falcon" : "") +
            ((checkcart()) ? "cart" : "") +
            ((checkriding()) ? "Peco" : "") +
            ((ismounting()) ? "mount" : "") +
            " before proceeding.";
        close;
    }
    if (.SkillPointCheck && SkillPoint) {
        mes "Please use all your skill points before proceeding.";
        close;
    }

    .@eac = eaclass();
    .@i = ((.ThirdClass) ? roclass(.@eac&EAJ_UPPERMASK) : Class);
    if (.@i >= Job_Knight && .@i <= Job_Crusader2) {
        if (Class > Job_Crusader2) {
            mes "Switch to third class?";
            next;
            Job_Menu(roclass(.@eac|EAJL_THIRD));
            close;
        }
    }
    .@j1 = roclass(.@eac|EAJL_2_1);
    .@j2 = roclass(.@eac|EAJL_2_2);
    if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE)
        setarray .@exp[0], roclass(.@eac|EAJL_THIRD), 99;
    if (Class == Job_Ninja || Class == Job_Gunslinger)
        setarray .@exp[0], .@j1, 70;
    if (.@exp[0] && .SecondExpanded) {
        if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) {
            .@blvl = .Rebirth[0] - BaseLevel;
            .@jlvl = .@exp[1] - JobLevel;
            mes "You need " +
                ((.@blvl > 0) ? .@blvl + " more base levels " + ((.@jlvl > 0) ? "/ " : "") : "") +
                ((.@jlvl > 0) ? .@jlvl + " more job levels " : "") + "to continue.";
            close;
        }
        mes "Switch to " + jobname(.@exp[0]) + "?";
        next;
        Job_Menu(.@exp[0]);
        close;
    }
    if (.@eac&EAJL_2)
        if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) {
            mes "No more jobs are available.";
            close;
        }
    if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) {
        if (JobLevel < .JobReq[0])
            mes "A job level of " + .JobReq[0] + " is required to change into the 1st Class.";
        else if (Class == Job_Novice_High && .LastJob && lastJob) {
            mes "Switch classes now?";
            next;
            Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
        } else {
            switch(Class) {
            case Job_Novice:
                Job_Menu(
//                    Job_Super_Novice,
                    Job_Swordman,
                    Job_Mage,
                    Job_Archer,
                    Job_Acolyte,
                    Job_Merchant,
                    Job_Thief
                );
                break;
            default:
                mes "An error has occurred.";
                break;
            }
        }
        close;
    }
    if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1)
        mes "No more jobs are available.";
    else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1])
        mes "A job level of " + .JobReq[1] + " is required to change into the 2nd Class.";
    else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) {
        mes "Switch classes now?";
        next;
        Job_Menu(lastJob + Job_Novice_High);
    } else
        Job_Menu(.@j1, .@j2);
    close;

function Job_Menu {
    while(1) {
        if (getargcount() > 1) {
            mes "Select a job.";
            .@menu$ = "";
            for (.@i = 0; .@i < getargcount(); .@i++)
                .@menu$ = .@menu$ + " ~ " + jobname(getarg(.@i)) + ":";
            .@menu$ = .@menu$+" ~ ^777777Cancel^000000";
            next;
            .@i = getarg(select(.@menu$) - 1, 0);
            if (!.@i)
                close;
            if ((.@i == Job_SuperNovice || .@i == Job_Super_Baby) && BaseLevel < .SNovice) {
                mes "[Job Master]";
                mes "A base level of " + .SNovice + " is required to turn into a " + jobname(.@i) + ".";
                close;
            }
            mes "[Job Master]";
            mes "Are you sure?";
            next;
        } else
            .@i = getarg(0);
        if (select(" ~ Change into ^0055FF" + jobname(.@i) + "^000000 class: ~ ^777777" + ((getargcount() > 1) ? "Go back" : "Cancel") + "^000000") == 1) {
            //mes "You are now " + callfunc("F_InsertArticle", jobname(.@i)) + "!";
            announce "Congratulations "+strcharinfo(0)+" you are " +callfunc("F_InsertArticle", jobname(.@i)) + " now!",bc_all,0xFFFF00;
            if (.@i == Job_Novice_High && .LastJob)
                lastJob = Class;
            jobchange .@i;
            if (.@i == Job_Novice_High)
                resetlvl(1);
            else if (.@i == Job_Baby) {
                resetstatus;
                resetskill;
                set SkillPoint,0;
            }
            specialeffect2 EF_ANGEL2;
            specialeffect2 EF_ELECTRIC;
            if (.Platinum)
                callsub Get_Platinum;
				callfunc Job_Menu; 
            close;
        }
        if (getargcount() == 1)
            return;
        mes "[Job Master]";
    }
    end;
}

Get_Platinum:
    skill "NV_FIRSTAID",1,SKILL_PERM;
    switch (BaseClass) {
    case Job_Novice:
        if (Class != Job_SuperNovice)
            skill "NV_TRICKDEAD",1,SKILL_PERM;
        break;
    case Job_Swordman:
        skill "SM_MOVINGRECOVERY",1,SKILL_PERM;
        skill "SM_FATALBLOW",1,SKILL_PERM;
        skill "SM_AUTOBERSERK",1,SKILL_PERM;
        break;
    case Job_Mage:
        skill "MG_ENERGYCOAT",1,SKILL_PERM;
        break;
    case Job_Archer:
        skill "AC_MAKINGARROW",1,SKILL_PERM;
        skill "AC_CHARGEARROW",1,SKILL_PERM;
        break;
    case Job_Acolyte:
        skill "AL_HOLYLIGHT",1,SKILL_PERM;
        break;
    case Job_Merchant:
        skill "MC_CARTREVOLUTION",1,SKILL_PERM;
        skill "MC_CHANGECART",1,SKILL_PERM;
        skill "MC_LOUD",1,SKILL_PERM;
        break;
    case Job_Thief:
        skill "TF_SPRINKLESAND",1,SKILL_PERM;
        skill "TF_BACKSLIDING",1,SKILL_PERM;
        skill "TF_PICKSTONE",1,SKILL_PERM;
        skill "TF_THROWSTONE",1,SKILL_PERM;
        break;
    default:
        break;
    }
    switch (BaseJob) {
    case Job_Knight:
        skill "KN_CHARGEATK",1,SKILL_PERM;
        break;
    case Job_Priest:
        skill "PR_REDEMPTIO",1,SKILL_PERM;
        break;
    case Job_Wizard:
        skill "WZ_SIGHTBLASTER",1,SKILL_PERM;
        break;
    case Job_Blacksmith:
        skill "BS_UNFAIRLYTRICK",1,SKILL_PERM;
        skill "BS_GREED",1,SKILL_PERM;
        break;
    case Job_Hunter:
        skill "HT_PHANTASMIC",1,SKILL_PERM;
        break;
    case Job_Assassin:
        skill "AS_SONICACCEL",1,SKILL_PERM;
        skill "AS_VENOMKNIFE",1,SKILL_PERM;
        break;
    case Job_Crusader:
        skill "CR_SHRINK",1,SKILL_PERM;
        break;
    case Job_Monk:
        skill "MO_KITRANSLATION",1,SKILL_PERM;
        skill "MO_BALKYOUNG",1,SKILL_PERM;
        break;
    case Job_Sage:
        skill "SA_CREATECON",1,SKILL_PERM;
        skill "SA_ELEMENTWATER",1,SKILL_PERM;
        skill "SA_ELEMENTGROUND",1,SKILL_PERM;
        skill "SA_ELEMENTFIRE",1,SKILL_PERM;
        skill "SA_ELEMENTWIND",1,SKILL_PERM;
        break;
    case Job_Rogue:
        skill "RG_CLOSECONFINE",1,SKILL_PERM;
        break;
    case Job_Alchemist:
        skill "AM_BIOETHICS",1,SKILL_PERM;
        break;
    case Job_Bard:
        skill "BA_PANGVOICE",1,SKILL_PERM;
        break;
    case Job_Dancer:
        skill "DC_WINKCHARM",1,SKILL_PERM;
        break;
    default:
        break;
    }
    return;
  
  function	Get_Job_Equip	{
	// Note: The item is dropping, when the player can't hold it.
	// But that's better than not giving the item at all.
	.@eac = eaclass();
	if( .@eac&EAJL_FOURTH ) {
		// Fourth Class Items
		getitem 490087,1; // Hourglass Necklace
	} else if( .@eac&EAJL_THIRD ) {
		// Third Class Items
		getitem 2795,1;	//	Green Apple Ring for every 3rd Class
		switch(BaseJob) {
			// BaseJob of Third Cls
			// For Normal Third, Baby Third and Transcended Third Cls
			case Job_Knight:
				getitem 5746,1;	break;	//	Rune Circlet [1]
			case Job_Wizard:
				getitem 5753,1;	break;	//	Magic Stone Hat [1]
			case Job_Hunter:
				getitem 5748,1;	break;	//	Sniper Goggle [1]
			case Job_Priest:
				getitem 5747,1;	break;	//	Mitra [1]
			case Job_Blacksmith:
				getitem 5749,1;	break;	//	Driver Band [1]
			case Job_Assassin:
				getitem 5755,1;	break;	//	Silent Executor [1]
			case Job_Crusader:
				getitem 5757,1;	break;	//	Dip Schmidt Helm [1]
			case Job_Sage:
				getitem 5756,1;	break;	//	Wind Whisper [1]
			case Job_Bard:
				getitem 5751,1;	break;	//	Maestro Song's Hat [1]
			case Job_Dancer:
				getitem 5758,1;	break;	//	Dying Swan [1]
			case Job_Monk:
				getitem 5754,1;	break;	//	Blazing Soul [1]
			case Job_Alchemist:
				getitem 5752,1;	break;	//	Midas Whisper[1]
			case Job_Rogue:
				getitem 5750,1; 		//	Shadow Handicraft [1]
				getitem 6121,1;			//	Makeover Brush
				getitem 6122,1;	break;	//	Paint Brush
		}
	} else if (.@eac&EAJL_2) {
		// Second Class (And not Third Class)
		switch(BaseJob) {
			// Second Class
			case Job_Knight:
				getitem 1163,1;	break;	//	Claymore [0]
			case Job_Priest:
				getitem 1522,1;	break;	//	Stunner [0]
			case Job_Wizard:
				getitem 1617,1;	break;	//	Survivor's Rod [0]
			case Job_Blacksmith:
				getitem 1360,1;	break;	//	Two-Handed-Axe [1]
			case Job_Hunter:
				getitem 1718,1;	break;	//	Hunter Bow [0]
			case Job_Assassin:
				getitem 1254,1;	break;	//	Jamadhar [0]
			case Job_Crusader:
				getitem 1410,1;	break;	//	Lance [0]
			case Job_Monk:
				getitem 1807,1;	break;	//	Fist [0]
			case Job_Sage:
				getitem 1550,1;	break;	//	Book [3]
			case Job_Rogue:
				getitem 1222,1;	break;	//	Damascus [1]
			case Job_Alchemist:
				getitem 1126,1;	break;	//	Saber [2]
			case Job_Bard:
				getitem 1907,1;	break;	//	Guitar [0]
			case Job_Dancer:
				getitem 1960,1;	break;	//	Whip [1]
			case Job_Super_Novice:
				getitem 1208,1;	break;	//	Main Gauche [4]
			case Job_Star_Gladiator:
				getitem 1550,1;	break;	//	Book [3]
			case Job_Soul_Linker:
				getitem 1617,1;	break;	//	Survivor's Rod [0]
		}
	} else {
		// Neither Second or Third Cls
		// => First Cls or not covered by the switch
		switch(BaseClass) {
			// First Class
			case Job_Swordman:
				getitem 1108,1;	break;	//	Blade [4]
			case Job_Mage:
				getitem 1602,1;	break;	//	Rod [4]
			case Job_Archer:
				getitem 1705,1;	break;	//	Composite Bow [4]
			case Job_Acolyte:
				getitem 1505,1;	break;	//	Mace [4]
			case Job_Merchant:
				getitem 1302,1;	break;	//	Axe [4]
			case Job_Thief:
				getitem 1208,1;	break;	//	Main Gauche [4]
			case Job_Gunslinger:
				getitem 13101,1; break;	//	Six Shooter [2]
			case Job_Ninja:
				getitem 13010,1; break;	//	Asura [2]
		}
	}
	return;
}

OnInit:
    setarray .Rebirth[0],99,50;    // Minimum base level, job level to rebirth OR change to third class
    setarray .JobReq[0],10,40;    // Minimum job level to turn into 1st class, 2nd class
    .ThirdClass = 0;            // Enable third classes? (1: yes / 0: no)
    .SecondExpanded = 0;        // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? (1: yes / 0: no)
    .SNovice = 45;                // Minimum base level to turn into Super Novice
    .LastJob = 1;                // Enforce linear class changes? (1: yes / 0: no)
    .SkillPointCheck = 1;        // Force player to use up all skill points? (1: yes / 0: no)
    .Platinum = 0;                // Get platinum skills automatically? (1: yes / 0: no)
        initnpctimer;
        end;
OnTimer0050:
        showscript "Job Changer", getnpcid(0);
        initnpctimer;
        end;
}

payon,185,104,4    duplicate(Job Changer NPC)    Job Changer NPC#pay    4_M_ROYALGUARD,{

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

after that i try to change this
    payon,171,210,8    script    Job Changer NPC    4_M_ROYALGUARD,{ 
to payon,171,210,8 script Job Changer NPC 4_M_ROYALGUARD,{

no error but when im changing job i didnt get anyitem and the npc stock


 

1.png

2.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1191
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

4 hours ago, GM Winter said:

after that i try to change this
    payon,171,210,8    script    Job Changer NPC    4_M_ROYALGUARD,{ 
to payon,171,210,8 script Job Changer NPC 4_M_ROYALGUARD,{

no error but when im changing job i didnt get anyitem and the npc stock


 

1.png

2.png

I'm sorry, i had put wrong code in the script.

here, already tried it and it's working

//===== rAthena Script =======================================
//= Job Master
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: =========================================
//= A fully functional job changer.
//===== Additional Comments: =================================
//= 1.0 Initial script.
//= 1.1 Fixed reset on Baby job change.
//= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support.
//= 1.3 Kagerou/Oboro added.
//= 1.4 Rebellion added.
//============================================================
payon,171,210,8	script	Job Changer NPC	4_M_ROYALGUARD,{
function Job_Menu;

    mes "[Job Master]";
    if (Class > Job_Soul_Linker) {
        mes "No more jobs are available.";
        close;
    }
    if (checkfalcon() || checkcart() || checkriding() || ismounting()) {
        mes "Please remove your " +
            ((checkfalcon()) ? "falcon" : "") +
            ((checkcart()) ? "cart" : "") +
            ((checkriding()) ? "Peco" : "") +
            ((ismounting()) ? "mount" : "") +
            " before proceeding.";
        close;
    }
    if (.SkillPointCheck && SkillPoint) {
        mes "Please use all your skill points before proceeding.";
        close;
    }

    .@eac = eaclass();
    .@i = ((.ThirdClass) ? roclass(.@eac&EAJ_UPPERMASK) : Class);
    if (.@i >= Job_Knight && .@i <= Job_Crusader2) {
        if (Class > Job_Crusader2) {
            mes "Switch to third class?";
            next;
            Job_Menu(roclass(.@eac|EAJL_THIRD));
            close;
        }
    }
    .@j1 = roclass(.@eac|EAJL_2_1);
    .@j2 = roclass(.@eac|EAJL_2_2);
    if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE)
        setarray .@exp[0], roclass(.@eac|EAJL_THIRD), 99;
    if (Class == Job_Ninja || Class == Job_Gunslinger)
        setarray .@exp[0], .@j1, 70;
    if (.@exp[0] && .SecondExpanded) {
        if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) {
            .@blvl = .Rebirth[0] - BaseLevel;
            .@jlvl = .@exp[1] - JobLevel;
            mes "You need " +
                ((.@blvl > 0) ? .@blvl + " more base levels " + ((.@jlvl > 0) ? "/ " : "") : "") +
                ((.@jlvl > 0) ? .@jlvl + " more job levels " : "") + "to continue.";
            close;
        }
        mes "Switch to " + jobname(.@exp[0]) + "?";
        next;
        Job_Menu(.@exp[0]);
        close;
    }
    if (.@eac&EAJL_2)
        if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) {
            mes "No more jobs are available.";
            close;
        }
    if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) {
        if (JobLevel < .JobReq[0])
            mes "A job level of " + .JobReq[0] + " is required to change into the 1st Class.";
        else if (Class == Job_Novice_High && .LastJob && lastJob) {
            mes "Switch classes now?";
            next;
            Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
        } else {
            switch(Class) {
            case Job_Novice:
                Job_Menu(
//                    Job_Super_Novice,
                    Job_Swordman,
                    Job_Mage,
                    Job_Archer,
                    Job_Acolyte,
                    Job_Merchant,
                    Job_Thief
                );
                break;
            default:
                mes "An error has occurred.";
                break;
            }
        }
        close;
    }
    if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1)
        mes "No more jobs are available.";
    else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1])
        mes "A job level of " + .JobReq[1] + " is required to change into the 2nd Class.";
    else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) {
        mes "Switch classes now?";
        next;
        Job_Menu(lastJob + Job_Novice_High);
    } else
        Job_Menu(.@j1, .@j2);
    close;

function Job_Menu {
    while(1) {
        if (getargcount() > 1) {
            mes "Select a job.";
            .@menu$ = "";
            for (.@i = 0; .@i < getargcount(); .@i++)
                .@menu$ = .@menu$ + " ~ " + jobname(getarg(.@i)) + ":";
            .@menu$ = .@menu$+" ~ ^777777Cancel^000000";
            next;
            .@i = getarg(select(.@menu$) - 1, 0);
            if (!.@i)
                close;
            if ((.@i == Job_SuperNovice || .@i == Job_Super_Baby) && BaseLevel < .SNovice) {
                mes "[Job Master]";
                mes "A base level of " + .SNovice + " is required to turn into a " + jobname(.@i) + ".";
                close;
            }
            mes "[Job Master]";
            mes "Are you sure?";
            next;
        } else
            .@i = getarg(0);
        if (select(" ~ Change into ^0055FF" + jobname(.@i) + "^000000 class: ~ ^777777" + ((getargcount() > 1) ? "Go back" : "Cancel") + "^000000") == 1) {
            //mes "You are now " + callfunc("F_InsertArticle", jobname(.@i)) + "!";
            announce "Congratulations "+strcharinfo(0)+" you are " +callfunc("F_InsertArticle", jobname(.@i)) + " now!",bc_all,0xFFFF00;
            if (.@i == Job_Novice_High && .LastJob)
                lastJob = Class;
            jobchange .@i;
		callsub Get_Job_Equip;
            if (.@i == Job_Novice_High)
                resetlvl(1);
            else if (.@i == Job_Baby) {
                resetstatus;
                resetskill;
                set SkillPoint,0;
            }
            specialeffect2 EF_ANGEL2;
            specialeffect2 EF_ELECTRIC;
            if (.Platinum)
                callsub Get_Platinum;
            close;
        }
        if (getargcount() == 1)
            return;
        mes "[Job Master]";
    }
    end;
}

Get_Platinum:
    skill "NV_FIRSTAID",1,SKILL_PERM;
    switch (BaseClass) {
    case Job_Novice:
        if (Class != Job_SuperNovice)
            skill "NV_TRICKDEAD",1,SKILL_PERM;
        break;
    case Job_Swordman:
        skill "SM_MOVINGRECOVERY",1,SKILL_PERM;
        skill "SM_FATALBLOW",1,SKILL_PERM;
        skill "SM_AUTOBERSERK",1,SKILL_PERM;
        break;
    case Job_Mage:
        skill "MG_ENERGYCOAT",1,SKILL_PERM;
        break;
    case Job_Archer:
        skill "AC_MAKINGARROW",1,SKILL_PERM;
        skill "AC_CHARGEARROW",1,SKILL_PERM;
        break;
    case Job_Acolyte:
        skill "AL_HOLYLIGHT",1,SKILL_PERM;
        break;
    case Job_Merchant:
        skill "MC_CARTREVOLUTION",1,SKILL_PERM;
        skill "MC_CHANGECART",1,SKILL_PERM;
        skill "MC_LOUD",1,SKILL_PERM;
        break;
    case Job_Thief:
        skill "TF_SPRINKLESAND",1,SKILL_PERM;
        skill "TF_BACKSLIDING",1,SKILL_PERM;
        skill "TF_PICKSTONE",1,SKILL_PERM;
        skill "TF_THROWSTONE",1,SKILL_PERM;
        break;
    default:
        break;
    }
    switch (BaseJob) {
    case Job_Knight:
        skill "KN_CHARGEATK",1,SKILL_PERM;
        break;
    case Job_Priest:
        skill "PR_REDEMPTIO",1,SKILL_PERM;
        break;
    case Job_Wizard:
        skill "WZ_SIGHTBLASTER",1,SKILL_PERM;
        break;
    case Job_Blacksmith:
        skill "BS_UNFAIRLYTRICK",1,SKILL_PERM;
        skill "BS_GREED",1,SKILL_PERM;
        break;
    case Job_Hunter:
        skill "HT_PHANTASMIC",1,SKILL_PERM;
        break;
    case Job_Assassin:
        skill "AS_SONICACCEL",1,SKILL_PERM;
        skill "AS_VENOMKNIFE",1,SKILL_PERM;
        break;
    case Job_Crusader:
        skill "CR_SHRINK",1,SKILL_PERM;
        break;
    case Job_Monk:
        skill "MO_KITRANSLATION",1,SKILL_PERM;
        skill "MO_BALKYOUNG",1,SKILL_PERM;
        break;
    case Job_Sage:
        skill "SA_CREATECON",1,SKILL_PERM;
        skill "SA_ELEMENTWATER",1,SKILL_PERM;
        skill "SA_ELEMENTGROUND",1,SKILL_PERM;
        skill "SA_ELEMENTFIRE",1,SKILL_PERM;
        skill "SA_ELEMENTWIND",1,SKILL_PERM;
        break;
    case Job_Rogue:
        skill "RG_CLOSECONFINE",1,SKILL_PERM;
        break;
    case Job_Alchemist:
        skill "AM_BIOETHICS",1,SKILL_PERM;
        break;
    case Job_Bard:
        skill "BA_PANGVOICE",1,SKILL_PERM;
        break;
    case Job_Dancer:
        skill "DC_WINKCHARM",1,SKILL_PERM;
        break;
    default:
        break;
    }
    return;
  
  Get_Job_Equip:
	// Note: The item is dropping, when the player can't hold it.
	// But that's better than not giving the item at all.
	.@eac = eaclass();
	if( .@eac&EAJL_FOURTH ) {
		// Fourth Class Items
		getitem 490087,1; // Hourglass Necklace
	} else if( .@eac&EAJL_THIRD ) {
		// Third Class Items
		getitem 2795,1;	//	Green Apple Ring for every 3rd Class
		switch(BaseJob) {
			// BaseJob of Third Cls
			// For Normal Third, Baby Third and Transcended Third Cls
			case Job_Knight:
				getitem 5746,1;	break;	//	Rune Circlet [1]
			case Job_Wizard:
				getitem 5753,1;	break;	//	Magic Stone Hat [1]
			case Job_Hunter:
				getitem 5748,1;	break;	//	Sniper Goggle [1]
			case Job_Priest:
				getitem 5747,1;	break;	//	Mitra [1]
			case Job_Blacksmith:
				getitem 5749,1;	break;	//	Driver Band [1]
			case Job_Assassin:
				getitem 5755,1;	break;	//	Silent Executor [1]
			case Job_Crusader:
				getitem 5757,1;	break;	//	Dip Schmidt Helm [1]
			case Job_Sage:
				getitem 5756,1;	break;	//	Wind Whisper [1]
			case Job_Bard:
				getitem 5751,1;	break;	//	Maestro Song's Hat [1]
			case Job_Dancer:
				getitem 5758,1;	break;	//	Dying Swan [1]
			case Job_Monk:
				getitem 5754,1;	break;	//	Blazing Soul [1]
			case Job_Alchemist:
				getitem 5752,1;	break;	//	Midas Whisper[1]
			case Job_Rogue:
				getitem 5750,1; 		//	Shadow Handicraft [1]
				getitem 6121,1;			//	Makeover Brush
				getitem 6122,1;	break;	//	Paint Brush
		}
	} else if (.@eac&EAJL_2) {
		// Second Class (And not Third Class)
		switch(BaseJob) {
			// Second Class
			case Job_Knight:
				getitem 1163,1;	break;	//	Claymore [0]
			case Job_Priest:
				getitem 1522,1;	break;	//	Stunner [0]
			case Job_Wizard:
				getitem 1617,1;	break;	//	Survivor's Rod [0]
			case Job_Blacksmith:
				getitem 1360,1;	break;	//	Two-Handed-Axe [1]
			case Job_Hunter:
				getitem 1718,1;	break;	//	Hunter Bow [0]
			case Job_Assassin:
				getitem 1254,1;	break;	//	Jamadhar [0]
			case Job_Crusader:
				getitem 1410,1;	break;	//	Lance [0]
			case Job_Monk:
				getitem 1807,1;	break;	//	Fist [0]
			case Job_Sage:
				getitem 1550,1;	break;	//	Book [3]
			case Job_Rogue:
				getitem 1222,1;	break;	//	Damascus [1]
			case Job_Alchemist:
				getitem 1126,1;	break;	//	Saber [2]
			case Job_Bard:
				getitem 1907,1;	break;	//	Guitar [0]
			case Job_Dancer:
				getitem 1960,1;	break;	//	Whip [1]
			case Job_Super_Novice:
				getitem 1208,1;	break;	//	Main Gauche [4]
			case Job_Star_Gladiator:
				getitem 1550,1;	break;	//	Book [3]
			case Job_Soul_Linker:
				getitem 1617,1;	break;	//	Survivor's Rod [0]
		}
	} else {
		// Neither Second or Third Cls
		// => First Cls or not covered by the switch
		switch(BaseClass) {
			// First Class
			case Job_Swordman:
				getitem 1108,1;	break;	//	Blade [4]
			case Job_Mage:
				getitem 1602,1;	break;	//	Rod [4]
			case Job_Archer:
				getitem 1705,1;	break;	//	Composite Bow [4]
			case Job_Acolyte:
				getitem 1505,1;	break;	//	Mace [4]
			case Job_Merchant:
				getitem 1302,1;	break;	//	Axe [4]
			case Job_Thief:
				getitem 1208,1;	break;	//	Main Gauche [4]
			case Job_Gunslinger:
				getitem 13101,1; break;	//	Six Shooter [2]
			case Job_Ninja:
				getitem 13010,1; break;	//	Asura [2]
		}
	}
	return;

OnInit:
    setarray .Rebirth[0],99,50;    // Minimum base level, job level to rebirth OR change to third class
    setarray .JobReq[0],10,40;    // Minimum job level to turn into 1st class, 2nd class
    .ThirdClass = 0;            // Enable third classes? (1: yes / 0: no)
    .SecondExpanded = 0;        // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? (1: yes / 0: no)
    .SNovice = 45;                // Minimum base level to turn into Super Novice
    .LastJob = 1;                // Enforce linear class changes? (1: yes / 0: no)
    .SkillPointCheck = 1;        // Force player to use up all skill points? (1: yes / 0: no)
    .Platinum = 0;                // Get platinum skills automatically? (1: yes / 0: no)
        initnpctimer;
        end;
OnTimer0050:
        showscript "Job Changer", getnpcid(0);
        initnpctimer;
        end;
}

payon,185,104,4    duplicate(Job Changer NPC)    Job Changer NPC#pay    4_M_ROYALGUARD,{

 

Edited by hendra814
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

1 hour ago, hendra814 said:

I'm sorry, i had put wrong code in the script.

here, already tried it and it's working

//===== rAthena Script =======================================
//= Job Master
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: =========================================
//= A fully functional job changer.
//===== Additional Comments: =================================
//= 1.0 Initial script.
//= 1.1 Fixed reset on Baby job change.
//= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support.
//= 1.3 Kagerou/Oboro added.
//= 1.4 Rebellion added.
//============================================================
payon,171,210,8	script	Job Changer NPC	4_M_ROYALGUARD,{
function Job_Menu;

    mes "[Job Master]";
    if (Class > Job_Soul_Linker) {
        mes "No more jobs are available.";
        close;
    }
    if (checkfalcon() || checkcart() || checkriding() || ismounting()) {
        mes "Please remove your " +
            ((checkfalcon()) ? "falcon" : "") +
            ((checkcart()) ? "cart" : "") +
            ((checkriding()) ? "Peco" : "") +
            ((ismounting()) ? "mount" : "") +
            " before proceeding.";
        close;
    }
    if (.SkillPointCheck && SkillPoint) {
        mes "Please use all your skill points before proceeding.";
        close;
    }

    .@eac = eaclass();
    .@i = ((.ThirdClass) ? roclass(.@eac&EAJ_UPPERMASK) : Class);
    if (.@i >= Job_Knight && .@i <= Job_Crusader2) {
        if (Class > Job_Crusader2) {
            mes "Switch to third class?";
            next;
            Job_Menu(roclass(.@eac|EAJL_THIRD));
            close;
        }
    }
    .@j1 = roclass(.@eac|EAJL_2_1);
    .@j2 = roclass(.@eac|EAJL_2_2);
    if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE)
        setarray .@exp[0], roclass(.@eac|EAJL_THIRD), 99;
    if (Class == Job_Ninja || Class == Job_Gunslinger)
        setarray .@exp[0], .@j1, 70;
    if (.@exp[0] && .SecondExpanded) {
        if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) {
            .@blvl = .Rebirth[0] - BaseLevel;
            .@jlvl = .@exp[1] - JobLevel;
            mes "You need " +
                ((.@blvl > 0) ? .@blvl + " more base levels " + ((.@jlvl > 0) ? "/ " : "") : "") +
                ((.@jlvl > 0) ? .@jlvl + " more job levels " : "") + "to continue.";
            close;
        }
        mes "Switch to " + jobname(.@exp[0]) + "?";
        next;
        Job_Menu(.@exp[0]);
        close;
    }
    if (.@eac&EAJL_2)
        if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) {
            mes "No more jobs are available.";
            close;
        }
    if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) {
        if (JobLevel < .JobReq[0])
            mes "A job level of " + .JobReq[0] + " is required to change into the 1st Class.";
        else if (Class == Job_Novice_High && .LastJob && lastJob) {
            mes "Switch classes now?";
            next;
            Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
        } else {
            switch(Class) {
            case Job_Novice:
                Job_Menu(
//                    Job_Super_Novice,
                    Job_Swordman,
                    Job_Mage,
                    Job_Archer,
                    Job_Acolyte,
                    Job_Merchant,
                    Job_Thief
                );
                break;
            default:
                mes "An error has occurred.";
                break;
            }
        }
        close;
    }
    if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1)
        mes "No more jobs are available.";
    else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1])
        mes "A job level of " + .JobReq[1] + " is required to change into the 2nd Class.";
    else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) {
        mes "Switch classes now?";
        next;
        Job_Menu(lastJob + Job_Novice_High);
    } else
        Job_Menu(.@j1, .@j2);
    close;

function Job_Menu {
    while(1) {
        if (getargcount() > 1) {
            mes "Select a job.";
            .@menu$ = "";
            for (.@i = 0; .@i < getargcount(); .@i++)
                .@menu$ = .@menu$ + " ~ " + jobname(getarg(.@i)) + ":";
            .@menu$ = .@menu$+" ~ ^777777Cancel^000000";
            next;
            .@i = getarg(select(.@menu$) - 1, 0);
            if (!.@i)
                close;
            if ((.@i == Job_SuperNovice || .@i == Job_Super_Baby) && BaseLevel < .SNovice) {
                mes "[Job Master]";
                mes "A base level of " + .SNovice + " is required to turn into a " + jobname(.@i) + ".";
                close;
            }
            mes "[Job Master]";
            mes "Are you sure?";
            next;
        } else
            .@i = getarg(0);
        if (select(" ~ Change into ^0055FF" + jobname(.@i) + "^000000 class: ~ ^777777" + ((getargcount() > 1) ? "Go back" : "Cancel") + "^000000") == 1) {
            //mes "You are now " + callfunc("F_InsertArticle", jobname(.@i)) + "!";
            announce "Congratulations "+strcharinfo(0)+" you are " +callfunc("F_InsertArticle", jobname(.@i)) + " now!",bc_all,0xFFFF00;
            if (.@i == Job_Novice_High && .LastJob)
                lastJob = Class;
            jobchange .@i;
		callsub Get_Job_Equip;
            if (.@i == Job_Novice_High)
                resetlvl(1);
            else if (.@i == Job_Baby) {
                resetstatus;
                resetskill;
                set SkillPoint,0;
            }
            specialeffect2 EF_ANGEL2;
            specialeffect2 EF_ELECTRIC;
            if (.Platinum)
                callsub Get_Platinum;
            close;
        }
        if (getargcount() == 1)
            return;
        mes "[Job Master]";
    }
    end;
}

Get_Platinum:
    skill "NV_FIRSTAID",1,SKILL_PERM;
    switch (BaseClass) {
    case Job_Novice:
        if (Class != Job_SuperNovice)
            skill "NV_TRICKDEAD",1,SKILL_PERM;
        break;
    case Job_Swordman:
        skill "SM_MOVINGRECOVERY",1,SKILL_PERM;
        skill "SM_FATALBLOW",1,SKILL_PERM;
        skill "SM_AUTOBERSERK",1,SKILL_PERM;
        break;
    case Job_Mage:
        skill "MG_ENERGYCOAT",1,SKILL_PERM;
        break;
    case Job_Archer:
        skill "AC_MAKINGARROW",1,SKILL_PERM;
        skill "AC_CHARGEARROW",1,SKILL_PERM;
        break;
    case Job_Acolyte:
        skill "AL_HOLYLIGHT",1,SKILL_PERM;
        break;
    case Job_Merchant:
        skill "MC_CARTREVOLUTION",1,SKILL_PERM;
        skill "MC_CHANGECART",1,SKILL_PERM;
        skill "MC_LOUD",1,SKILL_PERM;
        break;
    case Job_Thief:
        skill "TF_SPRINKLESAND",1,SKILL_PERM;
        skill "TF_BACKSLIDING",1,SKILL_PERM;
        skill "TF_PICKSTONE",1,SKILL_PERM;
        skill "TF_THROWSTONE",1,SKILL_PERM;
        break;
    default:
        break;
    }
    switch (BaseJob) {
    case Job_Knight:
        skill "KN_CHARGEATK",1,SKILL_PERM;
        break;
    case Job_Priest:
        skill "PR_REDEMPTIO",1,SKILL_PERM;
        break;
    case Job_Wizard:
        skill "WZ_SIGHTBLASTER",1,SKILL_PERM;
        break;
    case Job_Blacksmith:
        skill "BS_UNFAIRLYTRICK",1,SKILL_PERM;
        skill "BS_GREED",1,SKILL_PERM;
        break;
    case Job_Hunter:
        skill "HT_PHANTASMIC",1,SKILL_PERM;
        break;
    case Job_Assassin:
        skill "AS_SONICACCEL",1,SKILL_PERM;
        skill "AS_VENOMKNIFE",1,SKILL_PERM;
        break;
    case Job_Crusader:
        skill "CR_SHRINK",1,SKILL_PERM;
        break;
    case Job_Monk:
        skill "MO_KITRANSLATION",1,SKILL_PERM;
        skill "MO_BALKYOUNG",1,SKILL_PERM;
        break;
    case Job_Sage:
        skill "SA_CREATECON",1,SKILL_PERM;
        skill "SA_ELEMENTWATER",1,SKILL_PERM;
        skill "SA_ELEMENTGROUND",1,SKILL_PERM;
        skill "SA_ELEMENTFIRE",1,SKILL_PERM;
        skill "SA_ELEMENTWIND",1,SKILL_PERM;
        break;
    case Job_Rogue:
        skill "RG_CLOSECONFINE",1,SKILL_PERM;
        break;
    case Job_Alchemist:
        skill "AM_BIOETHICS",1,SKILL_PERM;
        break;
    case Job_Bard:
        skill "BA_PANGVOICE",1,SKILL_PERM;
        break;
    case Job_Dancer:
        skill "DC_WINKCHARM",1,SKILL_PERM;
        break;
    default:
        break;
    }
    return;
  
  Get_Job_Equip:
	// Note: The item is dropping, when the player can't hold it.
	// But that's better than not giving the item at all.
	.@eac = eaclass();
	if( .@eac&EAJL_FOURTH ) {
		// Fourth Class Items
		getitem 490087,1; // Hourglass Necklace
	} else if( .@eac&EAJL_THIRD ) {
		// Third Class Items
		getitem 2795,1;	//	Green Apple Ring for every 3rd Class
		switch(BaseJob) {
			// BaseJob of Third Cls
			// For Normal Third, Baby Third and Transcended Third Cls
			case Job_Knight:
				getitem 5746,1;	break;	//	Rune Circlet [1]
			case Job_Wizard:
				getitem 5753,1;	break;	//	Magic Stone Hat [1]
			case Job_Hunter:
				getitem 5748,1;	break;	//	Sniper Goggle [1]
			case Job_Priest:
				getitem 5747,1;	break;	//	Mitra [1]
			case Job_Blacksmith:
				getitem 5749,1;	break;	//	Driver Band [1]
			case Job_Assassin:
				getitem 5755,1;	break;	//	Silent Executor [1]
			case Job_Crusader:
				getitem 5757,1;	break;	//	Dip Schmidt Helm [1]
			case Job_Sage:
				getitem 5756,1;	break;	//	Wind Whisper [1]
			case Job_Bard:
				getitem 5751,1;	break;	//	Maestro Song's Hat [1]
			case Job_Dancer:
				getitem 5758,1;	break;	//	Dying Swan [1]
			case Job_Monk:
				getitem 5754,1;	break;	//	Blazing Soul [1]
			case Job_Alchemist:
				getitem 5752,1;	break;	//	Midas Whisper[1]
			case Job_Rogue:
				getitem 5750,1; 		//	Shadow Handicraft [1]
				getitem 6121,1;			//	Makeover Brush
				getitem 6122,1;	break;	//	Paint Brush
		}
	} else if (.@eac&EAJL_2) {
		// Second Class (And not Third Class)
		switch(BaseJob) {
			// Second Class
			case Job_Knight:
				getitem 1163,1;	break;	//	Claymore [0]
			case Job_Priest:
				getitem 1522,1;	break;	//	Stunner [0]
			case Job_Wizard:
				getitem 1617,1;	break;	//	Survivor's Rod [0]
			case Job_Blacksmith:
				getitem 1360,1;	break;	//	Two-Handed-Axe [1]
			case Job_Hunter:
				getitem 1718,1;	break;	//	Hunter Bow [0]
			case Job_Assassin:
				getitem 1254,1;	break;	//	Jamadhar [0]
			case Job_Crusader:
				getitem 1410,1;	break;	//	Lance [0]
			case Job_Monk:
				getitem 1807,1;	break;	//	Fist [0]
			case Job_Sage:
				getitem 1550,1;	break;	//	Book [3]
			case Job_Rogue:
				getitem 1222,1;	break;	//	Damascus [1]
			case Job_Alchemist:
				getitem 1126,1;	break;	//	Saber [2]
			case Job_Bard:
				getitem 1907,1;	break;	//	Guitar [0]
			case Job_Dancer:
				getitem 1960,1;	break;	//	Whip [1]
			case Job_Super_Novice:
				getitem 1208,1;	break;	//	Main Gauche [4]
			case Job_Star_Gladiator:
				getitem 1550,1;	break;	//	Book [3]
			case Job_Soul_Linker:
				getitem 1617,1;	break;	//	Survivor's Rod [0]
		}
	} else {
		// Neither Second or Third Cls
		// => First Cls or not covered by the switch
		switch(BaseClass) {
			// First Class
			case Job_Swordman:
				getitem 1108,1;	break;	//	Blade [4]
			case Job_Mage:
				getitem 1602,1;	break;	//	Rod [4]
			case Job_Archer:
				getitem 1705,1;	break;	//	Composite Bow [4]
			case Job_Acolyte:
				getitem 1505,1;	break;	//	Mace [4]
			case Job_Merchant:
				getitem 1302,1;	break;	//	Axe [4]
			case Job_Thief:
				getitem 1208,1;	break;	//	Main Gauche [4]
			case Job_Gunslinger:
				getitem 13101,1; break;	//	Six Shooter [2]
			case Job_Ninja:
				getitem 13010,1; break;	//	Asura [2]
		}
	}
	return;

OnInit:
    setarray .Rebirth[0],99,50;    // Minimum base level, job level to rebirth OR change to third class
    setarray .JobReq[0],10,40;    // Minimum job level to turn into 1st class, 2nd class
    .ThirdClass = 0;            // Enable third classes? (1: yes / 0: no)
    .SecondExpanded = 0;        // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? (1: yes / 0: no)
    .SNovice = 45;                // Minimum base level to turn into Super Novice
    .LastJob = 1;                // Enforce linear class changes? (1: yes / 0: no)
    .SkillPointCheck = 1;        // Force player to use up all skill points? (1: yes / 0: no)
    .Platinum = 0;                // Get platinum skills automatically? (1: yes / 0: no)
        initnpctimer;
        end;
OnTimer0050:
        showscript "Job Changer", getnpcid(0);
        initnpctimer;
        end;
}

payon,185,104,4    duplicate(Job Changer NPC)    Job Changer NPC#pay    4_M_ROYALGUARD,{

 

thank you so much sir for your help i really appreciate it  ❤️

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...