Advertisement
yojimbos_law

maybe this tcrs script actually produced a real result?

Jun 30th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1.  
  2. int[int] m;
  3. file_to_map("mt_rand 1 to 170 first 1000000 seeds.txt",m);
  4. int c;
  5. boolean b;
  6. void butt(int d, int[int] x ,int r){
  7. //clear(m);
  8. print("seeds where mt_rand 1 to 170 is "+r+":");
  9. for i from 1 to (500000){
  10. if((m[i]) == r){
  11. c = 0;
  12. b = true;
  13. for j from 0 to (count(x)-1){
  14. b = b && (m[i+c] == m[i+c+x[j]]);
  15. c += x[j];
  16. }
  17. if(b){
  18. print(i+" = "+d+" * " + (i/d) + " + " + (i%d) );
  19. //abort("we did it");
  20. }
  21. }
  22. }
  23. print("====================");
  24.  
  25.  
  26. /*
  27. print("seeds where glibc rand 0 to 2147483647 is "+r+":");
  28. file_to_map("glibc rand 0 to 2147483647 first 1000000 seeds mod 170 plus 1.txt",m);
  29. for i from 1 to (500000){
  30. if((m[i]) == r){
  31. c = 0;
  32. b = true;
  33. for j from 0 to (count(x)-1){
  34. b = b && (m[i+c] == m[i+c+x[j]]);
  35. c += x[j];
  36. }
  37. if(b){
  38. print(i+" = "+d+" * " + (i/d) + " + " + (i%d) );
  39. abort("we did it");
  40. }
  41. }
  42. }
  43. print("====================");
  44. */
  45.  
  46. /*
  47. print("seeds where mt_rand mod 170 is "+r+":");
  48. clear(m);
  49. file_to_map("mt_rand mod 170.txt",m);
  50. for i from 1 to (500000){
  51. if((m[i]+1) == r){
  52. c = 0;
  53. b = true;
  54. for j from 0 to (count(x)-1){
  55. b = b && (m[i+c] == m[i+c+x[j]]);
  56. c += x[j];
  57. }
  58. if(b){
  59. print(i+" = "+d+" * " + (i/d) + " + " + (i%d) );
  60. abort("we did it.");
  61. }
  62. }
  63. }
  64. print("====================");
  65. */
  66. }
  67. //152 = 19*2^3
  68. //245 = 5*7*7
  69. int[int] but = {152*3,245*3,451*3};
  70. /*these have precisely the first enchantment for class 1 path 1.
  71. 532 804245262
  72. 777 697647321
  73. 1331 718230343
  74. 3066 401867098
  75. 4667 933430014
  76. 6959 195097050
  77. 8180 121809700
  78.  
  79. with differences:
  80. 245
  81. 554
  82. 1735
  83. 1601
  84. 2292
  85. 1221
  86. */
  87.  
  88. /*these have precisely the second enchantment for class 1 path 1.
  89.  
  90. 94 606216746
  91. 1275 121934420
  92. 2839 122462796
  93. 3519 767266958
  94. 4191 851515177
  95. 4472 218609014
  96. 6041 452627138
  97. 9839 880434260
  98.  
  99. with differences:
  100. 1181
  101. 1564
  102. 680
  103. 672
  104. 281
  105. 1569
  106. 3798
  107. */
  108. /* items with precisely first modifier for class 2 sign 1
  109. 191
  110. 1779
  111. 3508
  112. 4442
  113. 7541
  114. 9576
  115. */
  116.  
  117. /* items with precisely first modifier for class 3 sign 1
  118.  
  119. 696
  120. 1933
  121. 2835
  122. 2959
  123. 3314
  124. 4180
  125. 4265
  126. */
  127.  
  128. /* items with precisely first modifier for class 1 sign 2
  129.  
  130. 3093
  131. 4751
  132. 4958
  133. 5956
  134. 6929
  135. 7752
  136. */
  137.  
  138. /* items with precisely first modifier for class 3 sign 4
  139.  
  140. 149
  141. 2892
  142. 4590
  143. 4681
  144.  
  145. */
  146.  
  147. for ii from 50 to 50{
  148. //but = {152*ii,245*ii,451*ii,103*ii};
  149. //but = {245*ii,554*ii,1735*ii,1601*ii,2292*ii,1221*ii};
  150. //but = {1181*ii,1564*ii,680*ii,672*ii,281*ii,1569*ii,3798*ii};
  151. //but = {245*ii,554*ii,1735*ii,1601*ii,2292*ii,1221*ii};
  152. //but = {(1779-191)*ii,(3508-1779)*ii,(4442-3508)*ii,(7541-4442)*ii,(9576-7541)*ii};
  153. //but = {(1933-696)*ii,(2835-1933)*ii,(2959-2835)*ii,(3314-2959)*ii,(4180-3314)*ii,(4265-4180)*ii};
  154. //but = {(4751-3093)*ii,(4958-4751)*ii,(5956-4958)*ii,(6929-5956)*ii,(7752-6929)*ii};
  155. but = {(2892-149)*ii,(4590-2892)*ii,(4681-4590)*ii};
  156. print(ii);
  157. for i from 1 to 170{
  158. //butt(532,but,i);
  159. //butt(3093,but,i);
  160. butt(149,but,i);
  161. }
  162. }
  163.  
  164.  
  165.  
  166.  
  167.  
  168. //success for but = {1520,2450,4510}:
  169. //seeds where glibc rand 0 to 2147483647 is 3:
  170. //13841 = 380 * 36 + 161
  171. //thus seeds for items 380, 532, 777, and 1228 are 13841, 15361, 17811, and 22321 respectively for seal clubber under mongoose?
  172. //this is likely a false positive; the pattern doesn't hold for the next item in the sequence.
  173. //I think the reason is that some of the items had multiple modifiers. we'll exclude those in future tests.
  174.  
  175.  
  176.  
  177. //success for but = {12250,27700,86750,80050,114600,61050}:
  178. //seeds where mt_rand 1 to 170 is 168:
  179. //138955 = 532 * 261 + 103
  180. /*thus seeds for items
  181. 532
  182. 777
  183. 1331
  184. 3066
  185. 4667
  186. 6959
  187. 8180
  188.  
  189. are
  190.  
  191. 138955
  192. 151205
  193. 178905
  194. 265655
  195. 345705
  196. 460305
  197. 521355
  198.  
  199. respectively.
  200. */
  201. //horrifyingly, that suggests 18 + 50*itemID + 112337 as the argument for mt_srand().
  202.  
  203. //but = {1181*ii,1564*ii,680*ii,672*ii,281*ii,1569*ii,3798*ii} produces this, too:
  204. //seeds where mt_rand 1 to 170 is 167:
  205. //117055 = 94 * 1245 + 25
  206. //which has an identical seeding function, thus we really did it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement