Jump to content
  • 0

need help with this script


Dolphin86

Question


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.06
  • Content Count:  709
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

im using point system to add +1 points for each time a player picks 1 of each activity such as below ( menu )

Spoiler
	gathering:
		if(mastery == 3) goto finish;
		if(countitem(40008) > 1){
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "You have already picked";
		mes "GATHERING MASTERY.";
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Now select again..";
		menu	"Gathering",gathering,
				"Weapon And Tool Crafting",weapon,
				"Armor Crafting",armor,
				"Cooking",cookzz,
				"Slaughter",slaugh,
				"Processing",process;
		}
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Great pick!";
			getitem 40008, 1;
			mastery += 1;
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Now select again..";
			menu	"Gathering",gathering,
					"Weapon And Tool Crafting",weapon,
					"Armor Crafting",armor,
					"Cooking",cookzz,
					"Slaughter",slaugh,
					"Processing",process;

 

now here is the weird part (for me) when i have pick only 1 activity (menu), the script reads my mastery points as more then 3, when it should allow me to pick 2 more, what i am trying to do is player can only pick 3 activity from the menu list, onces player had pick up 3 diffrent type of activity the script should send to this below..

Spoiler
	finish:
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Great now you have 3 main";
		mes "MASTERY, remember if you";
		mes "in lost or need help";
		mes "ask in discord";
		close3;

 

can someone help me with my mess up script..

full script  (If someone can optimise and clean up my script that would be great help..) :

Spoiler
moc_para01,27,35,4	script	FARHANA	532,{
	
	soundeffect "menu.wav",0;
	mes "^ce7e00 === FARHANA === ^000000";
	mes "Hello, welcome to GUILD HALL,";
	mes "how may i help you ?";
	next;
		switch(select("- Benefit become a member ?:- I wish to register as guild member:- Nothing")){
			case 1:
				next;
				soundeffect "menu.wav",0;
				mes "^ce7e00 === FARHANA === ^000000";
				mes "Becoming a member of GUILD HALL";
				mes "will enable you to boost your";
				mes "MASTERY, take guild quest, and";
				mes "many more...";
				next;
				switch(select("- MASTERY ?:- Guild Quest ?:- Nothing")){
					case 1:
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "Yes mastery, such as gathering,";
						mes "cooking, weapon and armor Crafting";
						mes "as you progress on doing more of";
						mes "those activity you will gain";
						mes "more points to unlock more";
						mes "higher tier stuff..";
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "But sadly.. you can only have";
						mes "3 main mastery to choose for.";
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "as for the rest..";
						mes "they will remain as tier 1";
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "I would highly recomend to have";
						mes "friends with diffrent mastery";
						mes "so you can support each others";
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "i guess that will that be all,";
						mes "for now, see you soon..";
						close3;
					case 2:
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "Guild Quest is a great help,";
						mes "each member start from low rank";
						mes "such a [D Rank] but you can";
						mes "higher rank as you completed";
						mes "more quest, higher quest get's";
						mes "better reward!";
						close3;
					case 3:
						goto cancel;
				}
				
			case 2:
				next;
				soundeffect "menu.wav",0;
				mes "^ce7e00 === FARHANA === ^000000";
				mes "Ahh.. you wish to register,";
				mes "sure i can do that, but i will";
				mes "need 1 Durengo Coin";
				next;
				switch(select("- I have it:- I need time")){
					case 1:
						if(countitem(40016) < 1 ) {
							next;
							soundeffect "menu.wav",0;
							mes "^ce7e00 === FARHANA === ^000000";
							mes "I dont think you have";
							mes "1 Durengo Coin...";
							next;
							soundeffect "menu.wav",0;
							mes "^ce7e00 === FARHANA === ^000000";
							mes "You can exchange 1000 zeny";
							mes "for 1 Durengo Coin from";
							mes "my friend next to me";
							close3;
						}
						delitem 40016, 1;
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "I will take your Durengo Coin now";
						mes "oh yeah even if you cancel at any";
						mes "part of these process, you will not";
						mes "getting back that Durengo Coin";
						mes "as it is require for precess fee";
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "Great, now remember you can";
						mes "only select 3 Mastery";
						mes "and only those Mastery will be able";
						mes "to level up, and as for the rest";
						mes "it will remain as Tier 1..";
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "Now before you pick a Mastery";
						mes "if you are new to the server";
						mes "i would highly sugguest to pick";
						mes "GATHERING, PROCESSING and 1 of";
						mes "your own pick.";
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "But.. if you know what you are doing";
						mes "then go for it..";
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "Now please select your";
						mes "1st MASTERY";
						mes "desire Mastery";
						switch(select("- Gathering:- Weapon And Tool Crafting:- Armor Crafting:- Cooking:- Slaughter:- Processing:- I need time")){
							case 1:
								goto gathering_01;
							case 2:
								goto weapon_01;
							case 3:
								goto armor_01;
							case 4:
								goto cookzz_01;
							case 5:
								goto slaugh_01;
							case 6:
								goto process_01;
							case 7:
								goto cancel;
						}
						
					case 2:
						goto cancel;
				}
			case 3:
				goto cancel;
		}
		
	cancel:
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "I shall see you soon..";
		mes "Good Bye..";
		close3;
	
	gathering_01:
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "GATHERING....";
		mes "nice choice, are you sure";
		mes "you want to get";
		mes "GATHERING MASTERY ?";
		switch(select("- YES:- NO")){
			case 1:
				goto gathering;
			case 2:
				goto cancel;
									
		}
	
	gathering:
		if(mastery == 3) goto finish;
		if(countitem(40008) > 1){
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "You have already picked";
		mes "GATHERING MASTERY.";
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Now select again..";
		menu	"Gathering",gathering,
				"Weapon And Tool Crafting",weapon,
				"Armor Crafting",armor,
				"Cooking",cookzz,
				"Slaughter",slaugh,
				"Processing",process;
		}
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Great pick!";
			getitem 40008, 1;
			mastery += 1;
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Now select again..";
			menu	"Gathering",gathering,
					"Weapon And Tool Crafting",weapon,
					"Armor Crafting",armor,
					"Cooking",cookzz,
					"Slaughter",slaugh,
					"Processing",process;
		
	weapon:
		if(mastery == 3) goto finish;
		if(countitem(40039) > 1){
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "You have already picked";
		mes "WEAPON AND TOOL MASTERY.";
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Now select again..";
		menu	"Gathering",gathering,
				"Weapon And Tool Crafting",weapon,
				"Armor Crafting",armor,
				"Cooking",cookzz,
				"Slaughter",slaugh,
				"Processing",process;
		}
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Great pick!";
			getitem 40039, 1;
			mastery += 1;
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Now select again..";
			menu	"Gathering",gathering,
					"Weapon And Tool Crafting",weapon,
					"Armor Crafting",armor,
					"Cooking",cookzz,
					"Slaughter",slaugh,
					"Processing",process;
		
	weapon_01:
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "WEAPON AND TOOL CRAFTING....";
		mes "nice choice, are you sure";
		mes "you want to get ";
		mes "WEAPON AND TOOL CRAFTING MASTERY ?";
		switch(select("- YES:- NO")){
			case 1:
				goto weapon;
			case 2:
				goto cancel;
									
		}
		
	armor:
		if(mastery == 3) goto finish;
		if(countitem(40040) > 1){
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "You have already picked";
		mes "ARMOR CRAFTING MASTERY.";
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Now select again..";
		menu	"Gathering",gathering,
				"Weapon And Tool Crafting",weapon,
				"Armor Crafting",armor,
				"Cooking",cookzz,
				"Slaughter",slaugh,
				"Processing",process;
		}
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Great pick!";
			getitem 40040, 1;
			mastery += 1;
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Now select again..";
			menu	"Gathering",gathering,
					"Weapon And Tool Crafting",weapon,
					"Armor Crafting",armor,
					"Cooking",cookzz,
					"Slaughter",slaugh,
					"Processing",process;
		
	armor_01:
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "ARMOR CRAFTING....";
		mes "nice choice, are you sure";
		mes "you want to get ";
		mes "ARMOR CRAFTING MASTERY ?";
		switch(select("- YES:- NO")){
			case 1:
				goto armor;
			case 2:
				goto cancel;
		}
	
	cookzz:
		if(mastery == 3) goto finish;
		if(countitem(40038) > 1){
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "You have already picked";
		mes "COOKING MASTERY.";
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Now select again..";
		menu	"Gathering",gathering,
				"Weapon And Tool Crafting",weapon,
				"Armor Crafting",armor,
				"Cooking",cookzz,
				"Slaughter",slaugh,
				"Processing",process;
		}
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Great pick!";
			getitem 40038, 1;
			mastery += 1;
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Now select again..";
			menu	"Gathering",gathering,
					"Weapon And Tool Crafting",weapon,
					"Armor Crafting",armor,
					"Cooking",cookzz,
					"Slaughter",slaugh,
					"Processing",process;
	
	cookzz_01:
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "COOKING....";
		mes "nice choice, are you sure";
		mes "you want to get ";
		mes "COOKING MASTERY ?";
		switch(select("- YES:- NO")){
			case 1:
				goto cookzz;
			case 2:
				goto cancel;
		}
	
	slaugh:
		if(mastery == 3) goto finish;
		if(countitem(40041) > 1){
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "You have already picked";
		mes "SLAUGHTER MASTERY.";
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Now select again..";
		menu	"Gathering",gathering,
				"Weapon And Tool Crafting",weapon,
				"Armor Crafting",armor,
				"Cooking",cookzz,
				"Slaughter",slaugh,
				"Processing",process;
		}
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Great pick!";
			getitem 40041, 1;
			mastery += 1;
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Now select again..";
			menu	"Gathering",gathering,
					"Weapon And Tool Crafting",weapon,
					"Armor Crafting",armor,
					"Cooking",cookzz,
					"Slaughter",slaugh,
					"Processing",process;
	
	slaugh_01:
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "SLAUGHTER....";
		mes "nice choice, are you sure";
		mes "you want to get ";
		mes "SLAUGHTER MASTERY ?";
		switch(select("- YES:- NO")){
			case 1:
				goto slaugh;
			case 2:
				goto cancel;
		}
	
	process:
		if(mastery == 3) goto finish;
		if(countitem(40007) > 1){
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "You have already picked";
		mes "PROCESSING MASTERY.";
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Now select again..";
		menu	"Gathering",gathering,
				"Weapon And Tool Crafting",weapon,
				"Armor Crafting",armor,
				"Cooking",cookzz,
				"Slaughter",slaugh,
				"Processing",process;
		}
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Great pick!";
			getitem 40007, 1;
			mastery += 1;
			next;
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Now select again..";
			menu	"Gathering",gathering,
					"Weapon And Tool Crafting",weapon,
					"Armor Crafting",armor,
					"Cooking",cookzz,
					"Slaughter",slaugh,
					"Processing",process;
		
	process_01:
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "PROCESSING....";
		mes "nice choice, are you sure";
		mes "you want to get ";
		mes "PROCESSING MASTERY ?";
		switch(select("- YES:- NO")){
			case 1:
				goto process;
			case 2:
				goto cancel;
		}
	finish:
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Great now you have 3 main";
		mes "MASTERY, remember if you";
		mes "in lost or need help";
		mes "ask in discord";
		close3;
		
}

 

