Anonymous

In-game Functions: Difference between revisions

From Melvor Idle
Added functions to clear equipment quick equip items
(Added finding ancient relics)
(Added functions to clear equipment quick equip items)
Line 274: Line 274:
</syntaxhighlight>
</syntaxhighlight>
The above will add all ancient relics to every skill, including modded skills.
The above will add all ancient relics to every skill, including modded skills.
== Reset all Equipment Quick Equip Items ==
The below script will reset the Equipment Quick Equip items back to an empty item. These are the Quick Equip items that are found when clicking on an equipment slot, not the ones found in the skilling minibar (that are set through the bank).
=== Examples ===
<syntaxhighlight lang="js">
game.combat.player.equipment.equippedArray.forEach(equipped => {
equipped.quickEquipItems = [game.emptyEquipmentItem, game.emptyEquipmentItem, game.emptyEquipmentItem];
equipped.trimQuickEquipItems();
});
</syntaxhighlight>
The above code will reset all the quick equip items for the '''current''' equipment set.
<syntaxhighlight lang="js">
game.combat.player.equipmentSets.forEach(({ equipment }) => {
equipment.equippedArray.forEach(equipped => {
equipped.quickEquipItems = [game.emptyEquipmentItem, game.emptyEquipmentItem, game.emptyEquipmentItem];
equipped.trimQuickEquipItems();
});
});
</syntaxhighlight>
The above code will reset all the quick equip items for '''all''' equipment sets.
{{Menu}}
{{Menu}}