Advertisement
Guest User

Rune2006 Community

a guest
Jun 21st, 2013
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 15.92 KB | None | 0 0
  1. /**For Rune2006 Community and Plural
  2. *Date Started: June 18 2013
  3. *Date Unfinished: June 21 2013
  4. *@author: Driman + Plural
  5. *@resources used: Runescape wikia, youtube video: knight sword dialogue, itemdb.biz, rspscodes.synthasite.com
  6. *All you need is to set the npc dialogues the right way.
  7. *Need any help pm me!
  8. */
  9.  
  10.  
  11.  
  12.  
  13. ___________________________________________________________________________________
  14.  
  15.  
  16. //Add in Player.java
  17. private int knightSword = 0;//KnightSword
  18.  
  19. public int getKnightSword() {
  20.         return knightSword;
  21.     }
  22.  
  23.     public void setknightSword(int knightSword) {
  24.         this.knightSword = knightSword;
  25.     }
  26.  
  27.  
  28. //Add in Playersave.java, below quest point
  29. write.writeInt(player.getknightSword());//knightsword
  30.  
  31. //below quest point
  32. player.setknightSword(load.readInt());
  33.  
  34.  
  35.  
  36. //Dialogues.java
  37. /**Add in the missing npcs, and missing npcs id, also add in *hard to explain*
  38. */
  39. /**For Plural and Rune2006 :)
  40.             *@author Driman + Plural
  41.             *Date Started: June 18 2013
  42.             *Date Finished: June 21 2013
  43.             *Not finished
  44.             *purpose: You guys wanted a quest, and wanted to see my (Driman) code work.
  45.             */
  46.             case ###: //Squire
  47.                 switch(player.getDialogue().getChatId()) {
  48.             case 1 :
  49.                         player.getDialogue().sendNpcChat("Hello. I am the squire to Sir Vyvin.", HAPPY);
  50.                         return true;
  51.             case 2:
  52.                         player.getDialogue().sendOption("And how is life as a squire?", "Wouldn't you prefer to be a squire for me?");
  53.                         return true;
  54.             case 3 :
  55.                         switch(optionId) {
  56.                             case 1 :
  57.                                 player.getDialogue().sendPlayerChat("And how is life as a squire?", CONTENT);
  58.                                 return true;
  59.                             case 2 :
  60.                                 player.getDialogue().sendPlayerChat("Wouldn't you prefer to be a squire for me?", CONTENT);
  61.                                 return true;
  62.                         }
  63.                         break;
  64.                     case 4 :
  65.                         player.getDialogue().sendNpcChat("Well, Sir Vyvin is a good guy to work for, however,", "I'm in a spot of trouble today. I've gone and lost", "Sir Vyvin's sword!", CONTENT);
  66.                         player.getDialogue().setNextChatId(6);//I don't know if this is wrong.
  67.                         return true;
  68.                     case 5 :
  69.                         player.getDialogue().sendNpcChat("This is no time for jokes, adventurer.", ANGRY_2);
  70.                         player.getDialogue().endDialogue();//I don't know if, I need to put a break?
  71.                         return true;
  72.                     case 6:
  73.                         player.getDialogue().sendOption("Do you know where you lost it?", "I can make a new sword if you like...", "Is he angry?");
  74.                         return true;
  75.                     case 7:
  76.                         switch(optionId) {
  77.                             case 1 :
  78.                                 player.getDialogue().sendPlayerChat("Do you know where you lost it?", CONTENT);
  79.                                 return true;
  80.                             case 2 :
  81.                                 player.getDialogue().sendPlayerChat("I can make a new sword if you like...", CONTENT);
  82.                                 return true;
  83.                             case 3:
  84.                                 player.getDialogue().sendPlayerChat("Is he angry?", CONTENT);
  85.                                 return true;
  86.                         }
  87.                         break;
  88.                     case 8:
  89.                                 player.getDialogue().sendNpcChat("That's the problem! I don't know where it is or", "How I lost it, it was my responsibility...", DISTRESSED);
  90.                                 player.getDialogue().setNextChatId(11);
  91.                                 return true;
  92.                     case 9:
  93.                                 player.getDialogue().sendNpcChat("Thanks for the offer. I'd be surprised if you could", "though", DISTRESSED);
  94.                                 player.getDialogue().setNextChatId(12);
  95.                                 return true;
  96.                     case 10:
  97.                                 player.getDialogue().sendNpcChat("I can't bring myself to tell him, I like and need", "though", DISTRESSED);
  98.                                 player.getDialogue().setNextChatId(13);
  99.                                 return true;
  100.                     case 11:
  101.                                 player.getDialogue().sendPlayerChat("Hmm, I suggest to keep on looking.", CONTENT);
  102.                                 player.getDialogue().endDialogue();//I don't know if, I need to put a break?
  103.                                 return true;
  104.                     case 12:
  105.                                 player.getDialogue().sendNpcChat("The thing is, this sword is a family heirloom. It has been", "passed down through Vyvin's family for five", "generations! It was originally made by the Imcando", "dwarves, who were", DISTRESSED);
  106.                                 player.getDialogue().setNextChatId(14);
  107.                                 return true;
  108.                     case 13:
  109.                                 player.getDialogue().sendNpcChat("I suggest I have to tell him.", CONTENT);
  110.                                 switch(optionId) {
  111.                             case 1 :
  112.                                 player.getDialogue().sendPlayerChat("So would these dwarves make another one?", CONTENT);
  113.                                 return true;
  114.                             case 2 :
  115.                                 player.getDialogue().sendPlayerChat("Well I hope you find it soon.", CONTENT);
  116.                                 player.getDialogue().endDialogue();
  117.                                 return true;
  118.                         }
  119.                         break;
  120.                                 return true;
  121.                     case 14:
  122.                                 player.getDialogue().sendNpcChat("a particulary skilled tribe of dwarves smiths. I doubt", "anyone could make it in the style they do", HAPPY);
  123.                                 player.getDialogue().setNextChatId(15);
  124.                                 return true;
  125.                     case 15:
  126.                                 player.getDialogue().sendOption("So would these dwarves make another one?", "Well I hope you find it soon.");
  127.                                 return true;
  128.                     case 16:
  129.                         switch(optionId) {
  130.                             case 1 :
  131.                                 player.getDialogue().sendPlayerChat("So would these dwarves make another one?", CONTENT);
  132.                                 return true;
  133.                             case 2 :
  134.                                 player.getDialogue().sendPlayerChat("Well I hope you find it soon.", CONTENT);
  135.                                 player.getDialogue().endDialogue();
  136.                                 return true;
  137.                         }
  138.                         break;
  139.                     case 17:
  140.                         player.getDialogue().sendNpcChat("I'm not a hundred pecent sure the Imcando tribe", "exists anymore. I should think Reldo, the palace", "Librarian in Varrock, will knows; he has done a lot of", "research on the races of Rune2006.", HAPPY);
  141.                         return true;
  142.                     case 18:
  143.                         player.getDialogue().sendNpcChat("I don't suppose you could try and track down the", "Imcando dwarves for me? I've got so much work to", "do...", HAPPY);
  144.                         return true;
  145.                     case 19:
  146.                         player.getDialogue().sendOption("Ok, I'll give it a go.", "No, I've got lots of mining work to do.");
  147.                         return true;
  148.                     case 20:
  149.                         switch(optionId) {
  150.                             case 1 :
  151.                                 player.getDialogue().sendPlayerChat("Ok, I'll give it a go.", CONTENT);
  152.                                 player.getDialogue().setNextChatId(21);
  153.                                 return true;
  154.                             case 2 :
  155.                                 player.getDialogue().sendPlayerChat("Well I hope you find it soon.", CONTENT);
  156.                                 player.getDialogue().endDialogue();
  157.                                 return true;
  158.                         }
  159.                         break;
  160.                     case 21:
  161.                         player.getDialogue().sendNpcChat("Thank you very much! As I say, the best place to start", "should be with Reldo...", CONTENT);
  162.                         player.getDialogue().endDialogue();
  163.                         return true;
  164.                         }//remove if error
  165.                         break;//^-same
  166.  
  167.                 case ###: //Reldo *missing*
  168.                     switch(player.getDialogue().getChatId()) {
  169.                 case 1:
  170.                     player.getDialogue().sendNpcChat("Hello stranger.", CONTENT);
  171.                     return true;
  172.                 case 2:
  173.                     player.getDialogue().sendOption("I'm in search of a quest.", "Do you have anything to trade?", "What do you do?", "What do you know about the Imcando dwarves?");
  174.                     return true;
  175.                 case 3:
  176.                     switch(optionId) {
  177.                             case 1 :
  178.                                 player.getDialogue().sendPlayerChat("I'm in search of a quest.", HAPPY);
  179.                                 player.getDialogue().setNextChatId(4);
  180.                                 return true;
  181.                             case 2 :
  182.                                 player.getDialogue().sendPlayerChat("Do you have anything to trade?", CONTENT);
  183.                                 player.getDialogue().setNextChatId(5);
  184.                                 return true;
  185.                             case 3:
  186.                                 player.getDialogue().sendPlayerChat("What do you do?", CONTENT);
  187.                                 player.getDialogue().setNextChatId(6);
  188.                                 return true;
  189.                             case 4:
  190.                                 player.getDialogue().sendPlayerChat("What do you do know about the Imcando dwarves?", HAPPY);
  191.                                 player.getDialogue().setNextChatId(7);
  192.                                 return true;
  193.                         }
  194.                         break;
  195.                 case 4:
  196.                     player.getDialogue().sendNpcChat("Sorry, adventurer I don't have any quests at this", "moment in time, but keep checking. You never know when...", CONTENT);
  197.                     player.getDialogue().setNextChatId(2);
  198.                     return true;
  199.                 case 5:
  200.                     player.getDialogue().sendNpcChat("No, sorry. I'm not a trader, my life is researching.", CONTENT);
  201.                     player.getDialogue().setNextChatId(2);
  202.                     return true;
  203.                 case 6:
  204.                     player.getDialogue().sendNpcChat("I have devoted my life to research, mainly looking into", "different races that exist in Rune2006, it's", "very interesting indeed.", HAPPY);
  205.                     player.getDialogue().setNextChatId(2);
  206.                     return true;
  207.                 case 7:
  208.                     player.getDialogue().sendNpcChat("The Imcando dwarves, you say?", CONTENT);
  209.                     player.getDialogue().setNextChatId(8);
  210.                     return true;
  211.                 case 8:
  212.                     player.getDialogue().sendNpcChat("Ah yes... for many hundreds of years they were the", "World's most skilled smiths. They used secret smithing", "knowledge passed down from generation.", HAPPY);
  213.                     player.getDialogue().setNextChatId(9);
  214.                     return true;
  215.                 case 9:
  216.                     player.getDialogue().sendNpcChat("Unfortunately, about a century ago, the once thriving", "race was wiped out during the barbarian invasion of", "that time.", SAD);
  217.                     player.getDialogue().setNextChatId(10);
  218.                     return true;
  219.                 case 10:
  220.                     player.getDialogue().sendPlayerChat("So are there any Imcando left at all?", CONTENT);
  221.                     player.getDialogue().setNextChatId(11);
  222.                     return true;
  223.                 case 11:
  224.                     player.getDialogue().sendNpcChat("I believe a few of them survived, but with the bulk", "of their population destroyed their numbers have dwindled", "even further.", SAD);
  225.                     player.getDialogue().setNextChatId(12);
  226.                     return true;
  227.                 case 12:
  228.                     player.getDialogue().sendNpcChat("I believe I remember a couple living in Asgarnia near", "the cliffs on the Asgarnian southern peninsula, but they", "DO tend to keep to themselves.", SAD);
  229.                     player.getDialogue().setNextChatId(13);
  230.                     return true;
  231.                 case 13:
  232.                     player.getDialogue().sendNpcChat("They tend not to tell people that they're the", "descendants of the Imcando, which is why people think", "that the tribe has died out totally, but you may well", "have more luck talking to them if you bring them some", HAPPY);
  233.                     player.getDialogue().setNextChatId(14);
  234.                     return true;
  235.                 case 14:
  236.                     player.getDialogue().sendNpcChat(""redberry pie. They REALLY like redberry pie.", HAPPY);
  237.                     return true;
  238.                     }//Remove if errors
  239.                     break;//^- same
  240.  
  241.                 case ###: //Thurgo the Imcando dwarf *missing*
  242.                     switch(player.getDialogue().getChatId()) {
  243.                 case 1:
  244.                     player.getDialogue().sendOption("Skillcape of Smithing.", "Something else.");
  245.                     return true;
  246.                 case 2:
  247.                     switch(optionId) {
  248.                             case 1 :
  249.                                 player.getDialogue().sendPlayerChat("Skillcape of Smithing.", CONTENT);
  250.                                 player.getDialogue().endDialogue();
  251.    
  252.                                 return true;
  253.                             case 2 :
  254.                                 player.getDialogue().sendOption("Are you an Imcando Dwarf?", "Would you like some Redberry Pie?");
  255.                                 return true;
  256.                         }
  257.                         break;
  258.                 case 3:
  259.                     player.getDialogue().sendPlayerChat("Hello are you an Imcando Dwarf?", HAPPY);
  260.                     player.getDialogue().setNextChatId(5);
  261.                     return true;
  262.                 case 4:
  263.                     player.getDialogue().sendPlayerChat("Would you like some of my Redberry Pie?", HAPPY);
  264.                     player.getDialogue().setNextChatId(6);
  265.                     return true;
  266.                 case 5:
  267.                     player.getDialogue().sendNpcChat("Maybe. Who wants to know?", ANGRY);
  268.                     player.getDialogue().setNextChatId(7);
  269.                     return true;
  270.                 case 6:
  271.                     if (player.getInventory().playerHasItem(new Item(2325, 1))) {
  272.                             player.getInventory().removeItem(new Item(2325, 1));
  273.                             player.getInventory().addItemOrDrop(new Item(995));
  274.                             player.getDialogue().sendGiveItemNpc("You give Thurgo a Redberry Pie.", new Item(995));
  275.                             player.getDialogue().endDialogue();
  276.                         } else {
  277.                             player.getDialogue().sendPlayerChat("Oh dear. I don't have any Redberry Pie.", SAD);
  278.                             player.getDialogue().endDialogue();
  279.                         }
  280.                         return true;
  281.                 case 7:
  282.                     player.getDialogue().sendPlayerChat("Can you make me some special sword?", CONTENT);
  283.                     player.getDialogue().setNextChatId(8);
  284.                     return true;
  285.                 case 8:
  286.                     player.getDialogue().sendNpcChat("No! Unless I get a Redberry Pie!", ANGRY);
  287.                     player.getDialogue().setNextChatId(9);
  288.                     return true;
  289.                 case 9:
  290.                     if (player.getInventory().playerHasItem(new Item(2325))) {
  291.                             player.getDialogue().sendStatement("I have a Redberry Pie!");
  292.                             player.getDialogue().setNextChatId(10);
  293.                     } else {
  294.                             player.getDialogue().sendStatement("I need a Redberry Pie!");
  295.                             player.getDialogue().setNextChatId(11);
  296.                     }
  297.                     return true;
  298.                 case 10:
  299.                     player.getDialogue().sendStatement("You see Thurgo's eyes enlight.");
  300.                     player.getDialogue().setNextChatId(12);
  301.                     return true;
  302.                 case 11:
  303.                     player.getDialogue().sendNpcChat("I want a Redberry Pie!", ANGRY);
  304.                     player.getDialogue().endDialogue();
  305.                     return true;
  306.                 case 12:
  307.                     player.getDialogue().sendNpcChat("I'd never say no to a Redberry Pie!", "they're great STUFF!", HAPPY);
  308.                     player.getDialogue().setNextChatId(13);
  309.                     return true;
  310.                 case 13:
  311.                     if (player.getInventory().playerHasItem(new Item(2325, 1))) {
  312.                             player.getInventory().removeItem(new Item(2325, 1));
  313.                             player.getInventory().addItemOrDrop(new Item(995));
  314.                             //player.getDialogue().sendGiveItemNpc("You give Thurgo a Redberry Pie.", new Item(995));
  315.                             player.getDialogue().sendStatement("You hand over the pie. Thurgo eats the pie.", "Thurgo pats his stomach.");
  316.                             player.getDialogue().setNextChatId(14);
  317.                         } else {
  318.                             //player.getDialogue().sendPlayerChat("Oh dear. I don't have any Redberry Pie.", SAD);
  319.                             player.getDialogue().sendStatement("You don't have a Redberry Pie.");
  320.                             player.getDialogue().endDialogue();
  321.                         }
  322.                         return true;
  323.                 case 14:
  324.                     player.getDialogue().sendNpcChat("By Guthix! THAT was good Pie! Anyone who makes", "pie like THAT has to be alright.", HAPPY);
  325.                     player.getDialogue().setNextChatId(15);
  326.                     return true;
  327.                 case 15:
  328.                     player.getDialogue().sendPlayerChat("Could you make me a special sword?", HAPPY);
  329.                     player.getDialogue().setNextChatId(16);
  330.                     return true;
  331.                 case 16:
  332.                     player.getDialogue().sendNpcChat("Well, I guess after bringing me my favorite food I guess I", "give it a go. What sort of sword is it?", HAPPY);
  333.                     player.getDialogue().setNextChatId(17);
  334.                     return true;
  335.                 case 17:
  336.                     player.getDialogue().sendPlayerChat("I need to make a sword for one of the White Knights.", "He had one and was passed down for five.", "generations, but his squire has lost it. So we need", "a identical one to replace it.", HAPPY);
  337.                     player.getDialogue().setNextChatId(18);
  338.                     return true;
  339.                 case 18:
  340.                     player.getDialogue().sendNpcChat("A knight's sword eh? Well I need to know exactly", "how it looked before I can make one.", CONTENT);
  341.                     player.getDialogue().setNextChatId(18);
  342.                     return true;
  343.                 case 19:
  344.                     player.getDialogue().sendNpcChat("All the Faladian knights used to have swords with unique", "designs according to their position. Could you", "bring me a sword or something?", CONTENT);
  345.                     player.getDialogue().setNextChatId(20);
  346.                     return true;
  347.                 case 20:
  348.                     player.getDialogue().sendPlayerChat("I'll go and ask his squire to see if he has one.", HAPPY);
  349.                     //player.getDialogue().endDialogue(); //Need to add Quest ints
  350.                     player.getDialogue().setNextChatId(21);
  351.                     return true;
  352.                 case 21:
  353.                     if (player.getInventory().playerHasItem(new Item(, 1))) {//The item you get from cupboard
  354.                             player.getInventory().removeItem(new Item(, 1));
  355.                             //DON'T KNOW//player.getInventory().addItemOrDrop(new Item(995));
  356.                             //DON'T KNOW//player.getDialogue().sendGiveItemNpc(".", new Item(995));
  357.                             player.getDialogue().sendPlayerChat(".");
  358.                             player.getDialogue().setNextChatId(22);
  359.                         } else {
  360.                             player.getDialogue().sendPlayerChat("I have to get a picture of the sword.", SAD);
  361.                             player.getDialogue().endDialogue();
  362.                         }
  363.                         return true;
  364.                 case 22:
  365.                     player.getDialogue().sendNpcChat("Tha", CONTENT);
  366.                     player.getDialogue().setNextChatId(20);
  367.                     return true;
  368.                     }
  369.                     break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement