Advertisement
Tyluur

Untitled

Nov 7th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.97 KB | None | 0 0
  1. void script_4592() {
  2. int ivar0;
  3. int ivar1;
  4. int ivar2;
  5. int ivar3;
  6. int ivar4;
  7. int ivar5;
  8. int ivar6;
  9. int ivar7;
  10. int ivar8;
  11. int ivar9;
  12. int ivar10;
  13. deleteAllExtraChilds(new WidgetPointer(17,17));
  14. deleteAllExtraChilds(new WidgetPointer(17,20));
  15. deleteAllExtraChilds(new WidgetPointer(17,22));
  16. deleteAllExtraChilds(new WidgetPointer(17,15));
  17. if (((boolean)bitconfig_9226)) {
  18. setWidgetText(new WidgetPointer(17,12), "If you die in the Wilderness...");
  19. } else {
  20. setWidgetText(new WidgetPointer(17,12), "Items kept on death");
  21. }
  22. if (bitconfig_9226 == 2) {
  23. createExtraChild(new WidgetPointer(17,15), 4, 0);
  24. script_4595();
  25. setWidgetText(globalstring_351);
  26. setScriptCallOnGlobalStringChange(4596, new WidgetPointer(-32768,3), -2147483643, 351, 1, "IiY");
  27. return;
  28. }
  29. if (((getContainerFreeSlots(93) >= getItemContainerLength(93)) && (getContainerFreeSlots(94) >= getItemContainerLength(94))) && ((getContainerFreeSlots(530) >= getItemContainerLength(530)) || isMember())) {
  30. createExtraChild(new WidgetPointer(17,15), 4, 0);
  31. script_4595();
  32. setWidgetText("You have no items to lose.");
  33. return;
  34. }
  35. ivar0 = getWidgetActualWidth(new WidgetPointer(17,15));
  36. ivar1 = max(divide(ivar0, 36), 1);
  37. ivar2 = max(divide(subtract(ivar0, multiply(36, ivar1)), max(subtract(ivar1, 1), 1)), 2);
  38. ivar3 = max(divide(ivar2, 2), add(subtract(36, 32), 1));
  39. globalarray_0 = new int[4];
  40. globalarray_1 = new int[3];
  41. globalarray_2 = new int[3];
  42. globalarray_3 = new int[3];
  43. if (bitconfig_9227 > 0) {
  44. if (((boolean)bitconfig_9226)) {
  45. if (((boolean)bitconfig_9229)) {
  46. globalarray_0[0] = script_4593(1114128, "You may choose " + intToStr(bitconfig_9227) + " of the following items to keep, and all others will be dropped." + "<br>" + "The " + "<col=bebe00>" + "highlighted" + "</col>" + " items will be chosen by default.");
  47. } else {
  48. globalarray_0[0] = script_4593(1114128, "You may choose " + intToStr(bitconfig_9227) + " of the following items to keep, unless you become skulled, and all others will be dropped." + "<br>" + "The " + "<col=bebe00>" + "highlighted" + "</col>" + " items are chosen by default.");
  49. }
  50. } else if (((boolean)bitconfig_9229)) {
  51. globalarray_0[0] = script_4593(1114128, "You will keep the following items:");
  52. } else {
  53. globalarray_0[0] = script_4593(1114128, "You will keep the following items, unless you become skulled:");
  54. }
  55. } else {
  56. globalarray_0[0] = script_4593(1114128, "You will drop the following items:");
  57. }
  58. if (((boolean)bitconfig_9226)) {
  59. globalarray_0[1] = script_4593(1114131, "You will keep the following items automatically:");
  60. } else {
  61. globalarray_0[1] = script_4593(1114131, "You will drop the following items:");
  62. }
  63. globalarray_0[2] = script_4593(1114133, "The following items are always lost:");
  64. globalarray_4 = new int[4];
  65. globalarray_0[0] = script_750(bitconfig_9222);
  66. globalarray_0[1] = script_750(bitconfig_9223);
  67. globalarray_0[2] = script_750(bitconfig_9224);
  68. globalarray_0[3] = script_750(bitconfig_9225);
  69. ivar4 = add(getItemContainerLength(93), getItemContainerLength(94));
  70. deleteAllExtraChilds(new WidgetPointer(17,18));
  71. ivar5 = 0;
  72. while ((ivar5 < bitconfig_9227) && (ivar5 < 4)) {
  73. if (globalarray_4[ivar5] != -1) {
  74. createExtraChild(new WidgetPointer(17,18), 3, getExtraChildGap(new WidgetPointer(17,18)));
  75. createExtraChild(new WidgetPointer(17,18), 3, getExtraChildGap(new WidgetPointer(17,18)));
  76. setWidgetSize(36, 36, 0, 0);
  77. setWidgetSize(36, 36, 0, 0);
  78. setWidgetPosition(add(globalarray_1[0], 1), add(globalarray_2[0], 1), 0, 0);
  79. setWidgetPosition(globalarray_1[0], globalarray_2[0], 0, 0);
  80. setWidgetRGB(new Color(128, 128, 0));
  81. setWidgetRGB(new Color(190, 190, 0));
  82. setWidgetFilled(0);
  83. setWidgetFilled(0);
  84. cs2method2103(150);
  85. cs2method2103(0);
  86. script_4594(globalarray_4[ivar5], -1, globalarray_1[0], globalarray_2[0], 1114130);
  87. globalarray_0[0] = add(add(globalarray_1[0], 36), ivar2);
  88. if (add(globalarray_1[0], 36) >= ivar0) {
  89. globalarray_0[0] = 0;
  90. globalarray_0[0] = add(add(globalarray_2[0], 32), ivar3);
  91. }
  92. globalarray_0[0] = add(globalarray_3[0], 1);
  93. } else {
  94. createExtraChild(new WidgetPointer(17,18), 3, getExtraChildGap(new WidgetPointer(17,18)));
  95. setWidgetHidden(1);
  96. createExtraChild(new WidgetPointer(17,18), 3, getExtraChildGap(new WidgetPointer(17,18)));
  97. setWidgetHidden(1);
  98. createExtraChild(new WidgetPointer(17,18), 3, getExtraChildGap(new WidgetPointer(17,18)));
  99. setWidgetHidden(1);
  100. }
  101. ivar5 = add(ivar5, 1);
  102. }
  103. ivar5 = 0;
  104. ivar6 = -1;
  105. ivar7 = 0;
  106. ivar8 = 0;
  107. ivar9 = 0;
  108. while (ivar5 <= ivar4) {
  109. ivar6 = script_750(ivar5);
  110. if (ivar6 != -1) {
  111. ivar7 = script_1393(ivar5);
  112. ivar8 = 0;
  113. while ((ivar8 < 4) && (ivar7 > 0)) {
  114. if (globalarray_4[ivar8] == ivar6) {
  115. ivar7 = subtract(ivar7, 1);
  116. globalarray_0[ivar8] = -1;
  117. }
  118. ivar8 = add(ivar8, 1);
  119. }
  120. if (ivar7 > 0) {
  121. ivar9 = getItemHashmapData(getRealItem(ivar6), 1397);
  122. if (ivar9 == -1) {
  123. script_4594(-1, -1, -1, -1, 1114129);
  124. script_4594(-1, -1, -1, -1, 1114132);
  125. script_4594(ivar6, ivar7, globalarray_1[2], globalarray_2[2], 1114134);
  126. globalarray_0[2] = add(add(globalarray_1[2], 36), ivar2);
  127. if (add(globalarray_1[2], 36) >= ivar0) {
  128. globalarray_0[2] = 0;
  129. globalarray_0[2] = add(add(globalarray_2[2], 32), ivar3);
  130. }
  131. globalarray_0[2] = add(globalarray_3[2], 1);
  132. } else if (((boolean)ivar9) || (bitconfig_9226 != 0)) {
  133. script_4594(-1, -1, -1, -1, 1114129);
  134. script_4594(ivar6, ivar7, globalarray_1[1], globalarray_2[1], 1114132);
  135. script_4594(-1, -1, -1, -1, 1114134);
  136. globalarray_0[1] = add(add(globalarray_1[1], 36), ivar2);
  137. if (add(globalarray_1[1], 36) >= ivar0) {
  138. globalarray_0[1] = 0;
  139. globalarray_0[1] = add(add(globalarray_2[1], 32), ivar3);
  140. }
  141. globalarray_0[1] = add(globalarray_3[1], 1);
  142. } else {
  143. script_4594(ivar6, ivar7, globalarray_1[0], globalarray_2[0], 1114129);
  144. script_4594(-1, -1, -1, -1, 1114132);
  145. script_4594(-1, -1, -1, -1, 1114134);
  146. globalarray_0[0] = add(add(globalarray_1[0], 36), ivar2);
  147. if (add(globalarray_1[0], 36) >= ivar0) {
  148. globalarray_0[0] = 0;
  149. globalarray_0[0] = add(add(globalarray_2[0], 32), ivar3);
  150. }
  151. globalarray_0[0] = add(globalarray_3[0], 1);
  152. }
  153. } else {
  154. script_4594(-1, -1, -1, -1, 1114129);
  155. script_4594(-1, -1, -1, -1, 1114132);
  156. script_4594(-1, -1, -1, -1, 1114134);
  157. }
  158. } else {
  159. script_4594(-1, -1, -1, -1, 1114129);
  160. script_4594(-1, -1, -1, -1, 1114132);
  161. script_4594(-1, -1, -1, -1, 1114134);
  162. }
  163. ivar5 = add(ivar5, 1);
  164. }
  165. if (globalarray_1[0] > 0) {
  166. globalarray_0[0] = add(add(globalarray_2[0], 32), ivar3);
  167. } else {
  168. if (globalarray_3[0] <= 0) {
  169. globalarray_0[0] = 0;
  170. globalarray_0[0] = 0;
  171. }
  172. }
  173. if (globalarray_1[1] > 0) {
  174. globalarray_0[1] = add(add(globalarray_2[1], 32), ivar3);
  175. } else {
  176. if (globalarray_3[1] <= 0) {
  177. globalarray_0[1] = 0;
  178. globalarray_0[1] = 0;
  179. }
  180. }
  181. if (globalarray_1[2] > 0) {
  182. globalarray_0[2] = add(add(globalarray_2[2], 32), ivar3);
  183. } else {
  184. if (globalarray_3[2] <= 0) {
  185. globalarray_0[2] = 0;
  186. globalarray_0[2] = 0;
  187. }
  188. }
  189. ivar10 = 0;
  190. setWidgetSize(0, globalarray_0[0], 1, 0, new WidgetPointer(17,16));
  191. setWidgetPosition(0, ivar10, 1, 0, new WidgetPointer(17,16));
  192. ivar10 = add(ivar10, globalarray_0[0]);
  193. setWidgetSize(0, globalarray_2[0], 1, 0, new WidgetPointer(17,17));
  194. setWidgetPosition(0, ivar10, 1, 0, new WidgetPointer(17,17));
  195. ivar10 = add(add(ivar10, globalarray_2[0]), 5);
  196. setWidgetSize(0, globalarray_0[1], 1, 0, new WidgetPointer(17,19));
  197. setWidgetPosition(0, ivar10, 1, 0, new WidgetPointer(17,19));
  198. ivar10 = add(ivar10, globalarray_0[1]);
  199. setWidgetSize(0, globalarray_2[1], 1, 0, new WidgetPointer(17,20));
  200. setWidgetPosition(0, ivar10, 1, 0, new WidgetPointer(17,20));
  201. ivar10 = add(add(ivar10, globalarray_2[1]), 5);
  202. setWidgetSize(0, globalarray_0[2], 1, 0, new WidgetPointer(17,21));
  203. setWidgetPosition(0, ivar10, 1, 0, new WidgetPointer(17,21));
  204. ivar10 = add(ivar10, globalarray_0[2]);
  205. setWidgetSize(0, globalarray_2[2], 1, 0, new WidgetPointer(17,22));
  206. setWidgetPosition(0, ivar10, 1, 0, new WidgetPointer(17,22));
  207. ivar10 = add(ivar10, globalarray_2[2]);
  208. if ((getContainerFreeSlots(530) < getItemContainerLength(530)) && isMember()) {
  209. globalarray_0[3] = script_4593(1114135, "You have items stored on your " + "<col=ffff00>" + "beast of burden" + "</col>" + " that will be dropped if either of you dies.");
  210. }
  211. setWidgetSize(0, globalarray_0[3], 1, 0, new WidgetPointer(17,23));
  212. setWidgetPosition(0, ivar10, 1, 0, new WidgetPointer(17,23));
  213. ivar10 = add(ivar10, globalarray_0[3]);
  214. setWidgetScrollMax(0, ivar10, new WidgetPointer(17,15));
  215. if (ivar10 > getWidgetActualHeight(new WidgetPointer(17,15))) {
  216. script_31(1114136, 1114127, 792, 789, 790, 791, 773, 788);
  217. setWidgetIsHidden(false, new WidgetPointer(17,24));
  218. setWidgetPosition(0, 0, 0, 1, new WidgetPointer(17,15));
  219. } else {
  220. setWidgetIsHidden(true, new WidgetPointer(17,24));
  221. setWidgetPosition(0, 0, 1, 1, new WidgetPointer(17,15));
  222. cs2method2100(0, 0, new WidgetPointer(17,15));
  223. }
  224. return;
  225. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement