Advertisement
CivReborn

New Diep.io TDM AFK Script [AutoHotkey]

Dec 1st, 2017
2,124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Written By: Hellbent aka CivReborn
  2. ;Date:November 30th, 2017
  3. ;Diep.io TDM AFK Script
  4. #SingleInstance,Force
  5. CoordMode,Mouse,Screen
  6. CoordMode,Pixel,Screen
  7. Ls1:=["x0 y0 w250 h25 Border gMove_Windows","x255 y0 w22 h25 Border gMinimize_Windows","x277 y0 w22 h25 Border gGuiClose"
  8. ,"x15 y30 w100 h30 Border vWB gActions","x100 y65 w100 h30 Border vUB gActions","x45 y100 w100 h30 Border vLB gActions"
  9. ,"x155 y100 w100 h30 Border vRB gActions","x100 y135 w100 h30 Border vDB gActions","x10 y175 w90 h30 Border vSTRB gActions"
  10. ,"x105 y175 w90 h30 Border vSTOB gActions","x200 y175 w90 h30 Border gReload","x0 y210 w300 h20 Border vCPB gActions"]
  11. onehunlist:= ["x0 y0 w300 h230 BackgroundTeal cBlack","x5 y25 w290 h185 BackgroundTeal c111111","x125 y33 w160 h24 BackgroundTeal c111111"]
  12. Global 1D:={},Civ:="https://www.youtube.com/user/CivReborn",2D:={},3D:={},4D:={},Stop:=0
  13. ls2:=["x15 y30 w100 h30 BackgroundBlack","x15 y30 w98 h28 BackgroundTeal","x17 y32 w96 h26 Background111111","x100 y65 w100 h30 BackgroundBlack"
  14. ,"x100 y65 w98 h28 BackgroundTeal","x102 y67 w96 h26 Background111111","x45 y100 w100 h30 BackgroundBlack","x45 y100 w98 h28 BackgroundTeal"
  15. ,"x47 y102 w96 h26 Background111111","x155 y100 w100 h30 BackgroundBlack","x155 y100 w98 h28 BackgroundTeal","x157 y102 w96 h26 Background111111"
  16. ,"x100 y135 w100 h30 BackgroundBlack","x100 y135 w98 h28 BackgroundTeal","x102 y137 w96 h26 Background111111","x10 y175 w90 h30 BackgroundBlack"
  17. ,"x10 y175 w88 h28 BackgroundTeal","x12 y177 w86 h26 Background111111","x105 y175 w90 h30 BackgroundBlack","x105 y175 w88 h28 BackgroundTeal"
  18. ,"x107 y177 w86 h26 Background111111","x200 y175 w90 h30 BackgroundBlack","x200 y175 w88 h28 BackgroundTeal","x202 y177 w86 h26 Background111111"
  19. ,"x20 y70 w65 h2 BackgroundTeal","x85 y70 w2 h22 BackgroundTeal","x35 y90 w50 h2 BackgroundTeal","x35 y90 w2 h50 BackgroundTeal"
  20. ,"x20 y70 w2 h90 BackgroundTeal","x35 y140 w50 h2 BackgroundTeal","x85 y140 w2 h22 BackgroundTeal","x20 y160 w65 h2 BackgroundTeal"
  21. ,"x215 y70 w65 h2 BackgroundTeal","x215 y70 w2 h22 BackgroundTeal","x215 y90 w50 h2 BackgroundTeal","x280 y70 w2 h92 BackgroundTeal"
  22. ,"x265 y90 w2 h52 BackgroundTeal","x215 y140 w50 h2 BackgroundTeal","x215 y140 w2 h22 BackgroundTeal","x215 y160 w65 h2 BackgroundTeal"]
  23. TxT:= ["_","Diep.io Team Death Match AFK Script","X","Set Window","Set Top","Set Left","Set Right","Set Bottom","Start","Stop","Reload","By Hellbent aka CivReborn"]
  24. TxO:= ["x260 y-28 BackgroundTrans","x0 y3 w260 r1 Backgroundtrans Center","x280 y2 BackgroundTrans","x17 y35 w96 BackgroundTrans Center"
  25. ,"x102 y70 w96 BackgroundTrans Center","x47 y105 w96 BackgroundTrans Center","x157 y105 w96 BackgroundTrans Center","x102 y140 w96 BackgroundTrans Center"
  26. ,"x12 y180 w86 BackgroundTrans Center","x107 y180 w86 BackgroundTrans Center","x202 y180 w86 BackgroundTrans Center","x0 y210 w300 BackgroundTrans Center"]
  27. Gui,1:+AlwaysOnTop -Caption
  28. Gui,1:Margin,0,0
  29. Gui,1:Color,111111,111111
  30. for,k,v in onehunlist
  31.     Gui,1:Add,Progress,% v ,100
  32. for,k,v in ls2
  33.     Gui,1:Add,Progress,% v
  34. Gui,1:Font,cGray s24 Q5,Segoe UI Black
  35. for,k,v in TxO
  36.     {
  37.         if(A_Index=2)
  38.             Gui,1:Font,cSilver s10 Q5,Segoe UI Black
  39.         else if(A_Index=3)
  40.             Gui,1:Font,cGray s12 Q5,Segoe UI Black
  41.         else if(A_Index=4)
  42.             Gui,1:Font,cSilver s10 Q5,Segoe UI Black
  43.         Gui,1:Add,Text,% v ,% Txt[A_Index]
  44.     }
  45. Gui,1:Add,Edit,x127 y35 w156 h20 -E0x200 Disabled vTW,
  46. Gui,2:+AlwaysOnTop -Caption +LastFound +Owner1
  47. Gui,2:Color,White
  48. Winset,Transparent,1
  49. For, k,v in Ls1
  50.     Gui,2:Add,Text,% v
  51. Gui,1:Show,x900 y50 w300 h230,Diep.io Afk Script
  52. Gui,2:Show,x900 y50 w300 h230,Diep.io Afk Script TL
  53. return
  54. GuiClose:
  55.     ExitApp
  56. Reload:
  57.     Reload
  58. Move_Windows:
  59.     PostMessage,0xA1,2
  60.     While(GetKeyState("LButton"))
  61.         Sleep,10
  62.     WinGetPos,wx,wy,,,Diep.io Afk Script TL
  63.     Gui,1:Show,x%wx% y%wy%
  64.     return
  65. Minimize_Windows:
  66.     Gui,1:Minimize
  67.     return
  68. Actions:
  69.     (A_GuiControl="WB")?(SW(TW)):(A_GuiControl="UB")?(SPix(1D))
  70.     :(A_GuiControl="LB")?(SPix(2D)):(A_GuiControl="RB")?(SPix(3D))
  71.     :(A_GuiControl="DB")?(SPix(4D)):(A_GuiControl="STOB")?(Stop:=1)
  72.     :(A_GuiControl="STRB")?(SS(TW)):(A_GuiControl="CPB")?(RCC())
  73.     return
  74. SS(TW){
  75.     global
  76.     g:=0
  77.     Stop:=0
  78.     if(1D.x1=null||2D.x1=null||3D.x1=null||4D.x1=null||TW=null){
  79.         Gui,1:+OwnDialogs
  80.         Msgbox, Something is missing.`nMake sure you added all 5 items.
  81.         return
  82.     }
  83.     TrayTip,,Script IS Active,3
  84.     While(!Stop){
  85.         if(WinActive(TW))
  86.         Loop 4  {
  87.             g:=0
  88.             cpxf(%A_Index%D,1,A_Index)
  89.             cpxf(%A_Index%D,2,A_Index)
  90.         }
  91.         else    {
  92.             Sleep,1000
  93.             g++
  94.             if(g>30){
  95.                 g:=0
  96.                 TrayTip,Wrong Window,Script is still active,2
  97.             }
  98.         }
  99.                
  100.     }
  101. }
  102. RCC(){
  103.     Try{
  104.         Run,% Civ
  105.     }
  106. }
  107. cpxf(oT,X,N){
  108.     if(x=1){
  109.         PixelGetColor,tp,oT.x1,oT.y1
  110.         if(tp=oT.px1){
  111.             (N=1)?(SK("Down","Down")):(N=2)?(SK("Right","Down")):(N=3)?(SK("Left","Down")):(N=4)?(SK("Up","Down"))
  112.             oT.key:=1
  113.         }
  114.         else if(oT.key=1&&tp!=Ot.px1){
  115.             (N=1)?(SK("Down","Up")):(N=2)?(SK("Right","Up")):(N=3)?(SK("Left","Up")):(N=4)?(SK("Up","Up"))
  116.             oT.key:=o
  117.         }
  118.     }
  119.     else    {
  120.         PixelGetColor,tp,oT.x2,oT.y2
  121.         if(tp=oT.px2){
  122.             (N=1)?(SK("Down","Down")):(N=2)?(SK("Right","Down")):(N=3)?(SK("Left","Down")):(N=4)?(SK("Up","Down"))
  123.             oT.key:=1
  124.         }
  125.         else if(oT.key=1&&tp!=Ot.px2){
  126.             (N=1)?(SK("Down","Up")):(N=2)?(SK("Right","Up")):(N=3)?(SK("Left","Up")):(N=4)?(SK("Up","Up"))
  127.             oT.key:=o
  128.         }
  129.     }
  130. }
  131. SK(aa,bb){
  132.     Send,{%aa% %bb%}
  133. }
  134. SPix(TOBJ){
  135.     isPressed:=0,i:=0
  136.     Loop    {
  137.         Tooltip,Click on 2 locations in the GRAY area `n`nin the direction you are setting.
  138.         if(!GetKeyState("LButton")&&!isPressed)
  139.             isPressed:=1
  140.         else if(GetKeyState("LButton")&&isPressed){
  141.             isPressed:=0,i++
  142.             MouseGetPos,x,y
  143.             PixelGetColor,px,x,y
  144.             (i=1)?(TOBJ.x1:=x,TOBJ.y1:=y,TOBJ.px1:=px)
  145.             if(i=2){
  146.                 TOBJ.x2:=x,TOBJ.y2:=y,TOBJ.px2:=px
  147.                 Tooltip,
  148.                 return
  149.             }
  150.         }
  151.     }
  152. }
  153. SW(ByRef TW){
  154.     isPressed:=0,i:=0
  155.     Loop    {
  156.         Tooltip,Click twice on the game window to set it.
  157.         if(!GetKeyState("LButton")&&!isPressed)
  158.             isPressed:=1
  159.         else if(GetKeyState("LButton")&&isPressed){
  160.             isPressed:=0,i++
  161.             if(i>=2){
  162.                 WinGetTitle,TW,A
  163.                 ToolTip,
  164.                 GuiControl,1:,TW,% TW
  165.                 return
  166.             }
  167.         }
  168.     }
  169. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement