Jump to content
  • 0

Official JobMaster function Get_Job_Equip wasn't working


drakulya

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   11
  • Joined:  03/30/20
  • Last Seen:  

Hello every body!

I hope you're all doing well.

I'm using the official rAthena JobMaster custom script and i've realized that, no matter which job i'd choose, it never gaves me the job relative weapon/item - i tested it with First classes, second classes, transclasses and third-classes.

So, i've started studying the script code yesterday, when rAthena compiles there is no error, but it simply doesnt gave me the item.

I would like to know how you guys would fix it. Here i Solved.

My Solution is described bellow:

Changed the Original Job_Change function last lines:

// Executes the actual jobchange and closes.
function	Job_Change	{
	.@previous_class = Class;
	.@to_cls = getarg(0);
	next;
	mes .NPCName$;
	mes "You are now " + callfunc("F_InsertArticle", jobname(.@to_cls)) + "!";
	if (.@to_cls == Job_Novice_High && .LastJob)
		lastJob = Class; // Saves the lastJob for rebirth
	jobchange .@to_cls;
	if (.@to_cls == Job_Novice_High)
		resetlvl(1);
	else if (.@to_cls == Job_Baby) {
		resetstatus;
		resetskill;
		set SkillPoint,0;
	}
	specialeffect2 EF_ANGEL2;
	specialeffect2 EF_ELECTRIC;
	if (.@previous_class != Class) {
		if (.Platinum)
			callfunc "F_GetPlatinumSkills";
		if (.GetJobEquip)
			Get_Job_Equip();
	}
	close; // Always closes after the change
}

To this way below... (the function for me is now out of the "IF" condition and before the ".Platinum" IF condition), it always gives the item: 

// Executes the actual jobchange and closes.
function	Job_Change	{
	.@previous_class = Class;
	.@to_cls = getarg(0);
	next;
	mes .NPCName$;
	mes "You are now " + callfunc("F_InsertArticle", jobname(.@to_cls)) + "!";
	if (.@to_cls == Job_Novice_High && .LastJob)
		lastJob = Class; // Saves the lastJob for rebirth
	jobchange .@to_cls;
	if (.@to_cls == Job_Novice_High)
		resetlvl(1);
	else if (.@to_cls == Job_Baby) {
		resetstatus;
		resetskill;
		set SkillPoint,0;
	}
	specialeffect2 EF_ANGEL2;
	specialeffect2 EF_ELECTRIC;
	Get_Job_Equip();
	if (.Platinum)
		callfunc "F_GetPlatinumSkills";
	close; // Always closes after the change
}

Hope it helps someone who needs.

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1583
  • Reputation:   244
  • Joined:  08/03/12
  • Last Seen:  

49 minutes ago, drakulya said:

Hello every body!

I hope you're all doing well.

I'm using the official rAthena JobMaster custom script and i've realized that, no matter which job i'd choose, it never gaves me the job relative weapon/item - i tested it with First classes, second classes, transclasses and third-classes.

So, i've started studying the script code yesterday, when rAthena compiles there is no error, but it simply doesnt gave me the item.

I would like to know how you guys would fix it. Here i Solved.

My Solution is described bellow:

Changed the Original Job_Change function last lines:


// Executes the actual jobchange and closes.
function	Job_Change	{
	.@previous_class = Class;
	.@to_cls = getarg(0);
	next;
	mes .NPCName$;
	mes "You are now " + callfunc("F_InsertArticle", jobname(.@to_cls)) + "!";
	if (.@to_cls == Job_Novice_High && .LastJob)
		lastJob = Class; // Saves the lastJob for rebirth
	jobchange .@to_cls;
	if (.@to_cls == Job_Novice_High)
		resetlvl(1);
	else if (.@to_cls == Job_Baby) {
		resetstatus;
		resetskill;
		set SkillPoint,0;
	}
	specialeffect2 EF_ANGEL2;
	specialeffect2 EF_ELECTRIC;
	if (.@previous_class != Class) {
		if (.Platinum)
			callfunc "F_GetPlatinumSkills";
		if (.GetJobEquip)
			Get_Job_Equip();
	}
	close; // Always closes after the change
}

To this way below... (the function for me is now out of the "IF" condition and before the ".Platinum" IF condition), it always gives the item: 


// Executes the actual jobchange and closes.
function	Job_Change	{
	.@previous_class = Class;
	.@to_cls = getarg(0);
	next;
	mes .NPCName$;
	mes "You are now " + callfunc("F_InsertArticle", jobname(.@to_cls)) + "!";
	if (.@to_cls == Job_Novice_High && .LastJob)
		lastJob = Class; // Saves the lastJob for rebirth
	jobchange .@to_cls;
	if (.@to_cls == Job_Novice_High)
		resetlvl(1);
	else if (.@to_cls == Job_Baby) {
		resetstatus;
		resetskill;
		set SkillPoint,0;
	}
	specialeffect2 EF_ANGEL2;
	specialeffect2 EF_ELECTRIC;
	Get_Job_Equip();
	if (.Platinum)
		callfunc "F_GetPlatinumSkills";
	close; // Always closes after the change
}

Hope it helps someone who needs.

 

Are you sure you already set the variables .GetJobEquip below to true ? The Jobmaster NPC  have a few settings line  that you can change depends on your need a few lines before the line of code ends.

	.Platinum = true;				// Get platinum skills automatically?
	.GetJobEquip = false;			// Get job equipment (mostly weapons) on job change?

 

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   11
  • Joined:  03/30/20
  • Last Seen:  

@Chaos92Hi Chaos92! I was wondering from where the code gets the true or false parameter for GetJobEquip and i was supposing it was an always true, thats why i changed... I wasn't able to read this before you tell me. Thank you very much. I knew it was a great script and I was going crazy because it wasn't working, but it was my fault - lack of knowledge and attention.

You're right, there's no need to change the script itself, people just need to check the parameters on the last lines, Solved. Thanks again!

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...