Jump to content
  • 0

special_enchanter


MyNoobScriptz

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  75
  • Reputation:   3
  • Joined:  05/01/15
  • Last Seen:  

hi, rathena i think something wrong!!

i cant enchant Garment armor shield help me fixed plz

this script and picture!!

screenMustacheRO000.jpg

screenMustacheRO001.jpg

special_enchanter.txt

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

Try to replace

		setarray .@position$[1], "Headgear","Armor","Shield","Invalid","Garment","Footgear";
		set .@menu$,"";
		deletearray .@arr;
		set .@j, 1;
		for( set .@i,1; .@i <= 6; set .@i,.@i+1 )
		{
			if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { // Only catch shields
				set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
				set .@arr[.@j], .@i;
				set .@j, .@j + 1;
				set .@menu$, .@menu$ + ":";
			}
			if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) {
				set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
				set .@arr[.@j], .@i;
				set .@j, .@j + 1;
				set .@menu$, .@menu$ + ":";
			}

			
		}
		
		if (.@menu$ == "") {
			mes "["+strnpcinfo(1)+"]";
			mes "Errr wait. Oh Sorry but you must have armors equipped to enchant them!";
			close;
		}
		
		// Calibrating menu
		set .@part, select(.@menu$);
		if (.@arr[.@part] == 1)
			set .@part, 1;
		else if (.@arr[.@part] == 2)
			set .@part, 2;
		else if (.@arr[.@part] == 3)
			set .@part, 3;
		else if (.@arr[.@part] == 5)
			set .@part, 5;
		else if (.@arr[.@part] == 6)
			set .@part, 6;

TO

		setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
		for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) {
			if( getequipisequiped(.@indices[.@i]) ) {
				if( getiteminfo(getequipid(.@indices[.@i]),2) == 5 || getiteminfo(getequipid(.@indices[.@i]),5) == 136 )
					continue;
				set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
			}
			set .@menu$, .@menu$ + ":";
		}
		
		// Calibrating menu
		set .@part, .@indices[ select(.@menu$) ];

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  75
  • Reputation:   3
  • Joined:  05/01/15
  • Last Seen:  

3 hours ago, Technoken said:

Try to replace


		setarray .@position$[1], "Headgear","Armor","Shield","Invalid","Garment","Footgear";
		set .@menu$,"";
		deletearray .@arr;
		set .@j, 1;
		for( set .@i,1; .@i <= 6; set .@i,.@i+1 )
		{
			if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { // Only catch shields
				set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
				set .@arr[.@j], .@i;
				set .@j, .@j + 1;
				set .@menu$, .@menu$ + ":";
			}
			if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) {
				set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
				set .@arr[.@j], .@i;
				set .@j, .@j + 1;
				set .@menu$, .@menu$ + ":";
			}

			
		}
		
		if (.@menu$ == "") {
			mes "["+strnpcinfo(1)+"]";
			mes "Errr wait. Oh Sorry but you must have armors equipped to enchant them!";
			close;
		}
		
		// Calibrating menu
		set .@part, select(.@menu$);
		if (.@arr[.@part] == 1)
			set .@part, 1;
		else if (.@arr[.@part] == 2)
			set .@part, 2;
		else if (.@arr[.@part] == 3)
			set .@part, 3;
		else if (.@arr[.@part] == 5)
			set .@part, 5;
		else if (.@arr[.@part] == 6)
			set .@part, 6;

TO


		setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
		for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) {
			if( getequipisequiped(.@indices[.@i]) ) {
				if( getiteminfo(getequipid(.@indices[.@i]),2) == 5 || getiteminfo(getequipid(.@indices[.@i]),5) == 136 )
					continue;
				set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
			}
			set .@menu$, .@menu$ + ":";
		}
		
		// Calibrating menu
		set .@part, .@indices[ select(.@menu$) ];

 

THX!! now work

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