Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.45 KB | None | 0 0
  1. package net.mark.quest.npcs;
  2.  
  3. import net.mark.module.model.impl.BubbleBuilder;
  4. import net.mark.module.model.impl.ModuleListener;
  5. import net.mark.module.model.impl.actor.NPCManifest;
  6. import net.mark.module.model.impl.options.MenuOption;
  7.  
  8. /**
  9.  *
  10.  * @author Bl0dzy
  11.  * @version 0.1
  12.  * @Date 25 Feb 2019/16:45:43
  13.  */
  14. public class Cedric extends ModuleListener {
  15.  
  16.     @NPCManifest(ids = { 357 }, useWith= {50, 141})
  17.     public void cedricDrunk() {
  18.         if (getStage() == 4) {
  19.             BubbleBuilder.builder().affected(player).item(getItem().getID()).build().process();
  20.             dialog(true, "Cedric, here, drink some water");
  21.             dialog("oh yes, my head's starting to spin",
  22.                     "gulp...gulp");
  23.             message("Brother Cedric drinks the water");
  24.             dialog("aah, that's better");
  25.             message("you throw the excess water over brother Cedric");
  26.             dialog("now i just need to fix...",
  27.                     "..this cart..", "..and we can go party",
  28.                     ".could you help?");
  29.             setStage(5);
  30.            
  31.             options(getNpc(), new MenuOption("No, i've helped enough monks today", () -> {
  32.                 delay(1200);
  33.                 dialog("in that case i'd better drink..",
  34.                         "..more wine. It help's me think.");
  35.             }), new MenuOption("Yes i'd be happy to", () -> {
  36.                 delay(1200);
  37.                 dialog("i need some wood");
  38.                 dialog(true, "here you go..",
  39.                             "I've got some wood");
  40.                 dialog("well done, now i'll fix this cart",
  41.                             "you head back to Brother Omad",
  42.                             "Tell him i'm on my way", "I won't be long");
  43.                 setStage(6);
  44.             }));
  45.         }
  46.     }
  47.  
  48.     @NPCManifest(ids=357) // Brother Cedric
  49.     public void brotherCedric() {
  50.        
  51.         if (isComplete(QuestType.MONKS_FRIEND.ordinal())) {
  52.             dialog("Brother Oman sends you his thanks",
  53.                     "He won't be in a fit state to thank you in person any more");
  54.             return;
  55.            
  56.         }else if (getStage() == 0 || getStage() == 1 || getStage() == 2) {         
  57.                 dialog(true, "Hello");
  58.                 dialog("honey,money,woman,wine..");
  59.                 dialog(true, "Are you ok?");
  60.                 dialog(" yesshh...hic up...beautiful..");
  61.                 dialog(true, "take care old monk");
  62.                 dialog("la..di..da..hic..up..");
  63.                 message("The monk has had too much to drink");
  64.                 return;
  65.            
  66.         }else if (getStage() == 3) {
  67.             dialog(true, "Brother Cedric are you okay?");
  68.             dialog("yeesshhh, i'm very, very....",
  69.                     "..drunk..hic..up..");
  70.             dialog(true, "brother Omad needs the wine..",
  71.                     "..for the party");
  72.             dialog("oh dear, oh dear ",
  73.                     "I knew I had to do something",
  74.                     "pleashhh, find me some water",
  75.                     "once i'm sober i'll help you..",
  76.                     "..take the wine back.");
  77.             setStage(4);
  78.             return;        
  79.         }else if (getStage() == 4) {
  80.             dialog(true, "Are you okay?");
  81.             dialog("...hic up..oh my head..", "..I need some water.");
  82.             return;
  83.         }else if (getStage() == 5) {
  84.             dialog(true, "Hello Cedric");
  85.             dialog("want to help me fix the cart?");
  86.            
  87.            
  88.             options(getNpc(), new MenuOption("Yes i'd be happy to", () -> {
  89.                 delay(1200);
  90.                 dialog("i need some wood");
  91.                 if (remove(new Item(14,1))) {
  92.                     dialog(true, "here you go..", "I've got some wood");
  93.                     dialog("well done, now i'll fix this cart",
  94.                                 "you head back to Brother Omad",
  95.                                 "Tell him i'm on my way", "I won't be long");
  96.                     setStage(6);
  97.                 } else {
  98.                    
  99.                 }
  100.             }), new MenuOption("No, not really", () -> {
  101.                 delay(1200);
  102.             }));
  103.            
  104.         }else if (getStage() == 6) {
  105.             dialog(true, "Hello Cedric");
  106.             dialog("hi, i'm almost done here",
  107.                     "go tell Omad that I..", "..won't be long");
  108.             return;
  109.         }
  110.     }
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement