Facebook
From _bbk, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 283
  1. ;___________________
  2. ;       [Opcje]      
  3. ;___________________
  4. StartAfk=F8
  5. ExitApp=F9
  6.  
  7.  
  8. ;____________________
  9. Hotkey,%StartAfk%,Start
  10. Hotkey,%ExitApp%,Exit
  11. Return
  12. ;____________________
  13.  
  14. Start:
  15. WinMove, Minecraft, , , , 1280, 720
  16.     loop{
  17.         reJoin()                ;Wbijanie na serwer
  18.         Command("cx")           ;\
  19.         Command("cx")           ;   Komendy
  20.         Command("naprawkilof")  ;/
  21.         InventoryChecking()     ;Sprawdza Eq
  22.         Eat(2)                  ;Ilosc zjedzonego mięska
  23.         Dig(10)                 ;Ilosc Okrążeń na stoniarce
  24.     }
  25. Return
  26.  
  27. ;____________________
  28. Exit:
  29. ExitApp
  30. Return
  31. ;____________________
  32.  
  33.  
  34. Command(string){
  35.     SendInput {T}
  36.     Wait(500)
  37.     Send /%string%
  38.     Wait(1000)
  39.     SendInput {Enter}
  40.     Wait(200)
  41. }
  42.  
  43. reJoin(){
  44.     SendInput {T}
  45.     Wait(100)
  46.     setMPos(500, 420)
  47.     SendInput {LButton}
  48.     Wait(500)
  49.     SendInput {Enter}
  50.     Wait(200)
  51. }
  52. Eat(int){
  53.     SendInput {2}
  54.     loop, %int%{
  55.         SendInput {RButton down}
  56.         Wait(1600)
  57.         SendInput {RButton up}
  58.         Wait(200)
  59.     }
  60.     SendInput {1}
  61. }
  62.  
  63. Dig(int){
  64.     SendInput {LButton down}
  65.     Move(int)
  66.     SendInput {LButton up}
  67. }
  68.  
  69. Move(int){
  70.     loop, %int%{
  71.         Press("D", 10)
  72.         Press("S", 2)
  73.         Press("A", 10)
  74.         Press("W", 2)
  75.     }
  76. }
  77.  
  78. InventoryChecking(){
  79. x := 503
  80. y := 385
  81. l := 0
  82. i := 0
  83.     SendInput {e}
  84.     loop, 27{  ;TODO liczba paskow
  85.         if(i = 9){
  86.             i := 0
  87.             l++
  88.         }
  89.         Wait(200)
  90.         setMPos(x +36*i, y + 35*l)
  91.         DropGold()
  92.         i++
  93.     }
  94.     SendInput {e}
  95.     Wait(100)
  96. }
  97.  
  98.  
  99. dropGold(){
  100. goldcolor := 0x808080
  101. color:= getColor()
  102. if(color = goldcolor){
  103.         sendInput, {LCtrl down}{G}
  104.         Wait(100)
  105.         SendInput {LCtrl up}
  106.     }
  107. }
  108. getColor(){
  109.     MouseGetPos, X,Y
  110.     PixelGetColor, color, %X%, %Y%
  111.     return color
  112. }
  113.  
  114. Press(charkey, dist){
  115.     t := getTimeFromDis(dist)
  116.     SendInput {%charkey% down}
  117.     Wait(t)
  118.     SendInput {%charkey% up}
  119. }
  120.  
  121.  
  122. getTimeFromDis(s){
  123. t:=0
  124. t:= s*235
  125. return t
  126. }
  127.  
  128. setMPos(x, y){
  129.     MouseMove,x,y
  130. }
  131.  
  132.  
  133. Wait(s){
  134.     sleep, s
  135. }