I want to request an NPC that can combine headgearA and headgearB and produce headgearA with the effects of headgearA and headgearB.
I made this using @item2 command
And to be much easy to configure, itemA and itemB should be in an array something like
setarray .itemFuse1[0],itemidA,itemidB,fuseRate;
setarray .itemFuse2[0],itemidA,itemidB,fuseRate;
setarray .itemFuse3[0],itemidA,itemidB,fuseRate;
setarray .itemFuse4[0],itemidA,itemidB,fuseRate;
....
....
I can add more arrays for .itemFuseN[0]
Similar settings for with this from http://rathena.org/b...ro/#entry109922
OnInit:
// Format: <%>,<item ID>,<count>{,...};
setarray .P1[0],70,607,25;
setarray .P2[0],70,13710,1;
setarray .P3[0],40,5471,1;
setarray .P4[0],40,5210,1;
setarray .P5[0],40,5224,1;
setarray .P6[0],50,2357,1,2524,1,2421,1,2115,1;
setarray .P7[0],25,2701,1;
setarray .P8[0],5,2394,1;
setarray .Default[0],12214,1;
setarray .Cost[0],7227,300;
set .Total,8;
end;
The menu will show something like:
itemname(itemidA) + itemname(itemidB)
itemname(itemidA) + itemname(itemidB)
itemname(itemidA) + itemname(itemidB)
itemname(itemidA) + itemname(itemidB)
itemname(itemidA) + itemname(itemidB)
the menu will vary on how many arrays are available from the config. Similar with the Quest Shop of Euphy
Fusion can fail based on the chance/rate in the array. When it failed, both items will be destroyed or deleted.
When fusion is successful, user can obtain the item through
delitem itemidA,1;
delitem itemidB,1;
getitem2 itemidA,1,1,0,0,0,0,0,itemidB;