-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnano.opy
66 lines (52 loc) · 2.47 KB
/
nano.opy
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
56
57
58
59
60
61
62
63
64
65
66
#!mainFile "ANA_PB.opy"
rule "While score < NANO_SCORE, allow all buttons":
@Event eachPlayer
@Hero ana
@Condition (eventPlayer.getScore() < NANO_SCORE and eventPlayer.isAlive())
wait(0.2) #?
eventPlayer.allowButton(Button.PRIMARY_FIRE)
eventPlayer.allowButton(Button.SECONDARY_FIRE)
eventPlayer.allowButton(Button.MELEE)
eventPlayer.allowButton(Button.RELOAD)
eventPlayer.stopForcingButton(Button.ULTIMATE)
rule "When reaching NANO_SCORE, nanoboost self":
@Event playerEarnedElimination
@Hero ana
@Condition eventPlayer.getScore() == NANO_SCORE
if eventPlayer.isMeleeing():
attacker.MedalQueue.append(Medal.NANOPUNCH)
if eventPlayer.isFiringSecondaryFire(): # for people using toggle scope
eventPlayer.forceButtonPress(Button.SECONDARY_FIRE)
eventPlayer.setUltCharge(100)
eventPlayer.setAbilityCooldown(Button.ABILITY_1, 1)
eventPlayer.forceButtonPress(Button.ULTIMATE)
wait() # for people using "confirm nano target"
eventPlayer.forceButtonPress(Button.ULTIMATE)
rule "When score = NANO_SCORE, disable all except sleep dart, warn other players, display objective":
@Event eachPlayer
@Hero ana
@Condition eventPlayer.getScore() == NANO_SCORE
eventPlayer.disallowButton(Button.PRIMARY_FIRE)
eventPlayer.disallowButton(Button.SECONDARY_FIRE)
eventPlayer.disallowButton(Button.MELEE)
eventPlayer.disallowButton(Button.RELOAD)
bigMessage(getAllPlayers().exclude(eventPlayer), "{0} {1} wins in 1 kill {0}".format(iconString(Icon.WARNING), eventPlayer))
bigMessage(eventPlayer, "{0} use sleep dart to win {0}".format(abilityIconString(Hero.ANA, Button.ABILITY_1)))
rule "While score = NANO_SCORE, sleep dart cooldown is 1.5":
@Event eachPlayer
@Hero ana
@Condition eventPlayer.getScore() == NANO_SCORE
@Condition eventPlayer.isUsingAbility1()
waitUntil(eventPlayer.getAbilityCooldown(Button.ABILITY_1) > 0, 1)
eventPlayer.setAbilityCooldown(Button.ABILITY_1, 1.5)
rule "If NANO_SCORE and died, nanoboost again":
@Event playerDied
@Hero ana
@Condition eventPlayer.getScore() == NANO_SCORE
eventPlayer.disallowButton(Button.ABILITY_1)
waitUntil(eventPlayer.isAlive(), 69)
while eventPlayer.isUsingUltimate() == false:
eventPlayer.setUltCharge(100)
eventPlayer.forceButtonPress(Button.ULTIMATE)
wait()
eventPlayer.allowButton(Button.ABILITY_1)