Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 112.28 KB | None | 0 0
  1. package com.tokhaar.client;
  2.  
  3. import java.util.Date;
  4.  
  5. import com.tokhaar.client.custom.osrs.Login;
  6.  
  7. public class OSRSClientScripts {
  8.  
  9. public static int DEBUG_WIDGET = 162;
  10.  
  11. static void execute(final InterfaceListener listener, final int i, Widget origin) {
  12. Object[] objectData = listener.objectData;
  13. int op;
  14. int int_4;
  15. int int_5;
  16. int operandValue;
  17. ClientScript script;
  18. int pc;
  19. pc = ((Integer) objectData[0]).intValue();
  20. script = ClientScript.listOsrs(pc);
  21. if (script != null) {
  22. if (origin != null) {
  23. int widgetId = origin.widgetHash >> 16;
  24. if (widgetId == DEBUG_WIDGET) {
  25. // System.err.println("script used: " + script.scriptId);
  26. boolean flag = false;
  27. for (int ixz = 0; ixz < script.opcodes.length; ixz++) {
  28. if (script.opcodes[ixz] > 999) {
  29. System.err.println("opcode used: " + script.opcodes[ixz]);
  30. }
  31. }
  32. // System.err.println("opcode used: " + Arrays.toString(script.opcodes));
  33. }
  34. }
  35. isp = 0;
  36. ssi = 0;
  37. pc = -1;
  38. int[] instructionIds = script.opcodes;
  39. int[] operands = script.intValues;
  40. byte byte_1 = -1;
  41. subScriptIndex = 0;
  42.  
  43. int int_8;
  44. try {
  45. intLocalVariables = new int[script.intLocalVariableCount];
  46. int_4 = 0;
  47. stringLocalVariables = new String[script.stringLocalVariableCount];
  48. int_5 = 0;
  49.  
  50. String string_0;
  51. for (int_8 = 1; int_8 < objectData.length; int_8++) {
  52. if (objectData[int_8] instanceof Integer) {
  53. operandValue = ((Integer) objectData[int_8]).intValue();
  54. if (operandValue == -2147483647) {
  55. operandValue = listener.data1;
  56. }
  57.  
  58. if (operandValue == -2147483646) {
  59. operandValue = listener.data2;
  60. }
  61.  
  62. if (operandValue == -2147483645) {
  63. operandValue = listener.jagexInterface != null ? listener.jagexInterface.widgetHash : -1;
  64. }
  65.  
  66. if (operandValue == -2147483644) {
  67. operandValue = listener.optionId;
  68. }
  69.  
  70. if (operandValue == -2147483643) {
  71. operandValue = listener.jagexInterface != null ? listener.jagexInterface.index : -1;
  72. }
  73.  
  74. if (operandValue == -2147483642) {
  75. operandValue = listener.draggedOnComponent != null ? listener.draggedOnComponent.widgetHash
  76. : -1;
  77. }
  78.  
  79. if (operandValue == -2147483641) {
  80. operandValue = listener.draggedOnComponent != null ? listener.draggedOnComponent.index : -1;
  81. }
  82.  
  83. if (operandValue == -2147483640) {
  84. operandValue = listener.keyCode;
  85. }
  86.  
  87. if (operandValue == -2147483639) {
  88. operandValue = listener.keyChar;
  89. System.err.println("operandvalue: " + operandValue);
  90. }
  91.  
  92. intLocalVariables[int_4++] = operandValue;
  93. } else if (objectData[int_8] instanceof String) {
  94. string_0 = (String) objectData[int_8];
  95. if (string_0.equals("event_opbase")) {
  96. string_0 = listener.optionBase;
  97. }
  98.  
  99. stringLocalVariables[int_5++] = string_0;
  100. }
  101. }
  102. int_8 = 0;
  103. Settings.field1009 = listener.field514;
  104.  
  105. while (true) {
  106. while (true) {
  107. while (true) {
  108. while (true) {
  109. while (true) {
  110. while (true) {
  111. while (true) {
  112. while (true) {
  113. while (true) {
  114. while (true) {
  115. while (true) {
  116. while (true) {
  117. while (true) {
  118. while (true) {
  119. while (true) {
  120. while (true) {
  121. while (true) {
  122. while (true) {
  123. while (true) {
  124. while (true) {
  125. while (true) {
  126. while (true) {
  127. while (true) {
  128. while (true) {
  129. while (true) {
  130. label310: while (true) {
  131. ++int_8;
  132. if (int_8 > i) {
  133. throw new RuntimeException();
  134. }
  135.  
  136. ++pc;
  137. op = instructionIds[pc];
  138.  
  139. int returnVal;
  140. // System.out.println("Parsing opcode = "+ op);
  141. if (op < 100) {
  142. if (op != 0) {
  143. if (op != 1) {
  144. if (op != 2) {
  145. if (op != 3) {
  146. if (op != 6) {
  147. if (op != 7) {
  148. if (op != 8) {
  149. if (op != 9) {
  150. if (op != 10) {
  151. if (op != 21) {
  152. if (op != 25) {
  153. if (op != 27) {
  154. if (op != 31) {
  155. if (op != 32) {
  156. if (op != 33) {
  157. if (op != 34) {
  158. if (op != 35) {
  159. if (op != 36) {
  160. if (op != 37) {
  161. if (op != 38) {
  162. if (op != 39) {
  163. int id;
  164. if (op != 40) {
  165. if (op != 42) {
  166. if (op != 43) {
  167. if (op == 44) {
  168. operandValue = operands[pc] >> 16;
  169. returnVal = operands[pc]
  170. & 0xFFFF;
  171. int int_11 = intStack[--isp];
  172. if (int_11 >= 0
  173. && int_11 <= 5000) {
  174. cs2ArrayLengths[operandValue] = int_11;
  175. byte byte_0 = -1;
  176. if (returnVal == 105) {
  177. byte_0 = 0;
  178. }
  179.  
  180. id = 0;
  181.  
  182. while (true) {
  183. if (id >= int_11) {
  184. continue label310;
  185. }
  186.  
  187. cs2ArrayData[operandValue][id] = byte_0;
  188. ++id;
  189. }
  190. }
  191.  
  192. throw new RuntimeException();
  193. } else if (op == 45) {
  194. operandValue = operands[pc];
  195. returnVal = intStack[--isp];
  196. if (returnVal < 0
  197. || returnVal >= cs2ArrayLengths[operandValue]) {
  198. throw new RuntimeException();
  199. }
  200.  
  201. intStack[++isp
  202. - 1] = cs2ArrayData[operandValue][returnVal];
  203. } else if (op == 46) {
  204. operandValue = operands[pc];
  205. isp -= 2;
  206. returnVal = intStack[isp];
  207. if (returnVal < 0
  208. || returnVal >= cs2ArrayLengths[operandValue]) {
  209. throw new RuntimeException();
  210. }
  211.  
  212. cs2ArrayData[operandValue][returnVal] = intStack[isp
  213. + 1];
  214. } else if (op == 47) {
  215. string_0 = Class120_Sub2.aStringArray2420[operands[pc]];
  216. if (string_0 == null) {
  217. string_0 = "null";
  218. }
  219.  
  220. stringStack[++ssi
  221. - 1] = string_0;
  222. } else if (op == 48) {
  223. final int i_27_ = operands[pc];
  224. Class120_Sub2.aStringArray2420[i_27_] = stringStack[--ssi];
  225. NodeSub.method1411(
  226. i_27_);
  227. } else {
  228. if (op != 60) {
  229. throw new IllegalStateException();
  230. }
  231.  
  232. Hashtable iterablehashtable_0 = script.switches[operands[pc]];
  233. IntegerNode integernode_0 = (IntegerNode) iterablehashtable_0
  234. .get(intStack[--isp]);
  235. if (integernode_0 != null) {
  236. pc += integernode_0.value;
  237. }
  238. }
  239. } else {
  240. final int i_17_ = operands[pc];
  241. Class120_Sub12_Sub25.varcs[i_17_] = intStack[--isp];
  242. CursorType
  243. .setVarcFromClient(
  244. i_17_);
  245. }
  246. } else {
  247. intStack[++isp
  248. - 1] = Class120_Sub12_Sub25.varcs[operands[pc]];
  249. }
  250. } else {
  251. operandValue = operands[pc];
  252. ClientScript subScript = ClientScript
  253. .listOsrs(
  254. operandValue);
  255. if (subScript == null) {
  256. System.err
  257. .println(
  258. "Error loading subscript "
  259. + operandValue
  260. + " with opcode "
  261. + op);
  262. }
  263. int[] intArguments = new int[subScript.intLocalVariableCount];
  264. String[] stringArguments = new String[subScript.stringLocalVariableCount];
  265.  
  266. for (id = 0; id < subScript.intArgumentCount; id++) {
  267. intArguments[id] = intStack[id
  268. + isp
  269. - subScript.intArgumentCount];
  270. }
  271.  
  272. for (id = 0; id < subScript.stringArgumentCount; id++) {
  273. stringArguments[id] = stringStack[id
  274. + ssi
  275. - subScript.stringArgumentCount];
  276. }
  277. isp -= subScript.intArgumentCount;
  278. ssi -= subScript.stringArgumentCount;
  279. SubScript sub = new SubScript();
  280. sub.origClientScript = script;
  281. sub.opcodeIndex = pc;
  282. sub.intLocalVariables = intLocalVariables;
  283. sub.stringLocalVariables = stringLocalVariables;
  284. scriptStack[++subScriptIndex
  285. - 1] = sub;
  286. script = subScript;
  287. instructionIds = subScript.opcodes;
  288. operands = subScript.intValues;
  289. pc = -1;
  290. intLocalVariables = intArguments;
  291. stringLocalVariables = stringArguments;
  292. }
  293. } else {
  294. --ssi;
  295. }
  296. } else {
  297. --isp;
  298. }
  299. } else {
  300. operandValue = operands[pc];
  301. ssi -= operandValue;
  302. String string_1 = Class120_Sub12_Sub21_Sub1
  303. .mergeStrings(
  304. stringStack,
  305. ssi,
  306. operandValue);
  307. stringStack[++ssi
  308. - 1] = string_1;
  309. }
  310. } else {
  311. stringLocalVariables[operands[pc]] = stringStack[--ssi];
  312. }
  313. } else {
  314. String s = stringLocalVariables[operands[pc]];
  315. stringStack[++ssi
  316. - 1] = s;
  317. }
  318. } else {
  319. intLocalVariables[operands[pc]] = intStack[--isp];
  320. }
  321. } else {
  322. intStack[++isp
  323. - 1] = intLocalVariables[operands[pc]];
  324. }
  325. } else {
  326. isp -= 2;
  327. if (intStack[isp] >= intStack[isp
  328. + 1]) {
  329. pc += operands[pc];
  330. }
  331. }
  332. } else {
  333. isp -= 2;
  334. if (intStack[isp] <= intStack[isp
  335. + 1]) {
  336. pc += operands[pc];
  337. }
  338. }
  339. } else {
  340. operandValue = operands[pc];
  341. VariableBit
  342. .setVarbitFromClient(
  343. operandValue,
  344. intStack[--isp],
  345. true);
  346. }
  347. } else {
  348. operandValue = operands[pc];
  349. intStack[++isp
  350. - 1] = VariableBit
  351. .getVarbitValue(
  352. operandValue,
  353. true);
  354. }
  355. } else {
  356. if (subScriptIndex == 0) {
  357. return;
  358. }
  359.  
  360. SubScript sub = scriptStack[--subScriptIndex];
  361. stringLocalVariables = sub.stringLocalVariables;
  362. script = sub.origClientScript;
  363. pc = sub.opcodeIndex;
  364. operands = script.intValues;
  365. intLocalVariables = sub.intLocalVariables;
  366. instructionIds = script.opcodes;
  367. }
  368. } else {
  369. isp -= 2;
  370. if (intStack[isp] > intStack[isp
  371. + 1]) {
  372. pc += operands[pc];
  373. }
  374. }
  375. } else {
  376. isp -= 2;
  377. if (intStack[isp] < intStack[isp
  378. + 1]) {
  379. pc += operands[pc];
  380. }
  381. }
  382. } else {
  383. isp -= 2;
  384. if (intStack[isp] == intStack[isp
  385. + 1]) {
  386. pc += operands[pc];
  387. }
  388. }
  389. } else {
  390. isp -= 2;
  391. if (intStack[isp] != intStack[isp
  392. + 1]) {
  393. pc += operands[pc];
  394. }
  395. }
  396. } else {
  397. pc += operands[pc];
  398. }
  399. } else {
  400. stringStack[++ssi
  401. - 1] = script.stringValues[pc];
  402. }
  403. } else {
  404. operandValue = operands[pc];
  405. VariableParameter
  406. .setVarpFromClient(
  407. operandValue,
  408. intStack[--isp],
  409. true);
  410. }
  411. } else {
  412. operandValue = operands[pc];
  413. intStack[++isp
  414. - 1] = Class2.playerVariablesOsrs[operandValue];
  415. }
  416. } else {
  417. int iconst = operands[pc];
  418. if (iconst >> 16 == 137) {
  419. int lowerbits = iconst
  420. & 0xFFFF;
  421. iconst = (1039 << 16)
  422. | lowerbits;
  423. System.out
  424. .println(
  425. "Translated");
  426. }
  427. intStack[++isp
  428. - 1] = iconst;
  429. }
  430. } else {
  431. boolean bool_1;
  432. if (script.intValues[pc] == 1) {
  433. bool_1 = true;
  434. } else {
  435. bool_1 = false;
  436. }
  437.  
  438. // System.out.println("Processing opcode = "+ op);
  439. returnVal = process(
  440. op,
  441. script,
  442. bool_1);
  443. switch (returnVal) {
  444. case 0:
  445. return;
  446. case 1:
  447. default:
  448. break;
  449. case 2:
  450. throw new IllegalStateException(
  451. "Opcode unsupported: "
  452. + op);
  453. }
  454. }
  455. }
  456. }
  457. }
  458. }
  459. }
  460. }
  461. }
  462. }
  463. }
  464. }
  465. }
  466. }
  467. }
  468. }
  469. }
  470. }
  471. }
  472. }
  473. }
  474. }
  475. }
  476. }
  477. }
  478. }
  479. }
  480. }
  481. } catch (Exception e) {
  482. e.printStackTrace();
  483. }
  484. }
  485. }
  486.  
  487. static int process(int opcode, ClientScript script, boolean flag) {
  488. int passed;
  489. if (opcode < 1000) {
  490. return under1000(opcode, script, flag);
  491. } else if (opcode < 1100) {
  492. return under1100(opcode, script, flag);
  493. } else if (opcode < 1200) {
  494. return under1200(opcode, script, flag);
  495. } else if (opcode < 1300) {
  496. return under1300(opcode, script, flag);
  497. } else if (opcode < 1400) {
  498. return under1400(opcode, script, flag);
  499. } else if (opcode < 1500) {
  500. return under1500(opcode, script, flag);
  501. } else if (opcode < 1600) {
  502. return under1600(opcode, script, flag);
  503. } else if (opcode < 1700) {
  504. return under1700(opcode, script, flag);
  505. } else if (opcode < 1800) {
  506. return under1800(opcode, script, flag);
  507. } else if (opcode < 1900) {
  508. return 2;
  509. } else if (opcode < 2000) {
  510. return under2000(opcode, flag);
  511. } else if (opcode < 2100) {
  512. return under1100(opcode, script, flag);
  513. } else if (opcode < 2200) {
  514. return under1200(opcode, script, flag);
  515. } else if (opcode < 2300) {
  516. return under1300(opcode, script, flag);
  517. // return 2;
  518. } else if (opcode < 2400) {
  519. return under1400(opcode, script, flag);
  520. // return 2;
  521. } else if (opcode < 2500) {
  522. return under1500(opcode, script, flag);
  523. } else if (opcode < 2600) {
  524. return under2600(opcode);
  525. } else if (opcode < 2700) {
  526. return under2700(opcode, script, flag);
  527. } else if (opcode < 2800) {
  528. return under2800(opcode, script, flag);
  529. } else if (opcode < 2900) {
  530. return under2900(opcode, script, flag);
  531. } else if (opcode < 3000) {
  532. return under2000(opcode, flag);
  533. } else if (opcode < 3100) {
  534. return 2;
  535. } else if (opcode < 3200) {
  536. return under3200(opcode, script, flag);
  537. } else if (opcode < 3300) {
  538. return under3300(opcode);
  539. } else if (opcode < 3400) {
  540. return under3400(opcode, script, flag);
  541. } else if (opcode < 3500) {
  542. return under3500(opcode);
  543. } else if (opcode < 3700) {
  544. return under3700(opcode, flag);
  545. } else if (opcode < 4100) {
  546. return under4100(opcode);
  547. } else if (opcode < 4200) {
  548. return under4200(opcode, script, flag);
  549. } else if (opcode < 4300) {
  550. return under4300(opcode, script, flag);
  551. } else if (opcode < 5100) {
  552. return under5100(opcode, script, flag);
  553. } else if (opcode < 5400) {
  554. return under5400(opcode, script, flag);
  555. } else if (opcode < 5600) {
  556. return under5600(opcode, script, flag);
  557. } else if (opcode < 6300) {
  558. return under6300(opcode, script, flag);
  559. } else if (opcode < 6600) {
  560. return under6600(opcode, script, flag);
  561. } else {
  562. passed = 2;
  563. }
  564.  
  565. return passed;
  566. }
  567.  
  568. static int under1000(int opcode, ClientScript script_0, boolean focused) {
  569. int header;
  570. int widgetType;
  571. if (opcode == 100) {
  572. isp -= 3;
  573. header = intStack[isp];
  574. widgetType = intStack[isp + 1];
  575. int compIndex = intStack[isp + 2];
  576. if (widgetType == 0) {
  577. throw new RuntimeException();
  578. } else {
  579. Widget parentWidget = StaticMethods.getJagexInterface(header, true);
  580. if (parentWidget.children == null) {
  581. parentWidget.children = new Widget[compIndex + 1];
  582. }
  583.  
  584. if (parentWidget.children.length <= compIndex) {
  585. Widget[] var7 = new Widget[compIndex + 1];
  586.  
  587. for (int var8 = 0; var8 < parentWidget.children.length; ++var8) {
  588. var7[var8] = parentWidget.children[var8];
  589. }
  590.  
  591. parentWidget.children = var7;
  592. }
  593.  
  594. if (compIndex > 0 && parentWidget.children[compIndex - 1] == null) {
  595. throw new RuntimeException("" + (compIndex - 1));
  596. } else {
  597. Widget newWidget = new Widget();
  598. newWidget.type = widgetType;
  599. newWidget.layer = newWidget.widgetHash = parentWidget.widgetHash;
  600. newWidget.index = compIndex;
  601. newWidget.cs2Format = true;
  602. parentWidget.children[compIndex] = newWidget;
  603. if (focused) {
  604. StaticFields.staticActiveComponent1 = newWidget;
  605. } else {
  606. StaticFields.staticActiveComponent2 = newWidget;
  607. }
  608.  
  609. InterfaceClickMask.redrawInterface(parentWidget);
  610. return 1;
  611. }
  612. }
  613. } else {
  614. Widget var9;
  615. if (opcode == 101) {
  616. var9 = focused ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  617. Widget var10 = StaticMethods.getJagexInterface(var9.widgetHash, true);
  618. var10.children[var9.index] = null;
  619. InterfaceClickMask.redrawInterface(var10);
  620. return 1;
  621. } else if (opcode == 102) {
  622. var9 = StaticMethods.getJagexInterface(intStack[--isp], true);
  623. var9.children = null;
  624. InterfaceClickMask.redrawInterface(var9);
  625. return 1;
  626. } else if (opcode != 200) {
  627. if (opcode == 201) {
  628. var9 = StaticMethods.getJagexInterface(intStack[--isp], true);
  629. if (var9 != null) {
  630. intStack[++isp - 1] = 1;
  631. if (focused) {
  632. StaticFields.staticActiveComponent1 = var9;
  633. } else {
  634. StaticFields.staticActiveComponent2 = var9;
  635. }
  636. } else {
  637. intStack[++isp - 1] = 0;
  638. }
  639.  
  640. return 1;
  641. } else {
  642. return 2;
  643. }
  644. } else {
  645. isp -= 2;
  646. header = intStack[isp];
  647. widgetType = intStack[isp + 1];
  648. Widget var11 = StaticMethods.getComponent(header, widgetType, true);
  649. if (var11 != null && widgetType != -1) {
  650. intStack[++isp - 1] = 1;
  651. if (focused) {
  652. StaticFields.staticActiveComponent1 = var11;
  653. } else {
  654. StaticFields.staticActiveComponent2 = var11;
  655. }
  656. } else {
  657. intStack[++isp - 1] = 0;
  658. }
  659.  
  660. return 1;
  661. }
  662. }
  663. }
  664.  
  665. static int under1100(int opcode, ClientScript script_0, boolean flag) {
  666. int var3 = -1;
  667. Widget widget;
  668. if (opcode >= 2000) {
  669. opcode -= 1000;
  670. var3 = intStack[--isp];
  671. widget = StaticMethods.getJagexInterface(var3, true);
  672. } else {
  673. widget = flag ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  674. }
  675.  
  676. if (opcode == 1000) {
  677. isp -= 4;
  678. widget.originalX = intStack[isp];
  679. widget.originalY = intStack[isp + 1];
  680. int dynamicX = intStack[isp + 2];
  681. int dynamicY = intStack[isp + 3];
  682. widget.dynamicXValue = (byte) dynamicX;
  683. widget.dynamicYValue = (byte) dynamicY;
  684. InterfaceClickMask.redrawInterface(widget);
  685. Class120_Sub12_Sub34.updateInterfaceDynamic(widget);
  686. if (widget.index == -1) {
  687. Class179.method2261(widget.widgetHash);
  688. }
  689. return 1;
  690. } else if (opcode == 1001) {
  691. isp -= 4;
  692. widget.originalWidth = intStack[isp];
  693. widget.originalHeight = intStack[isp + 1];
  694. widget.anInt2069 = 0;
  695. widget.anInt2007 = 0;
  696. int i_30_ = intStack[isp + 3];
  697. if (i_30_ < 0) {
  698. i_30_ = 0;
  699. } else if (i_30_ > 4) {
  700. i_30_ = 4;
  701. }
  702. int i_31_ = intStack[isp + 2];
  703. if (i_31_ < 0) {
  704. i_31_ = 0;
  705. } else if (i_31_ > 4) {
  706. i_31_ = 4;
  707. }
  708. widget.dynamicHeightValue = (byte) i_30_;
  709. widget.dynamicWidthValue = (byte) i_31_;
  710. InterfaceClickMask.redrawInterface(widget);
  711. Class120_Sub12_Sub34.updateInterfaceDynamic(widget);
  712. if (widget.type == 0) {
  713. ProducingGraphicsBuffer.adjustScrollBar(widget, false);
  714. }
  715. widget.originalY -= 3;
  716. return 1;
  717. } else if (opcode == 1003) {
  718. boolean var5 = intStack[--isp] == 1;
  719. if (var5 != widget.hidden) {
  720. widget.hidden = var5;
  721. InterfaceClickMask.redrawInterface(widget);
  722. }
  723.  
  724. return 1;
  725. } else if (opcode == 1005) {
  726. widget.noClickThrough = intStack[--isp] == 1;
  727. return 1;
  728. } else if (opcode == 1006) {
  729. boolean ok = intStack[--isp] == 1;
  730. return 1;
  731. } else {
  732. return 2;
  733. }
  734. }
  735.  
  736. static int under1200(int opcode, ClientScript script_0, boolean bool_0) {
  737. Widget widget;
  738. if (opcode >= 2000) {
  739. widget = StaticMethods.getJagexInterface(intStack[--isp], true);
  740. opcode -= 1000;
  741. } else {
  742. widget = bool_0 ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  743. }
  744.  
  745. if (opcode == 1100) {
  746. isp -= 2;
  747. widget.verticalScrollPosition = intStack[isp];
  748.  
  749. widget.horizontalScrollPosition = intStack[isp + 1];
  750.  
  751. Login.inject(widget);
  752. InterfaceClickMask.redrawInterface(widget);
  753. if (widget.index == -1) {
  754. Client.method108(widget.widgetHash);
  755. }
  756. return 1;
  757. } else if (opcode == 1101) {
  758. widget.disabledColor = intStack[--isp];
  759. InterfaceClickMask.redrawInterface(widget);
  760. return 1;
  761. } else if (opcode == 1102) {
  762. widget.filled = intStack[--isp] == 1;
  763. InterfaceClickMask.redrawInterface(widget);
  764. return 1;
  765. } else if (opcode == 1103) {
  766. widget.trans = intStack[--isp];
  767. InterfaceClickMask.redrawInterface(widget);
  768. return 1;
  769. } else if (opcode == 1104) {
  770. widget.lineWidth = intStack[--isp];
  771. InterfaceClickMask.redrawInterface(widget);
  772. return 1;
  773. } else if (opcode == 1105) {
  774. widget.defaultSprite = intStack[--isp];
  775. if (widget.defaultSprite == 1030) {
  776. widget.width = 38;
  777. }
  778. InterfaceClickMask.redrawInterface(widget);
  779. return 1;
  780. } else if (opcode == 1106) {
  781. widget.rotation = intStack[--isp];
  782. InterfaceClickMask.redrawInterface(widget);
  783. return 1;
  784. } else if (opcode == 1107) {
  785. widget.gridOriginal = intStack[--isp] == 1;
  786. InterfaceClickMask.redrawInterface(widget);
  787. return 1;
  788. } else if (opcode == 1108) {
  789. widget.mediaType = 1;
  790. widget.mediaId = intStack[--isp];
  791. InterfaceClickMask.redrawInterface(widget);
  792. return 1;
  793. } else if (opcode == 1109) {
  794. isp -= 6;
  795. widget.translateX = intStack[isp];
  796. widget.translateY = intStack[isp + 1];
  797. widget.angleX = intStack[isp + 2];
  798. widget.angleY = intStack[isp + 3];
  799. widget.angleZ = intStack[isp + 4];
  800. widget.zoom = intStack[isp + 5];
  801. InterfaceClickMask.redrawInterface(widget);
  802. return 1;
  803. } else {
  804. int int_2;
  805. if (opcode == 1110) {
  806. int_2 = intStack[--isp];
  807. if (int_2 != widget.disabledAnimId) {
  808. widget.disabledAnimId = int_2;
  809. widget.currentFrame = 0;
  810. widget.frameDelay = 0;
  811. InterfaceClickMask.redrawInterface(widget);
  812. }
  813.  
  814. return 1;
  815. } else if (opcode == 1111) {
  816. widget.modelOrtho = intStack[--isp] == 1;
  817. InterfaceClickMask.redrawInterface(widget);
  818. return 1;
  819. } else if (opcode == 1112) {
  820. final String string = stringStack[--ssi];
  821. if (!string.equals(widget.componentString)) {
  822. widget.componentString = string;
  823. InterfaceClickMask.redrawInterface(widget);
  824. }
  825. if (widget.index == -1) {
  826. Class187.method2479(widget.widgetHash);
  827. }
  828. return 1;
  829. } else if (opcode == 1113) {
  830. widget.fontId = intStack[--isp];
  831. InterfaceClickMask.redrawInterface(widget);
  832. return 1;
  833. } else if (opcode == 1114) {
  834. isp -= 3;
  835. widget.horizontalAlignment = intStack[isp];
  836. widget.verticalAlignment = intStack[isp + 1];
  837. widget.verticalSpacing = intStack[isp + 2];
  838. InterfaceClickMask.redrawInterface(widget);
  839. return 1;
  840. } else if (opcode == 1115) {
  841. widget.textHasBlackShadow = intStack[--isp] == 1;
  842. InterfaceClickMask.redrawInterface(widget);
  843. return 1;
  844. } else if (opcode == 1116) {
  845. widget.outline = intStack[--isp];
  846. InterfaceClickMask.redrawInterface(widget);
  847. return 1;
  848. } else if (opcode == 1117) {
  849. widget.shadow = intStack[--isp];
  850. InterfaceClickMask.redrawInterface(widget);
  851. return 1;
  852. } else if (opcode == 1118) {
  853. widget.flipVertical = intStack[--isp] == 1;
  854. InterfaceClickMask.redrawInterface(widget);
  855. return 1;
  856. } else if (opcode == 1119) {
  857. widget.flipHorizontal = intStack[--isp] == 1;
  858. InterfaceClickMask.redrawInterface(widget);
  859. return 1;
  860. } else if (opcode == 1120) {
  861. isp -= 2;
  862. widget.maxScrollHorizontal = intStack[isp];
  863. widget.maxScrollVertical = intStack[isp + 1];
  864. InterfaceClickMask.redrawInterface(widget);
  865. if (widget.type == 0) {
  866. ProducingGraphicsBuffer.adjustScrollBar(widget, false);
  867. }
  868.  
  869. return 1;
  870. } else if (opcode == 1122) {
  871. widget.enabledSpriteId = intStack[--isp];
  872. InterfaceClickMask.redrawInterface(widget);
  873. return 1;
  874. } else if (opcode == 1123) {
  875. widget.enabledColor = intStack[--isp];
  876. InterfaceClickMask.redrawInterface(widget);
  877. return 1;
  878. } else if (opcode == 1124) {
  879. widget.field2608 = intStack[--isp];
  880. InterfaceClickMask.redrawInterface(widget);
  881. return 1;
  882. /*
  883. * } else if (opcode == 1125) { int_2 = intStack[--isp]; class316 class316_0 =
  884. * (class316) StaticMethods.forOrdinal(StaticMethods.method423(), int_2); if
  885. * (class316_0 != null) { widget_0.field2701 = class316_0;
  886. * InterfaceClickMask.redrawInterface(widget_0); }
  887. *
  888. * return 1;
  889. */
  890. } else {
  891. boolean bool_1;
  892. if (opcode == 1126) {
  893. bool_1 = intStack[--isp] == 1;
  894. widget.invertYAxis = bool_1;
  895. return 1;
  896. } /*
  897. * else if (int_0 == 1127) { bool_1 = intStack[--isp] == 1; widget_0.field2726 =
  898. * bool_1; return 1; }
  899. */ else {
  900. return 2;
  901. }
  902. }
  903. }
  904. }
  905.  
  906. static int under1300(int opcode, ClientScript script_0, boolean bool_0) {
  907. Widget widget_0;
  908. if (opcode >= 2000) {
  909. opcode -= 1000;
  910. widget_0 = StaticMethods.getJagexInterface(intStack[--isp], true);
  911. } else {
  912. widget_0 = bool_0 ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  913. }
  914.  
  915. InterfaceClickMask.redrawInterface(widget_0);
  916. if (opcode != 1200 && opcode != 1205 && opcode != 1212) {
  917. if (opcode == 1201) {
  918. widget_0.mediaType = 2;
  919. widget_0.mediaId = intStack[--isp];
  920. return 1;
  921. } else if (opcode == 1202) {
  922. widget_0.mediaType = 3;
  923. widget_0.mediaId = StaticFields.selfPlayer.appearance.getPlayerChatModelHash();
  924. return 1;
  925. } else {
  926. return 2;
  927. }
  928. } else {
  929. isp -= 2;
  930. int int_1 = intStack[isp];
  931. int int_2 = intStack[isp + 1];
  932. widget_0.objId = int_1;
  933. widget_0.objCount = int_2;
  934. ItemDefinition itemcomposition_0 = ItemDefinition.list(int_1);
  935. widget_0.angleX = itemcomposition_0.xan2d;
  936. widget_0.angleY = itemcomposition_0.yan2d;
  937. widget_0.angleZ = itemcomposition_0.zan2d;
  938. widget_0.translateX = itemcomposition_0.xof2d;
  939. widget_0.translateY = itemcomposition_0.yof2d;
  940. widget_0.zoom = itemcomposition_0.zoom2d;
  941. if (opcode == 1205) {
  942. widget_0.drawObjCount = false; // 0
  943. } /*
  944. * else if (int_0 == 1212 | itemcomposition_0.stackable == 1) { //TODO CONVERT
  945. * TO INT widget_0.field2664 = 1; }
  946. */ else {
  947. widget_0.drawObjCount = true; // 2
  948. }
  949.  
  950. if (widget_0.anInt2069 > 0) {
  951. widget_0.zoom = widget_0.zoom * 32 / widget_0.anInt2069;
  952. } else if (widget_0.originalWidth > 0) {
  953. widget_0.zoom = widget_0.zoom * 32 / widget_0.originalWidth;
  954. }
  955.  
  956. return 1;
  957. }
  958. }
  959.  
  960. static int under1400(int int_0, ClientScript script_0, boolean bool_0) {
  961. Widget widget_0;
  962. if (int_0 >= 2000) {
  963. int_0 -= 1000;
  964. widget_0 = StaticMethods.getJagexInterface(intStack[--isp], true);
  965. } else {
  966. widget_0 = bool_0 ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  967. }
  968.  
  969. int intValue;
  970. if (int_0 == 1300) {
  971. intValue = intStack[--isp] - 1;
  972. if (intValue >= 0 && intValue <= 9) {
  973. widget_0.setOption(stringStack[--ssi], intValue);
  974. return 1;
  975. } else {
  976. --ssi;
  977. return 1;
  978. }
  979. } else if (int_0 == 1301) {
  980. isp -= 2;
  981. intValue = intStack[isp];
  982. int int_2 = intStack[isp + 1];
  983. widget_0.draggableComponent = StaticMethods.getComponent(intValue, int_2, true);
  984. return 1;
  985. } else if (int_0 == 1302) {
  986. widget_0.dragRenderBehaviour = intStack[--isp] == 1;
  987. return 1;
  988. } else if (int_0 == 1303) {
  989. widget_0.deadDeadZone = intStack[--isp];
  990. return 1;
  991. } else if (int_0 == 1304) {
  992. widget_0.dragDeadTime = intStack[--isp];
  993. return 1;
  994. } else if (int_0 == 1305) {
  995. widget_0.optionBase = stringStack[--ssi];
  996. return 1;
  997. } else if (int_0 == 1306) {
  998. widget_0.targetVerb = stringStack[--ssi];
  999. return 1;
  1000. } else if (int_0 == 1307) {
  1001. // widget_0.optionsNew = null;
  1002. return 1;
  1003. } else {
  1004. return 2;
  1005. }
  1006. }
  1007.  
  1008. static int under1500(int opcode, ClientScript script_0, boolean bool_0) {
  1009. Widget widget_0;
  1010. if (opcode >= 2000) {
  1011. opcode -= 1000;
  1012. widget_0 = StaticMethods.getJagexInterface(intStack[--isp], true);
  1013. } else {
  1014. widget_0 = bool_0 ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  1015. }
  1016.  
  1017. String string_0 = stringStack[--ssi];
  1018. int[] ints_0 = null;
  1019. if (string_0.length() > 0 && string_0.charAt(string_0.length() - 1) == 89) {
  1020. int int_1 = intStack[--isp];
  1021. if (int_1 > 0) {
  1022. for (ints_0 = new int[int_1]; int_1-- > 0; ints_0[int_1] = intStack[--isp]) {
  1023. ;
  1024. }
  1025. }
  1026.  
  1027. string_0 = string_0.substring(0, string_0.length() - 1);
  1028. }
  1029.  
  1030. Object[] objects_0 = new Object[string_0.length() + 1];
  1031.  
  1032. int int_2;
  1033. for (int_2 = objects_0.length - 1; int_2 >= 1; --int_2) {
  1034. if (string_0.charAt(int_2 - 1) == 115) {
  1035. objects_0[int_2] = stringStack[--ssi];
  1036. } else {
  1037. objects_0[int_2] = new Integer(intStack[--isp]);
  1038. }
  1039. }
  1040.  
  1041. int_2 = intStack[--isp];
  1042. if (int_2 != -1) {
  1043. objects_0[0] = new Integer(int_2);
  1044. } else {
  1045. objects_0 = null;
  1046. }
  1047.  
  1048. if (opcode == 1400) {
  1049. widget_0.onClickListener = objects_0;
  1050. } else if (opcode == 1401) {
  1051. widget_0.onHoldListener = objects_0;
  1052. } else if (opcode == 1402) {
  1053. widget_0.onReleaseListener = objects_0;
  1054. } else if (opcode == 1403) {
  1055. widget_0.onMouseOverListener = objects_0;
  1056. } else if (opcode == 1404) {
  1057. widget_0.onMouseLeaveListener = objects_0;
  1058. } else if (opcode == 1405) {
  1059. widget_0.onDragListener = objects_0;
  1060. } else if (opcode == 1406) {
  1061. widget_0.onTargetLeaveListener = objects_0;
  1062. } else if (opcode == 1407) {
  1063. widget_0.onVarpUpdateListener = objects_0;
  1064. widget_0.varpChangeTriggers = ints_0;
  1065. } else if (opcode == 1408) {
  1066. widget_0.onLoopCycleListener = objects_0;
  1067. } else if (opcode == 1409) {
  1068. widget_0.onOptionClickListener = objects_0;
  1069. } else if (opcode == 1410) {
  1070. widget_0.onDragCompleteListener = objects_0;
  1071. } else if (opcode == 1411) {
  1072. widget_0.onClickRepeatListener = objects_0;
  1073. } else if (opcode == 1412) {
  1074. widget_0.onMouseRepeatListener = objects_0;
  1075. } else if (opcode == 1414) {
  1076. widget_0.onInventoryUpdateListener = objects_0;
  1077. widget_0.inventoryChangeTriggers = ints_0;
  1078. } else if (opcode == 1415) {
  1079. widget_0.onSkillUpdateListener = objects_0;
  1080. widget_0.skillListernerTriggers = ints_0;
  1081. } else if (opcode == 1416) {
  1082. widget_0.onTargetEnterListener = objects_0;
  1083. } else if (opcode == 1417) {
  1084. widget_0.onMouseWheelListener = objects_0;
  1085. } else if (opcode == 1418) {
  1086. widget_0.onGameMessageReceived = objects_0;
  1087. } else if (opcode == 1419) {
  1088. widget_0.keyPressedListener = objects_0;
  1089. } else if (opcode == 1420) {
  1090. widget_0.privateChatUpdateListener = objects_0;
  1091. } else if (opcode == 1421) {
  1092. widget_0.onClanChatUpdateListener = objects_0;
  1093. } else if (opcode == 1422) {
  1094. widget_0.miscInformationUpdateListener = objects_0;
  1095. } else if (opcode == 1423) {
  1096. widget_0.onDialogAbortListener = objects_0;
  1097. } else if (opcode == 1424) {
  1098. widget_0.onInterfaceOverridingUpdate = objects_0;
  1099. } else if (opcode == 1425) {
  1100. widget_0.onGrandExchangeUpdateListener = objects_0;
  1101. } else if (opcode == 1426) {
  1102. widget_0.onLoginScreenCameraUpdate = objects_0;
  1103. } else {
  1104. if (opcode != 1427) {
  1105. return 2;
  1106. }
  1107.  
  1108. widget_0.onResizeListener = objects_0;
  1109. }
  1110.  
  1111. widget_0.hasListener = true;
  1112. return 1;
  1113. }
  1114.  
  1115. static int under1600(int int_0, ClientScript script_0, boolean bool_0) {
  1116. Widget widget_0 = bool_0 ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  1117. if (int_0 == 1500) {
  1118. intStack[++isp - 1] = widget_0.x;
  1119. return 1;
  1120. } else if (int_0 == 1501) {
  1121. intStack[++isp - 1] = widget_0.y;
  1122. return 1;
  1123. } else if (int_0 == 1502) {
  1124. intStack[++isp - 1] = widget_0.width;
  1125. return 1;
  1126. } else if (int_0 == 1503) {
  1127. intStack[++isp - 1] = widget_0.height;
  1128. return 1;
  1129. } else if (int_0 == 1504) {
  1130. intStack[++isp - 1] = widget_0.hidden ? 1 : 0;
  1131. return 1;
  1132. } else if (int_0 == 1505) {
  1133. intStack[++isp - 1] = widget_0.layer;
  1134. return 1;
  1135. } else {
  1136. return 2;
  1137. }
  1138. }
  1139.  
  1140. static int under1700(int opcode, ClientScript script, boolean flag) {
  1141. Widget widget_1;
  1142. widget_1 = flag ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  1143. if (opcode == 1600) {
  1144. intStack[++isp - 1] = widget_1.horizontalScrollPosition;
  1145. return 1;
  1146. } else if (opcode == 1601) {
  1147. intStack[++isp - 1] = widget_1.verticalScrollPosition;
  1148. return 1;
  1149. } else if (opcode == 1602) {
  1150. stringStack[++ssi - 1] = widget_1.componentString;
  1151. return 1;
  1152. } else if (opcode == 1603) {
  1153. intStack[++isp - 1] = widget_1.maxScrollVertical;
  1154. return 1;
  1155. } else if (opcode == 1604) {
  1156. intStack[++isp - 1] = widget_1.maxScrollHorizontal;
  1157. return 1;
  1158. } else if (opcode == 1605) {
  1159. intStack[++isp - 1] = widget_1.zoom;
  1160. return 1;
  1161. } else if (opcode == 1606) {
  1162. intStack[++isp - 1] = widget_1.angleX;
  1163. return 1;
  1164. } else if (opcode == 1607) {
  1165. intStack[++isp - 1] = widget_1.angleZ;
  1166. return 1;
  1167. } else if (opcode == 1608) {
  1168. intStack[++isp - 1] = widget_1.angleY;
  1169. return 1;
  1170. } else if (opcode == 1609) {
  1171. intStack[++isp - 1] = widget_1.trans;
  1172. return 1;
  1173. } else if (opcode == 1610) {
  1174. intStack[++isp - 1] = widget_1.field2608;
  1175. return 1;
  1176. } else if (opcode == 1611) {
  1177. intStack[++isp - 1] = widget_1.disabledColor;
  1178. return 1;
  1179. } else if (opcode == 1612) {
  1180. intStack[++isp - 1] = widget_1.enabledColor;
  1181. return 1;
  1182. } /*
  1183. * else if (opcode == 1613) { intStack[++isp - 1] =
  1184. * widget_1.field2701.vmethod5815(); return 1; } else if (opcode == 1614) {
  1185. * intStack[++isp - 1] = widget_1.field2726 ? 1 : 0; return 1; }
  1186. */
  1187.  
  1188. return 2;
  1189. }
  1190.  
  1191. static int under1800(int opcode, ClientScript script, boolean flag) {
  1192. Widget widget_0 = flag ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  1193. if (opcode == 1700) {
  1194. intStack[++isp - 1] = widget_0.objId;
  1195. return 1;
  1196. } else if (opcode == 1701) {
  1197. if (widget_0.objId != -1) {
  1198. intStack[++isp - 1] = widget_0.objCount;
  1199. } else {
  1200. intStack[++isp - 1] = 0;
  1201. }
  1202.  
  1203. return 1;
  1204. } else if (opcode == 1702) {
  1205. intStack[++isp - 1] = widget_0.index;
  1206. return 1;
  1207. }
  1208.  
  1209. return 2;
  1210. }
  1211.  
  1212. /*
  1213. * static int under1900(int int_0, ClientScript script_0, boolean bool_0) {
  1214. * Widget widget_0 = bool_0 ? StaticFields.staticActiveComponent1 :
  1215. * StaticFields.staticActiveComponent2; if (int_0 == 1800) { intStack[++isp - 1]
  1216. * = Game.getClickMask(widget_0).getTargetMask(); return 1; } else if (int_0 !=
  1217. * 1801) { if (int_0 == 1802) { if (widget_0.spellNameNew == null) {
  1218. * stringStack[++ssi - 1] = ""; } else { stringStack[++ssi - 1] =
  1219. * widget_0.spellNameNew; }
  1220. *
  1221. * return 1; } else { return 2; } } else { int int_1 = intStack[--isp]; --int_1;
  1222. * if (widget_0.optionsNew != null && int_1 < widget_0.optionsNew.length &&
  1223. * widget_0.optionsNew[int_1] != null) { stringStack[++ssi - 1] =
  1224. * widget_0.optionsNew[int_1]; } else { stringStack[++ssi - 1] = ""; }
  1225. *
  1226. * return 1; } }
  1227. */
  1228.  
  1229. static int under2600(int opcode) {
  1230. int passed;
  1231.  
  1232. int widgetHash = intStack[--isp];
  1233. Widget widget_1 = StaticMethods.getJagexInterface(widgetHash, true);
  1234. if (opcode == 2500) {
  1235. intStack[++isp - 1] = widget_1.x;
  1236. passed = 1;
  1237. } else if (opcode == 2501) {
  1238. intStack[++isp - 1] = widget_1.y;
  1239. passed = 1;
  1240. } else if (opcode == 2502) {
  1241. intStack[++isp - 1] = widget_1.width;
  1242. passed = 1;
  1243. } else if (opcode == 2503) {
  1244. intStack[++isp - 1] = widget_1.height;
  1245. passed = 1;
  1246. } else if (opcode == 2504) {
  1247. intStack[++isp - 1] = widget_1.hidden ? 1 : 0;
  1248. passed = 1;
  1249. } else if (opcode == 2505) {
  1250. intStack[++isp - 1] = widget_1.layer;
  1251. passed = 1;
  1252. } else {
  1253. passed = 2;
  1254. }
  1255.  
  1256. return passed;
  1257. }
  1258.  
  1259. static int under2700(int int_0, ClientScript script_0, boolean bool_0) {
  1260. Widget widget_0 = StaticMethods.getJagexInterface(intStack[--isp], true);
  1261. if (int_0 == 2600) {
  1262. intStack[++isp - 1] = widget_0.horizontalScrollPosition;
  1263. return 1;
  1264. } else if (int_0 == 2601) {
  1265. intStack[++isp - 1] = widget_0.verticalScrollPosition;
  1266. return 1;
  1267. } else if (int_0 == 2602) {
  1268. stringStack[++ssi - 1] = widget_0.componentString;
  1269. return 1;
  1270. } else if (int_0 == 2603) {
  1271. intStack[++isp - 1] = widget_0.maxScrollHorizontal;
  1272. return 1;
  1273. } else if (int_0 == 2604) {
  1274. intStack[++isp - 1] = widget_0.maxScrollVertical;
  1275. return 1;
  1276. } else if (int_0 == 2605) {
  1277. intStack[++isp - 1] = widget_0.zoom;
  1278. return 1;
  1279. } else if (int_0 == 2606) {
  1280. intStack[++isp - 1] = widget_0.angleX;
  1281. return 1;
  1282. } else if (int_0 == 2607) {
  1283. intStack[++isp - 1] = widget_0.angleZ;
  1284. return 1;
  1285. } else if (int_0 == 2608) {
  1286. intStack[++isp - 1] = widget_0.angleY;
  1287. return 1;
  1288. } else if (int_0 == 2609) {
  1289. intStack[++isp - 1] = widget_0.trans;
  1290. return 1;
  1291. } else if (int_0 == 2610) {
  1292. intStack[++isp - 1] = widget_0.field2608;
  1293. return 1;
  1294. } else if (int_0 == 2611) {
  1295. intStack[++isp - 1] = widget_0.disabledColor;
  1296. return 1;
  1297. } else if (int_0 == 2612) {
  1298. intStack[++isp - 1] = widget_0.enabledColor;
  1299. return 1;
  1300. } /*
  1301. * else if (int_0 == 2613) { intStack[++isp - 1] =
  1302. * widget_0.field2701.vmethod5815(); return 1; } else if (int_0 == 2614) {
  1303. * intStack[++isp - 1] = widget_0.field2726 ? 1 : 0; return 1; }
  1304. */ else {
  1305. return 2;
  1306. }
  1307. }
  1308.  
  1309. static int under2000(int opcode, boolean flag) {
  1310. Widget widget_0;
  1311. if (opcode >= 2000) {
  1312. opcode -= 1000;
  1313. widget_0 = StaticMethods.getJagexInterface(intStack[--isp], true);
  1314. } else {
  1315. widget_0 = flag ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  1316. }
  1317.  
  1318. if (opcode == 1927) {
  1319. if (Settings.field1009 >= 10) {
  1320. throw new RuntimeException();
  1321. } else if (widget_0.onResizeListener == null) {
  1322. return 0;
  1323. } else {
  1324. InterfaceListener scriptevent_0 = new InterfaceListener();
  1325. scriptevent_0.jagexInterface = widget_0;
  1326. scriptevent_0.objectData = widget_0.onResizeListener;
  1327. scriptevent_0.field514 = Settings.field1009 + 1;
  1328. Class88.lowPriorityInterfaceScripts.addLast(scriptevent_0);
  1329. return 1;
  1330. }
  1331. } else {
  1332. return 2;
  1333. }
  1334. }
  1335.  
  1336. static int under3200(int opcode, ClientScript script, boolean flag) {
  1337. Widget widget_0;
  1338. int passed;
  1339. String string_0;
  1340. int int_3;
  1341. int int_1;
  1342. int int_2;
  1343. if (opcode == 3100) {
  1344. string_0 = stringStack[--ssi];
  1345. StaticMethods.pushMessage(string_0, "", 0);
  1346. passed = 1;
  1347. } else if (opcode == 3101) {
  1348. isp -= 2;
  1349. Class192.animatePlayer(StaticFields.selfPlayer, intStack[isp], intStack[isp + 1]);
  1350. passed = 1;
  1351. } else if (opcode == 3103) {
  1352. Class90.removeSubInterfaces();
  1353. if (Class156.dialogInterface != null) {
  1354. InterfaceClickMask.redrawInterface(Class156.dialogInterface);
  1355. Class156.dialogInterface = null;
  1356. }
  1357. passed = 1;
  1358. } else if (opcode == 3104) {
  1359. string_0 = stringStack[--ssi];
  1360. int_3 = 0;
  1361. if (Class120_Sub21.isValidStringBase10(string_0)) {
  1362. int_3 = Class31.stringToBase10(string_0);
  1363. }
  1364. StaticFields.outputStream.putOpcode(219);
  1365. StaticFields.outputStream.putInt(int_3);
  1366. passed = 1;
  1367. } else {
  1368. if (opcode == 3105) {
  1369. string_0 = stringStack[--ssi];
  1370. StaticFields.outputStream.putOpcode(149);
  1371. StaticFields.outputStream.putLong(VariableParameter.stringToLong(string_0));
  1372. passed = 1;
  1373. } else if (opcode == 3106) {
  1374. string_0 = stringStack[--ssi];
  1375. StaticFields.outputStream.putOpcode(164);
  1376. StaticFields.outputStream.putByte(string_0.length() + 1);
  1377. StaticFields.outputStream.putJagexString(string_0);
  1378. passed = 1;
  1379. } else {
  1380. String string_1;
  1381. if (opcode == 3107) {
  1382. int slot = intStack[--isp];
  1383. String option = stringStack[--ssi];
  1384. Class3.executePlayerAction(option, slot);
  1385. passed = 1;
  1386. } else if (opcode == 3108) {
  1387. isp -= 3;
  1388. int_1 = intStack[isp];
  1389. int_3 = intStack[isp + 1];
  1390. int_2 = intStack[isp + 2];
  1391. widget_0 = StaticMethods.getJagexInterface(intStack[--isp], true);
  1392. Class120_Sub12_Sub8.dragComponent(widget_0, int_1, int_3);
  1393. passed = 1;
  1394. } else if (opcode == 3109) {
  1395. isp -= 2;
  1396. int_1 = intStack[isp];
  1397. int_3 = intStack[isp + 1];
  1398. Widget widget_2 = flag ? StaticFields.staticActiveComponent1 : StaticFields.staticActiveComponent2;
  1399. Class120_Sub12_Sub8.dragComponent(widget_2, int_1, int_3);
  1400. passed = 1;
  1401. } else if (opcode == 3110) {
  1402. Settings.middleMouseMovement = intStack[--isp] == 1;
  1403. passed = 1;
  1404. } else if (opcode == 3111) {
  1405. intStack[++isp - 1] = Settings.HIDE_PROOFS ? 1 : 0;
  1406. passed = 1;
  1407. } else if (opcode == 3112) {
  1408. Settings.HIDE_PROOFS = intStack[--isp] == 1;
  1409. passed = 1;
  1410. } else if (opcode == 3113) {
  1411. string_0 = stringStack[--ssi];
  1412. boolean bool_4 = intStack[--isp] == 1;
  1413. // HorizontalAlignment.method5156(string_0, bool_4, false);
  1414. passed = 1;
  1415. } else if (opcode == 3115) {
  1416. int_1 = intStack[--isp];
  1417. passed = 1;
  1418. } else if (opcode == 3116) {
  1419. int_1 = intStack[--isp];
  1420. ssi -= 2;
  1421. string_1 = stringStack[ssi];
  1422. String string_2 = stringStack[ssi + 1];
  1423. if (string_1.length() > 500) {
  1424. passed = 1;
  1425. } else if (string_2.length() > 500) {
  1426. passed = 1;
  1427. } else {
  1428. /*
  1429. * PacketNode packetnode_4 = class26.method433(ClientPacket.field2167,
  1430. * Client.field626.field1218); packetnode_4.packetBuffer.putShort(1 +
  1431. * class316.getLength(string_1) + class316.getLength(string_2));
  1432. * packetnode_4.packetBuffer.method3575(int_1);
  1433. * packetnode_4.packetBuffer.putString(string_2);
  1434. * packetnode_4.packetBuffer.putString(string_1);
  1435. * Client.field626.method1980(packetnode_4);
  1436. */
  1437. passed = 1;
  1438. }
  1439. } else if (opcode == 3117) {
  1440. StaticFields.shiftDropping = intStack[--isp] == 1;
  1441. passed = 1;
  1442. } else if (opcode == 3118) {
  1443. StaticFields.mouseOverText = intStack[--isp] == 1;
  1444. passed = 1;
  1445. } else if (opcode == 3119) {
  1446. StaticFields.renderSelf = intStack[--isp] == 1;
  1447. passed = 1;
  1448. } else if (opcode == 3120) {
  1449. if (intStack[--isp] == 1) {
  1450. // Client.playerNameMask |= 0x1;
  1451. } else {
  1452. // Client.playerNameMask &= 0xFFFFFFFE;
  1453. }
  1454.  
  1455. passed = 1;
  1456. } else if (opcode == 3121) {
  1457. if (intStack[--isp] == 1) {
  1458. // Client.playerNameMask |= 0x2;
  1459. } else {
  1460. // Client.playerNameMask &= 0xFFFFFFFD;
  1461. }
  1462.  
  1463. passed = 1;
  1464. } else if (opcode == 3122) {
  1465. if (intStack[--isp] == 1) {
  1466. // Client.playerNameMask |= 0x4;
  1467. } else {
  1468. // Client.playerNameMask &= 0xFFFFFFFB;
  1469. }
  1470.  
  1471. passed = 1;
  1472. } else if (opcode == 3123) {
  1473. if (intStack[--isp] == 1) {
  1474. // Client.playerNameMask |= 0x8;
  1475. } else {
  1476. // Client.playerNameMask &= 0xFFFFFFF7;
  1477. }
  1478.  
  1479. passed = 1;
  1480. } else if (opcode == 3124) {
  1481. // Client.playerNameMask = 0;
  1482. passed = 1;
  1483. } else if (opcode == 3125) {
  1484. boolean ok = intStack[--isp] == 1;
  1485. passed = 1;
  1486. } else if (opcode == 3126) {
  1487. boolean ok = intStack[--isp] == 1;
  1488. passed = 1;
  1489. } else if (opcode == 3127) {
  1490. flag = intStack[--isp] == 1;
  1491. boolean ok = flag;
  1492. passed = 1;
  1493. } else if (opcode == 3128) {
  1494. int[] ints_1 = intStack;
  1495. int_3 = ++isp - 1;
  1496. boolean bool_2 = false;
  1497. ints_1[int_3] = bool_2 ? 1 : 0;
  1498. passed = 1;
  1499. } else if (opcode == 3129) {
  1500. isp -= 2;
  1501. Settings.field750 = intStack[isp];
  1502. Settings.field661 = intStack[isp + 1];
  1503. passed = 1;
  1504. } else if (opcode == 3130) {
  1505. isp -= 2;
  1506. passed = 1;
  1507. } else if (opcode == 3131) {
  1508. --isp;
  1509. passed = 1;
  1510. } else if (opcode == 3132) {
  1511. intStack[++isp - 1] = StaticFields.canvasWidth;
  1512. intStack[++isp - 1] = StaticFields.canvasHeight;
  1513. passed = 1;
  1514. } else if (opcode == 3133) {
  1515. --isp;
  1516. passed = 1;
  1517. } else {
  1518. passed = 2;
  1519. }
  1520. }
  1521. }
  1522.  
  1523. return passed;
  1524. }
  1525.  
  1526. static int under3300(int opcode) {
  1527. int int_1;
  1528. int int_2;
  1529. int int_3;
  1530. int passed;
  1531. if (opcode == 3200) {
  1532. isp -= 3;
  1533. int_1 = intStack[isp];
  1534. int_3 = intStack[isp + 1];
  1535. int_2 = intStack[isp + 2];
  1536. Class48.playSound(int_1, int_2, int_3, 255);
  1537.  
  1538. passed = 1;
  1539. } else if (opcode == 3201) {
  1540. int_1 = intStack[--isp];
  1541. ObjectPile.playMusic(255, int_1);
  1542. passed = 1;
  1543. } else if (opcode == 3202) {
  1544. isp -= 2;
  1545. int_1 = intStack[isp];
  1546. int_3 = intStack[isp + 1];
  1547. Class101.method832(255, int_3, int_1);
  1548.  
  1549. passed = 1;
  1550. } else {
  1551. passed = 2;
  1552. }
  1553.  
  1554. return passed;
  1555. }
  1556.  
  1557. static int under2800(int int_0, ClientScript script_0, boolean bool_0) {
  1558. Widget widget_0;
  1559. if (int_0 == 2700) {
  1560. widget_0 = StaticMethods.getJagexInterface(intStack[--isp], true);
  1561. intStack[++isp - 1] = widget_0.objId;
  1562. return 1;
  1563. } else if (int_0 == 2701) {
  1564. widget_0 = StaticMethods.getJagexInterface(intStack[--isp], true);
  1565. if (widget_0.objId != -1) {
  1566. intStack[++isp - 1] = widget_0.objCount;
  1567. } else {
  1568. intStack[++isp - 1] = 0;
  1569. }
  1570.  
  1571. return 1;
  1572. } else if (int_0 == 2702) {
  1573. int int_1 = intStack[--isp];
  1574. SubInterface widgetnode_0 = (SubInterface) Class120_Sub12_Sub13.subInterfaces.get(int_1);
  1575. if (widgetnode_0 != null) {
  1576. intStack[++isp - 1] = 1;
  1577. } else {
  1578. intStack[++isp - 1] = 0;
  1579. }
  1580.  
  1581. return 1;
  1582. } else if (int_0 == 2706) {
  1583. intStack[++isp - 1] = Class69.rootInterfaceId;
  1584. return 1;
  1585. } else {
  1586. return 2;
  1587. }
  1588. }
  1589.  
  1590. static int under2900(int int_0, ClientScript script_0, boolean bool_0) {
  1591. Widget widget_0 = StaticMethods.getJagexInterface(intStack[--isp], true);
  1592. if (int_0 == 2800) {
  1593. intStack[++isp - 1] = Client.getClickMask(widget_0).getTargetMask();
  1594. return 1;
  1595. } else if (int_0 != 2801) {
  1596. if (int_0 == 2802) {
  1597. if (widget_0.optionBase == null) {
  1598. stringStack[++ssi - 1] = "";
  1599. } else {
  1600. stringStack[++ssi - 1] = widget_0.optionBase;
  1601. }
  1602.  
  1603. return 1;
  1604. } else {
  1605. return 2;
  1606. }
  1607. } else {
  1608. int int_1 = intStack[--isp];
  1609. --int_1;
  1610. if (widget_0.actions != null && int_1 < widget_0.actions.length && widget_0.actions[int_1] != null) {
  1611. stringStack[++ssi - 1] = widget_0.actions[int_1];
  1612. } else {
  1613. stringStack[++ssi - 1] = "";
  1614. }
  1615.  
  1616. return 1;
  1617. }
  1618. }
  1619.  
  1620. static int under3400(int int_0, ClientScript script_0, boolean bool_0) {
  1621. if (int_0 == 3300) {
  1622. intStack[++isp - 1] = StaticFields.clientTick;
  1623. return 1;
  1624. } else {
  1625. int int_1;
  1626. int int_2;
  1627. if (int_0 == 3301) {
  1628. isp -= 2;
  1629. int_1 = intStack[isp];
  1630. int_2 = intStack[isp + 1];
  1631. intStack[++isp - 1] = ObjectContainer.getId(int_1, int_2);
  1632. return 1;
  1633. } else {
  1634. int[] ints_0;
  1635. int int_3;
  1636. ObjectContainer itemcontainer_0;
  1637. int int_4;
  1638. if (int_0 == 3302) {
  1639. isp -= 2;
  1640. int_1 = intStack[isp];
  1641. int_2 = intStack[isp + 1];
  1642. ints_0 = intStack;
  1643. int_3 = ++isp - 1;
  1644. itemcontainer_0 = (ObjectContainer) ObjectContainer.objectContainerCache.get(int_1);
  1645. if (itemcontainer_0 == null) {
  1646. int_4 = 0;
  1647. } else if (int_2 >= 0 && int_2 < itemcontainer_0.objectCounts.length) {
  1648. int_4 = itemcontainer_0.objectCounts[int_2];
  1649. } else {
  1650. int_4 = 0;
  1651. }
  1652.  
  1653. ints_0[int_3] = int_4;
  1654. return 1;
  1655. } else if (int_0 == 3303) {
  1656. isp -= 2;
  1657. int_1 = intStack[isp];
  1658. int_2 = intStack[isp + 1];
  1659. intStack[++isp - 1] = ObjectContainer.getCount(int_1, int_2);
  1660. return 1;
  1661. } else if (int_0 == 3304) {
  1662. int_1 = intStack[--isp];
  1663. intStack[++isp - 1] = InvType.list(int_1).size;
  1664. return 1;
  1665. } else if (int_0 == 3305) {
  1666. int id = intStack[--isp];
  1667. intStack[++isp - 1] = StaticFields.skillsLevel[id];
  1668. return 1;
  1669. } else if (int_0 == 3306) {
  1670. int_1 = intStack[--isp];
  1671. intStack[++isp - 1] = StaticFields.skillsBaseLevel[int_1];
  1672. return 1;
  1673. } else if (int_0 == 3307) {
  1674. int_1 = intStack[--isp];
  1675. intStack[++isp - 1] = StaticFields.skillsXp[int_1];
  1676. return 1;
  1677. } else {
  1678. int int_5;
  1679. if (int_0 == 3308) {
  1680. int_1 = Class173.gameLevel;
  1681. int_2 = (StaticFields.selfPlayer.x >> 7) + GameEntity.currentBaseX;
  1682. int_5 = (StaticFields.selfPlayer.y >> 7) + LightType.currentBaseZ;
  1683. intStack[++isp - 1] = (int_2 << 14) + int_5 + (int_1 << 28);
  1684. return 1;
  1685. } else if (int_0 == 3309) {
  1686. int_1 = intStack[--isp];
  1687. intStack[++isp - 1] = int_1 >> 14 & 0x3FFF;
  1688. return 1;
  1689. } else if (int_0 == 3310) {
  1690. int_1 = intStack[--isp];
  1691. intStack[++isp - 1] = int_1 >> 28;
  1692. return 1;
  1693. } else if (int_0 == 3311) {
  1694. int_1 = intStack[--isp];
  1695. intStack[++isp - 1] = int_1 & 0x3FFF;
  1696. return 1;
  1697. } else if (int_0 == 3312) {
  1698. intStack[++isp - 1] = Class120_Sub12_Sub37.membersClient ? 1 : 0;
  1699. return 1;
  1700. } else if (int_0 == 3313) {
  1701. isp -= 2;
  1702. int_1 = intStack[isp] + 32768;
  1703. int_2 = intStack[isp + 1];
  1704. intStack[++isp - 1] = ObjectContainer.getId(int_1, int_2);
  1705. return 1;
  1706. } else if (int_0 != 3314) {
  1707. if (int_0 == 3315) {
  1708. isp -= 2;
  1709. int_1 = intStack[isp] + 32768;
  1710. int_2 = intStack[isp + 1];
  1711. intStack[++isp - 1] = ObjectContainer.getCount(int_1, int_2);
  1712. return 1;
  1713. } else if (int_0 == 3316) {
  1714. if (Class86.staffLevel >= 2) {
  1715. intStack[++isp - 1] = Class86.staffLevel;
  1716. } else {
  1717. intStack[++isp - 1] = 0;
  1718. }
  1719.  
  1720. return 1;
  1721. } else if (int_0 == 3317) {
  1722. intStack[++isp - 1] = Class120_Sub22.rebootTimer;
  1723. return 1;
  1724. } else if (int_0 == 3318) {
  1725. intStack[++isp - 1] = Class157.worldId;
  1726. return 1;
  1727. } else if (int_0 == 3321) {
  1728. intStack[++isp - 1] = Class69_Sub2.energy;
  1729. return 1;
  1730. } else if (int_0 == 3322) {
  1731. intStack[++isp - 1] = Identifiers.weight;
  1732. return 1;
  1733. } else if (int_0 == 3323) {
  1734. if (Class120_Sub12_Sub9.playerModTrial >= 5 && Class120_Sub12_Sub9.playerModTrial <= 9) {
  1735. intStack[++isp - 1] = 1;
  1736. } else {
  1737. intStack[++isp - 1] = 0;
  1738. }
  1739.  
  1740. return 1;
  1741. } else if (int_0 == 3324) {
  1742. intStack[++isp - 1] = 0;// Client.flags;
  1743. return 1;
  1744. } else if (int_0 == 3325) {
  1745. isp -= 4;
  1746. int_1 = intStack[isp];
  1747. int_2 = intStack[isp + 1];
  1748. int_5 = intStack[isp + 2];
  1749. int_3 = intStack[isp + 3];
  1750. int_1 += int_2 << 14;
  1751. int_1 += int_5 << 28;
  1752. int_1 += int_3;
  1753. intStack[++isp - 1] = int_1;
  1754. return 1;
  1755. } else {
  1756. return 2;
  1757. }
  1758. } else {
  1759. isp -= 2;
  1760. int_1 = intStack[isp] + 32768;
  1761. int_2 = intStack[isp + 1];
  1762. ints_0 = intStack;
  1763. int_3 = ++isp - 1;
  1764. itemcontainer_0 = (ObjectContainer) ObjectContainer.objectContainerCache.get(int_1);
  1765. if (itemcontainer_0 == null) {
  1766. int_4 = 0;
  1767. } else if (int_2 >= 0 && int_2 < itemcontainer_0.objectCounts.length) {
  1768. int_4 = itemcontainer_0.objectCounts[int_2];
  1769. } else {
  1770. int_4 = 0;
  1771. }
  1772.  
  1773. ints_0[int_3] = int_4;
  1774. return 1;
  1775. }
  1776. }
  1777. }
  1778. }
  1779. }
  1780.  
  1781. static int under3500(int opcode) {
  1782. int passed;
  1783. if (opcode == 3400) {
  1784. isp -= 2;
  1785. int enumId = intStack[isp];
  1786. int paramId = intStack[isp + 1];
  1787. Enums var37 = Enums.list(enumId, true);
  1788. if (var37.returnType != 115) {
  1789. }
  1790.  
  1791. stringStack[++ssi - 1] = var37.getStringParamValue(paramId);
  1792.  
  1793. passed = 1;
  1794. } else if (opcode == 3408) {
  1795. isp -= 4;
  1796. int returnType = intStack[isp];
  1797. int inputType = intStack[isp + 1];
  1798. int enumId = intStack[isp + 2];
  1799. int paramId = intStack[isp + 3];
  1800. Enums enumType = Enums.list(enumId, true);
  1801. if (returnType == enumType.returnType && inputType == enumType.inputType) {
  1802. if (inputType == 115) {
  1803. stringStack[++ssi - 1] = enumType.getStringParamValue(paramId);
  1804. } else {
  1805. intStack[++isp - 1] = enumType.getIntegerParamValue(paramId);
  1806. }
  1807. passed = 1;
  1808. } else {
  1809. if (inputType == 115) {
  1810. stringStack[++ssi - 1] = "null";
  1811. } else {
  1812. intStack[++isp - 1] = 0;
  1813. }
  1814.  
  1815. passed = 1;
  1816. }
  1817. } else if (opcode == 3411) {
  1818. int enumId = intStack[--isp];
  1819. Enums var27 = Enums.list(enumId, true);
  1820. intStack[++isp - 1] = var27.paramCount;
  1821. passed = 1;
  1822. } else {
  1823. passed = 2;
  1824. }
  1825.  
  1826. return passed;
  1827. }
  1828.  
  1829. static int under4100(int opcode) {
  1830. int passed;
  1831. int operand1;
  1832. int int_2;
  1833. int operand2;
  1834. int int_4;
  1835. if (opcode == 4000) {
  1836. isp -= 2;
  1837. operand1 = intStack[isp];
  1838. operand2 = intStack[isp + 1];
  1839. intStack[++isp - 1] = operand2 + operand1;
  1840. passed = 1;
  1841. } else if (opcode == 4001) {
  1842. isp -= 2;
  1843. operand1 = intStack[isp];
  1844. operand2 = intStack[isp + 1];
  1845. intStack[++isp - 1] = operand1 - operand2;
  1846. passed = 1;
  1847. } else if (opcode == 4002) {
  1848. isp -= 2;
  1849. operand1 = intStack[isp];
  1850. operand2 = intStack[isp + 1];
  1851. intStack[++isp - 1] = operand2 * operand1;
  1852. passed = 1;
  1853. } else if (opcode == 4003) {
  1854. isp -= 2;
  1855. operand1 = intStack[isp];
  1856. operand2 = intStack[isp + 1];
  1857. intStack[++isp - 1] = operand1 / operand2;
  1858. passed = 1;
  1859. } else if (opcode == 4004) {
  1860. operand1 = intStack[--isp];
  1861. intStack[++isp - 1] = (int) (Math.random() * operand1);
  1862. passed = 1;
  1863. } else if (opcode == 4005) {
  1864. operand1 = intStack[--isp];
  1865. intStack[++isp - 1] = (int) (Math.random() * (operand1 + 1));
  1866. passed = 1;
  1867. } else if (opcode == 4006) {
  1868. isp -= 5;
  1869. operand1 = intStack[isp];
  1870. operand2 = intStack[isp + 1];
  1871. int_2 = intStack[isp + 2];
  1872. int_4 = intStack[isp + 3];
  1873. int int_5 = intStack[isp + 4];
  1874. intStack[++isp - 1] = operand1 + (int_5 - int_2) * (operand2 - operand1) / (int_4 - int_2);
  1875. passed = 1;
  1876. } else if (opcode == 4007) {
  1877. isp -= 2;
  1878. operand1 = intStack[isp];
  1879. operand2 = intStack[isp + 1];
  1880. intStack[++isp - 1] = operand1 + operand2 * operand1 / 100;
  1881. passed = 1;
  1882. } else if (opcode == 4008) {
  1883. isp -= 2;
  1884. operand1 = intStack[isp];
  1885. operand2 = intStack[isp + 1];
  1886. intStack[++isp - 1] = operand1 | 1 << operand2;
  1887. passed = 1;
  1888. } else if (opcode == 4009) {
  1889. isp -= 2;
  1890. operand1 = intStack[isp];
  1891. operand2 = intStack[isp + 1];
  1892. intStack[++isp - 1] = operand1 & -1 - (1 << operand2);
  1893. passed = 1;
  1894. } else if (opcode == 4010) {
  1895. isp -= 2;
  1896. operand1 = intStack[isp];
  1897. operand2 = intStack[isp + 1];
  1898. intStack[++isp - 1] = (operand1 & 1 << operand2) != 0 ? 1 : 0;
  1899. passed = 1;
  1900. } else if (opcode == 4011) {
  1901. isp -= 2;
  1902. operand1 = intStack[isp];
  1903. operand2 = intStack[isp + 1];
  1904. intStack[++isp - 1] = operand1 % operand2;
  1905. passed = 1;
  1906. } else if (opcode == 4012) {
  1907. isp -= 2;
  1908. operand1 = intStack[isp];
  1909. operand2 = intStack[isp + 1];
  1910. if (operand1 == 0) {
  1911. intStack[++isp - 1] = 0;
  1912. } else {
  1913. intStack[++isp - 1] = (int) Math.pow(operand1, operand2);
  1914. }
  1915.  
  1916. passed = 1;
  1917. } else if (opcode == 4013) {
  1918. isp -= 2;
  1919. operand1 = intStack[isp];
  1920. operand2 = intStack[isp + 1];
  1921. if (operand1 == 0) {
  1922. intStack[++isp - 1] = 0;
  1923. passed = 1;
  1924. } else {
  1925. switch (operand2) {
  1926. case 0:
  1927. intStack[++isp - 1] = Integer.MAX_VALUE;
  1928. break;
  1929. case 1:
  1930. intStack[++isp - 1] = operand1;
  1931. break;
  1932. case 2:
  1933. intStack[++isp - 1] = (int) Math.sqrt(operand1);
  1934. break;
  1935. case 3:
  1936. intStack[++isp - 1] = (int) Math.cbrt(operand1);
  1937. break;
  1938. case 4:
  1939. intStack[++isp - 1] = (int) Math.sqrt(Math.sqrt(operand1));
  1940. break;
  1941. default:
  1942. intStack[++isp - 1] = (int) Math.pow(operand1, 1.0D / operand2);
  1943. }
  1944.  
  1945. passed = 1;
  1946. }
  1947. } else if (opcode == 4014) {
  1948. isp -= 2;
  1949. operand1 = intStack[isp];
  1950. operand2 = intStack[isp + 1];
  1951. intStack[++isp - 1] = operand1 & operand2;
  1952. passed = 1;
  1953. } else if (opcode == 4015) {
  1954. isp -= 2;
  1955. operand1 = intStack[isp];
  1956. operand2 = intStack[isp + 1];
  1957. intStack[++isp - 1] = operand1 | operand2;
  1958. passed = 1;
  1959. } else if (opcode == 4018) {
  1960. isp -= 3;
  1961. long long_0 = intStack[isp];
  1962. long long_1 = intStack[isp + 1];
  1963. long long_2 = intStack[isp + 2];
  1964. intStack[++isp - 1] = (int) (long_2 * long_0 / long_1);
  1965. passed = 1;
  1966. } else {
  1967. passed = 2;
  1968. }
  1969.  
  1970. return passed;
  1971. }
  1972.  
  1973. static int under4200(int int_0, ClientScript script_0, boolean bool_0) {
  1974. String string_0;
  1975. int int_1;
  1976. if (int_0 == 4100) {
  1977. string_0 = stringStack[--ssi];
  1978. int_1 = intStack[--isp];
  1979. stringStack[++ssi - 1] = string_0 + int_1;
  1980. return 1;
  1981. } else {
  1982. String string_3;
  1983. if (int_0 == 4101) {
  1984. ssi -= 2;
  1985. string_0 = stringStack[ssi];
  1986. string_3 = stringStack[ssi + 1];
  1987. stringStack[++ssi - 1] = string_0 + string_3;
  1988. return 1;
  1989. } else {
  1990. int int_11;
  1991. if (int_0 == 4102) {
  1992. string_0 = stringStack[--ssi];
  1993. int_1 = intStack[--isp];
  1994. String[] strings_0 = stringStack;
  1995. int_11 = ++ssi - 1;
  1996. String string_1;
  1997. if (int_1 < 0) {
  1998. string_1 = Integer.toString(int_1);
  1999. } else {
  2000. int int_2 = int_1;
  2001. String string_2;
  2002. if (int_1 < 0) {
  2003. string_2 = Integer.toString(int_1, 10);
  2004. } else {
  2005. int int_5 = 2;
  2006.  
  2007. for (int int_6 = int_1 / 10; int_6 != 0; int_5++) {
  2008. int_6 /= 10;
  2009. }
  2010.  
  2011. char[] chars_0 = new char[int_5];
  2012. chars_0[0] = 43;
  2013.  
  2014. for (int int_7 = int_5 - 1; int_7 > 0; --int_7) {
  2015. int int_8 = int_2;
  2016. int_2 /= 10;
  2017. int int_9 = int_8 - int_2 * 10;
  2018. if (int_9 >= 10) {
  2019. chars_0[int_7] = (char) (int_9 + 87);
  2020. } else {
  2021. chars_0[int_7] = (char) (int_9 + 48);
  2022. }
  2023. }
  2024.  
  2025. string_2 = new String(chars_0);
  2026. }
  2027.  
  2028. string_1 = string_2;
  2029. }
  2030.  
  2031. strings_0[int_11] = string_0 + string_1;
  2032. return 1;
  2033. } else if (int_0 == 4103) {
  2034. string_0 = stringStack[--ssi];
  2035. stringStack[++ssi - 1] = string_0.toLowerCase();
  2036. return 1;
  2037. } else {
  2038. int int_3;
  2039. if (int_0 == 4104) {
  2040. int_3 = intStack[--isp];
  2041. long long_0 = 86400000L * (int_3 + 11745L);
  2042. Class192.aCalendar2121.setTime(new Date(long_0));
  2043. int_11 = Class192.aCalendar2121.get(5);
  2044. int int_12 = Class192.aCalendar2121.get(2);
  2045. int int_4 = Class192.aCalendar2121.get(1);
  2046. stringStack[++ssi - 1] = int_11 + "-" + CustomLocation.aStringArray2716[int_12] + "-" + int_4;
  2047. return 1;
  2048. } else if (int_0 == 4105) {
  2049. ssi -= 2;
  2050. string_0 = stringStack[ssi];
  2051. string_3 = stringStack[ssi + 1];
  2052. if (StaticFields.selfPlayer.appearance != null && StaticFields.selfPlayer.appearance.isFemale) {
  2053. stringStack[++ssi - 1] = string_3;
  2054. } else {
  2055. stringStack[++ssi - 1] = string_0;
  2056. }
  2057.  
  2058. return 1;
  2059. } else if (int_0 == 4106) {
  2060. int_3 = intStack[--isp];
  2061. stringStack[++ssi - 1] = Integer.toString(int_3);
  2062. return 1;
  2063. } else if (int_0 == 4107) {
  2064. ssi -= 2;
  2065. int[] ints_1 = intStack;
  2066. int_1 = ++isp - 1;
  2067. int_11 = FloorOverlay.compareResult(Class120_Sub12_Sub21_Sub1
  2068. .compareLocalised(stringStack[ssi + 1], Class9.language, stringStack[ssi]));
  2069. byte byte_0;
  2070. if (int_11 > 0) {
  2071. byte_0 = 1;
  2072. } else if (int_11 < 0) {
  2073. byte_0 = -1;
  2074. } else {
  2075. byte_0 = 0;
  2076. }
  2077.  
  2078. ints_1[int_1] = byte_0;
  2079. return 1;
  2080. } else {
  2081. int int_10;
  2082. if (int_0 == 4108) {
  2083. string_0 = stringStack[--ssi];
  2084. isp -= 2;
  2085. int_1 = intStack[isp];
  2086. int_10 = intStack[isp + 1];
  2087. intStack[++isp - 1] = LDFont.get(int_10).paragraphHeight(string_0, int_1);
  2088. return 1;
  2089. } else if (int_0 == 4109) {
  2090. string_0 = stringStack[--ssi];
  2091. isp -= 2;
  2092. int_1 = intStack[isp];
  2093. int_10 = intStack[isp + 1];
  2094. intStack[++isp - 1] = LDFont.get(int_10).paragraphWidth(string_0, int_1);
  2095. return 1;
  2096. } else if (int_0 == 4110) {
  2097. ssi -= 2;
  2098. string_0 = stringStack[ssi];
  2099. string_3 = stringStack[ssi + 1];
  2100. if (intStack[--isp] == 1) {
  2101. stringStack[++ssi - 1] = string_0;
  2102. } else {
  2103. stringStack[++ssi - 1] = string_3;
  2104. }
  2105.  
  2106. return 1;
  2107. } else if (int_0 == 4111) {
  2108. string_0 = stringStack[--ssi];
  2109. stringStack[++ssi - 1] = AbstractFont.removeTags(string_0);
  2110. return 1;
  2111. } else if (int_0 == 4112) {
  2112. string_0 = stringStack[--ssi];
  2113. int_1 = intStack[--isp];
  2114. stringStack[++ssi - 1] = string_0 + (char) int_1;
  2115. return 1;
  2116. } else if (int_0 == 4113) {
  2117. int_3 = intStack[--isp];
  2118. intStack[++isp - 1] = QuickChatMessageType.isValidCharacter((char) int_3) ? 1 : 0;
  2119. return 1;
  2120. } else if (int_0 == 4114) {
  2121. int_3 = intStack[--isp];
  2122. intStack[++isp - 1] = Class120_Sub12_Sub5.isLetterOrNumber((char) int_3) ? 1 : 0;
  2123. return 1;
  2124. } else {
  2125. int[] ints_0;
  2126. boolean bool_1;
  2127. char char_0;
  2128. if (int_0 == 4115) {
  2129. int_3 = intStack[--isp];
  2130. ints_0 = intStack;
  2131. int_10 = ++isp - 1;
  2132. char_0 = (char) int_3;
  2133. bool_1 = char_0 >= 65 && char_0 <= 90 || char_0 >= 97 && char_0 <= 122;
  2134. ints_0[int_10] = bool_1 ? 1 : 0;
  2135. return 1;
  2136. } else if (int_0 != 4116) {
  2137. if (int_0 == 4117) {
  2138. string_0 = stringStack[--ssi];
  2139. if (string_0 != null) {
  2140. intStack[++isp - 1] = string_0.length();
  2141. } else {
  2142. intStack[++isp - 1] = 0;
  2143. }
  2144.  
  2145. return 1;
  2146. } else if (int_0 == 4118) {
  2147. string_0 = stringStack[--ssi];
  2148. isp -= 2;
  2149. int_1 = intStack[isp];
  2150. int_10 = intStack[isp + 1];
  2151. stringStack[++ssi - 1] = string_0.substring(int_1, int_10);
  2152. return 1;
  2153. } else if (int_0 == 4119) {
  2154. string_0 = stringStack[--ssi];
  2155. StringBuilder stringbuilder_0 = new StringBuilder(string_0.length());
  2156. boolean bool_2 = false;
  2157.  
  2158. for (int_11 = 0; int_11 < string_0.length(); int_11++) {
  2159. char_0 = string_0.charAt(int_11);
  2160. if (char_0 == 60) {
  2161. bool_2 = true;
  2162. } else if (char_0 == 62) {
  2163. bool_2 = false;
  2164. } else if (!bool_2) {
  2165. stringbuilder_0.append(char_0);
  2166. }
  2167. }
  2168.  
  2169. stringStack[++ssi - 1] = stringbuilder_0.toString();
  2170. return 1;
  2171. } else if (int_0 == 4120) {
  2172. string_0 = stringStack[--ssi];
  2173. int_1 = intStack[--isp];
  2174. intStack[++isp - 1] = string_0.indexOf(int_1);
  2175. return 1;
  2176. } else if (int_0 == 4121) {
  2177. ssi -= 2;
  2178. string_0 = stringStack[ssi];
  2179. string_3 = stringStack[ssi + 1];
  2180. int_10 = intStack[--isp];
  2181. intStack[++isp - 1] = string_0.indexOf(string_3, int_10);
  2182. return 1;
  2183. } else {
  2184. return 2;
  2185. }
  2186. } else {
  2187. int_3 = intStack[--isp];
  2188. ints_0 = intStack;
  2189. int_10 = ++isp - 1;
  2190. char_0 = (char) int_3;
  2191. bool_1 = char_0 >= 48 && char_0 <= 57;
  2192. ints_0[int_10] = bool_1 ? 1 : 0;
  2193. return 1;
  2194. }
  2195. }
  2196. }
  2197. }
  2198. }
  2199. }
  2200. }
  2201.  
  2202. static int under3700(int opcode, boolean bool_0) {
  2203. int passed;
  2204. if (opcode == 3600) {
  2205. if (ObjectPile.friendsServerStatus == 0) {
  2206. intStack[++isp - 1] = -2;
  2207. } else if (ObjectPile.friendsServerStatus == 1) {
  2208. intStack[++isp - 1] = -1;
  2209. } else {
  2210. intStack[++isp - 1] = ProducingGraphicsBuffer.friendCount;
  2211. }
  2212.  
  2213. passed = 1;
  2214. } else if (opcode == 3601) {
  2215. int int_1 = intStack[--isp];
  2216. if (ObjectPile.friendsServerStatus == 2 && int_1 < ProducingGraphicsBuffer.friendCount) {
  2217. stringStack[++ssi - 1] = StaticFields.friendsName[int_1];
  2218. stringStack[++ssi - 1] = "";
  2219. } else {
  2220. stringStack[++ssi - 1] = "";
  2221. stringStack[++ssi - 1] = "";
  2222. }
  2223.  
  2224. passed = 1;
  2225. } else if (opcode == 3602) {
  2226. int int_1 = intStack[--isp];
  2227. if (ObjectPile.friendsServerStatus == 2 && int_1 < ProducingGraphicsBuffer.friendCount) {
  2228. intStack[++isp - 1] = StaticFields.friendsWorld[int_1];
  2229. } else {
  2230. intStack[++isp - 1] = 0;
  2231. }
  2232.  
  2233. passed = 1;
  2234. } else if (opcode == 3603) {
  2235. int int_1 = intStack[--isp];
  2236. if (ObjectPile.friendsServerStatus != 2 || int_1 >= ProducingGraphicsBuffer.friendCount) {
  2237. intStack[++isp - 1] = 0;
  2238. } else {
  2239. intStack[++isp - 1] = StaticFields.friendsRank[int_1];
  2240. }
  2241.  
  2242. passed = 1;
  2243. } else if (opcode == 3604) {
  2244. String string_0 = stringStack[--ssi];
  2245. int int_3 = intStack[--isp];
  2246. Class90.sendFriendsRankChange(string_0, int_3);
  2247. passed = 1;
  2248. } else if (opcode == 3605) {
  2249. String string_0 = stringStack[--ssi];
  2250. Class48.addFriend(VariableParameter.stringToLong(string_0));
  2251. passed = 1;
  2252. } else if (opcode == 3606) {
  2253. String string_0 = stringStack[--ssi];
  2254. ParticleEmitter.removeFriend(VariableParameter.stringToLong(string_0));
  2255. passed = 1;
  2256. } else if (opcode == 3607) {
  2257. String string_0 = stringStack[--ssi];
  2258. Class154.addIgnore(VariableParameter.stringToLong(string_0));
  2259. passed = 1;
  2260. } else if (opcode == 3608) {
  2261. String string_0 = stringStack[--ssi];
  2262. StaticMethods.removeIgnore(VariableParameter.stringToLong(string_0));
  2263. passed = 1;
  2264. } else if (opcode == 3609) {
  2265. String string_0 = stringStack[--ssi];
  2266. if (string_0.startsWith("<img=0>") || string_0.startsWith("<img=1>")) {
  2267. string_0 = string_0.substring(7);
  2268. }
  2269. intStack[++isp - 1] = SpotAnimType.isFriendOrSelf(string_0) ? 1 : 0;
  2270. passed = 1;
  2271. } else if (opcode == 3611) {
  2272. if (InterfaceChangeNode.clanName == null) {
  2273. stringStack[++ssi - 1] = "";
  2274. } else {
  2275. stringStack[++ssi - 1] = Class120_Sub12_Sub23.method1326(InterfaceChangeNode.clanName);
  2276. }
  2277.  
  2278. passed = 1;
  2279. } else if (opcode == 3612) {
  2280. if (InterfaceChangeNode.clanName == null) {
  2281. intStack[++isp - 1] = 0;
  2282. } else {
  2283. intStack[++isp - 1] = Class120_Sub14_Sub13.clanMembersAmount;
  2284. }
  2285.  
  2286. passed = 1;
  2287. } else if (opcode == 3613) {
  2288. int int_1 = intStack[--isp];
  2289. if (InterfaceChangeNode.clanName != null && int_1 < Class120_Sub14_Sub13.clanMembersAmount) {
  2290. stringStack[++ssi - 1] = Class120_Sub12_Sub23.method1326(ReflectionCheckNode.clanMembers[int_1].name);
  2291. } else {
  2292. stringStack[++ssi - 1] = "";
  2293. }
  2294.  
  2295. passed = 1;
  2296. } else if (opcode == 3614) {
  2297. int int_1 = intStack[--isp];
  2298. if (InterfaceChangeNode.clanName != null && Class120_Sub14_Sub13.clanMembersAmount > int_1) {
  2299. intStack[++isp - 1] = ReflectionCheckNode.clanMembers[int_1].world;
  2300. } else {
  2301. intStack[++isp - 1] = 0;
  2302. }
  2303.  
  2304. passed = 1;
  2305. } else if (opcode == 3615) {
  2306. int int_1 = intStack[--isp];
  2307. if (InterfaceChangeNode.clanName == null || Class120_Sub14_Sub13.clanMembersAmount <= int_1) {
  2308. intStack[++isp - 1] = 0;
  2309. } else {
  2310. intStack[++isp - 1] = ReflectionCheckNode.clanMembers[int_1].rank;
  2311. }
  2312.  
  2313. passed = 1;
  2314. } else if (opcode == 3616) {
  2315. intStack[++isp - 1] = DataStore.kickRank;
  2316. passed = 1;
  2317. } else if (opcode == 3617) {
  2318. String string_0 = stringStack[--ssi];
  2319. Class166.kickClanMember(string_0);
  2320. passed = 1;
  2321. } else if (opcode == 3618) {
  2322. intStack[++isp - 1] = MouseHandler.selfRankInClan;
  2323. passed = 1;
  2324. } else if (opcode == 3619) {
  2325. String string_0 = stringStack[--ssi];
  2326. Class120_Sub21.joinClanChat(VariableParameter.stringToLong(string_0));
  2327. passed = 1;
  2328. } else if (opcode == 3620) {
  2329. Client.leaveClanChat();
  2330. passed = 1;
  2331. } else if (opcode == 3621) {
  2332. if (ObjectPile.friendsServerStatus != 0) {
  2333. intStack[++isp - 1] = -1;
  2334. } else {
  2335. intStack[++isp - 1] = Class120_Sub12_Sub26.ignoreCount;
  2336. }
  2337.  
  2338. passed = 1;
  2339. } else if (opcode == 3622) {
  2340. int int_1 = intStack[--isp];
  2341. if (ObjectPile.friendsServerStatus == 0 || Class120_Sub12_Sub26.ignoreCount <= int_1) {
  2342. stringStack[++ssi - 1] = "";
  2343. stringStack[++ssi - 1] = "";
  2344. } else {
  2345. stringStack[++ssi - 1] = Class136.longToString(StaticFields.ignoreNamesAsLong[int_1]);
  2346. stringStack[++ssi - 1] = "";
  2347. }
  2348.  
  2349. passed = 1;
  2350. } else if (opcode == 3623) {
  2351. String string_0 = stringStack[--ssi];
  2352. if (string_0.startsWith("<img=0>") || string_0.startsWith("<img=1>")) {
  2353. string_0 = string_0.substring(7);
  2354. }
  2355. intStack[++isp - 1] = Light.isIgnored(string_0) ? 1 : 0;
  2356. passed = 1;
  2357. } else if (opcode == 3624) {
  2358. int int_1 = intStack[--isp];
  2359. if (ReflectionCheckNode.clanMembers == null || int_1 >= Class120_Sub14_Sub13.clanMembersAmount
  2360. || !ReflectionCheckNode.clanMembers[int_1].name.equalsIgnoreCase(StaticFields.selfPlayer.name)) {
  2361. intStack[++isp - 1] = 0;
  2362. } else {
  2363. intStack[++isp - 1] = 1;
  2364. }
  2365.  
  2366. passed = 1;
  2367. } else if (opcode == 3625) {
  2368. if (Class150.clanOwner != null) {
  2369. stringStack[++ssi - 1] = Class120_Sub12_Sub23.method1326(Class150.clanOwner);
  2370. } else {
  2371. stringStack[++ssi - 1] = "";
  2372. }
  2373.  
  2374. passed = 1;
  2375. } else if (opcode == 3626) {
  2376. int int_1 = intStack[--isp];
  2377. // if (WorldMapType3.clanMemberManager != null && int_1 <
  2378. // WorldMapType3.clanMemberManager.getCount() && ((ClanMember)
  2379. // WorldMapType3.clanMemberManager.get(int_1)).method5266()) {
  2380. // intStack[++isp - 1] = 1;
  2381. // } else {
  2382. intStack[++isp - 1] = 0;
  2383. // }
  2384.  
  2385. passed = 1;
  2386. } else if (opcode == 3627) {
  2387. int int_1 = intStack[--isp];
  2388. // if (WorldMapType3.clanMemberManager != null && int_1 <
  2389. // WorldMapType3.clanMemberManager.getCount() && ((ClanMember)
  2390. // WorldMapType3.clanMemberManager.get(int_1)).method5267()) {
  2391. // intStack[++isp - 1] = 1;
  2392. // } else {
  2393. intStack[++isp - 1] = 0;
  2394. // }
  2395.  
  2396. passed = 1;
  2397. } else if (opcode == 3628) {
  2398. // DState.friendManager.field970.method5346();
  2399. passed = 1;
  2400. } else if (opcode == 3629) {
  2401. boolean bool_1 = intStack[--isp] == 1;
  2402. // DState.friendManager.field970.method5347(new class308(bool_1));
  2403. passed = 1;
  2404. } else if (opcode == 3630) {
  2405. boolean bool_1 = intStack[--isp] == 1;
  2406. // DState.friendManager.field970.method5347(new class309(bool_1));
  2407. passed = 1;
  2408. } else if (opcode == 3631) {
  2409. boolean bool_1 = intStack[--isp] == 1;
  2410. // DState.friendManager.field970.method5347(new class143(bool_1));
  2411. passed = 1;
  2412. } else if (opcode == 3632) {
  2413. boolean bool_1 = intStack[--isp] == 1;
  2414. // DState.friendManager.field970.method5347(new class137(bool_1));
  2415. passed = 1;
  2416. } else if (opcode == 3633) {
  2417. boolean bool_1 = intStack[--isp] == 1;
  2418. // DState.friendManager.field970.method5347(new class142(bool_1));
  2419. passed = 1;
  2420. } else if (opcode == 3634) {
  2421. boolean bool_1 = intStack[--isp] == 1;
  2422. // DState.friendManager.field970.method5347(new class145(bool_1));
  2423. passed = 1;
  2424. } else if (opcode == 3635) {
  2425. boolean bool_1 = intStack[--isp] == 1;
  2426. // DState.friendManager.field970.method5347(new class141(bool_1));
  2427. passed = 1;
  2428. } else if (opcode == 3636) {
  2429. boolean bool_1 = intStack[--isp] == 1;
  2430. // DState.friendManager.field970.method5347(new class139(bool_1));
  2431. passed = 1;
  2432. } else if (opcode == 3637) {
  2433. boolean bool_1 = intStack[--isp] == 1;
  2434. // DState.friendManager.field970.method5347(new TileParticleQueue(bool_1));
  2435. passed = 1;
  2436. } else if (opcode == 3638) {
  2437. boolean bool_1 = intStack[--isp] == 1;
  2438. // DState.friendManager.field970.method5347(new class140(bool_1));
  2439. passed = 1;
  2440. } else if (opcode == 3639) {
  2441. // DState.friendManager.field970.method5337();
  2442. passed = 1;
  2443. } else if (opcode == 3640) {
  2444. // DState.friendManager.field975.method5346();
  2445. passed = 1;
  2446. } else if (opcode == 3641) {
  2447. boolean bool_1 = intStack[--isp] == 1;
  2448. // DState.friendManager.field975.method5347(new class308(bool_1));
  2449. passed = 1;
  2450. } else if (opcode == 3642) {
  2451. boolean bool_1 = intStack[--isp] == 1;
  2452. // DState.friendManager.field975.method5347(new class309(bool_1));
  2453. passed = 1;
  2454. } else if (opcode == 3643) {
  2455. // DState.friendManager.field975.method5337();
  2456. passed = 1;
  2457. } else if (opcode == 3644) {
  2458. // if (WorldMapType3.clanMemberManager != null) {
  2459. // WorldMapType3.clanMemberManager.method5346();
  2460. // }
  2461.  
  2462. passed = 1;
  2463. } else if (opcode == 3645) {
  2464. boolean bool_1 = intStack[--isp] == 1;
  2465. // if (WorldMapType3.clanMemberManager != null) {
  2466. // WorldMapType3.clanMemberManager.method5347(new class308(bool_1));
  2467. // }
  2468.  
  2469. passed = 1;
  2470. } else if (opcode == 3646) {
  2471. boolean bool_1 = intStack[--isp] == 1;
  2472. // if (WorldMapType3.clanMemberManager != null) {
  2473. // WorldMapType3.clanMemberManager.method5347(new class309(bool_1));
  2474. // }
  2475.  
  2476. passed = 1;
  2477. } else if (opcode == 3647) {
  2478. boolean bool_1 = intStack[--isp] == 1;
  2479. // if (WorldMapType3.clanMemberManager != null) {
  2480. // WorldMapType3.clanMemberManager.method5347(new class143(bool_1));
  2481. // }
  2482.  
  2483. passed = 1;
  2484. } else if (opcode == 3648) {
  2485. boolean bool_1 = intStack[--isp] == 1;
  2486. // if (WorldMapType3.clanMemberManager != null) {
  2487. // WorldMapType3.clanMemberManager.method5347(new class137(bool_1));
  2488. // }
  2489.  
  2490. passed = 1;
  2491. } else if (opcode == 3649) {
  2492. boolean bool_1 = intStack[--isp] == 1;
  2493. // if (WorldMapType3.clanMemberManager != null) {
  2494. // WorldMapType3.clanMemberManager.method5347(new class142(bool_1));
  2495. // }
  2496.  
  2497. passed = 1;
  2498. } else if (opcode == 3650) {
  2499. boolean bool_1 = intStack[--isp] == 1;
  2500. // if (WorldMapType3.clanMemberManager != null) {
  2501. // WorldMapType3.clanMemberManager.method5347(new class145(bool_1));
  2502. // }
  2503.  
  2504. passed = 1;
  2505. } else if (opcode == 3651) {
  2506. boolean bool_1 = intStack[--isp] == 1;
  2507. // if (WorldMapType3.clanMemberManager != null) {
  2508. // WorldMapType3.clanMemberManager.method5347(new class141(bool_1));
  2509. // }
  2510.  
  2511. passed = 1;
  2512. } else if (opcode == 3652) {
  2513. boolean bool_1 = intStack[--isp] == 1;
  2514. // if (WorldMapType3.clanMemberManager != null) {
  2515. // WorldMapType3.clanMemberManager.method5347(new class139(bool_1));
  2516. // }
  2517.  
  2518. passed = 1;
  2519. } else if (opcode == 3653) {
  2520. boolean bool_1 = intStack[--isp] == 1;
  2521. // if (WorldMapType3.clanMemberManager != null) {
  2522. // WorldMapType3.clanMemberManager.method5347(new TileParticleQueue(bool_1));
  2523. // }
  2524.  
  2525. passed = 1;
  2526. } else if (opcode == 3654) {
  2527. boolean bool_1 = intStack[--isp] == 1;
  2528. // if (WorldMapType3.clanMemberManager != null) {
  2529. // WorldMapType3.clanMemberManager.method5347(new class140(bool_1));
  2530. // }
  2531.  
  2532. passed = 1;
  2533. } else if (opcode == 3655) {
  2534. // if (WorldMapType3.clanMemberManager != null) {
  2535. // WorldMapType3.clanMemberManager.method5337();
  2536. // }
  2537.  
  2538. passed = 1;
  2539. } else if (opcode == 3656) {
  2540. boolean bool_1 = intStack[--isp] == 1;
  2541. // DState.friendManager.field970.method5347(new class144(bool_1));
  2542. passed = 1;
  2543. } else if (opcode == 3657) {
  2544. boolean bool_1 = intStack[--isp] == 1;
  2545. // if (WorldMapType3.clanMemberManager != null) {
  2546. // WorldMapType3.clanMemberManager.method5347(new class144(bool_1));
  2547. // }
  2548.  
  2549. passed = 1;
  2550. } else {
  2551. passed = 2;
  2552. }
  2553.  
  2554. return passed;
  2555. }
  2556.  
  2557. static int under4300(int int_0, ClientScript script_0, boolean bool_0) {
  2558. int int_1;
  2559. if (int_0 == 4200) {
  2560. int_1 = intStack[--isp];
  2561. stringStack[++ssi - 1] = ItemDefinition.list(int_1).name;
  2562. return 1;
  2563. } else {
  2564. int int_2;
  2565. ItemDefinition itemcomposition_2;
  2566. if (int_0 == 4201) {
  2567. isp -= 2;
  2568. int_1 = intStack[isp];
  2569. int_2 = intStack[isp + 1];
  2570. itemcomposition_2 = ItemDefinition.list(int_1);
  2571. if (int_2 >= 1 && int_2 <= 5 && itemcomposition_2.groundOptions[int_2 - 1] != null) {
  2572. stringStack[++ssi - 1] = itemcomposition_2.groundOptions[int_2 - 1];
  2573. } else {
  2574. stringStack[++ssi - 1] = "";
  2575. }
  2576.  
  2577. return 1;
  2578. } else if (int_0 == 4202) {
  2579. isp -= 2;
  2580. int_1 = intStack[isp];
  2581. int_2 = intStack[isp + 1];
  2582. itemcomposition_2 = ItemDefinition.list(int_1);
  2583. if (int_2 >= 1 && int_2 <= 5 && itemcomposition_2.inventoryOptions[int_2 - 1] != null) {
  2584. stringStack[++ssi - 1] = itemcomposition_2.inventoryOptions[int_2 - 1];
  2585. } else {
  2586. stringStack[++ssi - 1] = "";
  2587. }
  2588.  
  2589. return 1;
  2590. } else if (int_0 == 4203) {
  2591. int_1 = intStack[--isp];
  2592. intStack[++isp - 1] = ItemDefinition.list(int_1).cost;
  2593. return 1;
  2594. } else if (int_0 == 4204) {
  2595. int_1 = intStack[--isp];
  2596. intStack[++isp - 1] = ItemDefinition.list(int_1).stackable == 1 ? 1 : 0;
  2597. return 1;
  2598. } else {
  2599. ItemDefinition itemcomposition_0;
  2600. if (int_0 == 4205) {
  2601. int_1 = intStack[--isp];
  2602. itemcomposition_0 = ItemDefinition.list(int_1);
  2603. if (itemcomposition_0.certtemplate == -1 && itemcomposition_0.certlink >= 0) {
  2604. intStack[++isp - 1] = itemcomposition_0.certlink;
  2605. } else {
  2606. intStack[++isp - 1] = int_1;
  2607. }
  2608.  
  2609. return 1;
  2610. } else if (int_0 == 4206) {
  2611. int_1 = intStack[--isp];
  2612. itemcomposition_0 = ItemDefinition.list(int_1);
  2613. if (itemcomposition_0.certtemplate >= 0 && itemcomposition_0.certlink >= 0) {
  2614. intStack[++isp - 1] = itemcomposition_0.certlink;
  2615. } else {
  2616. intStack[++isp - 1] = int_1;
  2617. }
  2618.  
  2619. return 1;
  2620. } else if (int_0 == 4207) {
  2621. int_1 = intStack[--isp];
  2622. intStack[++isp - 1] = ItemDefinition.list(int_1).members ? 1 : 0;
  2623. return 1;
  2624. } else if (int_0 == 4208) {
  2625. int_1 = intStack[--isp];
  2626. itemcomposition_0 = ItemDefinition.list(int_1);
  2627. if (itemcomposition_0.pheld2 == -1 && itemcomposition_0.pheld1 >= 0) {
  2628. intStack[++isp - 1] = itemcomposition_0.pheld1;
  2629. } else {
  2630. intStack[++isp - 1] = int_1;
  2631. }
  2632.  
  2633. return 1;
  2634. } else if (int_0 == 4209) {
  2635. int_1 = intStack[--isp];
  2636. itemcomposition_0 = ItemDefinition.list(int_1);
  2637. if (itemcomposition_0.pheld2 >= 0 && itemcomposition_0.pheld1 >= 0) {
  2638. intStack[++isp - 1] = itemcomposition_0.pheld1;
  2639. } else {
  2640. intStack[++isp - 1] = int_1;
  2641. }
  2642.  
  2643. return 1;
  2644. } else if (int_0 == 4210) {
  2645. String string_1 = stringStack[--ssi];
  2646. int_2 = intStack[--isp];
  2647. Class120_Sub12_Sub25.searchObjects(string_1, int_2 == 1);
  2648.  
  2649. intStack[++isp - 1] = Buffer.searchResultCount;
  2650. return 1;
  2651. } else if (int_0 != 4211) {
  2652. if (int_0 == 4212) {
  2653. ParticleNode.searchResultsPos = 0;
  2654. return 1;
  2655. } else {
  2656. return 2;
  2657. }
  2658. } else {
  2659. if (Class120_Sub12_Sub37.searchResults == null
  2660. || Buffer.searchResultCount <= ParticleNode.searchResultsPos) {
  2661. intStack[++isp - 1] = -1;
  2662. } else {
  2663. intStack[++isp - 1] = Class120_Sub12_Sub3
  2664. .bitFlagged(Class120_Sub12_Sub37.searchResults[ParticleNode.searchResultsPos++], 65535);
  2665. }
  2666.  
  2667. return 1;
  2668. }
  2669. }
  2670. }
  2671. }
  2672.  
  2673. static int under5100(int int_0, ClientScript script, boolean flag) {
  2674. String string_0;
  2675. int int_1;
  2676. int int_2;
  2677. if (int_0 == 5000) {
  2678. intStack[++isp - 1] = Class69_Sub3_Sub1.publicChatSetting;
  2679. return 1;
  2680. }
  2681. if (int_0 == 5002) {
  2682. string_0 = stringStack[--ssi];
  2683. isp -= 2;
  2684. int_1 = intStack[isp];
  2685. int_2 = intStack[isp + 1];
  2686. StaticFields.outputStream.putOpcode(90);
  2687. StaticFields.outputStream.putLong(VariableParameter.stringToLong(string_0));
  2688. StaticFields.outputStream.putByte(int_1 + -1);
  2689. StaticFields.outputStream.putByte(int_2);
  2690. return 1;
  2691. } else {
  2692. int int_3;
  2693. if (int_0 == 5003) {
  2694. isp -= 2;
  2695. int_3 = intStack[isp];
  2696. int_1 = intStack[isp + 1];
  2697. /*
  2698. * ChatLineBuffer chatlinebuffer_0 = (ChatLineBuffer)
  2699. * class83.chatLineMap.get(Integer.valueOf(int_3)); MessageNode messagenode_1 =
  2700. * chatlinebuffer_0.getMessage(int_1); if (messagenode_1 != null) {
  2701. * intStack[++isp - 1] = messagenode_1.id; intStack[++isp - 1] =
  2702. * messagenode_1.tick; stringStack[++ssi - 1] = messagenode_1.name != null ?
  2703. * messagenode_1.name : ""; stringStack[++ssi - 1] = messagenode_1.sender !=
  2704. * null ? messagenode_1.sender : ""; stringStack[++ssi - 1] =
  2705. * messagenode_1.value != null ? messagenode_1.value : ""; intStack[++isp - 1] =
  2706. * messagenode_1.method1040() ? 1 : messagenode_1.method1043() ? 2 : 0; } else {
  2707. */
  2708. intStack[++isp - 1] = -1;
  2709. intStack[++isp - 1] = 0;
  2710. stringStack[++ssi - 1] = "";
  2711. stringStack[++ssi - 1] = "";
  2712. stringStack[++ssi - 1] = "";
  2713. intStack[++isp - 1] = 0;
  2714. // }
  2715.  
  2716. return 1;
  2717. } else if (int_0 == 5004) {
  2718. int_3 = intStack[--isp];
  2719. /*
  2720. * MessageNode messagenode_2 = OwnWorldComparator.method1130(int_3); if
  2721. * (messagenode_2 != null) { intStack[++isp - 1] = messagenode_2.type;
  2722. * intStack[++isp - 1] = messagenode_2.tick; stringStack[++ssi - 1] =
  2723. * messagenode_2.name != null ? messagenode_2.name : ""; stringStack[++ssi - 1]
  2724. * = messagenode_2.sender != null ? messagenode_2.sender : ""; stringStack[++ssi
  2725. * - 1] = messagenode_2.value != null ? messagenode_2.value : ""; intStack[++isp
  2726. * - 1] = messagenode_2.method1040() ? 1 : messagenode_2.method1043() ? 2 : 0; }
  2727. * else {
  2728. */
  2729. intStack[++isp - 1] = -1;
  2730. intStack[++isp - 1] = 0;
  2731. stringStack[++ssi - 1] = "";
  2732. stringStack[++ssi - 1] = "";
  2733. stringStack[++ssi - 1] = "";
  2734. intStack[++isp - 1] = 0;
  2735. // }
  2736.  
  2737. return 2;
  2738. } else if (int_0 == 5005) {
  2739. intStack[++isp - 1] = Class120_Sub12_Sub31.privateChatSetting;
  2740.  
  2741. return 1;
  2742. } else if (int_0 == 5008) {
  2743. String var3 = stringStack[--ssi];
  2744. int movementEffect = intStack[--isp];
  2745. String string = var3.toLowerCase();
  2746. String string_80_ = string.toLowerCase();
  2747. int colorEffect = 0;
  2748. if (string.startsWith("::")) {
  2749. StaticMethods
  2750. .executeCommand(string);
  2751. } else if (string_80_.startsWith(StringLibrary.aString2566)) {
  2752. colorEffect = 0;
  2753. string = string.substring(StringLibrary.aString2566.length());
  2754. } else if (string_80_.startsWith(StringLibrary.aString2589)) {
  2755. colorEffect = 1;
  2756. string = string.substring(StringLibrary.aString2589.length());
  2757. } else if (string_80_.startsWith(StringLibrary.aString276)) {
  2758. colorEffect = 2;
  2759. string = string.substring(StringLibrary.aString276.length());
  2760. } else if (string_80_.startsWith(StringLibrary.aString1066)) {
  2761. colorEffect = 3;
  2762. string = string.substring(StringLibrary.aString1066.length());
  2763. } else if (string_80_.startsWith(StringLibrary.aString1148)) {
  2764. colorEffect = 4;
  2765. string = string.substring(StringLibrary.aString1148.length());
  2766. } else if (string_80_.startsWith(StringLibrary.aString1137)) {
  2767. colorEffect = 5;
  2768. string = string.substring(StringLibrary.aString1137.length());
  2769. } else if (string_80_.startsWith(StringLibrary.aString2622)) {
  2770. colorEffect = 6;
  2771. string = string.substring(StringLibrary.aString2622.length());
  2772. } else if (string_80_.startsWith(StringLibrary.aString1766)) {
  2773. colorEffect = 7;
  2774. string = string.substring(StringLibrary.aString1766.length());
  2775. } else if (string_80_.startsWith(StringLibrary.aString1217)) {
  2776. colorEffect = 8;
  2777. string = string.substring(StringLibrary.aString1217.length());
  2778. } else if (string_80_.startsWith(StringLibrary.aString2665)) {
  2779. colorEffect = 9;
  2780. string = string.substring(StringLibrary.aString2665.length());
  2781. } else if (string_80_.startsWith(StringLibrary.aString60)) {
  2782. colorEffect = 10;
  2783. string = string.substring(StringLibrary.aString60.length());
  2784. } else if (string_80_.startsWith(StringLibrary.aString2614)) {
  2785. string = string.substring(StringLibrary.aString2614.length());
  2786. colorEffect = 11;
  2787. } else if (Class9.language != 0) {
  2788. if (string_80_.startsWith(StringLibrary.aString2231)) {
  2789. colorEffect = 0;
  2790. string = string.substring(StringLibrary.aString2231.length());
  2791. } else if (string_80_.startsWith(StringLibrary.aString2213)) {
  2792. colorEffect = 1;
  2793. string = string.substring(StringLibrary.aString2213.length());
  2794. } else if (string_80_.startsWith(StringLibrary.aString618)) {
  2795. colorEffect = 2;
  2796. string = string.substring(StringLibrary.aString618.length());
  2797. } else if (string_80_.startsWith(StringLibrary.aString1483)) {
  2798. colorEffect = 3;
  2799. string = string.substring(StringLibrary.aString1483.length());
  2800. } else if (string_80_.startsWith(StringLibrary.aString3575)) {
  2801. colorEffect = 4;
  2802. string = string.substring(StringLibrary.aString3575.length());
  2803. } else if (string_80_.startsWith(StringLibrary.aString2574)) {
  2804. colorEffect = 5;
  2805. string = string.substring(StringLibrary.aString2574.length());
  2806. } else if (string_80_.startsWith(StringLibrary.aString1397)) {
  2807. colorEffect = 6;
  2808. string = string.substring(StringLibrary.aString1397.length());
  2809. } else if (string_80_.startsWith(StringLibrary.aString2206)) {
  2810. colorEffect = 7;
  2811. string = string.substring(StringLibrary.aString2206.length());
  2812. } else if (string_80_.startsWith(StringLibrary.aString1685)) {
  2813. colorEffect = 8;
  2814. string = string.substring(StringLibrary.aString1685.length());
  2815. } else if (string_80_.startsWith(StringLibrary.aString1062)) {
  2816. colorEffect = 9;
  2817. string = string.substring(StringLibrary.aString1062.length());
  2818. } else if (string_80_.startsWith(StringLibrary.aString1457)) {
  2819. colorEffect = 10;
  2820. string = string.substring(StringLibrary.aString1457.length());
  2821. } else if (string_80_.startsWith(StringLibrary.aString1316)) {
  2822. colorEffect = 11;
  2823. string = string.substring(StringLibrary.aString1316.length());
  2824. }
  2825. }
  2826. string_80_ = string.toLowerCase();
  2827. if (string_80_.startsWith(StringLibrary.aString624)) {
  2828. movementEffect = 1;
  2829. string = string.substring(StringLibrary.aString624.length());
  2830. } else if (string_80_.startsWith(StringLibrary.aString952)) {
  2831. movementEffect = 2;
  2832. string = string.substring(StringLibrary.aString952.length());
  2833. } else if (string_80_.startsWith(StringLibrary.aString325)) {
  2834. movementEffect = 3;
  2835. string = string.substring(StringLibrary.aString325.length());
  2836. } else if (string_80_.startsWith(StringLibrary.aString1903)) {
  2837. movementEffect = 4;
  2838. string = string.substring(StringLibrary.aString1903.length());
  2839. } else if (string_80_.startsWith(StringLibrary.aString2548)) {
  2840. movementEffect = 5;
  2841. string = string.substring(StringLibrary.aString2548.length());
  2842. } else if (Class9.language != 0) {
  2843. if (string_80_.startsWith(StringLibrary.aString807)) {
  2844. movementEffect = 1;
  2845. string = string.substring(StringLibrary.aString807.length());
  2846. } else if (string_80_.startsWith(StringLibrary.aString1398)) {
  2847. movementEffect = 2;
  2848. string = string.substring(StringLibrary.aString1398.length());
  2849. } else if (string_80_.startsWith(StringLibrary.aString915)) {
  2850. movementEffect = 3;
  2851. string = string.substring(StringLibrary.aString915.length());
  2852. } else if (string_80_.startsWith(StringLibrary.aString3011)) {
  2853. movementEffect = 4;
  2854. string = string.substring(StringLibrary.aString3011.length());
  2855. } else if (string_80_.startsWith(StringLibrary.aString2538)) {
  2856. movementEffect = 5;
  2857. string = string.substring(StringLibrary.aString2538.length());
  2858. }
  2859. }
  2860. StaticFields.outputStream.putOpcode(186);
  2861. StaticFields.outputStream.putByte(0);
  2862. final int startOff = StaticFields.outputStream.offset;
  2863. StaticFields.outputStream.putByte(colorEffect);
  2864. StaticFields.outputStream.putByte(movementEffect);
  2865. Class148.encodeText(StaticFields.outputStream, string);
  2866. StaticFields.outputStream.putByteAt(StaticFields.outputStream.offset - startOff);
  2867. return 1;
  2868. } else if (int_0 == 5020) {
  2869. System.err.println("5020 called");
  2870. string_0 = stringStack[--ssi];
  2871. StaticMethods.executeCommand(string_0);
  2872. // HookType.method1031(string_0);
  2873. return 1;
  2874. } else {
  2875. int int_4;
  2876. if (int_0 != 5015) {
  2877. if (int_0 == 5016) {
  2878. intStack[++isp - 1] = KeyboardHandler.tradeChatSetting;
  2879. return 1;
  2880. } else {
  2881. int[] ints_0;
  2882. if (int_0 == 5017) {
  2883. int_3 = intStack[--isp];
  2884. ints_0 = intStack;
  2885. int_2 = ++isp - 1;
  2886. int_4 = Class120_Sub16.chatMessageCount;
  2887.  
  2888. ints_0[int_2] = int_4;
  2889. return 1;
  2890. } else if (int_0 == 5018) {
  2891. int_3 = intStack[--isp];
  2892. intStack[++isp - 1] = 0;// Preferences.method1621(int_3);
  2893. return 1;
  2894. } else if (int_0 == 5019) {
  2895. int_3 = intStack[--isp];
  2896. ints_0 = intStack;
  2897. int_2 = ++isp - 1;
  2898. /*
  2899. * MessageNode messagenode_0 = (MessageNode) class83.messages.get(int_3); if
  2900. * (messagenode_0 == null) { int_4 = -1; } else if (messagenode_0.next ==
  2901. * class83.field1184.sentinel) { int_4 = -1; } else { int_4 = ((MessageNode)
  2902. * messagenode_0.next).id; }
  2903. */
  2904.  
  2905. ints_0[int_2] = -1;// int_4;
  2906. return 1;
  2907. } else if (int_0 == 5021) {
  2908. String string = stringStack[--ssi].toLowerCase().trim();
  2909. return 1;
  2910. } else if (int_0 == 5022) {
  2911. stringStack[++ssi - 1] = ""; // TIES WITH 5021
  2912. return 1;
  2913. } else {
  2914. return 2;
  2915. }
  2916. }
  2917. } else {
  2918. if (StaticFields.selfPlayer != null && StaticFields.selfPlayer.name != null) {
  2919. string_0 = StaticFields.selfPlayer.getTitledName();
  2920. } else {
  2921. string_0 = StaticFields.loginName;
  2922. }
  2923.  
  2924. stringStack[++ssi - 1] = string_0;
  2925. return 1;
  2926. }
  2927. }
  2928. }
  2929. }
  2930.  
  2931. static int under5400(int int_0, ClientScript script_0, boolean bool_0) {
  2932. if (int_0 == 5306) {
  2933. int[] ints_0 = intStack;
  2934. int int_1 = ++isp - 1;
  2935. int int_2 = /* HDToolkit.glEnabled && MouseRecorder.frameResizable ? 2 : */ 1; // TODO resize
  2936. ints_0[int_1] = int_2;
  2937. return 1;
  2938. } else {
  2939. int int_3;
  2940. if (int_0 == 5307) {
  2941. int_3 = intStack[--isp];
  2942. if (int_3 == 1 || int_3 == 2) {
  2943. StaticMethods.changeDisplayMode(int_3, -1, -1, false);
  2944. }
  2945.  
  2946. return 1;
  2947. } else if (int_0 == 5308) {
  2948. intStack[++isp - 1] = Class120_Sub12_Sub19.lastUsedDisplayMode;
  2949. return 1;
  2950. } else if (int_0 != 5309) {
  2951. return 2;
  2952. } else {
  2953. int_3 = intStack[--isp];
  2954. if (int_3 == 1 || int_3 == 2) {
  2955. Class120_Sub12_Sub19.lastUsedDisplayMode = int_3;
  2956. Class120_Sub6.savePreferences(NpcDefinition.gameSignlink);
  2957. }
  2958.  
  2959. return 1;
  2960. }
  2961. }
  2962. }
  2963.  
  2964. static int under5600(int int_0, ClientScript script_0, boolean bool_0) {
  2965. int int_1;
  2966. if (int_0 == 5504) {
  2967. isp -= 2;
  2968. int_1 = intStack[isp];
  2969. int int_2 = intStack[isp + 1];
  2970. AmbientSound.setCameraRotation(int_1, int_2);
  2971. return 1;
  2972. } else if (int_0 == 5505) {
  2973. intStack[++isp - 1] = (int) Class120_Sub12_Sub21.cameraPitch;
  2974. return 1;
  2975. } else if (int_0 == 5506) {
  2976. intStack[++isp - 1] = (int) DummyOutputStream.cameraYaw;
  2977. return 1;
  2978. } else if (int_0 == 5530) {
  2979. int_1 = intStack[--isp];
  2980. if (int_1 < 0) {
  2981. int_1 = 0;
  2982. }
  2983.  
  2984. Settings.idk = int_1;
  2985. return 1;
  2986. } else if (int_0 == 5531) {
  2987. intStack[++isp - 1] = Settings.idk;
  2988. return 1;
  2989. } else {
  2990. return 2;
  2991. }
  2992. }
  2993.  
  2994. static int under6300(int int_0, ClientScript script_0, boolean bool_0) {
  2995. if (int_0 == 6200) {
  2996. isp -= 2;
  2997. Client.minFov = (short) intStack[isp];
  2998. if (Client.minFov <= 0) {
  2999. Client.minFov = (short) 256;
  3000. }
  3001. Client.maxFov = (short) intStack[isp + 1];
  3002. if (Client.maxFov <= 0) {
  3003. Client.maxFov = (short) 205;
  3004. }
  3005.  
  3006. return 1;
  3007. } else if (int_0 == 6201) {
  3008. isp -= 2;
  3009. Client.minZoom = (short) intStack[isp];
  3010. if (Client.minZoom <= 0) {
  3011. Client.minZoom = (short) 256;
  3012. }
  3013. Client.maxZoom = (short) intStack[isp + 1];
  3014. if (Client.maxZoom <= 0) {
  3015. Client.maxZoom = (short) 320;
  3016. }
  3017.  
  3018. return 1;
  3019. } else if (int_0 == 6202) {
  3020. isp -= 4;
  3021. Class120_Sub12_Sub16.aShort3250 = (short) intStack[isp];
  3022. if (Class120_Sub12_Sub16.aShort3250 <= 0) {
  3023. Class120_Sub12_Sub16.aShort3250 = (short) 1;
  3024. }
  3025. FileSystemRequest.aShort3932 = (short) intStack[isp + 1];
  3026. if (FileSystemRequest.aShort3932 <= 0) {
  3027. FileSystemRequest.aShort3932 = (short) 32767;
  3028. } else if (Class120_Sub12_Sub16.aShort3250 > FileSystemRequest.aShort3932) {
  3029. FileSystemRequest.aShort3932 = Class120_Sub12_Sub16.aShort3250;
  3030. }
  3031. RuntimeException_Sub1.aShort2143 = (short) intStack[isp + 2];
  3032. if (RuntimeException_Sub1.aShort2143 <= 0) {
  3033. RuntimeException_Sub1.aShort2143 = (short) 1;
  3034. }
  3035. GameShell.aShort2 = (short) intStack[isp + 3];
  3036. if (GameShell.aShort2 <= 0) {
  3037. GameShell.aShort2 = (short) 32767;
  3038. } else if (RuntimeException_Sub1.aShort2143 > GameShell.aShort2) {
  3039. GameShell.aShort2 = RuntimeException_Sub1.aShort2143;
  3040. }
  3041.  
  3042. return 1;
  3043. } else if (int_0 == 6203) {
  3044. Class154.method2079(0, 0, DummyInputStream.gameScreenInterface.width,
  3045. DummyInputStream.gameScreenInterface.height, false);
  3046. intStack[++isp - 1] = Class120_Sub12_Sub27.effectiveWidth;
  3047. intStack[++isp - 1] = Light.effectiveHeight;
  3048.  
  3049. return 1;
  3050. } else if (int_0 == 6204) {
  3051. intStack[++isp - 1] = Client.minZoom;
  3052. intStack[++isp - 1] = Client.maxZoom;
  3053. return 1;
  3054. } else if (int_0 == 6205) {
  3055. intStack[++isp - 1] = Client.minFov;
  3056. intStack[++isp - 1] = Client.maxFov;
  3057. return 1;
  3058. } else {
  3059. return 2;
  3060. }
  3061. }
  3062.  
  3063. static int under6600(int int_0, ClientScript script_0, boolean bool_0) {
  3064. World world_0;
  3065. if (int_0 == 6501) {
  3066. /*
  3067. * World.field944 = 0; world_0 = class236.method4592(); if (world_0 != null) {
  3068. * intStack[++isp - 1] = world_0.id; intStack[++isp - 1] = world_0.mask;
  3069. * stringStack[++ssi - 1] = world_0.activity; intStack[++isp - 1] =
  3070. * world_0.location; intStack[++isp - 1] = world_0.playerCount;
  3071. * stringStack[++ssi - 1] = world_0.address; } else {
  3072. */
  3073. intStack[++isp - 1] = -1;
  3074. intStack[++isp - 1] = 0;
  3075. stringStack[++ssi - 1] = "";
  3076. intStack[++isp - 1] = 0;
  3077. intStack[++isp - 1] = 0;
  3078. stringStack[++ssi - 1] = "";
  3079. // }
  3080.  
  3081. return 1;
  3082. } else if (int_0 == 6502) {
  3083. /*
  3084. * world_0 = class236.method4592(); if (world_0 != null) { intStack[++isp - 1] =
  3085. * world_0.id; intStack[++isp - 1] = world_0.mask; stringStack[++ssi - 1] =
  3086. * world_0.activity; intStack[++isp - 1] = world_0.location; intStack[++isp - 1]
  3087. * = world_0.playerCount; stringStack[++ssi - 1] = world_0.address; } else {
  3088. */
  3089. intStack[++isp - 1] = -1;
  3090. intStack[++isp - 1] = 0;
  3091. stringStack[++ssi - 1] = "";
  3092. intStack[++isp - 1] = 0;
  3093. intStack[++isp - 1] = 0;
  3094. stringStack[++ssi - 1] = "";
  3095. // }
  3096.  
  3097. return 1;
  3098. } else {
  3099. World world_1;
  3100. int int_1;
  3101. int int_2;
  3102. if (int_0 == 6506) {
  3103. int_1 = intStack[--isp];
  3104. /*
  3105. * world_1 = null;
  3106. *
  3107. * for (int_2 = 0; int_2 < World.worldCount; int_2++) { if (int_1 ==
  3108. * World.worldList[int_2].id) { world_1 = World.worldList[int_2]; break; } }
  3109. *
  3110. * if (world_1 != null) { intStack[++isp - 1] = world_1.id; intStack[++isp - 1]
  3111. * = world_1.mask; stringStack[++ssi - 1] = world_1.activity; intStack[++isp -
  3112. * 1] = world_1.location; intStack[++isp - 1] = world_1.playerCount;
  3113. * stringStack[++ssi - 1] = world_1.address; } else {
  3114. */
  3115. intStack[++isp - 1] = -1;
  3116. intStack[++isp - 1] = 0;
  3117. stringStack[++ssi - 1] = "";
  3118. intStack[++isp - 1] = 0;
  3119. intStack[++isp - 1] = 0;
  3120. stringStack[++ssi - 1] = "";
  3121. // }
  3122.  
  3123. return 1;
  3124. } else if (int_0 == 6507) {
  3125. isp -= 4;
  3126. int_1 = intStack[isp];
  3127. boolean bool_2 = intStack[isp + 1] == 1;
  3128. int_2 = intStack[isp + 2];
  3129. boolean bool_1 = intStack[isp + 3] == 1;
  3130. /*
  3131. * if (World.worldList != null) { class120.method2781(0, World.worldList.length
  3132. * - 1, int_1, bool_2, int_2, bool_1); }
  3133. */
  3134.  
  3135. return 1;
  3136. } else if (int_0 != 6511) {
  3137. if (int_0 == 6512) {
  3138. Settings.petPriority = intStack[--isp] == 1;
  3139. return 1;
  3140. } else {
  3141. int int_3;
  3142. if (int_0 == 6513) {
  3143. isp -= 2;
  3144. int_1 = intStack[isp];
  3145. int_3 = intStack[isp + 1];
  3146. ParamType paramType = ParamType.list(int_3);
  3147. if (paramType.isString()) {
  3148. stringStack[++ssi - 1] = NpcDefinition.list(int_1).getStringParamValue(int_3,
  3149. paramType.defaultString);
  3150. } else {
  3151. intStack[++isp - 1] = NpcDefinition.list(int_1).getIntegerParamValue(int_3,
  3152. paramType.defaultInt);
  3153. }
  3154.  
  3155. return 1;
  3156. } else if (int_0 == 6514) {
  3157. isp -= 2;
  3158. int_1 = intStack[isp];
  3159. int_3 = intStack[isp + 1];
  3160. ParamType paramType = ParamType.list(int_3);
  3161. if (paramType.isString()) {
  3162. stringStack[++ssi - 1] = ObjectDefinition.list(int_1).getStringParamValue(int_3,
  3163. paramType.defaultString);
  3164. } else {
  3165. intStack[++isp - 1] = ObjectDefinition.list(int_1).getIntegerParamValue(int_3,
  3166. paramType.defaultInt);
  3167. }
  3168.  
  3169. return 1;
  3170. } else if (int_0 == 6515) {
  3171. isp -= 2;
  3172. int_1 = intStack[isp];
  3173. int_3 = intStack[isp + 1];
  3174. ParamType paramType = ParamType.list(int_3);
  3175. if (paramType.isString()) {
  3176. stringStack[++ssi - 1] = ItemDefinition.list(int_1).getStringParam(int_3,
  3177. paramType.defaultString);
  3178. } else {
  3179. intStack[++isp - 1] = ItemDefinition.list(int_1).getIntegerParamValue(int_3,
  3180. paramType.defaultInt);
  3181. }
  3182.  
  3183. return 1;
  3184. } else if (int_0 == 6516) {
  3185. isp -= 2;
  3186. int_1 = intStack[isp];
  3187. int_3 = intStack[isp + 1];
  3188. ParamType params = ParamType.list(int_3);
  3189. int int_4;
  3190. // class265 class265_0;
  3191. // class265 class265_1;
  3192. byte[] bytes_0;
  3193. if (params.isString()) {
  3194. String[] strings_0 = stringStack;
  3195. int_4 = ++ssi - 1;
  3196. /*
  3197. * class265_0 = (class265) class265.field3334.get(int_1); if (class265_0 !=
  3198. * null) { class265_1 = class265_0; } else { bytes_0 =
  3199. * class7.field42.getConfigData(34, int_1); class265_0 = new class265(); if
  3200. * (bytes_0 != null) { class265_0.method4960(new Buffer(bytes_0)); }
  3201. *
  3202. * class265_0.method4961(); class265.field3334.put(class265_0, int_1);
  3203. * class265_1 = class265_0; }
  3204. */
  3205.  
  3206. strings_0[int_4] = "";// class265_1.method4963(int_3, params.defaultString);
  3207. } else {
  3208. int[] ints_0 = intStack;
  3209. int_4 = ++isp - 1;
  3210. /*
  3211. * class265_0 = (class265) class265.field3334.get(int_1); if (class265_0 !=
  3212. * null) { class265_1 = class265_0; } else { bytes_0 =
  3213. * class7.field42.getConfigData(34, int_1); class265_0 = new class265(); if
  3214. * (bytes_0 != null) { class265_0.method4960(new Buffer(bytes_0)); }
  3215. *
  3216. * class265_0.method4961(); class265.field3334.put(class265_0, int_1);
  3217. * class265_1 = class265_0; }
  3218. */
  3219.  
  3220. ints_0[int_4] = 0;// class265_1.method4962(int_3, params.defaultInt);
  3221. }
  3222.  
  3223. return 1;
  3224. } else if (int_0 == 6518) {
  3225. intStack[++isp - 1] = 0;
  3226. return 1;
  3227. } else if (int_0 == 6519) {
  3228. int confClientType = 1;
  3229. intStack[++isp - 1] = confClientType & 3;
  3230. return 1;
  3231. } else if (int_0 == 6520) {
  3232. return 1;
  3233. } else if (int_0 == 6521) {
  3234. return 1;
  3235. } else if (int_0 == 6522) {
  3236. --ssi;
  3237. --isp;
  3238. return 1;
  3239. } else if (int_0 == 6523) {
  3240. --ssi;
  3241. --isp;
  3242. return 1;
  3243. } else if (int_0 == 6524) {
  3244. intStack[++isp - 1] = -1;
  3245. return 1;
  3246. } else if (int_0 == 6525) {
  3247. intStack[++isp - 1] = 1;
  3248. return 1;
  3249. } else if (int_0 == 6526) {
  3250. intStack[++isp - 1] = 1;
  3251. return 1;
  3252. } else {
  3253. return 2;
  3254. }
  3255. }
  3256. } else {
  3257. int_1 = intStack[--isp];
  3258. /*
  3259. * if (int_1 >= 0 && int_1 < World.worldCount) { world_1 =
  3260. * World.worldList[int_1]; intStack[++isp - 1] = world_1.id; intStack[++isp - 1]
  3261. * = world_1.mask; stringStack[++ssi - 1] = world_1.activity; intStack[++isp -
  3262. * 1] = world_1.location; intStack[++isp - 1] = world_1.playerCount;
  3263. * stringStack[++ssi - 1] = world_1.address; } else {
  3264. */
  3265. intStack[++isp - 1] = -1;
  3266. intStack[++isp - 1] = 0;
  3267. stringStack[++ssi - 1] = "";
  3268. intStack[++isp - 1] = 0;
  3269. intStack[++isp - 1] = 0;
  3270. stringStack[++ssi - 1] = "";
  3271. // }
  3272.  
  3273. return 1;
  3274. }
  3275. }
  3276. }
  3277.  
  3278. static int[] intStack;
  3279. static String[] stringStack;
  3280.  
  3281. static int isp;
  3282. static int ssi;
  3283.  
  3284. static int[] intLocalVariables;
  3285. static String[] stringLocalVariables;
  3286.  
  3287. static SubScript[] scriptStack;
  3288. static int subScriptIndex = 0;
  3289.  
  3290. static int[] cs2ArrayLengths;
  3291. static int[][] cs2ArrayData;
  3292.  
  3293. static {
  3294. cs2ArrayLengths = new int[5];
  3295. cs2ArrayData = new int[5][5000];
  3296. intStack = new int[1000];
  3297. stringStack = new String[1000];
  3298. subScriptIndex = 0;
  3299. scriptStack = new SubScript[50];
  3300. }
  3301. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement