Advertisement
Guest User

Untitled

a guest
May 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.01 KB | None | 0 0
  1. Func IDAndSell()
  2.     Update("Cleaning inventory")
  3.     GoNearestNPCToCoords(-4231, 11350)
  4.     CheckGold()
  5.     Ident(1, 20)
  6.     Ident(2, 5)
  7.     Ident(3, 10)
  8. ;~  Ident(4, 10)
  9.     Sell(1, 20)
  10.     Sell(2, 5)
  11.     Sell(3, 10)
  12. ;~  Sell(4, 10)
  13.     CmdCB($CA_GetGold)
  14.     $intGold += $cbVar[0] - $intCash
  15.     $intCash = $cbVar[0]
  16.     GUICtrlSetData($lblGold, $intGold)
  17. EndFunc
  18.  
  19. Func CheckGold ()
  20.     $cbType = "int"
  21.     $Gold = CmdCB($CA_GETGOLD)
  22.     $Gold = $cbVar[0]
  23.     If $Gold > 70000 Then ;Store Gold?
  24.         Cmd($CA_DEPOSITGOLD, 65000)
  25.         Sleep (Random(1000, 1400))
  26.     ElseIf $Gold < 100 Then ;Enough Money for IDKit?
  27.         Cmd($CA_WithdrawGold, 5000)
  28.         Sleep (Random(100, 150))
  29.     EndIf
  30. EndFunc
  31.  
  32. Func Ident($bagIndex, $numOfSlots)
  33.     $cbType = "int"
  34.     CmdCB($CA_GETIDKIT) ;Check if there is a IDKit
  35.    
  36.     If $cbVar[0] = 0 Then
  37.         Cmd($CA_BuyItem, 5, 100) ;Buy IDKit. buyitem used because merch doesnt sell sup ID kits
  38.         Sleep(Random(500,1000))
  39.         CmdCB($CA_GETIDKIT)
  40.         Sleep(Random(500,1000))
  41.         MoveItemById($cbVar[0], 4, 1) ;Move IDKit to Spot (4, 1)
  42.         Sleep(Random(500,1000))
  43.     EndIf  
  44.    For $i = 1 To $numOfSlots Step 1
  45.        
  46.  
  47.        
  48.         Cmd($CA_IDENTIFYITEM, $bagIndex, $i)
  49.        
  50.         Sleep(Random(290, 310))
  51.         $cbType = "int"
  52.         CmdCB($CA_GETIDKIT) ;Check if there is a IDKit
  53.        
  54.         If $cbVar[0] = 0 Then
  55.             Cmd($CA_BuyItem, 5, 100) ;Buy IDKit. buyitem used because merch doesnt sell sup ID kits
  56.             Sleep(Random(500,1000))
  57.             CmdCB($CA_GETIDKIT)
  58.             Sleep(Random(500,1000))
  59.             MoveItemById($cbVar[0], 4, 1) ;Move IDKit to Spot (4, 1)
  60.             Sleep(Random(500,1000))
  61.         EndIf
  62.     Next
  63. EndFunc
  64.    
  65.    
  66. Func Sell($bagIndex, $numOfSlots)
  67.    For $i = 1 To $numOfSlots Step 1
  68.       Cmd($CA_SELLITEM, $bagIndex, $i)
  69.       Sleep(Random(500,750))
  70.    Next
  71. EndFunc
  72.  
  73. Func GoNearestNPCToCoords($x, $y)
  74.     MoveToEx($x, $y)
  75.     $guy = GetNearestNPCToCoords($x, $y)
  76.  
  77.     $cbType = "float"
  78.     Do
  79.         RndSleep(250)
  80.         Cmd($CA_GoNPC, $guy)
  81.         RndSleep(250)
  82.         $a = CmdCB($CA_GetCoords, $guy)
  83.         CmdCB($CA_GetCoords, -2)
  84.     Until ComputeDistanceEx($cbVar[0], $cbVar[1], $a[0], $a[1]) < 250
  85.     RndSleep(500)
  86. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement