-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbot_custom_events.inc
71 lines (61 loc) · 1.86 KB
/
bot_custom_events.inc
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
67
68
69
70
71
|
| bot_custom_events.inc
|
| Add your custom code here for event responses.
|
| Sub SetupCustomEvents MUST EXIST
|------------------
| SetupCustomEvents
| This sub will be called once during program startup. Use it to setup timers and such.
|------------------
Sub SetupCustomEvents
| hateplaneb
/if (${Zone.ID}==76) /declare InnyDoomTimer timer global 5s
/return
|------------
| Event_Timer
| Built in function that will trigger any time a timer expires.
| Use this to call special handling routines as needed based on what timer expired.
|------------
Sub Event_Timer(Timer,OriginalValue)
/if (${String[${Timer}].Equal[InnyDoomTimer]}) /call InnyDoomTimer ${OriginalValue}
/return
|
|### hateplaneb Inny Doom
|
#event InnyDoom "#*#You feel a sense of doom upon you.#*#"
Sub Event_InnyDoom
/if (${AnnounceChannel.NotEqual[NULL]}) /docommand /${AnnounceChannel} Inny wants to DT me!
/while ( ${Me.Song[Doom].ID} && ${Me.State.NotEqual[HOVER]} ) {
/bc -- Need Cure for Doom --
/delay 2s ${Spawn[Cleansing Aura].ID}
/doevents
/moveto id ${Spawn[Cleansing Aura].ID} loose
/delay 2s ${Math.Distance[${Me.Y},${Me.X}:${YLOC},${XLOC}]}<10
}
/return
Sub InnyDoomTimer(OriginalValue)
/if (${Zone.ID}==76) {
/call InnyDoomAura
}
/varset InnyDoomTimer ${OriginalValue}
/return
Sub InnyDoomAura
| Calls the Aura location for the raid, fixed approximate X locations are:
| X=104 == door
| X=125 == Corner
| X=-4 == Spawn
/if (${Zone.ID}==76 && ${Spawn[Cleansing Aura].ID}) {
/declare X int local
/varset X ${Spawn[Cleansing Aura].X}
/if (${X} < 0) {
/rsay Aura at SPAWN
} else /if ( ${X} < 112 ) {
/rsay Aura at DOOR
} else {
/rsay Aura at CORNER
}
} else {
/bc Can't find cleansing aura!
}
/return