# HG changeset patch # User Paper <37962225+mrpapersonic@users.noreply.github.com> # Date 1666128744 14400 # Node ID bf6d6304f6f792921c9f92230c0346ed4008ebc9 # Parent 2e115eb60be89c6e8c2a114eed3fd9bbc38a7c10 Add files via upload committer: GitHub diff -r 2e115eb60be8 -r bf6d6304f6f7 mod7.nsb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mod7.nsb Tue Oct 18 17:32:24 2022 -0400 @@ -0,0 +1,34 @@ +{if:{argslen}|=|1|then:{ +if:{arg:0}|=|--oem|then:{choose:95|96|97|98|99|00|01|02|03}{range:100|365}-OEM-{lua: +function sumdigits(n) + local sum = 0 + while n > 0 do + sum = sum + n%10 + n = math.floor(n/10) + end + return sum +end + +the = 1 +while (sumdigits(the) % 7 ~= 0) do + the = (math.random(1, 99999)*10)+math.random(1,7) +end +print(string.format("%07d", the)) +}-{range:10000|99999}|else: +{set:first|{range:111|999}}{ +if:{get:first}|=|333|then:{set:first|332}}{ +if:{get:first}|=|444|then:{set:first|443}}{ +if:{get:first}|=|555|then:{set:first|554}}{ +if:{get:first}|=|666|then:{set:first|665}}{ +if:{get:first}|=|777|then:{set:first|776}}{ +if:{get:first}|=|888|then:{set:first|887}}{ +if:{get:first}|=|999|then:{set:first|998}}{get:first}{ +if:{arg:0}|=|--office|then:{ +if:{substring:{get:first}|2|3}|=|9|then:0|else:{len:{repeat:{substring:{get:first}|2|3}|a}{repeat:1|a}}}}-{lua: +the = 1 +while (the % 7 ~= 0) do + the = (math.random(1, 999999)*10)+math.random(1,7) +end +print(string.format("%07d", the)) +}} +|else:`.t mod7 <--normal> OR <--office> OR <--oem>`} \ No newline at end of file