def BossCheck(): print("Waiting for boss to spawn...") time.sleep(10) for mob in boss: print("Checking for boss: " + str(mob) + "...") while Field.FindMob(mob).valid and GameState.IsInGame(): print("Boss found: " + str(mob) + ", killing boss...") time.sleep(6) for item in eqp: print("Checking for item: " + str(item) + "...") while Field.FindItem(item).valid and GameState.IsInGame(): #Terminal.SetCheckBox("Kami Vac",False) print("item found with id:" + str(item) + ", waiting until item looted") time.sleep(9) for mob in boss: print("Checking for boss: " + str(mob) + "...") while Field.FindMob(mob).valid and GameState.IsInGame(): print("Boss found: " + str(mob) + ", killing boss...") time.sleep(6) for item in eqp: print("Checking for item: " + str(item) + "...") while Field.FindItem(item).valid and GameState.IsInGame(): #Terminal.SetCheckBox("Kami Vac",False) print("item found with id:" + str(item) + ", waiting until item looted") time.sleep(9) print("no boss found or boss killed") time.sleep(6)
def mano(): mob = Field.FindMob(9300815) if mob.valid: Terminal.SetCheckBox("Kami Vac", True) Terminal.SetCheckBox("Auto Attack", True) Character.BasicAttack() if not mob.valid: Terminal.SetCheckBox("Kami Vac", False) Terminal.SetCheckBox("Auto Attack", False) Character.Teleport(68, 150) Character.EnterPortal()
def find_one_box(): print("Searching a Box") flag = False for box_id in NIGHTMARE_BOX: mob = Field.FindMob(box_id) if mob.valid: print("Found Mob", mob, box_id) flag = True return mob print("Found None") return None
def doSS(): Terminal.SetCheckBox("bot/si_no_wait", True) #Terminal.SetCheckBox("main/boss_freeze", True) Terminal.SetCheckBox("Auto Buff", False) for i in range(roundsPerRun): killCount = 0 mobsKilled = [] while killCount < 5: if not GameState.IsInGame() or not isInSS(): print("Not in SS!") break curMob = "" for mobID in mobArray: mob = Field.FindMob(mobID) if mob.valid and mob not in mobsKilled: curMob = mob mobsKilled.append(mob) break if curMob != "": SunCat.KamiTP(curMob.x, curMob.y) time.sleep(killTime) Key.Press(npcChatKey) time.sleep(0.2) Key.Press(npcChatKey) time.sleep(waitTime) killCount += 1 else: print("No mobs left!") time.sleep( 3) #Wait for mobs to respawn - this should never be hit SunCat.KamiTP(baseX, baseY) time.sleep(roundWaitTime) Terminal.SetCheckBox("bot/si_no_wait", False) #Terminal.SetCheckBox("main/boss_freeze", False) Terminal.SetCheckBox("Auto Buff", True) SunCat.StopTP() print("Finished!")
def runSS(): for i in range(roundsPerRun): killCount = 0 mobsKilled = [] while killCount < 5: if not GameState.IsInGame() or not inSS(): print("Not in SS!") break curMob = None for mobID in ssMobArray: mob = Field.FindMob(mobID) if mob.valid and mob not in mobsKilled: curMob = mob mobsKilled.append(mob) break if curMob is not None: SunCat.KamiTP(curMob.x, curMob.y) time.sleep(killTime) Key.Press(npcChatKey) time.sleep(0.2) Key.Press(npcChatKey) time.sleep(waitTime) killCount += 1 else: print("No mobs left!") time.sleep( 3) #Wait for mobs to respawn - this should never be hit SunCat.KamiTP(ssBaseX, ssBaseY) time.sleep(roundWaitTime) SCLib.UpdateVar("CurSSRuns", SCLib.GetVar("CurSSRuns") + 1) SCLib.UpdateVar("CurStep", "FinishingSS")
def startDD(): if Field.GetID() >= ddMap and Field.GetID() <= ddMapEnd: curStage = SunCat.GetDDStage() if curStage >= ddExitLevel: SunCat.StopTP() retreatDD() time.sleep(4) else: boxFound = False for box in ddPurpleBoxes: curBox = Field.FindMob(box) if curBox.valid: boxFound = True if SCLib.GetVar("UsingSI"): Terminal.SetCheckBox("Skill Injection", True) SunCat.KamiTP(curBox.x + kamiOffsetX, curBox.y + kamiOffsetY) break if boxFound == False: Terminal.SetCheckBox("Skill Injection", False) SunCat.KamiTP(ddRestX, ddRestY) elif Field.GetID() == ddExitMap: SunCat.StopTP() #SunCat.UnfilterMobs() Character.TalkToNpc(ddNpc) else: if SCLib.GetVar("RetryCount") < 3: print("Failed to enter DD... Retrying") SCLib.UpdateVar("RetryCount", SCLib.GetVar("RetryCount") + 1) SCLib.UpdateVar("CurStep", "InitDD") else: print("Finished DD") SunCat.UnhookDD() SCLib.UpdateVar("CurStep", "InitSS") SCLib.UpdateVar("CurDaily", "SS") SCLib.UpdateVar("RetryCount", 0)
def KillHorntail(bossDifficulty): SCLib.PersistVar("HasSpawned", False) SCLib.PersistVar("NowLockedVar", False) HasSpawned = SCLib.GetVar("HasSpawned") NowLockedVar = SCLib.GetVar("NowLockedVar") SCLib.StartVars() if bossDifficulty == 0: HorntailEasy = True HorntailNormal = False HorntailChaos = False elif bossDifficulty == 1: HorntailEasy = False HorntailNormal = True HorntailChaos = False else: HorntailEasy = False HorntailNormal = False HorntailChaos = True HorntailPreQuest = Quest.GetQuestState(7313) if HorntailPreQuest == 0: print( "Horntail Prequest not started or done, Starting quest before entery" ) if Field.GetID() != CaveOfLifeEntrance1: Terminal.Rush(CaveOfLifeEntrance1) else: Quest.StartQuest(7313, 2081006) print("Horntail Prequest started") else: #ToggleKami(False) print("Doing Horntail") if HorntailEasy: print("Easy") if Field.GetID() != HorntailsCaveEasy: if Field.GetID() != TheCaveOfTrialEasy2: if Field.GetID() != TheCaveOfTrialEasy1: if Field.GetID() != EntranceToHorntailsCave: GotoHorntail() else: if not NowLockedVar: Npc.ClearSelection() Npc.RegisterSelection( "Easy Mode (Level 130 or above)") time.sleep(1) Character.TalkToNpc(2083004) time.sleep(1) else: print( "Seems like you diddnt finish your last attempt and are locked. Continueing other bosses" ) SCLib.UpdateVar("KillHorntail", False) ResetNowLockedFunction() else: NowLockedFunction() boss = Field.FindMob(HorntailsLeftHeadEasy) if boss.valid: ToggleKami(False) if Character.GetPos().x != 522: Character.Teleport(522, -40) print("Horntails left head still alive standby") else: ToggleFaceLeft(True) ToggleKami(False) if Character.GetPos().x != 840: Character.Teleport(840, -165) else: Character.EnterPortal() else: boss = Field.FindMob(HorntailsRightHeadEasy) if boss.valid: ToggleKami(False) ToggleAttack(True) if Character.GetPos().x != 9: Character.Teleport(9, -40) print("Horntails right head still alive standby") else: ToggleFaceLeft(False) ToggleKami(False) if Character.GetPos().x != -307: Character.Teleport(-307, -165) else: Character.EnterPortal() else: boss = Field.FindMob(EasyHorntail) if boss.valid: ToggleAttack(True) DidSpawn() ToggleKami(True) print("Horntail still alive Standby") else: if HasSpawned: ToggleKami(False) ToggleLoot(True) print( "Horntail Easy Is dead waiting 10 sec before continueing" ) time.sleep(10) Character.TalkToNpc(2083002) time.sleep(1) SCLib.UpdateVar("KillHorntail", False) ToggleLoot(False) ResetSpawn() ResetNowLockedFunction() else: ToggleKami(False) ToggleAttack(False) crystal = Field.FindReactor(2401300) if crystal.valid: if Character.GetPos().x != 540: Character.Teleport(540, 15) else: Character.BasicAttack() time.sleep(2) elif HorntailNormal: print("Normal") if Field.GetID() not in HorntailsCaveNormal: if Field.GetID() not in TheCaveOfTrialNormal2: if Field.GetID() not in TheCaveOfTrialNormal1: if Field.GetID() != EntranceToHorntailsCave: GotoHorntail() else: if not NowLockedVar: Npc.ClearSelection() Npc.RegisterSelection( "Normal Mode (Level 130 or above)") time.sleep(1) Character.TalkToNpc(2083004) time.sleep(1) else: print( "Seems like you diddnt finish your last attempt and are locked. Continueing other bosses" ) SCLib.UpdateVar("KillHorntail", False) ResetNowLockedFunction() else: NowLockedFunction() boss = Field.FindMob(HorntailsLeftHeadNormal) if boss.valid: ToggleKami(False) ToggleAttack(True) if Character.GetPos().x != 522: Character.Teleport(522, -40) print("Horntails left head still alive standby") else: ToggleFaceLeft(True) ToggleKami(False) if Character.GetPos().x != 840: Character.Teleport(840, -165) else: Character.EnterPortal() else: boss = Field.FindMob(HorntailsRightHeadNormal) if boss.valid: ToggleKami(False) if Character.GetPos().x != 9: Character.Teleport(9, -40) print("Horntails right head still alive standby") else: ToggleFaceLeft(False) ToggleKami(False) if Character.GetPos().x != -307: Character.Teleport(-307, -165) else: Character.EnterPortal() else: boss = Field.FindMob(NormalHorntail) if boss.valid: ToggleAttack(True) ToggleKami(True) DidSpawn() print("Horntail Normal still alive Standby") else: if HasSpawned: ToggleKami(False) ToggleLoot(True) print( "Horntail Normal Is dead waiting 10 sec before continueing" ) time.sleep(10) Character.TalkToNpc(2083002) time.sleep(1) ToggleLoot(False) SCLib.UpdateVar("KillHorntail", False) ResetSpawn() ResetNowLockedFunction() else: ToggleAttack(False) ToggleKami(False) crystal = Field.FindReactor(2401000) if crystal.valid: if Character.GetPos().x != 540: Character.Teleport(540, 15) else: Character.BasicAttack() time.sleep(2) elif HorntailChaos: print("Chaos") if Field.GetID() not in ChaosHorntailsCave: if Field.GetID() not in TheCaveOfTrialChaos2: if Field.GetID() not in TheCaveOfTrialChaos1: if Field.GetID() != EntranceToHorntailsCave: GotoHorntail() else: if not NowLockedVar: Npc.ClearSelection() Npc.RegisterSelection( "Chaos Mode (Level 135 or above)") time.sleep(1) Character.TalkToNpc(2083004) time.sleep(1) else: print( "Seems like you diddnt finish your last attempt and are locked. Continueing other bosses" ) SCLib.UpdateVar("KillHorntail", False) ResetNowLockedFunction() else: NowLockedFunction() boss = Field.FindMob(ChaosHorntailsLeftHead) if boss.valid: ToggleKami(False) ToggleAttack(True) while Character.GetPos().x not in range(500, 570): Character.AMoveX(522) print("Horntails left head still alive standby") else: ToggleFaceLeft(True) ToggleKami(False) if Character.GetPos().x != 840: Character.Teleport(840, -165) else: Character.EnterPortal() else: boss = Field.FindMob(ChaosHorntailsRightHead) if boss.valid: ToggleKami(False) ToggleAttack(True) while Character.GetPos().x not in range(-40, 40): Character.AMoveX(9) print("Horntails right head still alive standby") else: ToggleFaceLeft(False) ToggleKami(False) if Character.GetPos().x != -307: Character.Teleport(-307, -165) else: Character.EnterPortal() else: boss = Field.FindMob(ChaosHorntail) boss1 = Field.FindMob(ChaosHorntail1) boss2 = Field.FindMob(ChaosHorntail2) boss3 = Field.FindMob(ChaosHorntail3) boss4 = Field.FindMob(ChaosHorntail4) if boss.valid or boss1.valid or boss2.valid or boss3.valid or boss4.valid: ToggleAttack(True) #ToggleKami(True) DidSpawn() while Character.GetPos().x not in range(140, 220): Character.AMoveX(183) print("Horntail still alive, Standby") else: if HasSpawned: ToggleKami(False) ToggleLoot(False) #print("Horntail Is dead waiting 10 sec before continueing") print("Looting") Terminal.SetCheckBox("Auto Loot", True) MoveToXLocation(Field.GetRect().left) time.sleep(1.5) MoveToXLocation(Field.GetRect().right) time.sleep(1.5) MoveToXLocation(Field.GetRect().left) time.sleep(1.5) MoveToXLocation(Field.GetRect().right) time.sleep(1.5) MoveToXLocation(Field.GetRect().left) time.sleep(1.5) #time.sleep(10) Character.TalkToNpc(2083002) time.sleep(1) SCLib.UpdateVar("KillHorntail", False) ToggleLoot(False) ResetSpawn() ResetNowLockedFunction() else: ToggleAttack(False) ToggleKami(False) crystal = Field.FindReactor(2401100) if crystal.valid: if Character.GetPos().x != 540: Character.Teleport(540, 15) else: Character.BasicAttack() time.sleep(2)
def GetMob(self): mobCheck = Field.FindMob(self.mobID) if mobCheck.valid: return mobCheck return None
elif quest11 != 2: talkquest(quest11, 34462, 450005200, 450005200, 3003307, 3003308) elif quest12 != 2: talkquest(quest12, 34463, 450005200, 450005220, 3003307, 3003311) elif quest13 != 2: if quest13 == 0: rush(450005220) time.sleep(2) Quest.StartQuest(34464, 3003311) time.sleep(5) Character.Teleport(500, 50) time.sleep(10) Character.Teleport(-1340, 70) if not Field.FindMob(86440141).valid: Key.Press(0x26) Key.Press(0x88) time.sleep(10) Character.Teleport(375, 50) time.sleep(10) Character.Teleport(-1380, -285) time.sleep(10) Key.Press(0x26) Key.Press(0x88) time.sleep(10) Character.Teleport(-350, 70) time.sleep(10) Character.Teleport(-1370, -50) time.sleep(10) Key.Press(0x26)
def find_one_box(): for box_id in NIGHTMARE_BOX: mob = Field.FindMob(box_id) if mob.valid: return mob return None