-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbattle_ActivateChampion - Saitama.py
55 lines (43 loc) · 1.34 KB
/
battle_ActivateChampion - Saitama.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from System.Collections.Generic import List
def getGroundObjectFilter(id, color, range=15):
filter = Items.Filter()
filter.Graphics = List[int]([id])
filter.Hues = List[int]([color])
filter.OnGround = True
filter.Movable = False
filter.RangeMax = range
return filter
def getPentagramFilter():
filter = Items.Filter()
filter.Graphics = List[int]([0x0FEA])
filter.Hues = List[int]([0x0000])
filter.OnGround = True
filter.Movable = False
filter.RangeMax = 5
return filter
def isPentagramExist(filter):
# FIND PENTAGRAM
items = Items.ApplyFilter(filter)
item = Items.Select(items, "Nearest")
if item:
return True
else:
return False
def activateChampion(filter):
# ACTIVATE IDOL OF CHAMPION
skulls = Items.ApplyFilter(filter)
skull = Items.Select(skulls, "Nearest")
# Use Valor to Skull
if skull:
Player.InvokeVirtue("Valor")
Misc.Pause(200)
Target.TargetExecute(skull)
# FILTERS
skullFilter = getGroundObjectFilter(0x1F18, 0x0000, 20)
pentagramFilter = getGroundObjectFilter(0x0FEA, 0x0000, 20)
deactiveStairsFilter = getGroundObjectFilter(0x0759, 0x0497, 20)
# RUN
while not Player.IsGhost:
if isPentagramExist(getGroundObjectFilter(0x1F18, 0x0000, 20)):
activateChampion(getSkull)
Misc.Pause(5000)