Jump to content
  • 0

Enchanter that can enchant 1st to 4th slot


Critica

Question


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

Hi guys,
can anyone here do me script like that?
just a simple enchanter that can enchat through slot 1st to 4th slot
with the required orb(enchantments) and success rate like 80% to 50%

there is a script like this, the custom echanter, but the script is too complicated

for me to edit it...

 

 

so if anyone could do this, that would be great! thanks!

Link to comment
Share on other sites

17 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

If possible yes, 

its kinda like this

 

http://rathena.org/board/topic/61734-custom-enchantment-system/

 

 

it let you chose what slot u want to be enchanted, with a success rate,

 

but i just need a simple enchanter

1. Ask what equipment you want to slot

2. Where you want to slot the orb(enchantment) 1st to 4th slot

3. NPC check what orb(enchantment) you have and use that for slotting / and maybe add some price? (zeny/item)

4. Success rate on enchanting

5. I think thats about it.

 

prontera,194,188,4	script	Enchant Expert	712,{
	mes .npc$;
	mes "Hello there!";
	mes "I can enchant your items,";
	mes "for a small fee of "+.pric+"z.";
	emotion e_no1,0; next;
	if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
	if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; }
	
	mes .npc$;
	mes "Which item would you like to enchant?"; next;
	while(set(.@a,.@a+1)<=.e_len) {
		if(getequipid(.@a)>-1)
			set .@menu$, .@menu$+.eqp$[.@a-1]+"- [^0000FF"+getitemname(getequipid(.@a))+"^000000]:";
		else set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a-1]+"- [Empty]^000000:";
	}
		
	select(.@menu$);
	set .@eq_loc, @menu;
	set .@eq_itm, getequipid(.@eq_loc);
	if(.@eq_itm<0) {
		mes .npc$;
		mes "Hmm, I don't think you have anything equipped there.";
		close;
	}
	
	set .@menu$, "";
	set .@a, .en_orb[0];
	while((set(.@a,.@a+1)-1)<=.en_orb[1])
		if(getiteminfo(.@a-1,2)>-1)
			if(set(.@c,countitem(.@a-1))) {
				set .@menu$, .@menu$+getitemname(.@a-1)+" x"+.@c+":";
				set .@b,.@b+1; set .@item[.@b], .@a-1;
			}
			
	if(.@menu$=="") {
		mes .npc$;
		mes "Hmm, you don't seem to have any enchantment orbs.";
		close;
	}

	mes .npc$;
	mes "Please, select an enchantment from the menu."; next;
	select(.@menu$);
	set .@itm, .@item[@menu];

	set .@menu$, ""; set .@a, 0;
	while((set(.@a,.@a+1)-1)<4) {
		setd(".@crd"+.@a, getequipcardid(.@eq_loc,.@a-1));
		if(getequipcardid(.@eq_loc,.@a-1))
			set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^a92435"+getitemname(getequipcardid(.@eq_loc,.@a-1))+"^000000]:";
		else set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^30ad25Empty^000000]:";
	}
	
	mes .npc$;
	mes "Select a slot."; next;
	select(.@menu$);
	set .@eqrf,	getequiprefinerycnt(.@eq_loc);
	if(getequipcardid(.@eq_loc,@menu-1)) {
		mes .npc$;
		mes "Would you like me to remove this card?"; next;
		if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
		getitem getequipcardid(.@eq_loc,@menu-1),1;
		delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
		setd(".@crd"+@menu, 0);
		getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
	}

	if(rand(100)>.perc) {
		mes .npc$;
		mes "I'm sorry but I've failed you!";
		misceffect 155; emotion e_sob,0;
		set Zeny,Zeny-.pric;
		close;
	}
	
	set Zeny,Zeny-.pric;
	delitem .@itm,1;
	delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
	setd(".@crd"+@menu, .@itm);
	getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
	misceffect .efet;
	emotion e_no1,0;
	mes .npc$;
	mes "All done!";
	equip .@eq_itm;
	close;

//NPC Constants
	OnInit:
		//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
		set      .npc$  ,	"[^0000FFEnchant Expert^000000]"; // NPC Name
		set      .pric  ,	1000000;                          // Price
		set      .efet  ,	154;                              // Effect Number
		set      .perc  ,	rand(50,80);                      // Percent
		setarray .crd_c$,	"st", "nd", "rd", "th";           // Count
		setarray .en_orb,	4700, 4862;                       // Range of IDs selected for enchanting.
		setarray .eqp$  ,	"Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment",
		                	"Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear";
		set      .e_len ,	getarraysize(.eqp$);
		//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}
Edited by Skorm
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  04/14/12
  • Last Seen:  

can i know, how to change directly to the 3nd slot and 4th slot only?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  06/26/18
  • Last Seen:  

@Skorm 

setarray .itm6  ,   4763, 4764;                       // Footgear

Here's the error 

[Error]: script:delitem: unknown item "0".
[Debug]: Source (NPC): Enchant Expert at ayothaya (171,148)

 

Please ?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

//v1.4
new_1-2,95,71,4	script	Enchant Expert	100,{
//Character Variables
	set .@geid,	getequipid(9);
	set .@cout,	countitem(.item);
	set .@gin$,	getitemname(.item);
	set .@gerf,	getequiprefinerycnt(9);
	set .@crd1,	getequipcardid(9,0);
	set .@crd2,	getequipcardid(9,1);
	set .@crd3,	getequipcardid(9,2);
	set .@crd4,	getequipcardid(9,3);
	set .@itm,	4700+((rand(5)*10)+rand(3));

	mes .npc$;
	mes "I can endow your glasses with mystical powers, but It'll cost yah "+.pric+" "+((.pric-1)?.@gin$+"s":.@gin$)+"."; next;
	if(!.@cout) { mes .npc$; mes "Sorry come back when you have "+.@gin$+"(s)."; close; }
	if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
	if(.@cout<.pric) { mes .npc$; mes "I'm sorry you don't have enough "+.@gin$+"(s) to for me to endow your specticals, please come back later."; close; }
	if(rand(0,((100/.perc)-1))) { mes .npc$; mes "I'm sorry but I've failed you!"; misceffect 155; emotion e_sob,0; delitem .item,.pric; close; }
	mes .npc$;

	if(compare(.uit$,""+.@geid)) {
		delitem .item,.pric;
		delitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
		getitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@itm;
		misceffect .efet;
		mes "All done!";
		equip .@geid;
		close;
	}
	mes "I'm sorry but you need to equipped a slotted mid-range headgear before we can continue.";
	close;

//NPC Constants
	OnInit:
		//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
		set .npc$,	"[^0000FFBlinger^000000]";			// NPC Name
		set .pric,	1;						// Price
		set .efet,	154;						// Effect Number
		set .item,	6242;						// Item Number
		set .uit$,	"5074,5401,5104,18507,5068,2204,2260,5085,2202";// Item List
		set .perc,	rand(50,80); // Percent
		/*18603(Black Devil Mask), Not included because it wasn't in my DB*/ 
		/*2286 Unslotted version of 18507*/
		/*2203 Unslotted version of 2204*/
		/*2201 Unslotted version of 2202*/
		//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}

 

Do you mean like my script if in that case why didn't you just message me?

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

//v1.4
new_1-2,95,71,4	script	Bling	100,{
//Character Variables
	set .@geid,	getequipid(9);
	set .@cout,	countitem(.item);
	set .@gin$,	getitemname(.item);
	set .@gerf,	getequiprefinerycnt(9);
	set .@crd1,	getequipcardid(9,0);
	set .@crd2,	getequipcardid(9,1);
	set .@crd3,	getequipcardid(9,2);
	set .@crd4,	getequipcardid(9,3);
	set .@itm,	4700+((rand(5)*10)+rand(3));

	mes .npc$;
	mes "I can endow your glasses with mystical powers, but It'll cost yah "+.pric+" "+((.pric-1)?.@gin$+"s":.@gin$)+"."; next;
	if(!.@cout) { mes .npc$; mes "Sorry come back when you have "+.@gin$+"(s)."; close; }
	if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
	if(.@cout<.pric) { mes .npc$; mes "I'm sorry you don't have enough "+.@gin$+"(s) to for me to endow your specticals, please come back later."; close; }
	if(rand(0,((100/.perc)-1))) { mes .npc$; mes "I'm sorry but I've failed you!"; misceffect 155; emotion e_sob,0; delitem .item,.pric; close; }
	mes .npc$;

	if(compare(.uit$,""+.@geid)) {
		delitem .item,.pric;
		delitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
		getitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@itm;
		misceffect .efet;
		mes "All done!";
		equip .@geid;
		close;
	}
	mes "I'm sorry but you need to equipped a slotted mid-range headgear before we can continue.";
	close;

//NPC Constants
	OnInit:
		//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
		set .npc$,	"[^0000FFBlinger^000000]";			// NPC Name
		set .pric,	1;						// Price
		set .efet,	154;						// Effect Number
		set .item,	6242;						// Item Number
		set .uit$,	"5074,5401,5104,18507,5068,2204,2260,5085,2202";// Item List
		set .perc,	rand(50,80); // Percent
		/*18603(Black Devil Mask), Not included because it wasn't in my DB*/ 
		/*2286 Unslotted version of 18507*/
		/*2203 Unslotted version of 2204*/
		/*2201 Unslotted version of 2202*/
		//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}

 

Do you mean like my script if in that case why didn't you just message me?

Oh wow, didnt kno you have that script, ive been searching a lot and i cant find any,

thanks anyways! ima try it now  /no1

=======================================================================================

 

Well my idea of script is kinda like this,

but i need this ff

1, can choose to slot 1-4th with succes chance

2. required an orb(enchantments) before enchanting

3. can enchant Head/Armor/Garment and Shoes.

 

Edited by Critica
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

Oh wow, didnt kno you have that script, ive been searching a lot and i cant find any,

thanks anyways! ima try it now  /no1

=======================================================================================

 

Well my idea of script is kinda like this,

but i need this ff

1, can choose to slot 1-4th with succes chance

2. required an orb(enchantments) before enchanting

3. can enchant Head/Armor/Garment and Shoes.

 

 

Alright I'm going to need a little more info like what orb enchantments are you talking about? There are many of them... do you want all?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

If possible yes, 
its kinda like this

http://rathena.org/board/topic/61734-custom-enchantment-system/
it let you chose what slot u want to be enchanted, with a success rate,

but i just need a simple enchanter
1. Ask what equipment you want to slot

2. Where you want to slot the orb(enchantment) 1st to 4th slot

3. NPC check what orb(enchantment) you have and use that for slotting / and maybe add some price? (zeny/item)
4. Success rate on enchanting
5. I think thats about it.

ive tested it, i got the orb, and full equips, 
but on here nothing shows

screenr_Athena023.jpg

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

ive tested it, i got the orb, and full equips, 

but on here nothing shows

 

 

screenr_Athena023.jpg

 

 

Woops made some last second chances ... Switch these around.

		set      .e_len ,	getarraysize(.eqp$);
		setarray .eqp$  ,	"Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment",
		                	"Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear";

 

Or just re-copy my paste because I updated it.

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

Thank you, it all works as i wanted hehe!

1 thing a added is this ( delitem .@itm,1; ) on failing

	if(rand(100)>.perc) {
		mes .npc$;
		mes "I'm sorry but I've failed you!";
		misceffect 155; emotion e_sob,0;
		set Zeny,Zeny-.pric;
		delitem .@itm,1;
		close;

 

and i just wana ask, whats causing this to  show up? not really a big deal, 
i just wana know, can i take it off? if not its ok...
screenr_Athena024.jpg

 

 

thanks for doing it apriciate the help!  /no1

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

Thank you, it all works as i wanted hehe!

1 thing a added is this ( delitem .@itm,1; ) on failing

	if(rand(100)>.perc) {
		mes .npc$;
		mes "I'm sorry but I've failed you!";
		misceffect 155; emotion e_sob,0;
		set Zeny,Zeny-.pric;
		delitem .@itm,1;
		close;

 

and i just wana ask, whats causing this to  show up? not really a big deal, 

i just wana know, can i take it off? if not its ok...

screenr_Athena024.jpg

 

 

thanks for doing it apriciate the help!  /no1

 

That was a debug message I forgot to remove. I've since removed it from my first post.

 

Also I wasn't sure if you wanted that item deleted so I hadn't added that part. I'm glad you were able to understand it enough to add that xD. Means my work isn't quite as messy as I thought LOL.

 

Last Edit: I added a message if you don't have any enchantment orbs... forgot that in the original.

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

sorry for the post.

can i know, how to change directly to the 2nd slot until 4th slot only?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

sorry for the post.

can i know, how to change directly to the 2nd slot until 4th slot only?

 

prontera,194,188,4	script	Enchant Expert	712,{
	mes .npc$;
	mes "Hello there!";
	mes "I can enchant your items,";
	mes "for a small fee of "+.pric+"z.";
	emotion e_no1,0; next;
	if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
	if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; }
	
	mes .npc$;
	mes "Which item would you like to enchant?"; next;
	while(set(.@a,.@a+1)<=.e_len) {
		if(getequipid(.@a)>-1)
			set .@menu$, .@menu$+.eqp$[.@a-1]+"- [^0000FF"+getitemname(getequipid(.@a))+"^000000]:";
		else set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a-1]+"- [Empty]^000000:";
	}
		
	select(.@menu$);
	set .@eq_loc, @menu;
	set .@eq_itm, getequipid(.@eq_loc);
	if(.@eq_itm<0) {
		mes .npc$;
		mes "Hmm, I don't think you have anything equipped there.";
		close;
	}
	
	set .@menu$, "";
	set .@a, .en_orb[0];
	while((set(.@a,.@a+1)-1)<=.en_orb[1])
		if(getiteminfo(.@a-1,2)>-1)
			if(set(.@c,countitem(.@a-1))) {
				set .@menu$, .@menu$+getitemname(.@a-1)+" x"+.@c+":";
				set .@b,.@b+1; set .@item[.@b], .@a-1;
			}
			
	if(.@menu$=="") {
		mes .npc$;
		mes "Hmm, you don't seem to have any enchantment orbs.";
		close;
	}

	mes .npc$;
	mes "Please, select an enchantment from the menu."; next;
	select(.@menu$);
	set .@itm, .@item[@menu];

	set .@menu$, ""; set .@a, 0;
	while((set(.@a,.@a+1))<4) {
		if(getequipcardid(.@eq_loc,.@a))
			set .@menu$, .@menu$+(.@a+1)+.crd_c$[.@a]+" Slot- [^a92435"+getitemname(getequipcardid(.@eq_loc,.@a))+"^000000]:";
		else set .@menu$, .@menu$+(.@a+1)+.crd_c$[.@a]+" Slot- [^30ad25Empty^000000]:";
	}
	
	setarray .@card, getequipcardid(.@eq_loc,0), getequipcardid(.@eq_loc,1), getequipcardid(.@eq_loc,2), getequipcardid(.@eq_loc,3);
	
	mes .npc$;
	mes "Select a slot."; next;
	set .@men, select(.@menu$);
	set .@eqrf,	getequiprefinerycnt(.@eq_loc);
	if(getequipcardid(.@eq_loc,@menu)) {
		mes .npc$;
		mes "Would you like me to remove this card?"; next;
		if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
		getitem getequipcardid(.@eq_loc,.@men),1;
		unequip(.@eq_loc);
		delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
		set .@card[.@men], 0;
		getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
	}

	if(rand(100)>.perc) {
		mes .npc$;
		mes "I'm sorry but I've failed you!";
		misceffect 155; emotion e_sob,0;
		set Zeny,Zeny-.pric;
		close;
	}
	
	set Zeny,Zeny-.pric;
	delitem .@itm,1;
	delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
	set .@card[.@men], .@itm;
	getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
	misceffect .efet;
	emotion e_no1,0;
	mes .npc$;
	mes "All done!";
	equip .@eq_itm;
	close;

//NPC Constants
	OnInit:
		//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
		set      .npc$  ,	"[^0000FFEnchant Expert^000000]"; // NPC Name
		set      .pric  ,	1000000;                          // Price
		set      .efet  ,	154;                              // Effect Number
		set      .perc  ,	rand(50,80);                      // Percent
		setarray .crd_c$,	"st", "nd", "rd", "th";           // Count
		setarray .en_orb,	4700, 4862;                       // Range of IDs selected for enchanting.
		setarray .eqp$  ,	"Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment",
		                	"Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear";
		set      .e_len ,	getarraysize(.eqp$);
		//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   1
  • Joined:  10/09/13
  • Last Seen:  

 

sorry for the post.

can i know, how to change directly to the 2nd slot until 4th slot only?

prontera,194,188,4	script	Enchant Expert	712,{
	mes .npc$;
	mes "Hello there!";
	mes "I can enchant your items,";
	mes "for a small fee of "+.pric+"z.";
	emotion e_no1,0; next;
	if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
	if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; }
	
	mes .npc$;
	mes "Which item would you like to enchant?"; next;
	while(set(.@a,.@a+1)<=.e_len) {
		if(getequipid(.@a)>-1)
			set .@menu$, .@menu$+.eqp$[.@a-1]+"- [^0000FF"+getitemname(getequipid(.@a))+"^000000]:";
		else set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a-1]+"- [Empty]^000000:";
	}
		
	select(.@menu$);
	set .@eq_loc, @menu;
	set .@eq_itm, getequipid(.@eq_loc);
	if(.@eq_itm<0) {
		mes .npc$;
		mes "Hmm, I don't think you have anything equipped there.";
		close;
	}
	
	set .@menu$, "";
	set .@a, .en_orb[0];
	while((set(.@a,.@a+1)-1)<=.en_orb[1])
		if(getiteminfo(.@a-1,2)>-1)
			if(set(.@c,countitem(.@a-1))) {
				set .@menu$, .@menu$+getitemname(.@a-1)+" x"+.@c+":";
				set .@b,.@b+1; set .@item[.@b], .@a-1;
			}
			
	if(.@menu$=="") {
		mes .npc$;
		mes "Hmm, you don't seem to have any enchantment orbs.";
		close;
	}

	mes .npc$;
	mes "Please, select an enchantment from the menu."; next;
	select(.@menu$);
	set .@itm, .@item[@menu];

	set .@menu$, ""; set .@a, 0;
	while((set(.@a,.@a+1))<4) {
		if(getequipcardid(.@eq_loc,.@a))
			set .@menu$, .@menu$+(.@a+1)+.crd_c$[.@a]+" Slot- [^a92435"+getitemname(getequipcardid(.@eq_loc,.@a))+"^000000]:";
		else set .@menu$, .@menu$+(.@a+1)+.crd_c$[.@a]+" Slot- [^30ad25Empty^000000]:";
	}
	
	setarray .@card, getequipcardid(.@eq_loc,0), getequipcardid(.@eq_loc,1), getequipcardid(.@eq_loc,2), getequipcardid(.@eq_loc,3);
	
	mes .npc$;
	mes "Select a slot."; next;
	set .@men, select(.@menu$);
	set .@eqrf,	getequiprefinerycnt(.@eq_loc);
	if(getequipcardid(.@eq_loc,@menu)) {
		mes .npc$;
		mes "Would you like me to remove this card?"; next;
		if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
		getitem getequipcardid(.@eq_loc,.@men),1;
		unequip(.@eq_loc);
		delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
		set .@card[.@men], 0;
		getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
	}

	if(rand(100)>.perc) {
		mes .npc$;
		mes "I'm sorry but I've failed you!";
		misceffect 155; emotion e_sob,0;
		set Zeny,Zeny-.pric;
		close;
	}
	
	set Zeny,Zeny-.pric;
	delitem .@itm,1;
	delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
	set .@card[.@men], .@itm;
	getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@card[0], .@card[1], .@card[2], .@card[3];
	misceffect .efet;
	emotion e_no1,0;
	mes .npc$;
	mes "All done!";
	equip .@eq_itm;
	close;

//NPC Constants
	OnInit:
		//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
		set      .npc$  ,	"[^0000FFEnchant Expert^000000]"; // NPC Name
		set      .pric  ,	1000000;                          // Price
		set      .efet  ,	154;                              // Effect Number
		set      .perc  ,	rand(50,80);                      // Percent
		setarray .crd_c$,	"st", "nd", "rd", "th";           // Count
		setarray .en_orb,	4700, 4862;                       // Range of IDs selected for enchanting.
		setarray .eqp$  ,	"Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment",
		                	"Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear";
		set      .e_len ,	getarraysize(.eqp$);
		//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}

 

is it possible to make this?

 

Specific ID to a Specific Item.

 

This are the actual ID's: 

 

ID 4760 -> is for Shields

ID 4761 -> is for Armor

ID 4762 -> is for Garment

ID 4763 and 4764 -> is for Footgear

ID 4765 -> is for Weapon

ID 4766 -> is for Lower Headgear

ID 4767 -> is for Upper/Middle Headgear

 

There's also a chance to break the equipment's and weapons when enchanting. 

 

1 slot = 100%

2 slot = 80%

3 slot = 50%

4 slot = 10%

 

Thanks in Advance!

Edited by caizercafe
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

 

is it possible to make this?

 

Specific ID to a Specific Item.

 

This are the actual ID's: 

 

ID 4760 -> is for Shields

ID 4761 -> is for Armor

ID 4762 -> is for Garment

ID 4763 and 4764 -> is for Footgear

ID 4765 -> is for Weapon

ID 4766 -> is for Lower Headgear

ID 4767 -> is for Upper/Middle Headgear

 

There's also a chance to break the equipment's and weapons when enchanting. 

 

1 slot = 100%

2 slot = 80%

3 slot = 50%

4 slot = 10%

 

Thanks in Advance!

 

prontera,194,188,4	script	Enchant Expert	712,{
	mes .npc$;
	mes "Hello there!";
	mes "I can enchant your items,";
	mes "for a small fee of "+.pric+"z.";
	emotion e_no1,0; next;
	if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
	if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; }
	
	mes .npc$;
	mes "Which item would you like to enchant?"; next;
	while(set(.@a,.@a+1)<=.e_len) {
		if(getequipid(.@a)>-1)
			set .@menu$, .@menu$+.eqp$[.@a-1]+"- [^0000FF"+getitemname(getequipid(.@a))+"^000000]:";
		else set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a-1]+"- [Empty]^000000:";
	}
		
	select(.@menu$);
	set .@eq_loc, @menu;
	set .@eq_itm, getequipid(.@eq_loc);
	if(.@eq_itm<0) {
		mes .npc$;
		mes "Hmm, I don't think you have anything equipped there.";
		close;
	}
	
	set .@menu$, "";
	set(.@eq,(getiteminfo(.@eq_itm,2)==4?4:.@eq_loc));
	for(set(.@b,0);.@b<getarraysize(getd(".itm"+.@eq));set(.@b,.@b+1)) {
		set(.@items,getd(".itm"+.@eq+"["+.@b+"]"));
		if(getiteminfo(.@items,2)>-1)
			if(set(.@c,countitem(.@items))) {
				set .@menu$, .@menu$+getitemname(.@items)+" x"+.@c+":";
				set .@b,.@b+1; set .@item[.@b], .@items;
			}
	}
			
	if(.@menu$=="") {
		mes .npc$;
		mes "Hmm, you don't seem to have any enchantment orbs for that equipment.";
		close;
	}

	mes .npc$;
	mes "Please, select an enchantment from the menu."; next;
	select(.@menu$);
	set .@itm, .@item[@menu];

	set .@menu$, ""; set .@a, 0;
	while((set(.@a,.@a+1)-1)<4) {
		setd(".@crd"+.@a, getequipcardid(.@eq_loc,.@a-1));
		if(getequipcardid(.@eq_loc,.@a-1))
			set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^a92435"+getitemname(getequipcardid(.@eq_loc,.@a-1))+"^000000]:";
		else set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^30ad25Empty^000000]:";
	}
	
	mes .npc$;
	mes "Select a slot."; next;
	set(.@slot,select(.@menu$)-1);
	set .@eqrf,	getequiprefinerycnt(.@eq_loc);
	if(getequipcardid(.@eq_loc,.@slot)) {
		mes .npc$;
		mes "Would you like me to remove this card?"; next;
		if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
		getitem getequipcardid(.@eq_loc,.@slot),1;
		delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
		setd(".@crd"+(@menu+1), 0);
		getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
	}

	if(rand(101)>.perc[.@slot]) {
		mes .npc$;
		mes "I'm sorry but I've failed you!";
		misceffect 155; emotion e_sob,0;
		set Zeny,Zeny-.pric;
		close;
	}
	
	set Zeny,Zeny-.pric;
	delitem .@itm,1;
	delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
	setd(".@crd"+(@menu+1), .@itm);
	getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
	misceffect .efet;
	emotion e_no1,0;
	mes .npc$;
	mes "All done!";
	equip .@eq_itm;
	close;

//NPC Constants
	OnInit:
		//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
		set      .npc$  ,	"[^0000FFEnchant Expert^000000]"; // NPC Name
		set      .pric  ,	1000000;                          // Price
		set      .efet  ,	154;                              // Effect Number
		setarray .perc  ,	100,80,50,10;                     // Percent slot
		setarray .crd_c$,	"st", "nd", "rd", "th";           // Count
		setarray .itm3  ,   4760;                             // Sheilds
		setarray .itm2  ,   4761;                             // Armor
		setarray .itm5  ,   4762;                             // Garment
		setarray .itm6  ,   4763, 4764;                       // Footgear
		setarray .itm7  ,   4765;                             // Accessory1
		setarray .itm8  ,   4766;                             // Accessory2
		setarray .itm4  ,   4765;                             // Weapon
		setarray .itm10 ,   4766;                             // Low Headgear
		setarray .itm9  ,   4767;                             // Mid Headgear
		setarray .itm1  ,   4767;                             // Upper Headgear
		setarray .eqp$  ,	"Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment",
		                	"Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear";
		set      .e_len ,	getarraysize(.eqp$);
		//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   1
  • Joined:  10/09/13
  • Last Seen:  

Wow! super thank you Skorm!! thanks a lot!  /thx

Edited by caizercafe
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   1
  • Joined:  10/09/13
  • Last Seen:  

 

 

is it possible to make this?

 

Specific ID to a Specific Item.

 

This are the actual ID's: 

 

ID 4760 -> is for Shields

ID 4761 -> is for Armor

ID 4762 -> is for Garment

ID 4763 and 4764 -> is for Footgear

ID 4765 -> is for Weapon

ID 4766 -> is for Lower Headgear

ID 4767 -> is for Upper/Middle Headgear

 

There's also a chance to break the equipment's and weapons when enchanting. 

 

1 slot = 100%

2 slot = 80%

3 slot = 50%

4 slot = 10%

 

Thanks in Advance!

 

prontera,194,188,4	script	Enchant Expert	712,{
	mes .npc$;
	mes "Hello there!";
	mes "I can enchant your items,";
	mes "for a small fee of "+.pric+"z.";
	emotion e_no1,0; next;
	if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
	if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; }
	
	mes .npc$;
	mes "Which item would you like to enchant?"; next;
	while(set(.@a,.@a+1)<=.e_len) {
		if(getequipid(.@a)>-1)
			set .@menu$, .@menu$+.eqp$[.@a-1]+"- [^0000FF"+getitemname(getequipid(.@a))+"^000000]:";
		else set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a-1]+"- [Empty]^000000:";
	}
		
	select(.@menu$);
	set .@eq_loc, @menu;
	set .@eq_itm, getequipid(.@eq_loc);
	if(.@eq_itm<0) {
		mes .npc$;
		mes "Hmm, I don't think you have anything equipped there.";
		close;
	}
	
	set .@menu$, "";
	set(.@eq,(getiteminfo(.@eq_itm,2)==4?4:.@eq_loc));
	for(set(.@b,0);.@b<getarraysize(getd(".itm"+.@eq));set(.@b,.@b+1)) {
		set(.@items,getd(".itm"+.@eq+"["+.@b+"]"));
		if(getiteminfo(.@items,2)>-1)
			if(set(.@c,countitem(.@items))) {
				set .@menu$, .@menu$+getitemname(.@items)+" x"+.@c+":";
				set .@b,.@b+1; set .@item[.@b], .@items;
			}
	}
			
	if(.@menu$=="") {
		mes .npc$;
		mes "Hmm, you don't seem to have any enchantment orbs for that equipment.";
		close;
	}

	mes .npc$;
	mes "Please, select an enchantment from the menu."; next;
	select(.@menu$);
	set .@itm, .@item[@menu];

	set .@menu$, ""; set .@a, 0;
	while((set(.@a,.@a+1)-1)<4) {
		setd(".@crd"+.@a, getequipcardid(.@eq_loc,.@a-1));
		if(getequipcardid(.@eq_loc,.@a-1))
			set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^a92435"+getitemname(getequipcardid(.@eq_loc,.@a-1))+"^000000]:";
		else set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^30ad25Empty^000000]:";
	}
	
	mes .npc$;
	mes "Select a slot."; next;
	set(.@slot,select(.@menu$)-1);
	set .@eqrf,	getequiprefinerycnt(.@eq_loc);
	if(getequipcardid(.@eq_loc,.@slot)) {
		mes .npc$;
		mes "Would you like me to remove this card?"; next;
		if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; }
		getitem getequipcardid(.@eq_loc,.@slot),1;
		delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
		setd(".@crd"+(@menu+1), 0);
		getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
	}

	if(rand(101)>.perc[.@slot]) {
		mes .npc$;
		mes "I'm sorry but I've failed you!";
		misceffect 155; emotion e_sob,0;
		set Zeny,Zeny-.pric;
		close;
	}
	
	set Zeny,Zeny-.pric;
	delitem .@itm,1;
	delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
	setd(".@crd"+(@menu+1), .@itm);
	getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
	misceffect .efet;
	emotion e_no1,0;
	mes .npc$;
	mes "All done!";
	equip .@eq_itm;
	close;

//NPC Constants
	OnInit:
		//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
		set      .npc$  ,	"[^0000FFEnchant Expert^000000]"; // NPC Name
		set      .pric  ,	1000000;                          // Price
		set      .efet  ,	154;                              // Effect Number
		setarray .perc  ,	100,80,50,10;                     // Percent slot
		setarray .crd_c$,	"st", "nd", "rd", "th";           // Count
		setarray .itm3  ,   4760;                             // Sheilds
		setarray .itm2  ,   4761;                             // Armor
		setarray .itm5  ,   4762;                             // Garment
		setarray .itm6  ,   4763, 4764;                       // Footgear
		setarray .itm7  ,   4765;                             // Accessory1
		setarray .itm8  ,   4766;                             // Accessory2
		setarray .itm4  ,   4765;                             // Weapon
		setarray .itm10 ,   4766;                             // Low Headgear
		setarray .itm9  ,   4767;                             // Mid Headgear
		setarray .itm1  ,   4767;                             // Upper Headgear
		setarray .eqp$  ,	"Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment",
		                	"Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear";
		set      .e_len ,	getarraysize(.eqp$);
		//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}

 

 

Hello again sir Skorm,

 

ive got an error

 

when enchanting on footgear with an item ID of 4764

setarray .itm6  ,   4763, 4764;                       // Footgear

Here's the error 

[Error]: script:delitem: unknown item "0".
[Debug]: Source (NPC): Enchant Expert at ayothaya (171,148)
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...