Jump to content
  • 0

help me this! enchant


Question

Posted

Error is

[Error]: script:delitem: failed to delete 1 items (AID=2000020 item_id=17108).
[Debug]: Source (NPC): earo at phtownall (160,248)

this my script


phtownall,160,248,5	script	earo	803,{
	mes "[Hidden Slot Enchant]";	
	mes "Hello I can enchant your armor";	
	mes "and give them +2 to +10 depending";	
	mes "of your luk. However, the armor could";	
	mes "break, and this if you have sloted or refined";	
	mes "armor you will loose then so I advice you";
	mes "to use a clean sloted armor.";
	mes "Remember this procces will cost you 5,000,000z";	
	mes "And Break the armor is 15%";
	next;
	mes "If you have same armor in the inventory";
	mes "same as you have equiped, those will";
	mes "loose refinement effects, cards and status too.";
	mes "So, make sure you bring me one by one armors equiped.";
	next;
	menu

		"High Quality Armor",Lhigh;

		
Lhigh:
	if( zeny < 5000000 )	{
	mes "[Hidden Slot Enchant]";
	mes "Hey sorry not enough money.";
	close;
	}
	for (set .@c, 0; .@c < getarraysize(.ids3); set .@c, .@c + 1) {
		if (isequipped(.ids3[.@c]) == 1) {
			mes "[Hidden Slot Enchant]";
			mes "I see you have ^FF0000[" +getitemname(.ids3[.@c]) +"]^000000 equiped.";
			next;
			mes "[Hidden Slot Enchant]";
			mes "Let's go, will go to procces..";
			mes "Good luck!...";
			next;
			callfunc("Enchant");
			close; // Close, no more loop if armor detected
		} // End if
	} // End loop
	mes "[Hidden Slot Enchant]";
	mes "You should equip your armor first.";
	close;
	
OnInit:
// Big part I know, but I wanted you to know wich armor is every ID, this will make your life easier when you want to post a guide how this work in your private RO  forum
	setarray .ids3[0],20110, // Meteo Plate[1]
					20052, // Orlean's Uniform[1]
					17161, // Diabolus Robe[1]
					17033, // Diabolus Armor[1]
					2375, // Sprint Mail[1]
					2317, // Kandra[1] || Gandora[1]
					2342, // Naga Scale Armor[1]
					2364, // Life Link[1]
					2357, // Refined Tights[1]
					2376, // Assaulter Plate[1]
					2377, // Elite Engineer Armor[1]
					2378, // Assassin Robe[1]
					2379, // Warlock Battle Robe[1]
					2380, // Robe of Order[1]
					2381, // Elite Archer Suit[1]
					2382; // Elite Shooter Suit[1]
end;
} // End Script

function	script	Enchant	{
set @itemid,getequipid(EQI_ARMOR);
set zeny, zeny - 5000000;
set @porcentaje, rand(0,100);
if (@porcentaje >= 0 && @porcentaje <= 15) { // 10% break
	delitem @itemid, 1;
	mes "[Hidden Slot Enchant]";			
	mes "You have loose your armor I'm sorry.";

} else if (@porcentaje >= 11 && @porcentaje <= 10) { // 1% + 10 stat X
	delitem @itemid,1;
	setarray .@level[0],4709,4739,4749,4719,4729,4759;
	set @enchant_id, .@level[rand(0,5)];
	getitem2 @itemid, 1, 1, 0, 0, 0, 0, 0, @enchant_id;
	mes "[Hidden Slot Enchant]";			
	mes "Hooray ~ Here you are your enchanted armor !";
} else if (@porcentaje >= 11 && @porcentaje <= 13) { // 1% + 9 stat X
	delitem @itemid,1;
	setarray .@level[0],4708,4738,4748,4718,4728,4758;
	set @enchant_id, .@level[rand(0,5)];
	getitem2 @itemid, 1, 1, 0, 0, 0, 0, 0, @enchant_id;
	mes "[Hidden Slot Enchant]";			
	mes "Hooray ~ Here you are your enchanted armor !";
} else if (@porcentaje >= 11 && @porcentaje <= 14) { // 1% + 8 stat X
	delitem @itemid,1;
	setarray .@level[0],4707,4737,4747,4717,4727,4757;
	set @enchant_id, .@level[rand(0,5)];
	getitem2 @itemid, 1, 1, 0, 0, 0, 0, 0, @enchant_id;
	mes "[Hidden Slot Enchant]";			
	mes "Hooray ~ Here you are your enchanted armor !";
} else if (@porcentaje >= 11 && @porcentaje <= 18) { // 1% + 7 stat X
	delitem @itemid,1;
	setarray .@level[0],4706,4736,4746,4716,4726,4756;
	set @enchant_id, .@level[rand(0,5)];
	getitem2 @itemid, 1, 1, 0, 0, 0, 0, 0, @enchant_id;
	mes "[Hidden Slot Enchant]";			
	mes "Hooray ~ Here you are your enchanted armor !";
} else if (@porcentaje >= 11 && @porcentaje <= 20) { // 1% + 6 stat X
	delitem @itemid,1;
	setarray .@level[0],4705,4735,4745,4715,4725,4755;
	set @enchant_id, .@level[rand(0,5)];
	getitem2 @itemid, 1, 1, 0, 0, 0, 0, 0, @enchant_id;
	mes "[Hidden Slot Enchant]";			
	mes "Hooray ~ Here you are your enchanted armor !";
} else if (@porcentaje >= 11 && @porcentaje <= 30) { // 1% + 5 stat X
	delitem @itemid,1;
	setarray .@level[0],4704,4734,4744,4714,4724,4754;
	set @enchant_id, .@level[rand(0,5)];
	getitem2 @itemid, 1, 1, 0, 0, 0, 0, 0, @enchant_id;
	mes "[Hidden Slot Enchant]";			
	mes "Hooray ~ Here you are your enchanted armor !";

} else if (@porcentaje >= 11 && @porcentaje <= 50) { // 1% + 4 stat X
	delitem @itemid,1;
	setarray .@level[0],4703,4733,4743,4713,4723,4753;
	set @enchant_id, .@level[rand(0,5)];
	getitem2 @itemid, 1, 1, 0, 0, 0, 0, 0, @enchant_id;
	mes "[Hidden Slot Enchant]";			
	mes "Hooray ~ Here you are your enchanted armor !";
} else if (@porcentaje >= 11 && @porcentaje <= 80) { // 1% + 3 stat X
	delitem @itemid,1;
	setarray .@level[0],4702,4712,4722,4732,4742,4752;
	set @enchant_id, .@level[rand(0,5)];
	getitem2 @itemid, 1, 1, 0, 0, 0, 0, 0, @enchant_id;
	mes "[Hidden Slot Enchant]";			
	mes "Hooray ~ Here you are your enchanted armor !";
} else if (@porcentaje >= 11 && @porcentaje <= 99) { // 9% + 2 stat X
	delitem @itemid,1;
	setarray .@level[0],4701,4711,4721,4731,4741,4751;
	set @enchant_id, .@level[rand(0,5)];
	getitem2 @itemid, 1, 1, 0, 0, 0, 0, 0, @enchant_id;
	mes "[Hidden Slot Enchant]";			
	mes "Hooray ~ Here you are your enchanted armor !";
} // End if
return;
} // End function

please help me

1 answer to this question

Recommended Posts

Posted (edited)

I dont see in setarray .ids3[0your ArmorID item_id=17108

 

Just tested your script and it working fine for me...

Add IDs of your armors to setarray, like below:

 

setarray .ids3[0],20110, // Meteo Plate[1]
                    20052, // Orlean's Uniform[1]
                    17161, // Diabolus Robe[1]
                    17033, // Diabolus Armor[1]
                    2375, // Sprint Mail[1]
                    2317, // Kandra[1] || Gandora[1]
                    2342, // Naga Scale Armor[1]
                    2364, // Life Link[1]
                    2357, // Refined Tights[1]
                    2376, // Assaulter Plate[1]
                    2377, // Elite Engineer Armor[1]
                    2378, // Assassin Robe[1]
                    2379, // Warlock Battle Robe[1]
                    2380, // Robe of Order[1]
                    2381, // Elite Archer Suit[1]
                    2382; // Elite Shooter Suit[1]

                    17108; // Your Current Armor

 

And i have warning that ia have no

                    20110, // Meteo Plate[1]
                    20052, // Orlean's Uniform[1]
                    17161, // Diabolus Robe[1]
                    17033, // Diabolus Armor[1]
in my database...


And one more thing:

make this line

} else if (@porcentaje >= 11 && @porcentaje <= 10) { // 1% + 10 stat X

 

must be like this

} else if (@porcentaje >= 11 && @porcentaje <= 12) { // 1% + 10 stat X

Edited by Phenomena

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...