Jump to content
  • 0

Enchant Expert (All Equipments)


fallen0519

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   2
  • Joined:  02/15/14
  • Last Seen:  

How to make this Enchanted Expert NPC able to enchant all equip including mid headgears and accessories, or can anyone customize the script to be able to configure the equipment option which one to enable.

 

Thank much, any pro scripter please help me about this.

prontera,165,164,4	script	Enchant Expert	626,{
	mes "[Enchant Expert]";
	mes "Hey, today might be your lucky day !!";
	mes "Do you want to enchant your equipped armor ?";
	next;
	mes "[Enchant Expert]";
	mes "The enchant system give you a random stats from +1 to +10.";
	mes "Of course, the higher the stats, the lower the percentage.";
	next;
	if ( select ( "yes", "no" ) == 2 ) close;
	if ( !getequipisequiped( EQI_ARMOR ) ) {
		mes "you did not equip an armor at the moment";
		close;
	}
	.@id = getequipid( EQI_ARMOR );
	.@ref = getequiprefinerycnt( EQI_ARMOR );
	.@card1 = getequipcardid( EQI_ARMOR, 0 );
	.@card2 = getequipcardid( EQI_ARMOR, 1 );
	.@card3 = getequipcardid( EQI_ARMOR, 2 );
	.@card4 = getequipcardid( EQI_ARMOR, 3 );
	if ( .@card1 == 255 || .@card1 == 254 ) {
		mes "I can't enchant a signed equipment";
		close;
	}
	if ( .@card4 ) {
		mes "this armor has already enchanted";
		close;
	}
	
	.@rand = rand(.totalchance);
	while ( ( .@rand = .@rand - .rate[.@r] ) >= 0 ) .@r++;
	.@o = rand(0,5); // orb of str/int/dex ....

	delitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 0;
	getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 4700 + .@o * 10 + .@r;
	equip .@id;
	close;
OnInit:
	setarray .rate, 55,50,45,25,20,5,4,3,2,1; // rate of getting +1 is 55%, +2 is 50% .... +10 is 10% ...

	while ( .@i < 10 ) {
		.totalchance = .totalchance + .rate[.@i];
		.@i++;
	}
	end;
}
Edited by fallen0519
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


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

	if ( select ( "yes", "no" ) == 2 ) close;
	if ( !getequipisequiped( EQI_ARMOR ) ) {
		mes "you did not equip an armor at the moment";
		close;
	}

change to

	.@equip = select( "Top","Armor","L-Hand","R-Hand","Garment","Shoe","Acc L","Acc R","Mid","Low" );
	if ( !getequipisequiped( .@equip ) ) {
		mes "you did not equip an equip there";
		close;
	}

then change all EQI_ARMOR 

to

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