Jump to content
  • 0
Sign in to follow this  
REKT

HELP Callfunc Correct or Not?

Question

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! ^_^

 

 

^_^

Edited by Emistry

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

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;}
1599,Angra_Manyu,Angra Manyu,4,1,,10,200,,2,0,0xFFFFFFFF,7,2,2,1,1,1,8,{ callfunc "checkclass"; },{},{}

 

 

 

 

Edited by mleo1

Share this post


Link to post
Share on other sites
  • 0

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:

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;
}

Edited by Vlync

Share this post


Link to post
Share on other sites
  • 0

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");},{},{}
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;}
Edited by Joseph

Share this post


Link to post
Share on other sites
  • 0

 

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");},{},{}
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.!

Share this post


Link to post
Share on other sites
  • 0

How you want to categorize those classes?

I'll give you an example.

Add this in the function:

 

// Baby Wizard, Wizard, High Wizard, Warlock, Baby Warlockif (.@baseJob == Job_Wizard) { 	// Your effects here...	// ...}

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.