Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Pozycje questowe
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match http://syberia.margonem.pl/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. var positions = [
  12. {x: 56, y: 27, z: "Ithan", checked: false, dialogs: [3, 0, 0], dialogState: 0},
  13. ];
  14.  
  15. var isStop = false;
  16.  
  17. function talk (position) {
  18.  
  19. if(position.dialogState === position.dialogs.length) {
  20. message('Zakończono rozmowę.');
  21.  
  22. position.checked = true;
  23.  
  24. isStop = false;
  25.  
  26. return;
  27. }
  28.  
  29. $('#replies').find('li').eq( position.dialogs[position.dialogState] ).click();
  30.  
  31. setTimeout(() => {
  32.  
  33. position.dialogState++;
  34. talkWithNpc(position);
  35.  
  36. }, 500);
  37. }
  38.  
  39. const x = setInterval(() => {
  40.  
  41. if(!isStop) {
  42. for(var i in positions) {
  43. const position = positions[i];
  44.  
  45. if(position.x === hero.x && position.y === hero.y && position.z === map.name && !position.checked) {
  46. isStop = true;
  47.  
  48. _g('talk&id=44099');
  49. wait(500);
  50.  
  51. talkWithNpc(position);
  52. }
  53. }
  54. }
  55.  
  56. }, 500);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement