HELP Callfunc Correct or Not?

REKT

New member
Messages
372
Points
0
Emulator
Other
Hello, i just wanna asked if the one i made is correct or wrong?

please correct if it is wrong.

Or if you have a better way or optimized this script to make it better.

please feel free to post

http://pastebin.com/3Fkf7K9B

Thank you!
default_happy.png


default_happy.png


 
Last edited by a moderator:
Code:
function	script	checkclass	{	if( Class==Job_Assassin || Class==Job_Assassin_Cross ) goto Lskillssin;	if( Class==Job_Bard || Class==Job_Clown ) goto Lskillsbard;    if( Class==Job_Knight || Class==Job_Lord_Knight ) goto Lskillsknight; 	return;	Lskillssin:        bonus2 bAddRace,7,20;                                  bonus bIntravision,0;                                  if(getrefine()>=10) { bonus bAllStats,5; }      	return;Lskillsknight:		         bonus2 bAddRace,7,20;                          bonus bIntravision,0;                                  if(getrefine()>=10) { bonus bAllStats,5; }      	return;Lskillsbard:        bonus2 bAddRace,7,20;                                  bonus bIntravision,0;                                  if(getrefine()>=10) { bonus bAllStats,5; }               		return;}
Code:
1599,Angra_Manyu,Angra Manyu,4,1,,10,200,,2,0,0xFFFFFFFF,7,2,2,1,1,1,8,{ callfunc "checkclass"; },{},{}
 
Last edited by a moderator:
Hi, thanks for the respond, much appreciated! i will try to test this out.

Thank you Again.!

Opps, after i wear the item.

[Error]: script:getarg: index <idx=0> out of range <nargs=0> and no default value found

script:

Code:
function    script    Classes_Check    {    if( getarg(0)==Job_Assassin || getarg(0)==Job_Assassin_Cross ) goto Lskillssin;    if( getarg(0)==Job_Bard || getarg(0)==Job_Clown ) goto Lskillsbard;    if( getarg(0)==Job_Knight || getarg(0)==Job_Lord_Knight ) goto Lskillsknight;    end;    Lskillssin:    	    bonus2 bAddRace,7,20;	    bonus bIntravision,0;	    if(getrefine()>=10) { bonus bAllStats,5; }    end;Lskillsknight:    	    bonus2 bAddRace,7,20;
    bonus bIntravision,0;
    if(getrefine()>=10) { bonus bAllStats,5; }
   end;

Lskillsbard:

    bonus2 bAddRace,7,20;
    bonus bIntravision,0;
    if(getrefine()>=10) { bonus bAllStats,5; }
   end;
}
 
Last edited by a moderator:
You can use BaseJob instead, but this will also include baby classes and 3rd job classes for Assassin, Bard and Knight.

Not necessary to create a function, if you're using this for like 1 or 2 equipment(s).

Code:
{callfunc("Classes_Check");},{},{}
Code:
function	script	Classes_Check	{	.@baseJob = BaseJob;	if (.@baseJob == Job_Assassin || .@baseJob == Job_Bard || .@baseJob == Job_Knight) { 		bonus2 bAddRace,7,20;		bonus bIntravision,0;				if(getrefine()>=10)			bonus bAllStats,5;	}	return;}
 
Last edited by a moderator:
You can use BaseJob instead, but this will also include baby classes and 3rd job classes for Assassin, Bard and Knight.

Not necessary to create a function, if you're using this for like 1 or 2 equipment(s).

{callfunc("Classes_Check");},{},{}
Code:
function	script	Classes_Check	{	.@baseJob = BaseJob;	if (.@baseJob == Job_Assassin || .@baseJob == Job_Bard || .@baseJob == Job_Knight) { 		bonus2 bAddRace,7,20;		bonus bIntravision,0;				if(getrefine()>=10)			bonus bAllStats,5;	}	return;}
This script looks nice,

BTW, i'm making this kind of bonuses because i wanted to make each classes has different bonuses.

e.g Mage or High Wizard +1 INT so on and so forth, how can i add another class? with different bonuses?

Thank you.!

 
How you want to categorize those classes?

I'll give you an example.

Add this in the function:

Code:
// Baby Wizard, Wizard, High Wizard, Warlock, Baby Warlockif (.@baseJob == Job_Wizard) { 	// Your effects here...	// ...}
 
I will try it, i'll feedback ASAP.

Thank you for support! much appreciated!!

 
Back
Top