Jump to content
  • 0

Job change item base on base lvl


Question

Posted

Is this script possible?

 Item id:30100

example

lvl 10-69 swordsman 

lvl 70-99 knight

lvl 100–299 Lord Knight

lvl 300-999 rune knight

(if a character lvl 73 uses the item it wont turn to swordsman but knight based on level)

 

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

put this script on your item ID 30100>

callfunc "ItemBaseLevel";



and add this script on server:

function	script	ItemBaseLevel	{
	// lvl 10-69 swordsman
if(BaseLevel >= 10 && BaseLevel <= 69){
    if(BaseJob == Job_Swordman) end;
    jobchange Job_Swordman;
    dispbottom "Congrats! You become a Swordsman!";
    end;
}
    
// lvl 70-99 knight
if(BaseLevel >= 70 && BaseLevel <= 99){
    if(BaseJob == Job_Knight) end;
    jobchange Job_Knight;
    dispbottom "Congrats! You become a Knight!";
    end;
}
// lvl 100–299 Lord Knight
if(BaseLevel >= 100 && BaseLevel <= 299){
    if(BaseJob == Job_Lord_Knight) end;
    jobchange Job_Lord_Knight;
    dispbottom "Congrats! You become a Lord Knight!";
    end;
}
    
// lvl 300-999 rune knight
if(BaseLevel >= 300 && BaseLevel <= 999){
    if(BaseJob == Job_Rune_Knight) end;
    jobchange Job_Rune_Knight;
    dispbottom "Congrats! You become a Rune Knight!";
    end;
    }
}
Edited by HD Scripts
  • 0
Posted
2 hours ago, HD Scripts said:

put this script on your item ID 30100>


callfunc "ItemBaseLevel";



and add this script on server:


function	script	ItemBaseLevel	{
	// lvl 10-69 swordsman
if(BaseLevel >= 10 && BaseLevel <= 69){
    if(BaseJob == Job_Swordman) end;
    jobchange Job_Swordman;
    dispbottom "Congrats! You become a Swordsman!";
    end;
}
    
// lvl 70-99 knight
if(BaseLevel >= 70 && BaseLevel <= 99){
    if(BaseJob == Job_Knight) end;
    jobchange Job_Knight;
    dispbottom "Congrats! You become a Knight!";
    end;
}
// lvl 100–299 Lord Knight
if(BaseLevel >= 100 && BaseLevel <= 299){
    if(BaseJob == Job_Lord_Knight) end;
    jobchange Job_Lord_Knight;
    dispbottom "Congrats! You become a Lord Knight!";
    end;
}
    
// lvl 300-999 rune knight
if(BaseLevel >= 300 && BaseLevel <= 999){
    if(BaseJob == Job_Rune_Knight) end;
    jobchange Job_Rune_Knight;
    dispbottom "Congrats! You become a Rune Knight!";
    end;
    }
}

Thank you i will try this soon

  • 0
Posted

add this item id and the function script

// ...,{ callfunc("func_ItemClass", Job_Swordman, 10, 69); }, { }, { }
function	func_ItemClass	{
	.@class = getarg(0, Job_Novice);
	.@min = getarg(1, 1);
	.@max = getarg(1, 99);
	
	if (.@class) {
		if (BaseLevel >= .@min && BaseLevel <= .@max)
			jobchange .@class;
	}
	return;
}

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...