Jump to content
  • 0

Job change item base on base lvl


IvanD

Question


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.03
  • Content Count:  110
  • Reputation:   0
  • Joined:  11/13/17
  • Last Seen:  

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)

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  183
  • Reputation:   15
  • Joined:  06/10/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.03
  • Content Count:  110
  • Reputation:   0
  • Joined:  11/13/17
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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

 

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