Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <AutoItConstants.au3>
- HotKeySet("{f9}", "TogglePause")
- ;TODO AT WAKE UP
- ;MERGEDRAG each x seconds
- ;Equip gold [x]
- ;Stay in adventuyre mode until highest boss killed [x]
- ;Drop down to farm zone [NOT NOW]
- ;Inventory 61,2,3,4,5,6,7,8 for equipedItems
- ;Tooltip to know which run we are at
- ;------------ CONSTANTS ---------------------------------;
- Local $SLEEP_DELAY = 50
- Local $MOUSE_SPEED = 1
- Local $canrb = true
- Local $pause = false
- Local $rebNumber = 0
- ;Items
- Local $InventoryPositions[68]
- Local $Equipment[200]
- Local $EquipmentCount = 0
- Local $MAGIC_TYPE = 0
- Local $ENERGY_TYPE = 1
- Local $PIT_TYPE = 2
- Local $BOOST_TYPE = 3
- Local $MERGE_TYPE = 4
- Local $GOLD_TYPE = 5
- Local $MAIN_TYPE = 6
- Local $BOSS_TYPE = 7
- Local $TRANSFORM_TYPE = 8
- Local $SECOND_TYPE = 9
- Local $WANDOOS_TYPE = 10
- Local $BASE_TYPE = 11
- Local $LAST_SWAPPED = -1
- Local $swapped = 0
- Local $swapped1 = 0
- ;Menu Positions
- Local $MenuTrainAttack = 0
- Local $MenuTrainDefense = 1
- Local $MenuFightBoss = 2
- Local $MenuMoneyPit = 3
- Local $MenuAdventure = 4
- Local $MenuInventory = 5
- Local $MenuAugmentation = 6
- Local $MenuAdvTraining = 7
- Local $MenuTimeMachine = 8
- Local $MenuBloodMagic = 9
- Local $MenuWandoos = 10
- Local $MenuNGU = 11
- Local $MenuYgg = 12
- ; Trick to add/remove
- Local $Unassign = -1
- Local $Assign = 1
- ;Run Properties--------
- ;-- Timers
- Local $FightBossTimer = TimerInit()
- Local $ResetTimer = TimerInit()
- Local $BoostAndMergeTimer = TimerInit()
- Local $updateTimer = TimerInit()
- ;Props
- ;Start features time
- Local $AugmentsTime = 300000
- Local $BloodMagicTime = 300000
- Local $wandoosSwapped = 0
- ;End features time
- Local $GoldMachineEnergyEnd = 300000
- Local $GoldMachineMagicEnd = 300000
- Local $AugmentsEnd = 880000
- Local $BloodMagicEnd = 880000
- Local $reassignedEnergy = 0
- Local $reassignedMagic = 0
- ;IgnoreFeatures
- Local $IgnoreTimeMachine = 1
- Local $IgnoreAugments = 1
- Local $IgnoreBloodMagic = 1
- Local $bloodReassignCounter = 0
- Local $Log[50]
- Local $lastLog = 0
- Local $maxNGU = 0
- Local $NGUFraction = 0
- ;--------------------------------------------------------;
- ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
- ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<;
- ;~ SETTINGS
- Local $Initialized = 0
- Local $RunTime = 3600000 ; Time each run will take
- Local $FightBossTime = 80000 ; Time between each boss fight
- Local $BoostAndMergeTime = 90000 ; time between each merge/boost attempt
- Local $GoldMachineEnergyTime = 720999
- Local $GoldMachineMagicTime = 1080999
- Local $wandoosTime = 135000
- Local $NGUTime = $GoldMachineEnergyTime + 1
- Local $swapTime = 83000
- Local $swapTime1 = 172000
- Local $AugmentUsed = 2
- Local $BloodUsed = 2
- Local $NGUClicks = [9,5,0,8,0,10]
- ;--------------------------------------------------------;
- ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
- ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<;
- ; MAINLOOP/ MAINLOOP/ MAINLOOP/ MAINLOOP/ MAINLOOP/ MAINLOOP/
- Setup()
- ;~ MoneyPit()
- SwapItems($PIT_TYPE)
- SwapItems($BOSS_TYPE)
- SwapItems($WANDOOS_TYPE)
- SwapItems($SECOND_TYPE)
- SwapItems($MAIN_TYPE)
- SwapItems($BASE_TYPE)
- SwapItems($GOLD_TYPE)
- Rebirth()
- while 1
- local $srt = ""
- for $i = 0 to $lastLog-1 step 1
- $srt &= $Log[$i]
- Next
- ToolTip("Current time: " & TimerDiff($ResetTimer) &"ms"& @CRLF & "Rebirth: " & $rebNumber & @CRLF & " ______________ " & @CRLF & $srt , 20, 20, "NGU IDLE AUTO V0.01", 1)
- if $pause == True Then
- Sleep($SLEEP_DELAY*10)
- ContinueLoop
- EndIf
- if $Initialized == 0 Then
- ToolTipLog("Initializing...")
- $ResetTimer = TimerInit()
- $FightBossTimer = TimerInit()
- $BoostAndMergeTimer = TimerInit()
- FightBoss()
- Adventure(5,true)
- $Initialized = 1
- EndIf
- ; Things that need to be looped every x second
- if TimerDiff($ResetTimer) >= $runTime - 10000 Then
- ToolTipLog("Rebirthing...")
- RemoveCaps()
- send("r")
- sleep(100)
- send("t")
- sleep(100)
- send("r")
- sleep(100)
- send("t")
- sleep(100)
- send("r")
- sleep(100)
- send("t")
- SwapItems($PIT_TYPE)
- MoneyPit()
- SwapItems($PIT_TYPE)
- SwapItems($BOSS_TYPE)
- SwapItems($WANDOOS_TYPE)
- SwapItems($SECOND_TYPE)
- SwapItems($MAIN_TYPE)
- SwapItems($BASE_TYPE)
- SwapItems($GOLD_TYPE)
- Rebirth()
- EndIf
- if TimerDiff($FightBossTimer) >= $FightBossTime And TimerDiff($ResetTimer) <= $runTime - 30000 Then
- FightBoss()
- $FightBossTimer = TimerInit()
- EndIf
- if TimerDiff($BoostAndMergeTimer) >= $BoostAndMergeTime And TimerDiff($ResetTimer) <= $runTime - 30000 Then
- BoostItems()
- MergeItems()
- $BoostAndMergeTimer = TimerInit()
- EndIf
- if TimerDiff($ResetTimer) >= $runTime - 15000 Then
- if $LAST_SWAPPED <> $BOSS_TYPE Then
- RemoveCaps()
- send("r")
- sleep(100)
- send("r")
- send("t")
- sleep(100)
- send("t")
- if( $wandoosTime == 0 ) Then
- SwapItems($WANDOOS_TYPE)
- EndIf
- SwapItems($BOSS_TYPE)
- EndIf
- FightBoss()
- EndIf
- if TimerDiff($ResetTimer) >= $swapTime and $swapped == 0 Then
- RemoveCaps()
- send("r")
- sleep(100)
- send("t")
- SwapItems($MAIN_TYPE)
- $swapped = 1
- EndIf
- if TimerDiff($ResetTimer) >= $swapTime1 and $swapped1 == 0 Then
- RemoveCaps()
- send("r")
- sleep(100)
- send("t")
- SwapItems($SECOND_TYPE)
- $swapped1 = 1
- EndIf
- If TimerDiff($resetTimer) >= $runTime-$wandoosTime And $wandoosSwapped == 0 AND $wandoosTime>0 Then
- Sleep($SLEEP_DELAY)
- Send("r");
- Sleep($SLEEP_DELAY)
- Send("r");
- Sleep($SLEEP_DELAY)
- Send("t");
- Sleep($SLEEP_DELAY)
- Send("t");
- Sleep($SLEEP_DELAY)
- GoldMachine($Unassign, $Unassign)
- Augments($Unassign, 0, 0)
- BloodMagic($Unassign, 0)
- SwapItems($WANDOOS_TYPE)
- Wandoos(1)
- $wandoosSwapped = 1
- EndIf
- if TimerDiff($updateTimer) >= 5000 Then
- if TimerDiff($ResetTimer) < $GoldMachineEnergyTime Then
- If TimerDiff($resetTimer) <= 25000 AND TimerDiff($resetTimer) >= 12000 Then
- GoldMachine($Unassign, 0)
- Augments($Assign, $AugmentUsed, 0)
- Else
- Augments($Unassign, $AugmentUsed, 0)
- GoldMachine($Assign, 0)
- EndIf
- EndIf
- if TimerDiff($ResetTimer) < $GoldMachineMagicTime Then
- GoldMachine(0, $Assign)
- EndIf
- if TimerDiff($ResetTimer) >= $GoldMachineEnergyTime and TimerDiff($resetTimer) < $runTime-$wandoosTime then
- If $reassignedEnergy == 0 Then
- ToolTipLog("Reassigned Energy")
- GoldMachine($Unassign, 0)
- NGU(1,true)
- Augments($Assign, $AugmentUsed, 1)
- $reassignedEnergy = 1
- EndIf
- Augments($Assign, $AugmentUsed, 0)
- EndIf
- if TimerDiff($ResetTimer) >= $GoldMachineMagicTime and TimerDiff($resetTimer) < $runTime-$wandoosTime then
- GoldMachine(0, $Assign)
- If $reassignedMagic == 0 Then
- GoldMachine(0, $Unassign)
- ToolTipLog("Reassigned Magic")
- $reassignedMagic = 1
- EndIf
- If $bloodReassignCounter == 4 Then
- Sleep(150)
- Send("t");
- Sleep(150)
- Send("t");
- Sleep(150)
- $bloodReassignCounter = 0
- EndIf
- BloodMagic($Assign, 0)
- GoldMachine(0, $Assign)
- $bloodReassignCounter += 1
- EndIf
- If TimerDiff($resetTimer) >= $NGUTime And $maxNGU == 0 and 1 == 0 Then
- Augments($Unassign, $AugmentUsed, 0)
- Augments($Assign, $AugmentUsed, 1)
- NGU(1-$NGUFraction,true)
- $maxNGU = 1
- Augments($Assign, $AugmentUsed, 0)
- EndIf
- If TimerDiff($resetTimer) >= $runTime-$wandoosTime And $wandoosSwapped == 1 AND $wandoosTime>0 Then
- Wandoos(1)
- EndIf
- $updateTimer = TimerInit()
- EndIf
- while 0
- ; Since i'm not powerful, i'll keep this way for now. Pls change like Anso when we get new gear \o/
- if $IgnoreTimeMachine == 0 And TimerDiff($ResetTimer) <= $runTime - 30000 Then
- ToolTipLog("TM...")
- if TimerDiff($ResetTimer) >= $GoldMachineEnergyTime then
- GoldMachine($Assign, 0)
- EndIf
- if TimerDiff($ResetTimer) >= $GoldMachineMagicTime then
- GoldMachine(0, $Assign)
- EndIf
- if TimerDiff($ResetTimer) >= $GoldMachineEnergyEnd and TimerDiff($ResetTimer) <= $GoldMachineEnergyEnd + 10000 then
- GoldMachine($Unassign, 0)
- EndIf
- if TimerDiff($ResetTimer) >= $GoldMachineMagicEnd and TimerDiff($ResetTimer) <= $GoldMachineMagicEnd + 10000 then
- GoldMachine(0, $Unassign)
- EndIf
- if TimerDiff($ResetTimer) >= $GoldMachineEnergyEnd and TimerDiff($ResetTimer) >= $GoldMachineMagicEnd Then
- GoldMachine($Unassign, $Unassign)
- $IgnoreTimeMachine = 1
- EndIf
- EndIf
- if $IgnoreAugments == 0 And TimerDiff($ResetTimer) <= $runTime - 30000 Then
- ToolTipLog("Augments...")
- if TimerDiff($ResetTimer) >= $AugmentsTime then
- Augments($Assign, 4, 0)
- EndIf
- if TimerDiff($ResetTimer) >= $AugmentsEnd then
- Augments($Unassign, 0, 0)
- $IgnoreAugments = 1
- EndIf
- EndIf
- if $IgnoreBloodMagic == 0 And TimerDiff($ResetTimer) <= $runTime - 30000 Then
- ToolTipLog("Blood...")
- if TimerDiff($ResetTimer) >= $BloodMagicTime then
- BloodMagic($Assign, 0)
- EndIf
- if TimerDiff($ResetTimer) >= $BloodMagicEnd then
- ;BloodMagic($Unassign, 0, 0)
- $IgnoreBloodMagic = 1
- EndIf
- EndIf
- WEnd
- WEnd
- ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^;
- ; MAINLOOP/ MAINLOOP/ MAINLOOP/ MAINLOOP/ MAINLOOP/ MAINLOOP/
- ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
- ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<;
- ;--------------------------------------------------------;
- Func _goToMenu( $indexMenu )
- if $indexMenu >=0 AND $indexMenu <=12 Then
- ; 500 / 350 / 380 / 410
- Local $incrementY = 30;
- Local $startY = 350;
- Click($MOUSE_CLICK_LEFT,500, $startY + ($indexMenu * $incrementY ), 5 )
- Else
- Return
- EndIf
- EndFunc
- ;------------------- INVENTORY -------------------------;
- Func SetupInventoryPosition()
- ;660 / 660
- $startPosition = 660
- $currentPosition = 0
- For $r = 0 To 4 Step 1
- For $c = 0 To 11 Step 1
- local $posToShip = [$startPosition+($c*50), $startPosition+($r*50)-10]
- $InventoryPositions[$currentPosition] = $posToShip
- $currentPosition+=1
- Next
- Next
- ; MIDLE
- local $posToShip = [730, 384]
- $InventoryPositions[$currentPosition] = $posToShip
- CreateItem($BOOST_TYPE, $currentPosition, 0)
- $currentPosition+=1
- local $posToShip = [730, 435]
- $InventoryPositions[$currentPosition] = $posToShip
- CreateItem($BOOST_TYPE, $currentPosition, 0)
- $currentPosition+=1
- local $posToShip = [730, 480]
- $InventoryPositions[$currentPosition] = $posToShip
- CreateItem($BOOST_TYPE, $currentPosition, 0)
- $currentPosition+=1
- local $posToShip = [730, 535]
- $InventoryPositions[$currentPosition] = $posToShip
- CreateItem($BOOST_TYPE, $currentPosition, 0)
- $currentPosition+=1
- ; LEFT
- local $posToShip = [680, 435]
- $InventoryPositions[$currentPosition] = $posToShip
- CreateItem($BOOST_TYPE, $currentPosition, 0)
- CreateItem($MERGE_TYPE, $currentPosition, 0)
- $currentPosition+=1
- local $posToShip = [680, 480]
- $InventoryPositions[$currentPosition] = $posToShip
- CreateItem($BOOST_TYPE, $currentPosition, 0)
- CreateItem($MERGE_TYPE, $currentPosition, 0)
- $currentPosition+=1
- local $posToShip = [680, 535]
- $InventoryPositions[$currentPosition] = $posToShip
- CreateItem($BOOST_TYPE, $currentPosition, 0)
- CreateItem($MERGE_TYPE, $currentPosition, 0)
- $currentPosition+=1
- ; Weapon
- local $posToShip = [780, 435]
- $InventoryPositions[$currentPosition] = $posToShip
- CreateItem($BOOST_TYPE, $currentPosition, 0)
- CreateItem($MERGE_TYPE, $currentPosition, 0)
- $currentPosition+=1
- EndFunc
- Func CreateItem($type, $invPosition, $slotPosition)
- dim $item = [$type, $invPosition, $slotPosition]
- $Equipment[$EquipmentCount] = $item
- $EquipmentCount+=1
- EndFunc
- Func SwapItems($type)
- if( $EquipmentCount <1 ) Then
- Return
- EndIf
- _goToMenu($MenuInventory)
- For $i = 0 To $EquipmentCount - 1 Step 1
- $item = $Equipment[$i]
- if ( $item[0] == $type ) Then
- $pos = $item[1]
- $coord = $InventoryPositions[$pos]
- Local $index
- if $item[2] == 1 Then
- $index = "q"
- ElseIf $item[2] == 2 Then
- $index = "w"
- ElseIf $item[2] == 3 Then
- $index = "e"
- EndIf
- Sleep($SLEEP_DELAY*2)
- Send("{" & $index & " down}")
- Sleep($SLEEP_DELAY*2)
- MouseClick($MOUSE_CLICK_RIGHT, $coord[0], $coord[1], 1, $MOUSE_SPEED)
- Sleep($SLEEP_DELAY*2)
- Send("{" & $index & " up}")
- Sleep($SLEEP_DELAY*2)
- $LAST_SWAPPED = $type
- EndIf
- Next
- ToolTipLog("Swapped to" & TypeToString($LAST_SWAPPED))
- EndFunc
- Func BoostItems()
- if( $EquipmentCount <1 ) Then
- Return
- EndIf
- _goToMenu($MenuInventory)
- Sleep($SLEEP_DELAY)
- Send("{a down}")
- Sleep($SLEEP_DELAY)
- For $i =0 To $EquipmentCount - 1 Step 1
- $item = $Equipment[$i]
- if ( $item[0] == $BOOST_TYPE ) Then
- $pos = $item[1]
- $coord = $InventoryPositions[$pos]
- $index = $item[2]
- MouseClick($MOUSE_CLICK_LEFT, $coord[0], $coord[1], 1, $MOUSE_SPEED)
- EndIf
- Next
- Sleep($SLEEP_DELAY)
- Send("{a up}")
- Sleep($SLEEP_DELAY)
- EndFunc
- Func MergeItems()
- if( $EquipmentCount <1 ) Then
- Return
- EndIf
- Sleep($SLEEP_DELAY)
- Send("{d down}")
- Sleep($SLEEP_DELAY)
- For $i = 0 To $EquipmentCount - 1 Step 1
- $item = $Equipment[$i]
- if ( $item[0] == $MERGE_TYPE ) Then
- $pos = $item[1]
- $coord = $InventoryPositions[$pos]
- $index = $item[2]
- MouseClick($MOUSE_CLICK_LEFT, $coord[0], $coord[1], 1, $MOUSE_SPEED)
- EndIf
- Next
- Sleep($SLEEP_DELAY)
- Send("{d up}")
- Sleep($SLEEP_DELAY)
- Sleep($SLEEP_DELAY)
- Send("{e down}")
- Sleep($SLEEP_DELAY)
- For $i = 0 To $EquipmentCount - 1 Step 1
- $item = $Equipment[$i]
- if ( $item[0] == $MERGE_TYPE ) Then
- $pos = $item[1]
- $coord = $InventoryPositions[$pos]
- $index = $item[2]
- MouseClick($MOUSE_CLICK_LEFT, $coord[0], $coord[1], 1, $MOUSE_SPEED)
- EndIf
- Next
- Sleep($SLEEP_DELAY)
- Send("{e up}")
- Sleep($SLEEP_DELAY)
- EndFunc
- Func ToolTipLog($str)
- $dif = TimerDiff($ResetTimer)
- $dif2 = StringLeft($dif, StringInStr($dif, ".") -1)
- $Count = int($dif/1000)
- if($Log[49] <> "") Then
- for $i = 1 to 49
- $Log[($i-1)] = $Log[$i]
- Next
- $Log[49]=$Count & " : " & $str & @CRLF
- Else
- $Log[$lastLog]=$Count & " : " &$str & @CRLF
- $lastLog+=1
- EndIf
- EndFunc
- Func ResetLog()
- for $i = 0 to 49 step 1
- $Log[$i]=""
- Next
- $lastLog=0
- EndFunc
- ;-------------------- Funcs -----------------------------;
- Func MoneyPit()
- Local $MoneyPitClick = [756,629] ; This is the yes button.
- _goToMenu($MenuMoneyPit)
- Sleep($SLEEP_DELAY)
- Click("left",$MoneyPitClick[0]+50,$MoneyPitClick[1]+50,1)
- Click("left",$MoneyPitClick[0]+40,$MoneyPitClick[1]+40,1)
- Click("left",$MoneyPitClick[0]+30,$MoneyPitClick[1]+30,1)
- Click("left",$MoneyPitClick[0]+20,$MoneyPitClick[1]+20,1)
- Click("left",$MoneyPitClick[0]+10,$MoneyPitClick[1]+10,1)
- Click("left",$MoneyPitClick[0]+50,$MoneyPitClick[1]+50,1)
- Click("left",$MoneyPitClick[0]+40,$MoneyPitClick[1]+40,1)
- Click("left",$MoneyPitClick[0]+30,$MoneyPitClick[1]+30,1)
- Click("left",$MoneyPitClick[0]+20,$MoneyPitClick[1]+20,1)
- Click("left",$MoneyPitClick[0]+10,$MoneyPitClick[1]+10,1)
- EndFunc
- Func FightBoss()
- local $Nuke = [950,425]
- local $Fight = [950, 525]
- _goToMenu($MenuFightBoss)
- Sleep($SLEEP_DELAY)
- Click($MOUSE_CLICK_LEFT, $Nuke[0], $Nuke[1], 1)
- Sleep($SLEEP_DELAY)
- Sleep($SLEEP_DELAY)
- Click($MOUSE_CLICK_LEFT, $Nuke[0], $Nuke[1], 1)
- Sleep($SLEEP_DELAY)
- Sleep($SLEEP_DELAY)
- Click($MOUSE_CLICK_LEFT, $Nuke[0], $Nuke[1], 1)
- Sleep($SLEEP_DELAY)
- For $i = 0 To 5 Step 1
- Sleep($SLEEP_DELAY)
- Click($MOUSE_CLICK_LEFT, $Fight[0], $Fight[1], 1)
- Sleep(5*$SLEEP_DELAY)
- Next
- EndFunc
- Func Adventure($count, $inc)
- local $bossFound = false
- SwapItems($GOLD_TYPE)
- _goToMenu($MenuAdventure)
- if($inc == false) Then
- for $i = 0 To 10 Step 1
- Sleep($SLEEP_DELAY)
- Send("{left}")
- Sleep($SLEEP_DELAY)
- Next
- EndIf
- for $i = 0 To $count Step 1
- Sleep($SLEEP_DELAY)
- Send("{right}")
- Sleep($SLEEP_DELAY)
- Next
- sleep(4500)
- ; Highest boss is here probably, wait for the boss to die
- while $bossFound == False
- If(PixelGetColor(1049,733) == 0xFF0000) Then ; Enemy spawned?
- If (PixelGetColor(1041,617) == 0xF7EF29) Then ; Boss here
- $bossFound = true
- While PixelGetColor(1049,733) == 0xFF0000
- SLEEP(1000)
- WEnd
- Else
- Sleep(100)
- Send("{LEFT}")
- Sleep(100)
- Send("{RIGHT}")
- GoldMachine($Assign, $Assign)
- _goToMenu($MenuAdventure)
- EndIf
- EndIf
- WEnd
- send("r")
- sleep(100)
- send("t")
- Sleep($SLEEP_DELAY)
- Send("{left}")
- Sleep($SLEEP_DELAY)
- SwapItems($BASE_TYPE)
- EndFunc
- Func GoldMachine($energy, $magic)
- _goToMenu($MenuTimeMachine)
- Local $GoldPlus = [855,542]
- Local $GoldMinus = [887,542]
- Local $GoldMagicPlus = [855,642]
- Local $GoldMagicMinus = [887,642]
- Switch $energy
- case $Assign
- Click($MOUSE_CLICK_LEFT,$GoldPlus[0],$GoldPlus[1],2)
- case $Unassign
- Click($MOUSE_CLICK_LEFT,$GoldMinus[0],$GoldMinus[1],2)
- EndSwitch
- Switch $magic
- case $Assign
- Click($MOUSE_CLICK_LEFT,$GoldMagicPlus[0],$GoldMagicPlus[1],2)
- case $Unassign
- Click($MOUSE_CLICK_LEFT,$GoldMagicMinus[0],$GoldMagicMinus[1],2)
- EndSwitch
- EndFunc
- Func Augments($do, $where, $upgrade)
- _goToMenu($MenuAugmentation)
- $x = 0
- if($do == $Unassign) Then
- $x = 890
- Else
- $x = 855
- EndIf
- if $where == 0 Then ; 0 means everything, mostly for unassign part tho
- for $y = 580 To 860 Step 70
- Click($MOUSE_CLICK_LEFT, $x, $y-10, 1)
- Click($MOUSE_CLICK_LEFT, $x, $y+10, 1)
- Next
- Else
- if $upgrade == 1 Then
- Click($MOUSE_CLICK_LEFT, 926, 360, 2)
- Click($MOUSE_CLICK_LEFT, $x, 580+(70*($where-1))+10, 1)
- Click($MOUSE_CLICK_LEFT, 1202, 358, 2)
- Else
- Click($MOUSE_CLICK_LEFT, $x, 580+(70*($where-1))-10, 1)
- EndIf
- EndIf
- EndFunc
- Func BloodMagic($do, $where)
- _goToMenu($MenuBloodMagic)
- $x = 0
- if($do == $Unassign) Then
- $x = 850
- Else
- $x = 880
- EndIf
- if $where == 0 Then ; 0 means everything, mostly for unassign part tho
- Click($MOUSE_CLICK_LEFT, $x, 640, 2)
- Else
- Click($MOUSE_CLICK_LEFT, $x, 535+(35*$where) , 2)
- EndIf
- EndFunc
- Func Rebirth()
- FightBoss()
- Local $RebirthMenu = [413, 719]
- Local $RebirthButton = [815, 830]
- Local $RebirthYes = [756,627]
- Click($MOUSE_CLICK_LEFT,$RebirthMenu[0],$RebirthMenu[1],5)
- Click($MOUSE_CLICK_LEFT,$RebirthButton[0],$RebirthButton[1],5)
- Click($MOUSE_CLICK_LEFT,$RebirthYes[0],$RebirthYes[1],5)
- $FightBossTimer = TimerInit()
- $ResetTimer = TimerInit()
- $BoostAndMergeTimer = TimerInit()
- $FightBossTimer = TimerInit()
- $updateTimer = TimerInit()
- $IgnoreTimeMachine = 0
- $IgnoreAugments = 0
- $IgnoreBloodMagic = 0
- $reassignedEnergy = 0
- $swapped = 0
- $swapped1 = 0
- $wandoosSwapped = 0
- $Initialized = 0
- $rebNumber += 1
- EndFunc
- Func ColRowToInv($col, $row)
- $x = $col-1
- $y = $row-1
- return $x+$y*12
- EndFunc
- Func Setup()
- SetupInventoryPosition()
- ;~ Start as boss, swap to gold/mixed
- ;--------- Gold
- CreateItem($GOLD_TYPE, ColRowToInv(11,3), 0) ; strange head SWAPPED
- CreateItem($GOLD_TYPE, ColRowToInv(12,1), 0) ; 2d chest SWAPPED
- CreateItem($GOLD_TYPE, ColRowToInv(11,1), 0) ; 2d boots SWAPPED
- ;--------- Base CHECK
- CreateItem($BASE_TYPE, ColRowToInv(11,4), 1) ; stapler SWAPPED
- CreateItem($BASE_TYPE, ColRowToInv(11,5), 2) ; Meat SWAPPED
- CreateItem($BASE_TYPE, ColRowToInv(12,4), 3) ; ghost amulet SWAPPED
- ;--------- Main CHECK
- CreateItem($MAIN_TYPE, ColRowToInv(11,3), 0) ; strange rare SWAPPED
- CreateItem($MAIN_TYPE, ColRowToInv(11,2), 2) ; 2d weapon SWAPPED
- ;-------- Second CHECK
- CreateItem($SECOND_TYPE, ColRowToInv(12,1), 0) ; Strange chest SWAPPED
- CreateItem($SECOND_TYPE, ColRowToInv(12,2), 0) ; Ghost weapon SWAPPED
- ;~ $WANDOOS_TYPE
- CreateItem($WANDOOS_TYPE, ColRowToInv(12,3), 0) ; 2d Head SWAPPED
- CreateItem($WANDOOS_TYPE, ColRowToInv(12,2), 0) ; 2d weapon SWAPPED
- CreateItem($WANDOOS_TYPE, ColRowToInv(12,5), 3) ; 2d amulet SWAPPED
- ;-------- Boss HECK
- CreateItem($BOSS_TYPE, ColRowToInv(12,4), 3) ; heart SWAPPED
- CreateItem($BOSS_TYPE, ColRowToInv(11,5), 2) ; aafp SWAPPED
- CreateItem($BOSS_TYPE, ColRowToInv(11,4), 1) ; afp SWAPPED
- CreateItem($BOSS_TYPE, ColRowToInv(11,1), 0) ; strange boots SWAPPED
- CreateItem($BOSS_TYPE, ColRowToInv(11,2), 0) ; gaudy weapon SWAPPED
- CreateItem($BOSS_TYPE, ColRowToInv(12,3), 0) ; gaudy rare SWAPPED
- ;-------- Pit CHECK
- CreateItem($PIT_TYPE, ColRowToInv(10,2), 0) ; jake start SWAPPED
- CreateItem($PIT_TYPE, ColRowToInv(10,3), 0)
- CreateItem($PIT_TYPE, ColRowToInv(10,4), 0)
- CreateItem($PIT_TYPE, ColRowToInv(10,5), 0)
- CreateItem($PIT_TYPE, ColRowToInv(9,1), 2) ; Paper SWAPPED
- CreateItem($PIT_TYPE, ColRowToInv(11,4), 1) ; stapler SWAPPED
- For $r = 1 to 5 Step 1
- For $c = 9 to 12 step 1
- CreateItem($BOOST_TYPE, ColRowToInv($c,$r), 0)
- ;CreateItem($MERGE_TYPE, $currentPosition, 0)
- Next
- Next
- For $r = 1 to 5 Step 1
- For $c = 1 to 4 step 1
- CreateItem($TRANSFORM_TYPE, ColRowToInv($c,$r), 0)
- CreateItem($MERGE_TYPE, ColRowToInv($c,$r), 0)
- Next
- Next
- EndFunc
- Func RemoveCaps()
- GoldMachine($Unassign, $Unassign)
- Augments($Unassign, 0, 0)
- BloodMagic($Unassign, 0)
- EndFunc
- Func NGU($fraction, $ceil)
- _goToMenu($MenuNGU)
- Click($MOUSE_CLICK_LEFT, 930, 360, 5 )
- If $fraction == 0 Then
- For $a = 0 To 5 Step 1
- Click($MOUSE_CLICK_LEFT, 900, 565+$i*45, 1 )
- Sleep($SLEEP_DELAY)
- Next
- Return
- EndIf
- For $i = 0 To 5 Step 1
- Sleep(2*$SLEEP_DELAY)
- $iter = 0
- If $ceil Then
- $iter = Floor($NGUClicks[$i]*$fraction)
- Else
- $iter = Ceiling($NGUClicks[$i]*$fraction)
- EndIf
- For $a = 0 To $iter-1 Step 1
- Click($MOUSE_CLICK_LEFT, 860, 565+$i*45, 1 )
- Sleep($SLEEP_DELAY)
- Next
- Next
- Click($MOUSE_CLICK_LEFT, 1196, 360, 5 )
- EndFunc
- Func Wandoos($bool)
- _goToMenu($MenuWandoos)
- If $bool == 0 Then
- Sleep($SLEEP_DELAY)
- Click($MOUSE_CLICK_LEFT, 900, 560, 5 )
- Sleep($SLEEP_DELAY)
- Click($MOUSE_CLICK_LEFT, 900, 660, 5 )
- Return
- EndIf
- _goToMenu($MenuWandoos)
- Sleep($SLEEP_DELAY)
- Click($MOUSE_CLICK_LEFT, 872, 560, 5 )
- Sleep($SLEEP_DELAY)
- Click($MOUSE_CLICK_LEFT, 872, 660, 5 )
- EndFunc
- ;------------------- GLOBAL ----------------------------;
- Func Click($MouseClick, $positionX, $positionY, $amountOfClicks)
- Sleep($SLEEP_DELAY)
- MouseClick($MouseClick, $positionX, $positionY, $amountOfClicks, $MOUSE_SPEED)
- EndFunc
- Func TogglePause()
- If($pause == true ) Then
- $pause = False
- Else
- $pause = true
- EndIf
- EndFunc
- Func TypeToString($var)
- Select
- case $var == 0
- return "$MAGIC_TYPE"
- case $var == 1
- return "$ENERGY_TYPE"
- case $var == 2
- return "$PIT_TYPE"
- case $var == 3
- return "$BOOST_TYPE"
- case $var == 4
- return "$MERGE_TYPE"
- case $var == 5
- return "$GOLD_TYPE"
- case $var == 6
- return "$MAIN_TYPE"
- case $var == 7
- return "$BOSS_TYPE"
- case $var == 8
- return "$TRANSFORM_TYPE"
- case $var == 9
- return "$SECOND_TYPE"
- case $var == 10
- return "$WANDOOS_TYPE"
- case $var == 11
- return "$BASE_TYPE"
- Case Else
- return "error"
- EndSelect
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement