4,660
edits
mNo edit summary |
m (Added newlines for equipment template to make it easier to sift through the results) |
||
Line 47: | Line 47: | ||
pushResults({arr: game.cartography.worldMaps.getObjectByID('melvorAoD:Melvor').pointsOfInterest.filter(x => search(x)), header: '', iconType: 'POIIcon'}); | pushResults({arr: game.cartography.worldMaps.getObjectByID('melvorAoD:Melvor').pointsOfInterest.filter(x => search(x)), header: '', iconType: 'POIIcon'}); | ||
let outputString = ``; | let outputString = ``; | ||
results.forEach((str, i) => { outputString += (returnEquipmentTemplate ? i > 0 ? `|${str}` : `${str}` : `${str}\n`) }); | results.forEach((str, i) => { outputString += (returnEquipmentTemplate ? i > 0 ? `\n|${str}` : `${str}` : `${str}\n`) }); | ||
if (returnEquipmentTemplate) outputString += '}}'; | if (returnEquipmentTemplate) outputString += '\n}}'; | ||
copy(outputString);console.log(outputString); | copy(outputString);console.log(outputString); | ||
notifyPlayer(game.attack, `Copied results for ${searchTerm} to clipboard`, 'success', 0) | notifyPlayer(game.attack, `Copied results for ${searchTerm} to clipboard`, 'success', 0) | ||
</syntaxhighlight> | </syntaxhighlight> |