Arguments:
* Integer - Inventory index of the first item [0 to 41]
* Integer - Inventory index of the second item [0 to 41]
* Integer - Inventory index of the third item [0 to 41]
* Integer - Inventory index of the scroll [0 to 41]
* Integer - (Optional) Inventory index of the offering [0 to 41]
Returns:
* Promise
Example usages:
compound(0,1,2,3); // Combines the first 3 items in your inventory [0,1,2] using the scroll in the 4th slot [3]
compound(0,1,2,3,4); // A primordial essence in the 5th slot[4]
if(character.q.compound) log("Already combining something!");
compound(0,1,2,locate_item("cscroll0")).then(function(data){
if(data.success) game_log("I have a +"+data.level+" accessory now!");
else game_log("Rip accessories, you'll be missed.");
});
compound(0,1,2,locate_item("cscroll0")).then(
function(data){
game_log("Compound call completed");
log(data);
},
function(data){
game_log("Compound call failed with reason: "+data.reason);
},
);
Promise Reference:
"resolve"
{
success: true,
level: 2,
num: 16, // Inventory index
}
{
success: false, // Compound failed
failed: true,
level: 2,
num: 16,
}
"reject"
{
reason: "max_level", // Item reached it's max level
}
{
reason: "scroll", // Incompatible scroll
}
{
reason: "locked", // Item locked
}
{
reason: "in_progress", // Another compound in progress
}
{
reason: "no_item", // Inventory index issues
}
{
reason: "no_scroll", // There's no scroll on that inventory index
}
{
reason: "not_combinable", // Items are not combinable
}
{
reason: "mismatch", // Items are not the same
}
{
reason: "offering", // Invalid offering
}
{
reason: "bank", // If operation isn't allowed inside
}
{
reason: "exception", // Possible server exception
}
"source"