Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public void talkTo(String npcName, String... chatOptions)
  2. if (getDialogues().canContinue()){
  3. ctx.getDialogues().continueDialogue();
  4. } else if (getDialogues().canEnterInput()){
  5. for(String chatOption : chatOptions){
  6. ctx.getDialogues().chooseOption(chatOption);
  7. }
  8. } else {
  9. NPC npc = ctx.getNpcs().closest(npcName);
  10. if (npc != null){
  11. if (npc.interact("Talk-to")){
  12. return Calculations.random(800,1200);
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement