Jump to content
  • 0
Sign in to follow this  
legion

make item based on lvl and job

Question

Hi, can anyone please make a script that gives you an item that depends on your base/job level and job?

 

Example at job level 10 a pop up will appear saying that I have reached job level 10 and choose what 1st job I want to be so that a starter item for that specific job will be given like if I choose archer i will recieve a composite bow, and then at base level 33 I will receive a gakkung[1] and so on..

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Try this...

 

-	script	LevelRewards	HIDDEN_NPC,{if (JobLevel == 10) { mes "You've reached Job Level 10!";mes "Please choose your rewards...";next;switch(select("Swordsman:Merchant:Thief")){case 1: //For swordsman       mes "Here yo go...";       getitem itemid,amount;       close;case 2: //For Merchant       mes "Here yo go...";       getitem itemid,amount;       close;case 3: //For Thief       mes "Here yo go...";       getitem itemid,amount;       close;		}	 }} 

 

100% No errors found based on http://haru.ws/scriptchecker

 

Download : http://upaste.me/78b6992574f72cde

Edited by Jezu

Share this post


Link to post
Share on other sites
  • 0

 

Try this...

-<tab>script<tab>LevelRewards<tab>-1,{if JobLevel == 10 { mes "You've reach Job Lv. 10 !";mes "Please choose your rewards!";next;switch(select("Swordsman:Merchant:Thief"))Case 1:       mes "Here yo go...";       getitem itemid,amount;       close;Case 2:       mes "Here yo go...";       getitem itemid,amount;       close;Case 3:       mes "Here yo go...";       getitem itemid,amount;       close;      } } 

 

Even if it this is pseudocode, you need to use parentheses ( ) for if expressions, and you should enclose the contents of that switch inside curly braces { }. The approach is entirely wrong as well, as the OP requested a dialogue to pop up upon a Job level-up event.

Share this post


Link to post
Share on other sites
  • 0

Oh sorry, I just made it from scratch... btw, edited now..

 

Still wouldn't work, as you'd need to have a trigger for Job/Base level-up events. Try using OnPCBaseLvUpEvent and OnPCJobLvUpEvent.

Share this post


Link to post
Share on other sites
  • 0

This isn't quite complete, but as far as fitting the criteria you explained, I've written a basic concept. If you want to add different jobs or bonuses, follow the format used under the OnPCBaseLvUpEvent label.

 

/*=========================================================Utility: Level-up!by Mumbles===========================================================Description:Player is prompted after base or job level criteria is met.Bonuses can be added corresponding to base or job level.Third classes are not supported in this release.===========================================================Compatibility:Optimised for Hercules emulators.===========================================================Changelog:v0.1 - First version.=========================================================*/-	script	lvl_up	-1,{		/*-----------------------------------------------------	Script	-----------------------------------------------------*/	OnPCBaseLvUpEvent:		// Rebirth		if (!Upper && JobLevel == 50 && BaseLevel == 99) {			menu "Reborn to High Novice", -;			jobchange Job_Novice_High;			end;		}				// BaseLevel bonuses		switch (BaseClass) {			case Job_Novice:				switch (BaseLevel) {					case 99:	// Super Baby/Novice						menu "Change to Super "+ (Upper ? "Baby" : "Novice"), -;						jobchange (Upper ? Job_Super_Baby : Job_Super_Novice);						close;				}								break;							case Job_Archer:				switch (BaseLevel) {					case 33:	// Gakkung Bow						getitem Kakkung, 1;						break;				}								break;		}				end;	OnPCJobLvUpEvent:		// Rebirth		if (Class > Job_Thief && Class < Job_Crusader2 && JobLevel == 50 && BaseLevel == 99) {			menu "Reborn to High Novice", -;			jobchange Job_Novice_High;			end;		}				// Job changes		switch (BaseClass) {			case Job_Novice:				if (JobLevel < 10) {					close;				}								// Determine Class Type				.@type = Upper * 2;				break;							case Job_Gunslinger:			case Job_Ninja:			case Job_Taekwon:				close;							default:				if (JobLevel < 40) {					close;				}								// Determine Class Type				.@type = Upper * 2 + 1;				break;		}				// Class selection		message strcharinfo(0), "Please select a job.";		menu implode(getd(.type_name$[.@type] +"_class$"), ":"), -;		.@index = @menu - 1;				// Change job		jobchange getd(.type_id$[.@type] +"_class_id$["+ .@index +"]");		end;			/*-----------------------------------------------------	Configuration	-----------------------------------------------------*/	OnInit:		// Class Types		setarray .type_name$[0],	"first", "second", "first_trans", "second_trans", "first_baby", "second_baby";		setarray .type_id$[0],		"f", "s", "ft", "st", "fb", "sb";			// First Class names		setarray .first_class$[0],	"Swordman", "Mage", "Archer", "Acolyte", "Merchant", "Thief",									"Gunslinger", "Ninja", "Taekwon "+ (Sex ? "Boy" : "Girl");				// First Class IDs (corresponding)		setarray .f_class_id[0],	Job_Swordman, Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief,									Job_Gunslinger, Job_Ninja, Job_Taekwon;			// Second Class names		setarray .second_class$[0],	"Knight", "Wizard", "Hunter", "Priest", "Blacksmith", "Assassin",									"Crusader", "Sage", (Sex ? "Bard" : "Dancer"), "Monk", "Alchemist", "Rogue",									"Star Gladiator", "Soul Linker";				// Second Class IDs (corresponding)		setarray .s_class_id[0],	Job_Knight, Job_Wizard, Job_Hunter, Job_Priest, Job_Blacksmith, Job_Assassin,									Job_Crusader, Job_Sage, (Sex ? Job_Bard : Job_Dancer), Job_Monk, Job_Whitesmith, Job_Rogue,									Job_Star_Gladiator, Job_Soul_Linker;				// First Transcendent Class names		setarray .first_trans_class$[0],	"High Swordman", "High Mage", "High Archer", "High Acolyte", "High Merchant", "High Thief";				// First Transcendent Class IDs (corresponding)		setarray .ft_class_id[0],	Job_Swordman_High, Job_Mage_High, Job_Archer_High, Job_Acolyte_High, Job_Merchant_High, Job_Thief_High;			// Second Transcendent Class names		setarray .second_trans_class$[0],	"Lord Knight", "High Wizard", "Sniper", "High Priest", "Whitesmith", "Assassin Cross",											"Paladin", "Professor", (Sex ? "Clown" : "Gypsy"), "Champion", "Creator", "Stalker";				// Second Transcendent Class IDs (corresponding)		setarray .st_class_id[0],	Job_Lord_Knight, Job_High_Wizard, Job_Sniper, Job_High_Priest, Job_Whitesmith, Job_Assassin_Cross,									Job_Paladin, Job_Professor, (Sex ? Job_Clown : Job_Gypsy), Job_Champion, Job_Creator, Job_Stalker;				// First Baby Class names		setarray .first_baby_class$[0],	"Baby Swordman", "Baby Mage", "Baby Archer", "Baby Acolyte", "Baby Merchant", "Baby Thief";				// First Baby Class IDs (corresponding)		setarray .fb_class_id[0],	Job_Baby_Swordman, Job_Baby_Mage, Job_Baby_Archer, Job_Baby_Acolyte, Job_Baby_Merchant, Job_Baby_Thief;			// Second Baby Class names		setarray .second_baby_class$[0],	"Baby Knight", "Baby Wizard", "Baby Hunter", "Baby Priest", "Baby Blacksmith", "Baby Assassin",											"Baby Crusader", "Baby Sage", (Sex ? "Baby Bard" : "Baby Dancer"), "Baby Monk", "Baby Alchemist", "Baby Rogue";				// Second Baby Class IDs (corresponding)		setarray .sb_class_id[0],	Job_Baby_Knight, Job_Baby_Wizard, Job_Baby_Hunter, Job_Baby_Priest, Job_Baby_Blacksmith, Job_Baby_Assassin,									Job_Baby_Crusader, Job_Baby_Sage, (Sex ? Job_Baby_Bard : Job_Baby_Gypsy), Job_Baby_Monk, Job_Baby_Whitesmith, Job_Baby_Rogue;				end;}

 

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.