Edited by Dolphin86
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  665
  • Reputation:   673
  • Joined:  11/12/12
  • Last Seen:  

A few things to note:

  • "next" always comes before the switch/select statement, not after the "case" branches.
    • If you absolutely want to do this, then you might want to use "clear" before your "mes" dialogues instead.
  • When you use delitem, you should always change the status right afterwards. Be it a quest or a variable, something needs to be done after a delitem. Here's a very likely scenario in your case: the player registers, but then the script ends there or the player uses "cancel" in the next menu. He'll then have to pay with the coin again. While that's probably not a huge deal in this particular situation, that's something you should look out for. It could lead to some serious issues later on.
  • The usage of labels is a tad excessive. You'd normally only want to use labels if the code is repeated. Otherwise it doesn't make much sense to make things more complicated.
  • "countitem(id) > 1" means that will only trigger if the player has 2 items in his inventory. You wanted > 0 there.
  • The "mastery" variable doesn't work well here; that's a permanent player variable and it's way too easy to break out of the script in your case. And since the mastery amount is saved, speaking with the NPC again will cause issues since it's already set to 3 (which is the main bug you were having since you probably tested the script more than 3 times at least). I'd personally use a flag variable instead, but since you're already doing checks using a specific item, might as well use that. Well, I'd still recommend using a flag, but I don't know how this script will be used.
  • Since the dialogues were all repeats, I added an array instead with "OnInit". That makes it easier to add more masteries later on and it's easier to read/modify.
