Advertisement
Guest User

Untitled

a guest
May 23rd, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.99 KB | None | 0 0
  1. package com.rs.game.player.dialogues;
  2.  
  3. import com.rs.game.player.Skills;
  4. import com.rs.game.player.content.SlayerTask;
  5. import com.rs.game.player.content.SlayerTask.Master;
  6. import com.rs.utils.ShopsHandler;
  7. import com.rs.utils.Utils;
  8.  
  9. public class Kuradal extends Dialogue {
  10.  
  11. /**
  12. * Full dialogue for Kuradal
  13. * @author Unlucky4ever/Jacob <obruza@gmail.com>
  14. */
  15.  
  16. int npcId;
  17.  
  18. @Override
  19. public void start() {
  20. sendNPCDialogue(9085, 9827, "Hello, and what do you ask of me?");
  21. }
  22.  
  23. @Override
  24. public void run(int interfaceId, int componentId) {
  25. switch (stage) {
  26. case -1:
  27. sendOptionsDialogue("Select an Option", "I need another assignment.", "Can we talk about items and incentives?", "Tell me about your skillcape, please.", "Let's talk about you.", "Er...nothing...");
  28. stage = 0;
  29. break;
  30. case 0:
  31. switch (componentId) {
  32. case OPTION_1:
  33. sendPlayerDialogue(9827, "I need another assignment.");
  34. stage = 1;
  35. break;
  36. case OPTION_2:
  37. sendPlayerDialogue(9827, "Can we talk about items and incentives?");
  38. stage = 5;
  39. break;
  40. case OPTION_3:
  41. sendPlayerDialogue(9827, "Tell me about your skillcape, please.");
  42. stage = 17;
  43. break;
  44. case OPTION_4:
  45. sendPlayerDialogue(9827, "Let's talk about you.");
  46. stage = 18;
  47. break;
  48. case OPTION_5:
  49. sendPlayerDialogue(9827, "Er...nothing...");
  50. stage = 100;
  51. break;
  52. }
  53. break;
  54. case 1:
  55. if (player.getTask() == null) {
  56. SlayerTask.random(player, Master.KURADAL);
  57. sendNPCDialogue(9085, 9827, "Excellent, you're doing great. Your new task is to kill " + player.getTask().getTaskAmount() + " " + player.getTask().getName().toLowerCase() + "s.");
  58. stage = 2;
  59. } else {
  60. sendNPCDialogue(9085, 9827, "You're still hunting " + player.getTask().getName().toLowerCase() + "s; come back when you've finished your task.");
  61. stage = 100;
  62. }
  63. break;
  64. case 2:
  65. sendOptionsDialogue("Select an Option", "Got any tips for me?", "Okay, great!");
  66. stage = 3;
  67. break;
  68. case 3:
  69. switch (componentId) {
  70. case OPTION_1:
  71. sendPlayerDialogue(9827, "Got any tips for me?");
  72. stage = 4;
  73. break;
  74. case OPTION_2:
  75. sendPlayerDialogue(9827, "Okay, great!");
  76. stage = 100;
  77. break;
  78. }
  79. break;
  80. case 4:
  81. sendNPCDialogue(9085, 9827, "Not at this time, sorry.");
  82. stage = 100;
  83. break;
  84. case 5:
  85. sendNPCDialogue(9085, 9827, "Of course, what would you like to discuss: items for sale or incentives?");
  86. stage = 6;
  87. break;
  88. case 6:
  89. sendOptionsDialogue("Select an Option", "Let's talk items.", "Let's talk incentives.");
  90. stage = 7;
  91. break;
  92. case 7:
  93. switch (componentId) {
  94. case OPTION_1:
  95. sendPlayerDialogue(9827, "Let's talk items.");
  96. stage = 8;
  97. break;
  98. case OPTION_2:
  99. sendOptionsDialogue("Select an Option", "View rewards", "How do I earn co-op points to spend on rewards?", "Where can I use the co-op food and potion rewards?");
  100. stage = 10;
  101. break;
  102. }
  103. break;
  104. case 8:
  105. sendNPCDialogue(9085, 9827, "I have a wide selection of Slayer equipment - take a look!");
  106. stage = 9;
  107. break;
  108. case 9:
  109. ShopsHandler.openShop(player, 13);
  110. end();
  111. break;
  112. case 10:
  113. switch (componentId) {
  114. case OPTION_1:
  115. player.getInterfaceManager().sendInterface(164);
  116. player.getPackets().sendIComponentText(164, 20, "" + player.getSlayerPoints() + "");
  117.  
  118. // Points
  119. player.getPackets().sendIComponentText(164, 32, "50 points"); // Slayer XP (1M)
  120. player.getPackets().sendIComponentText(164, 33, "10 points"); // Ring of slaying
  121. player.getPackets().sendIComponentText(164, 36, "18 points"); // Slayer dart runes
  122. player.getPackets().sendIComponentText(164, 34, "18 points"); // Broad bolts
  123. player.getPackets().sendIComponentText(164, 35, "18 points"); // Broad arrows
  124. end();
  125. break;
  126. case OPTION_2:
  127. sendNPCDialogue(9085, 9827, "You'll gain co-op reward points if you complete at least half of your contribution to a task with a friend.");
  128. stage = 11;
  129. break;
  130. case OPTION_3:
  131. sendNPCDialogue(9085, 9827, "The rewards can be used in most of the areas we commonly send you to complete your tasks.");
  132. stage = 15;
  133. break;
  134. }
  135. break;
  136. case 11:
  137. sendNPCDialogue(9085, 9827, "That means you need to be in a group for most of the time you're working on your task, but it doesn't matter if your friend beats you to the majority of kill!");
  138. stage = 12;
  139. break;
  140. case 12:
  141. sendNPCDialogue(9085, 9827, "You'll still have been in a group for most of your contribution, so you're still entitled to a co-op reward point.");
  142. stage = 13;
  143. break;
  144. case 13:
  145. sendOptionsDialogue("Select an Options", "View rewards", "Where can I use the co-op food and potion rewards?", "That's all, thanks.");
  146. stage = 14;
  147. break;
  148. case 14:
  149. switch (componentId) {
  150. case OPTION_1:
  151. player.getInterfaceManager().sendInterface(164);
  152. player.getPackets().sendIComponentText(164, 20, "" + player.getSlayerPoints() + "");
  153.  
  154. // Points
  155. player.getPackets().sendIComponentText(164, 32, "50 points"); // Slayer XP (1M)
  156. player.getPackets().sendIComponentText(164, 33, "10 points"); // Ring of slaying
  157. player.getPackets().sendIComponentText(164, 36, "18 points"); // Slayer dart runes
  158. player.getPackets().sendIComponentText(164, 34, "18 points"); // Broad bolts
  159. player.getPackets().sendIComponentText(164, 35, "18 points"); // Broad arrows
  160. end();
  161. break;
  162. case OPTION_2:
  163. sendNPCDialogue(9085, 9827, "The rewards can be used in most of the areas we commonly send you to complete your tasks.");
  164. stage = 15;
  165. break;
  166. case OPTION_3:
  167. sendPlayerDialogue(9827, "That's all, thanks.");
  168. stage = 100;
  169. break;
  170. }
  171. break;
  172. case 15:
  173. sendOptionsDialogue("Select an Option", "View rewards", "How do I earn co-op points to spend on rewards?", "That's all, thanks");
  174. stage = 16;
  175. break;
  176. case 16:
  177. switch (componentId) {
  178. case OPTION_1:
  179. player.getInterfaceManager().sendInterface(164);
  180. player.getPackets().sendIComponentText(164, 20, "" + player.getSlayerPoints() + "");
  181.  
  182. // Points
  183. player.getPackets().sendIComponentText(164, 32, "50 points"); // Slayer XP (1M)
  184. player.getPackets().sendIComponentText(164, 33, "10 points"); // Ring of slaying
  185. player.getPackets().sendIComponentText(164, 36, "18 points"); // Slayer dart runes
  186. player.getPackets().sendIComponentText(164, 34, "18 points"); // Broad bolts
  187. player.getPackets().sendIComponentText(164, 35, "18 points"); // Broad arrows
  188. end();
  189. break;
  190. case OPTION_2:
  191. sendNPCDialogue(9085, 9827, "You'll gain co-op reward points if you complete at least half of your contribution to a task with a friend.");
  192. stage = 11;
  193. break;
  194. case OPTION_3:
  195. sendPlayerDialogue(9827, "That's all, thanks.");
  196. stage = 100;
  197. break;
  198. }
  199. break;
  200. case 17:
  201. if (player.getSkills().getLevelForXp(Skills.SLAYER) >= 99) {
  202. sendNPCDialogue(9085, 9827, "Well you have performed well as a student. I guess you have earned the right to wear a prestigious cape now. That will be 99000 coins, please.");
  203. stage = 77;
  204. } else {
  205. sendNPCDialogue(9085, 9827, "This is a Slayer's Skillcape. Only a true Slayer master is permitted to wear one. You need more training before you earn that honour.");
  206. stage = 100;
  207. }
  208. break;
  209. case 18:
  210. sendNPCDialogue(9085, 9827, "I'm Kuradal, daughter of Duradel. What more would you like to know?");
  211. stage = 19;
  212. break;
  213. case 19:
  214. sendOptionsDialogue("Select an Option", "Tell me more about your background.", "About your father...", "So what's in this dungeon then?");
  215. stage = 20;
  216. break;
  217. case 20:
  218. switch (componentId) {
  219. case OPTION_1:
  220. sendPlayerDialogue(9827, "Tell me more about your background.");
  221. stage = 21;
  222. break;
  223. case OPTION_2:
  224. sendPlayerDialogue(9827, "About your father...");
  225. stage = 31;
  226. break;
  227. case OPTION_3:
  228. sendPlayerDialogue(9827, "So what's in this dungeon then?");
  229. stage = 57;
  230. break;
  231. }
  232. break;
  233. case 21:
  234. sendNPCDialogue(9085, 9827, "If you so desire. As I said, I am Kuradal, daughter of Duradel - another great master of Slayer.");
  235. stage = 22;
  236. break;
  237. case 22:
  238. sendNPCDialogue(9085, 9827, "Unlike the others, though, I ventured out not only to slay, but also to capture.");
  239. stage = 23;
  240. break;
  241. case 23:
  242. sendNPCDialogue(9085, 9827, "I've caught many different types of creatures and I hold them within this dungeon, reserved exclusively for my pupils to slay.");
  243. stage = 24;
  244. break;
  245. case 24:
  246. sendPlayerDialogue(9827, "So slaying runs in the family, then?");
  247. stage = 25;
  248. break;
  249. case 25:
  250. sendNPCDialogue(9085, 9827, "Of course. One cannot simply 'grow up' with someone like my father. My childhood was all combat training, taking on the beasts of this land side by side with my father.");
  251. stage = 26;
  252. break;
  253. case 26:
  254. sendOptionsDialogue("Select an Option", "So who is your mother?", "Sounds like you had a hectic childhood!");
  255. stage = 27;
  256. break;
  257. case 27:
  258. switch (componentId) {
  259. case OPTION_1:
  260. sendPlayerDialogue(9827, "So who is your mother?");
  261. stage = 28;
  262. break;
  263. case OPTION_2:
  264. sendPlayerDialogue(9827, "Sounds like you had a hectic childhood!");
  265. stage = 56;
  266. break;
  267. }
  268. break;
  269. case 28:
  270. sendNPCDialogue(9085, 9827, "I'd rather not say. Can we talk about something else?");
  271. stage = 29;
  272. break;
  273. case 29:
  274. sendOptionsDialogue("Select an Option", "About your father...", "That's all for now.");
  275. stage = 30;
  276. break;
  277. case 30:
  278. switch (componentId) {
  279. case OPTION_1:
  280. sendPlayerDialogue(9827, "About your father...");
  281. stage = 31;
  282. break;
  283. case OPTION_2:
  284. sendPlayerDialogue(9827, "That's all for now.");
  285. stage = 55;
  286. break;
  287. }
  288. break;
  289. case 31:
  290. sendPlayerDialogue(9827, "Lucien is dead!");
  291. stage = 32;
  292. break;
  293. case 32:
  294. sendNPCDialogue(9085, 9827, "I know. I saw his corpse up at the ritual site.");
  295. stage = 33;
  296. break;
  297. case 33:
  298. sendPlayerDialogue(9827, "What? You were there? I didn't see you.");
  299. stage = 34;
  300. break;
  301. case 34:
  302. sendNPCDialogue(9085, 9827, "Nor I you, but I was there, fighting off Mahjarrat and their minions. None of them were Lucien, though.");
  303. stage = 35;
  304. break;
  305. case 35:
  306. sendNPCDialogue(9085, 9827, "I chased one of them into a cave, full of ice elementals called glacors. After killing a couple hundred of those, I managed to escape, but by then it was all over: everyone had gone.");
  307. stage = 36;
  308. break;
  309. case 36:
  310. sendPlayerDialogue(9827, "You sound angry. I'd have thought you'd be glad he's dead!");
  311. stage = 37;
  312. break;
  313. case 37:
  314. sendNPCDialogue(9085, 9827, "I am, but Lucien was my kill! Mine alone! No one had the right to take that from me! No one!");
  315. stage = 38;
  316. break;
  317. case 38:
  318. sendNPCDialogue(9085, 9827, "...");
  319. stage = 39;
  320. break;
  321. case 39:
  322. sendNPCDialogue(9085, 9827, "How will I honour my father's memory?");
  323. stage = 40;
  324. break;
  325. case 40:
  326. sendOptionsDialogue("Select an Option", "You honour him every day.", "By helping to defeat what killed Lucien!");
  327. stage = 41;
  328. break;
  329. case 41:
  330. switch (componentId) {
  331. case OPTION_1:
  332. sendPlayerDialogue(9827, "You honour him every day.");
  333. stage = 42;
  334. break;
  335. case OPTION_2:
  336. sendPlayerDialogue(9827, "By helping to defeat what killed Lucien!");
  337. stage = 50;
  338. break;
  339. }
  340. break;
  341. case 42:
  342. sendNPCDialogue(9085, 9827, "Bah! Any more of that touchy-feely nonsense and I'll be forced to revoke your Slayer license...");
  343. stage = 43;
  344. break;
  345. case 43:
  346. sendPlayerDialogue(9827, "But, yo-");
  347. stage = 44;
  348. break;
  349. case 44:
  350. sendNPCDialogue(9085, 9827, "Hahaha! The look on your face! That cheered me up some. Thanks, " + Utils.formatPlayerNameForDisplay(player.getDisplayName()) + ".");
  351. stage = 45;
  352. break;
  353. case 45:
  354. sendNPCDialogue(9085, 9827, "'You honour him every day.'");
  355. stage = 46;
  356. break;
  357. case 46:
  358. sendPlayerDialogue(9827, "I'm, er, glad I could help.");
  359. stage = 47;
  360. break;
  361. case 47:
  362. sendNPCDialogue(9085, 9827, "Now, can I help you with anything else?");
  363. stage = 48;
  364. break;
  365. case 48:
  366. sendOptionsDialogue("Select an Option", "I need another assignment.", "Can we talk about items and incentives?", "Tell me about your skillcape, please.", "Er...nothing...");
  367. stage = 49;
  368. break;
  369. case 49:
  370. switch (componentId) {
  371. case OPTION_1:
  372. sendPlayerDialogue(9827, "I need another assignment.");
  373. stage = 1;
  374. break;
  375. case OPTION_2:
  376. sendPlayerDialogue(9827, "Can we talk about items and incentives?");
  377. stage = 5;
  378. break;
  379. case OPTION_3:
  380. sendPlayerDialogue(9827, "Tell me about your skillcape, please.");
  381. stage = 17;
  382. break;
  383. case OPTION_4:
  384. sendPlayerDialogue(9827, "Er...nothing...");
  385. stage = 100;
  386. break;
  387. }
  388. break;
  389. case 50:
  390. sendNPCDialogue(9085, 9827, "Which was what, exactly?");
  391. stage = 51;
  392. break;
  393. case 51:
  394. sendPlayerDialogue(9827, "A dragonkin. Three of them, in fact.");
  395. stage = 52;
  396. break;
  397. case 52:
  398. sendNPCDialogue(9085, 9827, "Hmm, now that sounds like a challenge worth of a slayer master.");
  399. stage = 53;
  400. break;
  401. case 53:
  402. sendNPCDialogue(9085, 9827, "I've got some preparations to make. Collecting those for a dungeon could be tricky...");
  403. stage = 54;
  404. break;
  405. case 54:
  406. sendPlayerDialogue(9827, "Cellecting them? You're crazy!");
  407. stage = 47;
  408. break;
  409. case 55:
  410. sendNPCDialogue(9085, 9827, "Fine. I'll be here if you need me.");
  411. stage = 100;
  412. break;
  413. case 56:
  414. sendNPCDialogue(9085, 9827, "You could say that, but I am thankful for it as it made me the person I am today.");
  415. stage = 29;
  416. break;
  417. case 57:
  418. sendNPCDialogue(9085, 9827, "Well, I've been all over and managed to capture hellhounds, greater demons, gargoyles, abyssal demons, dark beasts, blue, iron and steel dragons.");
  419. stage = 58;
  420. break;
  421. case 58:
  422. sendPlayerDialogue(9827, "You caught them single-handedly?");
  423. stage = 59;
  424. break;
  425. case 59:
  426. sendNPCDialogue(9085, 9827, "You doubt my skills?");
  427. stage = 60;
  428. break;
  429. case 60:
  430. sendOptionsDialogue("Select an Option", "I didn't mean anything by it.", "Well, come on. You are just a girl and I'm a tough warrior!");
  431. stage = 61;
  432. break;
  433. case 61:
  434. switch (componentId) {
  435. case OPTION_1:
  436. sendPlayerDialogue(9827, "I didn't mean anything by it.");
  437. stage = 62;
  438. break;
  439. case OPTION_2:
  440. sendPlayerDialogue(9827, "Well, come on. You are just a girl and I'm a tough warrior!");
  441. stage = 75;
  442. break;
  443. }
  444. break;
  445. case 62:
  446. sendNPCDialogue(9085, 9827, "I'm glad to hear so.");
  447. stage = 63;
  448. break;
  449. case 63:
  450. sendPlayerDialogue(9827, "So is there anything else that's special about this dungeon?");
  451. stage = 64;
  452. break;
  453. case 64:
  454. sendNPCDialogue(9085, 9827, "I'm glad you asked. You might find creatures inside the dungeon drop something called a ferocious ring - they must have foraged them from remains in the area.");
  455. stage = 65;
  456. break;
  457. case 65:
  458. sendPlayerDialogue(9827, "Well, that's great and all, buy what exactly does it do?");
  459. stage = 66;
  460. break;
  461. case 66:
  462. sendNPCDialogue(9085, 9827, "Well, for one this, they are bound to these caves, so you'll find it has teleport charges that will return you to this place if you command it.");
  463. stage = 67;
  464. break;
  465. case 67:
  466. sendPlayerDialogue(9827, "Sounds good, but is that it?");
  467. stage = 68;
  468. break;
  469. case 68:
  470. sendNPCDialogue(9085, 9827, "Oh, no. As I said, it is bound to this area, so you'll find that you do more damage to creatures in the dungeon if you are wearing it. Also, if you happen to be near death in the dungeon, it'll save you in a similar manner to a ring of life,");
  471. stage = 69;
  472. break;
  473. case 69:
  474. sendNPCDialogue(9085, 9827, "teleporting you back to the safety of my presence.");
  475. stage = 70;
  476. break;
  477. case 70:
  478. sendPlayerDialogue(9827, "Even if I'm using ranged or magical combat? And what if I'm not in the dungeon when I die wearing it?");
  479. stage = 71;
  480. break;
  481. case 71:
  482. sendNPCDialogue(9085, 9827, "Calm down, one question at a time. First, it is a powerful artefact and will affect all combat styles.");
  483. stage = 72;
  484. break;
  485. case 72:
  486. sendNPCDialogue(9085, 9827, "Second, I would be careful about dying outside wearing it. I do not believe it will work anywhere but inside the dungeon here.");
  487. stage = 73;
  488. break;
  489. case 73:
  490. sendPlayerDialogue(9827, "Thanks for your help, Kuradal.");
  491. stage = 74;
  492. break;
  493. case 74:
  494. sendNPCDialogue(9085, 9827, "No problem. Anything else?");
  495. stage = -1;
  496. break;
  497. case 75:
  498. sendNPCDialogue(9085, 9827, "Just a girl, am I? Right!");
  499. stage = 76;
  500. break;
  501. case 76:
  502. // TODO: Knock player out and teleport somewhere randomly.
  503. end();
  504. break;
  505. case 77:
  506. sendOptionsDialogue("Select an Option", "I've changed my mind, I don't want it.", "Great; I've always wanted one!");
  507. stage = 78;
  508. break;
  509. case 78:
  510. switch (componentId) {
  511. case OPTION_1:
  512. sendPlayerDialogue(9827, "I've changed my mind, I don't want it.");
  513. stage = 100;
  514. break;
  515. case OPTION_2:
  516. if (player.getInventory().containsItem(995, 99000)) {
  517. sendPlayerDialogue(9827, "Great; I've always wanted one!");
  518. stage = 79;
  519. } else {
  520. sendPlayerDialogue(9827, "I don't have 99000 coins.");
  521. stage = 100;
  522. }
  523. break;
  524. }
  525. break;
  526. case 79:
  527. player.getInventory().deleteItem(995, 99000);
  528. player.getInventory().addItem(9787, 1);
  529. player.getInventory().addItem(9788, 1);
  530. sendNPCDialogue(9085, 9827, "Great hunting, " + Utils.formatPlayerNameForDisplay(player.getDisplayName()) + ".");
  531. stage = 100;
  532. break;
  533. case 100:
  534. end();
  535. break;
  536. }
  537. }
  538.  
  539. @Override
  540. public void finish() {
  541. // TODO Auto-generated method stub
  542.  
  543. }
  544.  
  545. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement