Last active
September 6, 2019 00:16
-
-
Save somebody1234/29165416e931a03c61340a708cd86799 to your computer and use it in GitHub Desktop.
Diamond Hunt Mobile Wiki helpful scripts. Use in browser console on https://diamondhunt.app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Script to get the loot table for an area, to be placed in https://diamondhuntmobile.fandom.com/wiki/Module:Area_DB | |
area='hauntedMansion'; // replace with the area you're looking for, capitalized the same way. | |
showExploringDropRates(area+'Loot');c=s=>s[0].toUpperCase()+s.slice(1).replace(/([a-z])([A-Z])/g,'$1 $2');setTimeout(_=>console.log('{'+[...$('#dialogue-confirm-text .table-stats')[0].children[0].children].slice(1).map(e=>'{\''+c(e.children[0].children[0].src.match(/\w+(?=\.png)/)[0])+'\','+((t=e.children[1].innerText).includes('-')?t.split(' - ')[0]:t).replace(/,/g,'')+','+(t.includes('-')?t.split(' - ')[1]:t).replace(/,/g,'')+','+e.children[2].innerText.slice(2).replace('*','')+','+(!!e.children[3])+','+e.children[2].innerText.includes('*')+'}').join(',').replace(/(,false)?,false}/g,'}')+'}'),1000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enemy='bloodChicken'; // replace with the enemy you're looking for, capitalized the same way. | |
sendBytes('EXAMINE_MONSTER_LOOT='+enemy);c=s=>s[0].toUpperCase()+s.slice(1).replace(/([a-z])([A-Z])/g,'$1 $2');setTimeout(_=>console.log('{'+[...$('#dialogue-confirm-text .table-stats')[0].children[0].children].slice(1).map(e=>'{\''+c(e.children[0].children[0].src.match(/\w+(?=\.png)/)[0])+'\','+((t=e.children[1].innerText).includes('-')?t.split(' - ')[0]:t).replace(/,/g,'')+','+(t.includes('-')?t.split(' - ')[1]:t).replace(/,/g,'')+','+e.children[2].innerText.slice(2).replace('*','')+','+(!!e.children[3])+','+e.children[2].innerText.includes('*')+'}').join(',').replace(/(,false)?,false}/g,'}')+'}'),1000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// before opening crafter page | |
craftingResearchLevel=6 | |
// open crafter recipes page and paste | |
c=s=>s[0].toUpperCase()+s.slice(1).replace(/([a-z])([A-Z\d])/g,'$1 $2');'return {\n'+[...$('#item-section-crafting-3 .main-button-table-tr-td2')].map(i=>`{'${i.children[0].innerText}','${i.parentElement.children[0].children[0].src.match(/\w+(?=\.png)/)[0]}',${(r=i.children[2]).children[2].innerText.match(/\d+/)[0]},{${[...r.children].map((e,i)=>i>=4&&i%3===1?`{'${c(r.children[i].src.match(/\w+(?=\.png)/)[0])}',${r.children[i+1].innerText.match(/[\d,]+/)[0].replace(/,/g,'')}}`:'').filter(_=>_).join(',')}},'${r.childNodes[0].textContent.replace(/'/g,'\\\'')}'}`).join(',\n')+'\n}\n' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment