Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void talkTo(String npc){
- List<WidgetChild> clickToContinue = getWidgets().getWidgetChildrenContainingText("Click to continue");
- if(!clickToContinue.isEmpty()){
- WidgetChild wc = clickToContinue.get(0);
- if(wc != null && wc.isVisible()){
- log("Interacting with widget");
- wc.interact();
- sleep(900,1200);
- }
- }
- if(!getDialogues().canContinue()){
- final NPC guide = getNpcs().closest(npc);
- if(guide != null){
- if(guide.isOnScreen()){
- if(guide.interact("Talk-to")){
- walkingSleep();
- sleepUntil(new Condition(){
- public boolean verify(){
- return getDialogues().canContinue();
- }
- },Calculations.random(1200,1600));
- }
- }
- else{
- getWalking().walk(guide);
- walkingSleep();
- }
- }
- }
- else{
- log("Clicking continue");
- getDialogues().clickContinue();
- sleep(600,900);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement