Custom Armor enchanter

rans

New member
Messages
358
Points
0
Location
Somewhere down the road
Emulator
Hi there can i request a custom enchanter?
i mean only work if i have the item to be compounded on my equip

Example: npc will only work if i have the +3stats orb(id 9999) and i want it to compund on 3rd slot of my mink coat. 

i found other script but their script works without the orb in my inventory. i want to make a requirement. 
Thanks 

 
Hi there can i request a custom enchanter?

i mean only work if i have the item to be compounded on my equip

Example: npc will only work if i have the +3stats orb(id 9999) and i want it to compund on 3rd slot of my mink coat. 

i found other script but their script works without the orb in my inventory. i want to make a requirement. 

Thanks 
If you want to make a requirement go http://herc.ws/wiki/Basic_Scripting read it all, analyze and then use 

if (countitem(9999) >= 1) 
 
Where you need this.

 
Well yeah thnx but i was expecting for someone who could make it an array i mean easy configure each time i add an item. if that is possible since my coding skills are not that good and messy script result into a server lag.

 
setarray .equipid[0], 1599; <= items that can be enchanted
setarray .enchant[0], 9999; <= enchant item id
setarray .itemsid[0], 909; <= items that need for enchant
setarray .amounts[0], 1;

.@menu$ = "";
for( .i = 0; .i < getarraysize( .equipid ); .i ++ )
{
.@menu$ += ( .i + 1 ) + ". " + getitemname(.equipid[.i];
.@menu$ += ":";
}

@select = select(.@menu$) - 1;

if( !isequipped( .equipid[@select] ) )
{
mes "equip the item first.";
close;
}
@error = 0;
for( .a = 0; .a < getarraysize( .itemsid ); .a ++ )
{
if( countitem( .itemsid[.a] ) < .amounts[.a] )
close; // no items

delitem .itemsid[.a], .amounts[.a];
}

delitem .equipid[@select], 1;
getitem2 .equipid[@select], 1, 1, 0, 1, 0, 0, 0, .enchant[0];
close;


this is sample.

need a menu for select the enchant orbs. But you can use this code for create your script
default_smile.png


(not tested)

 
Back
Top