Guest User

Untitled

a guest
Apr 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.93 KB | None | 0 0
  1. package server.model.npcs;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.FileNotFoundException;
  5. import java.io.FileReader;
  6. import java.io.IOException;
  7. import java.util.ArrayList;
  8.  
  9. import server.Config;
  10. import server.Server;
  11. import server.model.players.Client;
  12. import server.util.Misc;
  13. import server.world.map.VirtualWorld;
  14. import server.event.EventManager;
  15. import server.event.Event;
  16. import server.event.EventContainer;
  17.  
  18. public class NPCHandler {
  19. public static int maxNPCs = 10000;
  20. public static int maxListedNPCs = 10000;
  21. public static int random;
  22. public static int maxNPCDrops = 10000;
  23. public static NPC npcs[] = new NPC[maxNPCs];
  24. public static NPCList NpcList[] = new NPCList[maxListedNPCs];
  25. public NPCHandler() {
  26. for(int i = 0; i < maxNPCs; i++) {
  27. npcs[i] = null;
  28. }
  29. for(int i = 0; i < maxListedNPCs; i++) {
  30. NpcList[i] = null;
  31. }
  32. loadNPCList("./Data/CFG/npc.cfg");
  33. loadAutoSpawn("./Data/CFG/spawn-config.cfg");
  34. }
  35.  
  36.  
  37. public void Summon(Client c, int npcType, int x, int y, int heightLevel, int WalkingType, int HP, int maxHit, boolean attackPlayer, int attack, int defence) {
  38.  
  39.  
  40. // first, search for a free slot
  41. int slot = -1;
  42. for (int i = 1; i < maxNPCs; i++) {
  43. if (npcs[i] == null) {
  44. slot = i;
  45. break;
  46. }
  47. }
  48. if(slot == -1) {
  49. //Misc.println("No Free Slot");
  50. return; // no free slot found
  51. }
  52. NPC newNPC = new NPC(slot, npcType);
  53. newNPC.absX = x;
  54. newNPC.absY = y;
  55. newNPC.makeX = x;
  56. newNPC.makeY = y;
  57. newNPC.heightLevel = heightLevel;
  58. newNPC.walkingType = WalkingType;
  59. newNPC.HP = HP;
  60. newNPC.MaxHP = HP;
  61. newNPC.maxHit = maxHit;
  62. newNPC.attack = attack;
  63. newNPC.defence = defence;
  64.  
  65. newNPC.spawnedBy = c.getId();
  66.  
  67. newNPC.followPlayer = c.getId();
  68. // followPlayer(npcType, c.getId());
  69. newNPC.summon = true;
  70. c.lastsummon = npcType;
  71. c.summon = true;
  72. newNPC.gfx0(1315);
  73. c.summoningnpcid = slot;
  74. newNPC.npcslot = slot;
  75.  
  76.  
  77. if(attackPlayer) {
  78. newNPC.underAttack = true;
  79. if(c != null) {
  80. if(server.model.minigames.Barrows.COFFIN_AND_BROTHERS[c.randomCoffin][1] != newNPC.npcType) {
  81. if(newNPC.npcType == 2025 || newNPC.npcType == 2026 || newNPC.npcType == 2027 || newNPC.npcType == 2028 || newNPC.npcType == 2029 || newNPC.npcType == 2030) {
  82. newNPC.forceChat("You dare disturb my rest!");
  83. }
  84. }
  85. if(server.model.minigames.Barrows.COFFIN_AND_BROTHERS[c.randomCoffin][1] == newNPC.npcType) {
  86. newNPC.forceChat("You dare steal from us!");
  87. }
  88.  
  89. newNPC.killerId = c.playerId;
  90. }
  91. }
  92. npcs[slot] = newNPC;
  93. }
  94.  
  95.  
  96. /*public void spawnNpc3(Client c, int npcType, int x, int y, int heightLevel, int WalkingType, int HP, int maxHit, int attack, int defence, boolean attackPlayer, boolean headIcon, boolean summonFollow) {
  97. // first, search for a free slot
  98. int slot = -1;
  99. for (int i = 1; i < maxNPCs; i++) {
  100. if (npcs[i] == null) {
  101. slot = i;
  102. break;
  103. }
  104. }
  105. if(slot == -1) {
  106. //Misc.println("No Free Slot");
  107. return; // no free slot found
  108. }
  109. NPC newNPC = new NPC(slot, npcType);
  110. newNPC.absX = x;
  111. newNPC.absY = y;
  112. newNPC.makeX = x;
  113. newNPC.makeY = y;
  114. newNPC.heightLevel = heightLevel;
  115. newNPC.walkingType = WalkingType;
  116. newNPC.HP = HP;
  117. newNPC.MaxHP = HP;
  118. newNPC.maxHit = maxHit;
  119. newNPC.attack = attack;
  120. newNPC.defence = defence;
  121. newNPC.spawnedBy = c.getId();
  122. newNPC.underAttack = true;
  123. newNPC.facePlayer(c.playerId);
  124. if(headIcon)
  125. c.getPA().drawHeadicon(1, slot, 0, 0);
  126. if (summonFollow) {
  127. newNPC.summoner = true;
  128. newNPC.summonedBy = c.playerId;
  129. c.summonId = npcType;
  130. c.hasNpc = true;
  131. }
  132. if(attackPlayer) {
  133. newNPC.underAttack = true;
  134. if(c != null) {
  135. newNPC.killerId = c.playerId;
  136. }
  137. }
  138. npcs[slot] = newNPC;
  139. }*/
  140.  
  141.  
  142. public void appendJailKc(int i) {
  143. Client c = (Client)Server.playerHandler.players[npcs[i].killedBy];
  144. if(c != null) {
  145. int[] Jail = {
  146. 132
  147. };
  148. for (int j : Jail) {
  149. if (npcs[i].npcType == j) {
  150. c.monkeyk0ed++;
  151. c.sendMessage("You now have "+c.monkeyk0ed+" Monkey kills!");
  152. } else {
  153. c.sendMessage("Woah man slow down.. you already have 20 monkey kills..");
  154. break;
  155. }
  156. }
  157. }
  158. }
  159.  
  160. public void multiAttackGfx(int i, int gfx) {
  161. if (npcs[i].projectileId < 0)
  162. return;
  163. for (int j = 0; j < Server.playerHandler.players.length; j++) {
  164. if (Server.playerHandler.players[j] != null) {
  165. Client c = (Client)Server.playerHandler.players[j];
  166. if (c.heightLevel != npcs[i].heightLevel)
  167. continue;
  168. if (Server.playerHandler.players[j].goodDistance(c.absX, c.absY, npcs[i].absX, npcs[i].absY, 15)) {
  169. int nX = Server.npcHandler.npcs[i].getX() + offset(i);
  170. int nY = Server.npcHandler.npcs[i].getY() + offset(i);
  171. int pX = c.getX();
  172. int pY = c.getY();
  173. int offX = (nY - pY)* -1;
  174. int offY = (nX - pX)* -1;
  175. c.getPA().createPlayersProjectile(nX, nY, offX, offY, 50, getProjectileSpeed(i), npcs[i].projectileId, 43, 31, -c.getId() - 1, 65);
  176. }
  177. }
  178. }
  179. }
  180.  
  181. public boolean switchesAttackers(int i) {
  182. switch(npcs[i].npcType) {
  183. case 6261:
  184. case 6263:
  185. case 6265:
  186. case 6223:
  187. case 6225:
  188. case 6227:
  189. case 6248:
  190. case 6250:
  191. case 8133:
  192. case 6252:
  193. case 8596:
  194. case 2892:
  195. case 2894:
  196. case 50:
  197. case 6206:
  198. case 6208:
  199. case 6204:
  200. case 9947:
  201. case 3847:
  202. return true;
  203.  
  204. }
  205.  
  206. return false;
  207. }
  208. public boolean ArmadylKC(int i) {
  209. switch(npcs[i].npcType) {
  210. case 6222:
  211. case 6223:
  212. case 6225:
  213. case 6230:
  214. case 6239: // Aviansie
  215. case 6227:
  216. case 6232:
  217. case 6229:
  218. case 6233:
  219. case 6231:
  220. return true;
  221.  
  222. }
  223.  
  224. return false;
  225. }
  226. public boolean BandosKC(int i) {
  227. switch(npcs[i].npcType) {
  228. case 6260:
  229. case 6261:
  230. case 6263:
  231. case 6265:
  232. case 6277:
  233. case 6269:
  234. case 6270:
  235. case 3247:
  236. case 6276:
  237. case 6272:
  238. case 6274:
  239. case 6278:
  240. return true;
  241.  
  242. }
  243.  
  244. return false;
  245. }
  246. public boolean ZammyKC(int i) {
  247. switch(npcs[i].npcType) {
  248. case 6203:
  249. case 3065:
  250. case 6204:
  251. case 6206:
  252. case 6208:
  253. case 10039:
  254. case 5247:
  255. case 6219:
  256. case 1904:
  257. case 1977:
  258. case 6218:
  259. case 3067:
  260. case 6212:
  261. case 205:
  262. case 3248:
  263. case 6220:
  264. case 6221:
  265. case 6272:
  266. case 10903:
  267. case 7160:
  268. case 7159:
  269. case 7158:
  270. case 10093:
  271. case 3665:
  272. case 3062:
  273. return true;
  274.  
  275. }
  276.  
  277. return false;
  278. }
  279. public boolean SaraKC(int i) {
  280. switch(npcs[i].npcType) {
  281. case 6247:
  282. case 6248:
  283. case 6250:
  284. case 6254:
  285. case 6252:
  286. case 6257:
  287. case 6255:
  288. case 6256:
  289. case 6258:
  290. return true;
  291.  
  292. }
  293.  
  294. return false;
  295. }
  296. public int getNpcDeleteTime(int i) {
  297. switch(npcs[i].npcType) {
  298. case 1265:
  299. case 90:
  300. case 1648:
  301. case 1341:
  302. case 1851:
  303. case 1857:
  304. case 1854:
  305. return 2;
  306. case 82:
  307. return 3;
  308. case 103:
  309.  
  310. return 0;
  311. case 117:
  312. return 6;
  313. default:
  314. return 4;
  315. }
  316. }
  317.  
  318. public void multiAttackDamage(int i) {
  319. int max = getMaxHit(i);
  320. for (int j = 0; j < Server.playerHandler.players.length; j++) {
  321. if (Server.playerHandler.players[j] != null) {
  322. Client c = (Client)Server.playerHandler.players[j];
  323. if (c.isDead || c.heightLevel != npcs[i].heightLevel)
  324. continue;
  325. if (Server.playerHandler.players[j].goodDistance(c.absX, c.absY, npcs[i].absX, npcs[i].absY, 15)) {
  326. if (npcs[i].attackType == 2) {
  327. if (!c.prayerActive[16] && !c.curseActive[7]) {
  328. if (Misc.random(500) + 200 > Misc.random(c.getCombat().mageDef())) {
  329. int dam = Misc.random(max);
  330. c.dealDamage(dam);
  331. c.handleHitMask(dam);
  332. } else {
  333. c.dealDamage(0);
  334. c.handleHitMask(0);
  335. }
  336. } else {
  337. c.dealDamage(0);
  338. c.handleHitMask(0);
  339. }
  340. } else if (npcs[i].attackType == 1) {
  341. if (!c.prayerActive[17] && !c.curseActive[8]) {
  342. int dam = Misc.random(max);
  343. if (Misc.random(500) + 200 > Misc.random(c.getCombat().calculateRangeDefence())) {
  344. c.dealDamage(dam);
  345. c.handleHitMask(dam);
  346. } else {
  347. c.dealDamage(0);
  348. c.handleHitMask(0);
  349. }
  350. } else {
  351. c.dealDamage(0);
  352. c.handleHitMask(0);
  353. }
  354. }
  355. if (npcs[i].endGfx > 0) {
  356. c.gfx0(npcs[i].endGfx);
  357. }
  358. }
  359. c.getPA().refreshSkill(3);
  360. }
  361. }
  362. }
  363.  
  364. public int getClosePlayer(int i) {
  365. for (int j = 0; j < Server.playerHandler.players.length; j++) {
  366. if (Server.playerHandler.players[j] != null) {
  367. if (j == npcs[i].spawnedBy)
  368. return j;
  369. if (goodDistance(Server.playerHandler.players[j].absX, Server.playerHandler.players[j].absY, npcs[i].absX, npcs[i].absY, 2 + distanceRequired(i) + followDistance(i)) || isFightCaveNpc(i) || isRFDNpc(i)) {
  370. if ((Server.playerHandler.players[j].underAttackBy <= 0 && Server.playerHandler.players[j].underAttackBy2 <= 0) || Server.playerHandler.players[j].inMulti())
  371. if (Server.playerHandler.players[j].heightLevel == npcs[i].heightLevel)
  372. return j;
  373. }
  374. }
  375. }
  376. return 0;
  377. }
  378.  
  379. public int getCloseRandomPlayer(int i) {
  380. ArrayList<Integer> players = new ArrayList<Integer>();
  381. for (int j = 0; j < Server.playerHandler.players.length; j++) {
  382. if (Server.playerHandler.players[j] != null) {
  383. if (goodDistance(Server.playerHandler.players[j].absX, Server.playerHandler.players[j].absY, npcs[i].absX, npcs[i].absY, 2 + distanceRequired(i) + followDistance(i)) || isFightCaveNpc(i) || isRFDNpc(i)) {
  384. if ((Server.playerHandler.players[j].underAttackBy <= 0 && Server.playerHandler.players[j].underAttackBy2 <= 0) || Server.playerHandler.players[j].inMulti())
  385. if (Server.playerHandler.players[j].heightLevel == npcs[i].heightLevel)
  386. players.add(j);
  387. }
  388. }
  389. }
  390. if (players.size() > 0)
  391. return players.get(Misc.random(players.size() -1));
  392. else
  393. return 0;
  394. }
  395.  
  396. public int npcSize(int i) {
  397. switch (npcs[i].npcType) {
  398. case 2883:
  399. case 2882:
  400. case 2881:
  401. case 3493:
  402. return 3;
  403. case 3494:
  404. return 5;
  405. }
  406. return 0;
  407. }
  408.  
  409. public boolean isAggressive(int i) {
  410. switch (npcs[i].npcType) {
  411. case 6260:
  412. case 6261:
  413. case 6263:
  414. case 6265:
  415. case 6222:
  416. case 6223:
  417. case 6225:
  418. case 6227:
  419. case 6998:
  420. case 6692:
  421. case 6247:
  422. case 6248:
  423. case 6250:
  424. case 6252:
  425. case 1158:
  426. case 1160:
  427. case 1154:
  428. case 1157:
  429. case 6713:
  430. case 1156:
  431. case 795:
  432.  
  433. case 8133:
  434. case 3101:
  435. case 3102:
  436. case 5666:
  437. case 3103:
  438.  
  439. case 2892:
  440. case 2894:
  441. case 2881:
  442. case 50:
  443. case 2882:
  444. case 2883:
  445.  
  446. case 6203:
  447. case 6206:
  448. case 6208:
  449. case 6204:
  450. case 9947:
  451. case 3847:
  452. return true;
  453. }
  454. if (npcs[i].inWild() && npcs[i].MaxHP > 0 && npcs[i].npcType != 941)
  455. return false;
  456. if (isFightCaveNpc(i))
  457. return true;
  458. if (isRFDNpc(i))
  459. return true;
  460. return false;
  461. }
  462.  
  463. public boolean isFightCaveNpc(int i) {
  464. switch (npcs[i].npcType) {
  465. case 2627:
  466. case 2630:
  467. case 2631:
  468. case 2741:
  469. case 2743:
  470. case 2745:
  471. return true;
  472. }
  473. return false;
  474. }
  475.  
  476. public boolean isRFDNpc(int i) {
  477. switch (npcs[i].npcType) {
  478. case 3493:
  479. case 3494:
  480. case 3495:
  481. case 3496:
  482. case 3491:
  483. return true;
  484. }
  485. return false;
  486. }
  487.  
  488. public boolean isRFDNpc2(int i) {
  489. switch (npcs[i].npcType) {
  490. case 3495:
  491. return true;
  492. }
  493. return false;
  494. }
  495.  
  496. /**
  497. * Summon npc, barrows, etc
  498. **/
  499. public void spawnNpc(Client c, int npcType, int x, int y, int heightLevel, int WalkingType, int HP, int maxHit, int attack, int defence, boolean attackPlayer, boolean headIcon) {
  500. int slot = -1;
  501. for (int i = 1; i < maxNPCs; i++) {
  502. if (npcs[i] == null) {
  503. slot = i;
  504. break;
  505. }
  506. }
  507. if(slot == -1) {
  508. return;
  509. }
  510. NPC newNPC = new NPC(slot, npcType);
  511. newNPC.absX = x;
  512. newNPC.absY = y;
  513. newNPC.makeX = x;
  514. newNPC.makeY = y;
  515. newNPC.heightLevel = heightLevel;
  516. newNPC.walkingType = WalkingType;
  517. newNPC.HP = HP;
  518. newNPC.MaxHP = HP;
  519. newNPC.maxHit = maxHit;
  520. newNPC.attack = attack;
  521. newNPC.defence = defence;
  522. newNPC.spawnedBy = c.getId();
  523. if(headIcon)
  524. c.getPA().drawHeadicon(1, slot, 0, 0);
  525. if(attackPlayer) {
  526. newNPC.underAttack = true;
  527. if(c != null) {
  528. if(server.model.minigames.Barrows.COFFIN_AND_BROTHERS[c.randomCoffin][1] != newNPC.npcType) {
  529. if(newNPC.npcType == 2025 || newNPC.npcType == 2026 || newNPC.npcType == 2027 || newNPC.npcType == 2028 || newNPC.npcType == 2029 || newNPC.npcType == 2030) {
  530. newNPC.forceChat("You dare disturb my rest!");
  531. }
  532. }
  533. if (newNPC.npcType >= 4278 && newNPC.npcType <= 4284) {
  534. newNPC.forceAnim(4410);
  535. newNPC.forceChat("I'M ALIVE!");
  536. }
  537. if(server.model.minigames.Barrows.COFFIN_AND_BROTHERS[c.randomCoffin][1] == newNPC.npcType) {
  538. newNPC.forceChat("You dare steal from us!");
  539. }
  540.  
  541. newNPC.killerId = c.playerId;
  542. }
  543. }
  544. npcs[slot] = newNPC;
  545. }
  546.  
  547. public void spawnNpc2(int npcType, int x, int y, int heightLevel, int WalkingType, int HP, int maxHit, int attack, int defence) {
  548. // first, search for a free slot
  549. int slot = -1;
  550. for (int i = 1; i < maxNPCs; i++) {
  551. if (npcs[i] == null) {
  552. slot = i;
  553. break;
  554. }
  555. }
  556. if(slot == -1) {
  557. //Misc.println("No Free Slot");
  558. return; // no free slot found
  559. }
  560. NPC newNPC = new NPC(slot, npcType);
  561. newNPC.absX = x;
  562. newNPC.absY = y;
  563. newNPC.makeX = x;
  564. newNPC.makeY = y;
  565. newNPC.heightLevel = heightLevel;
  566. newNPC.walkingType = WalkingType;
  567. newNPC.HP = HP;
  568. newNPC.MaxHP = HP;
  569. newNPC.maxHit = maxHit;
  570. newNPC.attack = attack;
  571. newNPC.defence = defence;
  572. npcs[slot] = newNPC;
  573. }
  574.  
  575. public static void spawnNewNPC(int npcType, int x, int y, int heightLevel, int WalkingType, int HP, int maxHit, int attack, int defence, boolean needSpawn) {
  576. int slot = -1;
  577. for (int i = 1; i < maxNPCs; i++) {
  578. if (npcs[i] == null) {
  579. slot = i;
  580. break;
  581. }
  582. }
  583. if(slot == -1) {
  584. return;
  585. }
  586. NPC newNPC = new NPC(slot, npcType);
  587. newNPC.absX = x;
  588. newNPC.absY = y;
  589. newNPC.makeX = x;
  590. newNPC.makeY = y;
  591. newNPC.heightLevel = heightLevel;
  592. newNPC.walkingType = WalkingType;
  593. newNPC.HP = HP;
  594. newNPC.MaxHP = HP;
  595. newNPC.maxHit = maxHit;
  596. newNPC.attack = attack;
  597. newNPC.defence = defence;
  598. newNPC.NeedsRespawn = needSpawn;
  599. npcs[slot] = newNPC;
  600. if (newNPC.npcType == 1160) {
  601. newNPC.startAnim(1181);//spawn anim
  602. }
  603. }
  604.  
  605.  
  606.  
  607. /**
  608. * Emotes
  609. **/
  610. public static int getAttackEmote(int i) {
  611. switch(Server.npcHandler.npcs[i].npcType) {
  612.  
  613. case 6795:
  614. return 1010;
  615.  
  616. case 1648:
  617. return 9125;
  618.  
  619. case 1612:
  620. return 9449;
  621.  
  622. case 1643:
  623. return 7183;
  624.  
  625. case 1618:
  626. return 9130;
  627.  
  628. case 1610:
  629. return 9454;
  630.  
  631. case 1613:
  632. return 9487;
  633.  
  634. case 10775:
  635. return 13151;
  636.  
  637. case 2037:
  638. return 5485;
  639.  
  640. case 6797:
  641. return 8104;
  642.  
  643. case 8596:
  644. return 11197;
  645.  
  646. case 6799:
  647. return 8069;
  648.  
  649. case 6801:
  650. return 7853;
  651.  
  652. case 6803:
  653. return 8159;
  654.  
  655. case 8528:
  656. return 12696;
  657.  
  658. case 6805:
  659. return 7786;
  660.  
  661. case 6807:
  662. return 8148;
  663.  
  664. case 6810:
  665. return 7970;
  666.  
  667. case 6812:
  668. return 7935;
  669.  
  670. case 6814:
  671. return 7741;
  672.  
  673. case 6816:
  674. return 8288;
  675.  
  676. case 6819:
  677. return 7667;
  678.  
  679. case 6821:
  680. return 7680;
  681.  
  682.  
  683. case 6823:
  684. return 6376;
  685.  
  686.  
  687. case 6826:
  688. return 5387;
  689.  
  690.  
  691. case 6828:
  692. return 8208;
  693.  
  694.  
  695. case 6830:
  696. return 8292;
  697. case 6832:
  698. return 7795;
  699. case 6834:
  700. return 8248;
  701. case 6836:
  702. return 8275;
  703. case 6838:
  704. return 6254;
  705. case 6856:
  706. return 4921;
  707. case 6858:
  708. return 5327;
  709.  
  710. case 6860:
  711. case 6862:
  712. case 6864:
  713. return 7656;
  714.  
  715. case 6868:
  716. return 7896;
  717.  
  718. case 6870:
  719. return 8303;
  720.  
  721.  
  722. case 6872:
  723. return 7769;
  724.  
  725. case 6874:
  726. return 5782;
  727.  
  728. case 6890:
  729. return 7260;
  730.  
  731. case 7330:
  732. return 8223;
  733.  
  734. case 7332:
  735. return 8032;
  736.  
  737. case 7338:
  738. return 5228;
  739.  
  740. case 7352:
  741. return 8234;
  742.  
  743. case 7354:
  744. return 7755;
  745.  
  746. case 7355:
  747. return 7834;
  748.  
  749. case 7358:
  750. return 7844;
  751.  
  752. case 7359:
  753. return 8183;
  754.  
  755. case 7362:
  756. return 8257;
  757.  
  758. case 7364:
  759. case 7366:
  760. return 5228;
  761.  
  762. case 7368:
  763. case 7369:
  764.  
  765. return 8130;
  766.  
  767. case 7371:
  768. return 8093;
  769.  
  770. case 7374:
  771. return 7994;
  772.  
  773. case 7376:
  774. return 7946;
  775.  
  776.  
  777. case 6260:
  778. if (npcs[i].attackType == 0)
  779. return 7060;
  780. else
  781. return 7063;
  782. ///Kq
  783. case 1158:
  784. case 3835:
  785. if (npcs[i].attackType == 0)
  786. return 6241;
  787. else
  788. return 6240;
  789. case 1160:
  790. case 3836:
  791. if (npcs[i].attackType == 0)
  792. return 6235;
  793. else
  794. return 6234;
  795.  
  796. case 2892:
  797.  
  798. case 2894:
  799.  
  800. case 9947:
  801. case 3847:
  802. return 2868;
  803. case 2627:
  804. return 2621;
  805. case 2630:
  806. return 2625;
  807. case 2631:
  808. return 2633;
  809. case 2741:
  810. return 2637;
  811. case 2746:
  812. return 2637;
  813. case 2607:
  814. return 2611;
  815. case 2743://360
  816. return 2647;
  817.  
  818. //bandos gwd
  819. case 6261:
  820. case 6263:
  821. case 6265:
  822. return 6154;
  823. case 6267:
  824. return 361;
  825. case 6268:
  826. return 2930;
  827. case 6269:
  828. case 6270:
  829. return 4652;
  830. case 6271:
  831. case 6272:
  832. case 6273:
  833. case 6274:
  834. return 4320;
  835. case 6275:
  836. return 164;
  837. case 6276:
  838. case 6277:
  839. case 6278:
  840. return 4320;
  841. case 6279:
  842. case 6280:
  843. return 6184;
  844. case 6281:
  845. return 6134;
  846. case 6282:
  847. return 6188;
  848. case 6283:
  849. return 6184;
  850.  
  851. //end of gwd
  852. //zammy gwd
  853. case 6203:
  854. return 6945;
  855. case 6204:
  856. case 6206:
  857. case 6208:
  858. return 64;
  859. case 6210:
  860. return 6581;
  861. case 6211:
  862. return 169;
  863. case 6212:
  864. case 6213:
  865. return 6536;
  866. case 6215:
  867. return 1552;
  868. case 6216:
  869. case 6217:
  870. return 1582;
  871. case 6218:
  872. return 4300;
  873. //end of zammy gwd
  874. //arma gwd
  875. case 6222:
  876. return 6973;
  877. case 6225:
  878. return 6953;
  879. case 6223:
  880. return 6954;
  881. case 6227:
  882. return 6953;
  883. //spiritual mages
  884. case 6229:
  885. case 6230:
  886. case 6231:
  887. return 6954;
  888. //aviansies
  889. case 6232:
  890. case 6233:
  891. case 6234:
  892. case 6235:
  893. case 6236:
  894. case 6237:
  895. case 6238:
  896. case 6239:
  897. case 6240:
  898. case 6241:
  899. case 6242:
  900. case 6243:
  901. case 6244:
  902. case 6245:
  903. case 6246:
  904. return 6953;
  905. //end of arma gwd
  906.  
  907. //sara gwd
  908. case 6247:
  909. if (npcs[i].attackType == 2)
  910. return 6967;
  911. else
  912. return 6964;
  913.  
  914.  
  915. case 10057:
  916. if (npcs[i].attackType == 1)
  917. return 10817;
  918. else
  919. return 10816;
  920.  
  921.  
  922. case 6248:
  923. return 6376;
  924. case 6250:
  925. return 7018;
  926. case 6252:
  927. return 7009;
  928. //end of sara gwd
  929.  
  930. case 13: //wizards
  931. return 711;
  932.  
  933. case 103:
  934. return 123;
  935.  
  936. case 1624:
  937. return 1557;
  938.  
  939. case 90: //skele
  940. return 260;
  941.  
  942. case 50://drags
  943. case 53:
  944.  
  945. case 54:
  946. case 55:
  947. case 941:
  948. case 1590:
  949. case 1591:
  950. case 1592:
  951. return 80;
  952.  
  953. case 124: //earth warrior
  954. return 390;
  955.  
  956. case 803: //monk
  957. return 422;
  958.  
  959. case 52: //baby drag
  960. return 25;
  961.  
  962. case 58: //Shadow Spider
  963. case 59: //Giant Spider
  964. case 60: //Giant Spider
  965. case 61: //Spider
  966. case 62: //Jungle Spider
  967. case 63: //Deadly Red Spider
  968. case 64: //Ice Spider
  969. case 134:
  970. return 143;
  971.  
  972. case 105: //Bear
  973. case 106: //Bear
  974. return 41;
  975.  
  976. case 412:
  977. case 78:
  978. return 30;
  979.  
  980. case 2033: //rat
  981. return 138;
  982.  
  983. case 2031: // bloodworm
  984. return 2070;
  985.  
  986. case 101: // goblin
  987. return 309;
  988.  
  989. case 81: // cow
  990. return 0x03B;
  991.  
  992. case 21: // hero
  993. return 451;
  994.  
  995. case 41: // chicken
  996. return 55;
  997.  
  998. case 9: // guard
  999. case 32: // guard
  1000. case 20: // paladin
  1001. return 451;
  1002.  
  1003. case 1338: // dagannoth
  1004. case 1340:
  1005. case 1342:
  1006. return 1341;
  1007.  
  1008. case 19: // white knight
  1009. return 406;
  1010.  
  1011. case 110:
  1012. case 111: // ice giant
  1013. case 112:
  1014. case 117:
  1015. return 128;
  1016.  
  1017. case 2452:
  1018. return 1312;
  1019.  
  1020. case 2889:
  1021. return 2859;
  1022.  
  1023. case 118:
  1024. case 119:
  1025. return 99;
  1026.  
  1027. case 82://Lesser Demon
  1028. case 83://Greater Demon
  1029. case 84://Black Demon
  1030. case 1472://jungle demon
  1031. case 10039:
  1032. return 64;
  1033.  
  1034. case 1267:
  1035. case 1265:
  1036. return 1312;
  1037.  
  1038. case 125: // ice warrior
  1039. case 178:
  1040. return 451;
  1041.  
  1042. case 1153: //Kalphite Worker
  1043. case 1154: //Kalphite Soldier
  1044. case 1155: //Kalphite guardian
  1045. case 1156: //Kalphite worker
  1046. case 1157: //Kalphite guardian
  1047. return 1184;
  1048.  
  1049. case 123:
  1050. case 122:
  1051. return 164;
  1052.  
  1053.  
  1054.  
  1055.  
  1056. case 7334:
  1057. return 8172;
  1058. case 7336:
  1059. return 7871;
  1060. case 5228:
  1061. return 5228;
  1062.  
  1063. case 7340:
  1064. return 7879;
  1065.  
  1066. case 7342:
  1067. return 7879;
  1068.  
  1069. case 7344:
  1070. return 8183;
  1071.  
  1072. case 7346:
  1073. return 8048;
  1074.  
  1075. case 7348:
  1076. return 5989;
  1077.  
  1078.  
  1079. case 7350:
  1080. return 7693;
  1081.  
  1082.  
  1083. case 2028: // karil
  1084. return 2075;
  1085.  
  1086. case 2025: // ahrim
  1087. return 729;
  1088.  
  1089. case 2026: // dharok
  1090. return 2067;
  1091.  
  1092. case 2027: // guthan
  1093. return 2080;
  1094.  
  1095. case 2029: // torag
  1096. return 0x814;
  1097.  
  1098. case 2030: // verac
  1099. return 2062;
  1100.  
  1101. case 2881: //supreme
  1102. return 2855;
  1103.  
  1104. case 2882: //prime
  1105. return 2854;
  1106.  
  1107. case 2883: //rex
  1108. return 2851;
  1109.  
  1110. case 3340: // giant mole test
  1111. return 3312;
  1112.  
  1113. case 3200:
  1114. return 3146;
  1115.  
  1116.  
  1117. case 8349://tormented demon
  1118. if (npcs[i].attackType == 2)
  1119. return 10917;
  1120. else if (npcs[i].attackType == 1)
  1121. return 10918;
  1122. else if (npcs[i].attackType == 0)
  1123. return 10922;
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129. case 8133://corp beast
  1130. if (npcs[i].attackType == 2)
  1131. return 10053;
  1132. else if (npcs[i].attackType == 1)
  1133. return 10059;
  1134. else if (npcs[i].attackType == 0)
  1135. return 10057;
  1136. case 10127:
  1137. if (npcs[i].attackType == 2)
  1138. return 13176;
  1139. else if (npcs[i].attackType == 0)
  1140. return 13169;
  1141.  
  1142.  
  1143. case 10141://corp beast
  1144. if (npcs[i].attackType == 2)
  1145. return 10053;
  1146. else if (npcs[i].attackType == 0)
  1147. return 13599;
  1148. else if (npcs[i].attackType == 1)
  1149. return 13603;
  1150.  
  1151.  
  1152. case 2745:
  1153. if (npcs[i].attackType == 2)
  1154. return 9300;
  1155. else if (npcs[i].attackType == 1)
  1156. return 9276;
  1157. else if (npcs[i].attackType == 0)
  1158. return 9277;
  1159. case 655:
  1160. return 129;
  1161.  
  1162. default:
  1163. return 0x326;
  1164. }
  1165. }
  1166.  
  1167.  
  1168. public int getDeadEmote(int i) {
  1169. switch(npcs[i].npcType) {
  1170. case 8133: // corp beast
  1171. return 10059;
  1172. case 10141:
  1173. return 13602;
  1174. case 10127:
  1175. return 13171;
  1176. case 8596:
  1177. return 11199;
  1178. case 10057:
  1179. return 10815;
  1180.  
  1181. case 1648:
  1182. return 9125;
  1183. case 1612:
  1184. return 9449;
  1185. case 1643:
  1186. return 7183;
  1187. case 1618:
  1188. return 9130;
  1189. case 1610:
  1190. return 9454;
  1191. case 1613:
  1192. return 9487;
  1193. case 8349: // torm demon
  1194. return 10924;
  1195. //sara gwd
  1196. case 6247:
  1197. return 6965;
  1198. case 10775:
  1199. return 13153;
  1200. case 9947:
  1201. return 13772;
  1202. case 8528:
  1203. return 12694;
  1204. case 6248:
  1205. return 6377;
  1206. case 6250:
  1207. return 7016;
  1208. case 6252:
  1209. return 7011;
  1210. //bandos gwd
  1211. case 6261:
  1212. case 6263:
  1213. case 6265:
  1214. return 6156;
  1215. case 6260:
  1216. return 7062;
  1217. case 2892:
  1218. case 2894:
  1219. return 2865;
  1220. case 6203: //zammy gwd
  1221. return 6946;
  1222. case 6204:
  1223. case 6206:
  1224. case 6208:
  1225. return 67;
  1226. case 6222:
  1227. return 6975;
  1228. case 6223:
  1229. case 6225:
  1230. case 6227:
  1231. return 6956;
  1232. case 2607:
  1233. return 2607;
  1234. case 2627:
  1235. return 2620;
  1236. case 2630:
  1237. return 2627;
  1238. case 2631:
  1239. return 2630;
  1240. case 2738:
  1241. return 2627;
  1242. case 2741:
  1243. return 2638;
  1244. case 2746:
  1245. return 2638;
  1246. case 2743:
  1247. return 2646;
  1248. case 2745:
  1249. return 2654;
  1250.  
  1251.  
  1252. case 3200:
  1253. return 3147;
  1254.  
  1255. case 3847:
  1256. return 3993;
  1257.  
  1258. case 2035: //spider
  1259. return 146;
  1260.  
  1261. case 2033: //rat
  1262. return 141;
  1263.  
  1264. case 2031: // bloodvel
  1265. return 2073;
Add Comment
Please, Sign In to add comment