Created
June 6, 2018 01:32
-
-
Save chrisinajar/0a927035a825adc90d932af73d293f90 to your computer and use it in GitHub Desktop.
Quick function to detect if an RWK item is ash or not
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
function isAsh (itemNumber) { | |
var itype = parseInt(itemNumber / 1000, 10) % 100; | |
var inum = parseInt(itemNumber, 10) % 1000; | |
var iench = parseInt(itemNumber / 100000, 10) % 100 - 1; | |
if (iench > 34) { | |
return false; | |
} | |
if (iench < 0) { | |
return false; | |
} | |
if (itype === 27) { | |
return false; | |
} | |
if (inum > 70) { | |
return false; | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment