polypiling ingots & crafting matsYou can poly a stack of 3 of one crafting material into 1 of the same material with the enchantment (as in, attack) increased by +1- min input item enchant is +1 - does not work on 3x plain ingots- max input item is +4 for ingots of attack - as in you can poly 3x +4 attack ingots but not 3x +5 !-- max is +14 for STR, DEX, INT (will make one ingot of +15)-- max is +3 for def (will make one ingot of +4 defense)- not all tints are accepted - generally speaking only the tints are allowed to be crafted with can be poly'd

polypiling weapons & armourA pile or stack of 3 weapons and armour can be poly'd into one new piece. Study the code below to determine how that works. Hopefully it isn't too cheeseable - nor too useless!

Actual polypile code below!hint: the line function use_502() is where most of the action begins

accepted_crafting_materials={}for i=1,#pp_crafting_materials do for j=1,#pp_crafting_weapon_enchants do for k=1,pp_crafting_weapon_enchants[j][2] do for l=1,#pp_crafting_weapon_tints do tmp_itm=make_code(pp_crafting_materials[i],pp_crafting_weapon_tints[l],pp_crafting_weapon_enchants[j][1],k) table.insert(accepted_crafting_materials,tmp_itm) end end end for j=1,#pp_crafting_armour_enchants do for k=1,pp_crafting_armour_enchants[j][2] do for l=1,#pp_crafting_metal_armour_tints do tmp_itm=make_code(pp_crafting_materials[i],pp_crafting_metal_armour_tints[l],pp_crafting_armour_enchants[j][1],k) table.insert(accepted_crafting_materials,tmp_itm) end for l=1,#pp_crafting_wooden_armour_tints do tmp_itm=make_code(pp_crafting_materials[i],pp_crafting_wooden_armour_tints[l],pp_crafting_armour_enchants[j][1],k) table.insert(accepted_crafting_materials,tmp_itm) end for l=1,#pp_crafting_leather_armour_tints do tmp_itm=make_code(pp_crafting_materials[i],pp_crafting_leather_armour_tints[l],pp_crafting_armour_enchants[j][1],k) table.insert(accepted_crafting_materials,tmp_itm) end for l=1,#pp_crafting_cloth_armour_tints do tmp_itm=make_code(pp_crafting_materials[i],pp_crafting_cloth_armour_tints[l],pp_crafting_armour_enchants[j][1],k) table.insert(accepted_crafting_materials,tmp_itm) end end endend

function use_502 (id,tgt_id,alt,itm,bcode,x,y,z)

local plyr=get_player_ptr(id) local race=sc:get_racename(plyr.race) local map=get_map_ptr(z)

if(map:feature_is_hook(x,y) and plyr.account_name~=map:get_feat_text(x,y)) then send_message(id, "Not here!"); return end

-- go thru the pile of items and make sure they are either ownerless or owned by user -- also no poly soulbound local ptr=map:get_item_ptr(x,y) local pilecnt=0 local i1=Item(0) local i2=Item(0) local i3=Item(0)

local cnt=0 while ptr~=nil and cnt<3 do

if(ptr.owner~="" and ptr.owner~=plyr.name or is_no_drop(ptr.code) or ptr.furniture) then send_message(id, "There are items here that are either not yours or are soulbound!"); return; end

if cnt==0 then i1=ptr.code if ptr.qty>1 then i2=ptr.code if ptr.qty>2 then i3=ptr.code break end end end

if cnt==1 then if not i2:isValid() then i2=ptr.code if ptr.qty>1 then i3=ptr.code break end else i3=ptr.code break end end

if cnt==2 then i3=ptr.code end

ptr=ptr.next cnt=cnt+1 end

if not i1:isValid() or not i2:isValid() or not i3:isValid() then send_message(id, "Requires at least three items in the pile!") return end

local i4 = 0 local i5 = 0

-- yellow pot+2other pot->2mead if race=="dwarf" and get_base_code(i1)==0x104 and in_array(get_base_code(i2), pp_potions) and in_array(get_base_code(i3), pp_potions) then i4=0x5b3 i5=0x5b3 elseif race=="dwarf" and get_base_code(i1)==0x105 and in_array(get_base_code(i2), pp_potions) and in_array(get_base_code(i3), pp_potions) then i4=0x5b4 i5=0x5b4 elseif race=="dwarf" and get_base_code(i1)==0x106 and in_array(get_base_code(i2), pp_potions) and in_array(get_base_code(i3), pp_potions) then i4=0x5b2 i5=0x5b2 elseif (wl:is_weapon(i1) or wl:is_wearable(i1)) and (wl:is_weapon(i2) or wl:is_wearable(i2)) and (wl:is_weapon(i3) or wl:is_wearable(i3)) and wl:is_enchanted(i1) and wl:is_enchanted(i2) and wl:is_enchanted(i3) then -- sev's polypile local ia={i1,i2,i3} local t=0 local found=0 local i for i=1,3 do local m=get_to_mod(ia[i]) local v=get_modifier(ia[i]) if m==MP_WEAPON_BONUS then if v>MAX_WEAPON_BONUS then v=MAX_WEAPON_BONUS end t=t+16*v/MAX_WEAPON_BONUS found=found+1 elseif m==MP_ARMOUR_BONUS then if v>MAX_ARMOUR_BONUS then v=MAX_ARMOUR_BONUS end t=t+16*v/MAX_ARMOUR_BONUS found=found+1 elseif m==MP_INT_BONUS or m==MP_STR_BONUS or m==MP_DEX_BONUS then if v>MAX_ITEM_STAT_BONUS then v=MAX_ITEM_STAT_BONUS end t=t+16*(v-MIN_ITEM_STAT_BONUS)/(MAX_ITEM_STAT_BONUS-MIN_ITEM_STAT_BONUS) found=found+1 elseif m==MP_VIGOUR then if v>MAX_VIGOUR_BONUS then v=MAX_VIGOUR_BONUS end t=t+16*(v-MIN_VIGOUR_BONUS)/(MAX_VIGOUR_BONUS-MIN_VIGOUR_BONUS) found=found+1 elseif m==MP_MAGIC_RESISTANCE then if v>MAX_MR_BONUS then v=MAX_MR_BONUS end t=t+16*v/MAX_MR_BONUS found=found+1 elseif m==MP_NIGHTVISION then if v>MAX_NV_BONUS then v=MAX_NV_BONUS end t=t+16*v/MAX_NV_BONUS found=found+1 elseif m==MP_LEECHING then if v>3 then v=3 end t=t+2*v+5 found=found+1 elseif m==MP_ENCHANTED then t=t+int_rand(6)+10 found=found+1 end end

if found~=3 then send_message(id, "Nothing happened.") return end local q=t/3 -- work out avg

I reread the initial post and took this part as the most important with the code being possible things that might pop up from it. I was really hoping for more rare recipes like the horadric cube but this appears to be all there is:

polypiling ingots & crafting matsYou can poly a stack of 3 of one crafting material into 1 of the same material with the enchantment (as in, attack) increased by +1- min input item enchant is +1 - does not work on 3x plain ingots- max input item is +4 for ingots of attack - as in you can poly 3x +4 attack ingots but not 3x +5 !-- max is +14 for STR, DEX, INT (will make one ingot of +15)-- max is +3 for def (will make one ingot of +4 defense)- not all tints are accepted - generally speaking only the tints are allowed to be crafted with can be poly'd

polypiling weapons & armourA pile or stack of 3 weapons and armour can be poly'd into one new piece. Study the code below to determine how that works. Hopefully it isn't too cheeseable - nor too useless!

A neat tidbit small note that I have thought very cool is that when you polypile the items the successful items(s) go into your inventory instead of just sitting there. That is pretty awesome IMHO.