moc_para01,27,35,4	script	FARHANA	A	532,{
	soundeffect "menu.wav",0;
	mes "^ce7e00 === FARHANA === ^000000";
	mes "Hello, welcome to GUILD HALL,";
	mes "how may i help you ?";
	next;
	
	switch(select("- Benefit become a member ?:- I wish to register as guild member:- Nothing")){
		case 1:
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Becoming a member of GUILD HALL";
			mes "will enable you to boost your";
			mes "MASTERY, take guild quest, and";
			mes "many more...";
			next;
			
			switch(select("- MASTERY ?:- Guild Quest ?:- Nothing")) {
				case 1:
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "Yes mastery, such as gathering,";
					mes "cooking, weapon and armor Crafting";
					mes "as you progress on doing more of";
					mes "those activity you will gain";
					mes "more points to unlock more";
					mes "higher tier stuff..";
					next;
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "But sadly.. you can only have";
					mes "3 main mastery to choose for.";
					next;
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "as for the rest..";
					mes "they will remain as tier 1";
					next;
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "I would highly recomend to have";
					mes "friends with diffrent mastery";
					mes "so you can support each others";
					next;
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "i guess that will that be all,";
					mes "for now, see you soon..";
					close3;
				case 2:
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "Guild Quest is a great help,";
					mes "each member start from low rank";
					mes "such a [D Rank] but you can";
					mes "higher rank as you completed";
					mes "more quest, higher quest get's";
					mes "better reward!";
					close3;
				case 3:
					goto L_Cancel;
			}
			
			end;
		case 2:
			if (mastery_paid_price)
				goto L_MasteryMenuSelect2;
			
			soundeffect "menu.wav",0;
			mes "^ce7e00 === FARHANA === ^000000";
			mes "Ahh.. you wish to register,";
			mes "sure i can do that, but i will";
			mes "need 1 Durengo Coin";
			next;
			
			switch(select("- I have it:- I need time")) {
				case 1:
					if (countitem(40016) < 1) {
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "I dont think you have";
						mes "1 Durengo Coin...";
						next;
						soundeffect "menu.wav",0;
						mes "^ce7e00 === FARHANA === ^000000";
						mes "You can exchange 1000 zeny";
						mes "for 1 Durengo Coin from";
						mes "my friend next to me";
						close3;
					}
					
					delitem 40016, 1;
					mastery_paid_price = 1;
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "I will take your Durengo Coin now";
					mes "oh yeah even if you cancel at any";
					mes "part of these process, you will not";
					mes "getting back that Durengo Coin";
					mes "as it is require for precess fee";
					next;
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "Great, now remember you can";
					mes "only select 3 Mastery";
					mes "and only those Mastery will be able";
					mes "to level up, and as for the rest";
					mes "it will remain as Tier 1..";
					next;
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "Now before you pick a Mastery";
					mes "if you are new to the server";
					mes "i would highly sugguest to pick";
					mes "GATHERING, PROCESSING and 1 of";
					mes "your own pick.";
					next;
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "But.. if you know what you are doing";
					mes "then go for it..";
					next;
L_MasteryMenuSelect2:
					soundeffect "menu.wav",0;
					mes "^ce7e00 === FARHANA === ^000000";
					mes "Now please select your";
					mes "1st MASTERY";
					mes "desire Mastery";
					next;
					
L_MasteryMenuSelect:
					.@menu$ = "";
					
					for (.@i = 0; .@i < .mastery_count; .@i++) {
						.@menu$ += "- " + .mastery_names$[.@i] + ":";
					}
					
					.@menu$ += "- I need time";
					.@midx = select(.@menu$) - 1;
					
					if (.@midx >= .mastery_count)
						goto L_Cancel;
					
					goto L_MasteryConfirm;
					end;
				case 2:
					goto L_Cancel;
			}
			
			end;
		case 3:
			goto L_Cancel;
	}
	
	end;
L_Cancel:
	soundeffect "menu.wav",0;
	mes "^ce7e00 === FARHANA === ^000000";
	mes "I shall see you soon..";
	mes "Good Bye..";
	close3;
L_MasteryConfirm:
	// The mastery count is used by checking the amount of items the player has instead of using the 'mastery' variable.
	.@count = 0;
	
	for (.@i = 0; .@i < .mastery_count; .@i++) {
		.@count += countitem(.mastery_items[.@i]);
	}
	
	if (.@count >= 3) {
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Great now you have 3 main";
		mes "MASTERY, remember if you";
		mes "in lost or need help";
		mes "ask in discord";
		close3;
	}
	
	if (countitem(.mastery_items[.@midx]) > 0) {
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "You have already picked";
		mes strtoupper(.@mastery_names$[.@midx]) + " MASTERY.";
		next;
		soundeffect "menu.wav",0;
		mes "^ce7e00 === FARHANA === ^000000";
		mes "Now select again..";
		next;
		goto L_MasteryMenuSelect;
	}
	
	soundeffect "menu.wav",0;
	mes "^ce7e00 === FARHANA === ^000000";
	mes strtoupper(.mastery_names$[.@midx]) + "....";
	mes "nice choice, are you sure";
	mes "you want to get";
	mes strtoupper(.mastery_names$[.@midx]) + " MASTERY ?";
	next;
	
	switch(select("- YES:- NO")){
		case 2:
			goto L_Cancel;
	}
	
	soundeffect "menu.wav",0;
	mes "^ce7e00 === FARHANA === ^000000";
	mes "Great pick!";
	getitem .mastery_items[.@midx], 1;
	next;
	soundeffect "menu.wav",0;
	mes "^ce7e00 === FARHANA === ^000000";
	mes "Now select again..";
	next;
	goto L_MasteryMenuSelect;
OnInit:
	// Could just use setarray, but this is easier to read for me.
	.@i = 0;
	.mastery_names$[.@i] = "Gathering"; 				.mastery_items[.@i] = 40008; .@i++;
	.mastery_names$[.@i] = "Weapon And Tool Crafting"; 	.mastery_items[.@i] = 40039; .@i++;
	.mastery_names$[.@i] = "Armor Crafting"; 			.mastery_items[.@i] = 40040; .@i++;
	.mastery_names$[.@i] = "Cooking"; 					.mastery_items[.@i] = 40038; .@i++;
	.mastery_names$[.@i] = "Slaughter"; 				.mastery_items[.@i] = 40041; .@i++;
	.mastery_names$[.@i] = "Processing"; 				.mastery_items[.@i] = 40007; .@i++;
	.mastery_count = .@i;
	end;
}

 

Edited by Tokei
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.06
  • Content Count:  709
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

Posted (edited)

thanks @Tokei it works !! and i learn some new things !

Edited by Dolphin86
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...