-
Notifications
You must be signed in to change notification settings - Fork 0
/
p3_events.inc
executable file
·845 lines (668 loc) · 23.8 KB
/
p3_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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
#event followMe "<#1#> e3 follow me"
#event followMe "<#1#> e3 follow me #2#"
#event followMe "<#1#> p3 follow me"
#event followMe "<#1#> p3 follow me #2#"
#event followMe "[#1#(msg)] p3 follow me"
#event followMe "[#1#(msg)] p3 follow me #2#"
SUB EVENT_followMe(string line, string chatSender, string opts) {
/if (${Defined[opts]}==FALSE) /declare opts string local ${defaultStickOpts}
/if (${Spawn[pc =${chatSender}].ID}==${Me.ID}) /return
/invoke ${cq.Append[FOLLOW;AUTHOR=${chatSender};SPAWNID=${Spawn[pc =${chatSender}].ID};STICKOPTS=${opts}]}
/varset hardLoopReset TRUE
/RETURN
}
#event idle "<#*#> p3 idle #1#"
SUB EVENT_idle(string line, string newMode) {
/if (${newMode.Upper.Equal[ON]}) {
/bc Idle on.
/notify AdvancedDisplayOptionsWindow ADOW_MaxBGFPSSlider newvalue ${Math.Calc[3-9]}
} else {
/bc Idle off.
/notify AdvancedDisplayOptionsWindow ADOW_MaxBGFPSSlider newvalue ${Math.Calc[25-9]}
}
/RETURN
}
#event stop "<#1#> e3 stop"
#event stop "<#1#> p3 stop"
SUB EVENT_stop(string line, string chatSender) {
/invoke ${cq.Append[STOP;AUTHOR=${chatSender};ASSISTHOLDTIMER=50]}
/RETURN
}
#event addDebuffs "<#1#> p3 debuffs on #2#"
#event addDebuffs "[#1#(msg)] p3 debuffs on #2#"
SUB EVENT_addDebuffs(string line, string chatSender, string spawnID) {
/if (${Spawn[id ${spawnID}].ID}==NULL) {
/bc No spawn with ID: ${spawnID} found.
/return
} else {
/bc Adding ${Spawn[id ${spawnID}].CleanName} for auto-debuffs...
}
/call addTargetForDebuffs ${spawnID}
/RETURN
}
#event kill "[#1#(msg)] p3 kill #2#"
#event kill "<#1#> p3 kill #2#"
#event kill "[#1#(msg)] assist on #2#"
#event kill "<#1#> assist on #2#"
#event kill "[#1#(msg)] p3 assist on #2#"
#event kill "<#1#> p3 assist on #2#"
SUB event_kill(string line, string chatSender, string spawnID) {
/if (${assistLock}==TRUE) /RETURN
/invoke ${cq.Append[KILL;AUTHOR=${chatSender};SPAWNID=${spawnID}]}
/RETURN
}
#event killLock "[#1#(msg)] p3 killlock #2#"
#event killLock "<#1#> p3 killlock #2#"
#event killLock "[#1#(msg)] assistlock on #2#"
#event killLock "<#1#> assistlock on #2#"
SUB event_killLock(string line, string chatSender, string spawnID) {
/echo ${spawnID}
/invoke ${cq.Append[KILL;AUTHOR=${chatSender};SPAWNID=${spawnID};LOCK=YES;]}
/RETURN
}
#Event buffRequest "#*# tells you, '#2# #1#'"
#Event buffRequest "#1# tells you, '#2#'"
SUB EVENT_buffRequest(string line, string who, string msg)
/declare i int local 0
/declare requestKeyword ${msg.Upper.Replace[ ,]}
/declare spawnID int local
/declare spellName string local
/declare queueEntry string local
/declare repeatBuff int local 0
/if (${brSameGuildOnly}==TRUE && ${Me.Guild.Length}==0) /RETURN
/if (${brSameGuildOnly}==TRUE && ${Spawn[=${who}].Guild.Length}==0) /RETURN
/if (${brSameGuildOnly}==TRUE && ${Spawn[=${who}].Guild.NotEqual[${Me.Guild}]}) /RETURN
/if (${msg.Right[1].Equal[!]}) {
/varset repeatBuff 1
/varset requestKeyword ${requestKeyword.Left[-1]}
}
/for i 1 to ${iniBuffRequests.Size}
/if (${iniBuffRequests[${i},1].Equal[-]}) /break
/if (${Select[${requestKeyword},${iniBuffRequests[${i},${bKeyword}]}]}!=0) {
/varset spawnID ${Spawn[pc ${who}].ID}
/varset spellName ${iniBuffRequests[${i},1]}
/varset queueEntry ${spawnID}_${spellName}_${i}_${repeatBuff}
/if (${iniBuffRequests[${i},${bRequireTargetClass}].NotEqual[-]}) {
/if (${Select[${Spawn[id ${spawnID}].Class.ShortName},${iniBuffRequests[${i},${bRequireTargetClass}]}]}==0) /continue
}
/if (${repeatBuff}==1) {
/if (${repeatBuffsQueue.Index[${spawnID}_${i}]}>-1) {
/tell ${who} You're already in my list for repeat buffs for ${spellName}.
/continue
} else {
/invoke ${repeatBuffsQueue.Append[${spawnID}_${i}]}
/em beams a smile at ${who}.
}
} else {
/if (${buffQueue.Contains[${queueEntry}]}==TRUE) {
/tell ${who} You're already queued to receive ${spellName}.
/continue
} else {
/invoke ${buffQueue.Append[${queueEntry}]}
/em nods at ${who}.
}
}
}
/next i
/RETURN
#Event pleaseBuffs "#*#says, '#1# needs buffs'"
#Event pleaseBuffs "#*#says, '#1# needs buffs.'"
#Event pleaseBuffs "#1# needs buffs."
SUB EVENT_pleaseBuffs(string line, string emoter, string hailee)
/if (${brEnabled}==FALSE) /return
/if (${needsBuffPlayerQueue.Index[${emoter}]}>-1) /return
/invoke ${needsBuffPlayerQueue.Append[${emoter}]}
/em looks ${emoter} up and down.
/delay 2
/RETURN
#Event pleaseBuffsMe "#1# says, 'i need buffs'"
#Event pleaseBuffsMe "#1# says, 'i need buffs.'"
#Event pleaseBuffsMe "#1# tells you, 'i need buffs.'"
#Event pleaseBuffsMe "#1# tells you, 'i need buffs'"
SUB EVENT_pleaseBuffsMe(string line, string emoter, string hailee)
/if (${brEnabled}==FALSE) /return
/if (${needsBuffPlayerQueue.Index[${emoter}]}>-1) /return
/invoke ${needsBuffPlayerQueue.Append[${emoter}]}
/em looks ${emoter} up and down.
/delay 2
/RETURN
#Event hailResponse "#1# says, 'Hail, #2#'"
SUB EVENT_hailResponse(string line, string hailer, string hailee)
/if (${brEnabled}==FALSE) /return
/if (${hailee.NotEqual[${Me.CleanName}]}) /return
/declare response string local
/declare i int local 0
/declare spewedSpells string local
/declare cleanKeywords string local
/varset response Send me a tell with one of the following requests:
/for i 1 to ${Math.Calc[${iniBuffRequests.Size}-3]}
/if (${spewedSpells.Find[${iniBuffRequests[${i},1]},]}!=NULL) /continue
/if (${iniBuffRequests[${i},1].Equal[NULL]}) /break
/varset cleanKeywords ${iniBuffRequests[${i},${bKeyword}].Upper.Replace[EMOTABLE,]}
/if (${cleanKeywords.Find[!HIDE]}!=NULL) /continue
/if (${cleanKeywords.Right[1].Equal[,]}) /varset cleanKeywords ${cleanKeywords.Left[-1]}
/varset response ${response} ... [ ${cleanKeywords} => ${iniBuffRequests[${i},1]} ]
/varset spewedSpells ${iniBuffRequests[${i},1]},${spewedSpells}
/next i
/if (${brReplyViaTell}==TRUE) {
/docommand /tell ${hailer} ${response} (${Me.PctMana}m).
} else {
/say Hail, ${hailer}. ${response} (${Me.PctMana}m).
}
/RETURN
#EVENT clearBuffRequests "#*#p3 cbr#*#"
SUB event_clearBuffRequests(line, ChatSender)
/bc Clearing all single, repeat, and emoted buff requests.
/invoke ${repeatBuffsQueue.Clear}
/invoke ${buffQueue.Clear}
/invoke ${needsBuffPlayerQueue.Clear}
/RETURN
#event setAMTags "[#*#(msg)] e3 past #1#"
#event setAMTags "<#*#> e3 past #1#"
#event setAMTags "[#*#(msg)] p3 past #1#"
#event setAMTags "<#*#> p3 past #1#"
SUB EVENT_setAMTags(string line, string newTags)
/if (${newTags.Upper.Equal[NONE]} || ${newTags.Upper.Equal[CLEAR]}) {
/invoke ${assistTags.Clear}
/bc Not using any assist spell tags now.
} else {
/invoke ${assistTags.Clear}
/invoke ${assistTags.Append[${newTags}]}
/bc Assist tags are now: ${newTags}
}
/invoke ${cq.Append[TAGSCHANGED;]}
/RETURN
#event addPASTTags "[#*#(msg)] p3 pastadd #1# #2#"
#event addPASTTags "<#*#> p3 pastadd #1# #2#"
#event addPASTTags "[#*#(msg)] p3 pastadd #1#"
#event addPASTTags "<#*#> p3 pastadd #1#"
SUB EVENT_addPASTTags(string line, string newTags, string dur)
/declare i int local
/declare tok string local
/for i 1 to ${Math.Calc[${newTags.Count[,]}+1]}
/varset tok ${newTags.Token[${i},,]}
/if (${assistTags.Contains[${tok.Lower}]}==FALSE) {
/invoke ${assistTags.Append[${tok}]}
/bc Adding ${tok} to assist tags.
/if (${Defined[dur]}==TRUE) {
/call lockout past_${tok} ${dur}
/echo adding lockout for ${tok} => ${dur}
}
}
/next i
/invoke ${cq.Append[TAGSCHANGED;]}
/doevents flush addPASTTags
/RETURN
#event remPASTTags "[#*#(msg)] e3 pastrem #1#"
#event remPASTTags "<#*#> e3 pastrem #1#"
#event remPASTTags "[#*#(msg)] p3 pastrem #1#"
#event remPASTTags "<#*#> p3 pastrem #1#"
SUB EVENT_remPASTTags(string line, string remTags)
/call removePastTags "${remTags}"
/RETURN
#event setTwist "[#1#(msg)] p3 twist #2#"
#event setTwist "<#1#> p3 twist #2#"
SUB event_setTwist(string line, string chatSender, string newOrder) {
/if (${Me.Class.ShortName.NotEqual[BRD]}) /return
/if (${newOrder.Upper.Equal[OFF]}) {
/twist off
/timed 5 /twist off
/varset doTwist FALSE
/bc Twist is now off.
/return
} else {
/varset doTwist TRUE
/bc Twist is now on.
}
/invoke ${cq.Append[NEWTWIST;ORDER=${newOrder}]}
/RETURN
}
#event perf "[#1#(msg)] p3 perf"
#event perf "<#1#> p3 perf"
SUB event_perf(string line, string chatSender, string newOrder) {
/declare i int local
/for i 0 to ${Math.Calc[ ${modules.Count}-1 ]}
/echo ${modules.Item[${i}]} ::: ${Math.Calc[(${p3_${modules.Item[${i}]}_perftime}+1) / (${MacroQuest.Running} - ${perfStart}) * 100 ]}%
/next i
/echo idle:: ${Math.Calc[(${perfIdle}+1) / (${MacroQuest.Running} - ${perfStart}) * 100 ]}%
/RETURN
}
#event toggleSlay "[#*#(msg)] e3 slay #1#"
#event toggleSlay "<#*#> e3 slay #1#"
#event toggleSlay "[#*#(msg)] p3 slay #1#"
#event toggleSlay "<#*#> p3 slay #1#"
SUB EVENT_toggleSlay(string line, string newMode) {
/if (${amSlayLeader}==FALSE) /RETURN
/if (${newMode.Upper.Equal[ON]}) {
/varset slayEnabled TRUE
/bc Slay Mode is now ON.
} else /if (${newMode.Upper.Equal[OFF]}) {
/varset slayEnabled FALSE
/bc Slay Mode is now OFF.
}
/RETURN
}
#event buildSlayTeam "[#*#(msg)] e3 build slay team"
#event buildSlayTeam "<#*#> e3 build slay team"
#event buildSlayTeam "[#*#(msg)] p3 build slay team"
#event buildSlayTeam "<#*#> p3 build slay team"
SUB EVENT_buildSlayTeam(string line, string newMode) {
/if (${amSlayLeader}==FALSE) /RETURN
/call slayBuildTeam
/RETURN
}
#EVENT campCommand "[#1#(msg)] p3 camp #2#"
#EVENT campCommand "<#1#> p3 camp #2#"
#EVENT campCommand "[#1#(msg)] e3 camp #2#"
#EVENT campCommand "<#1#> e3 camp #2#"
SUB EVENT_campCommand(string line, string source, string newMode)
/if (${Spawn[=${source}].ID}==NULL) {
/bc Ignoring because ${source} is not in my zone.
/return
}
/if (${newMode.Upper.Equal[OFF]}) {
/invoke ${cq.Append[CAMPOFF;SOURCENAME=${source}]}
/return
}
/if (${newMode.Upper.Equal[HERE]}) {
/invoke ${cq.Append[CAMPON;TYPE=LOC;SOURCENAME=${source};LOCX=${Spawn[${source}].X};LOCY=${Spawn[${source}].Y};LOCZ=${Spawn[${source}].Z}]}
/return
}
/if (${newMode.Upper.Equal[THERE]}) {
/invoke ${cq.Append[CAMPON;TYPE=SPAWN;SPAWNTARGETID=${Me.ID}]}
/return
}
| IF "NEWMODE" WAS NOT HERE OR THERE, THEN ASSUME IT WAS A SPAWN
/if (${Spawn[=${newMode}].ID}!=NULL) {
/invoke ${cq.Append[CAMPON;TYPE=SPAWN;SPAWNTARGETID=${Spawn[=${newMode}].ID}]}
/return
}
/RETURN
#event retreatHere "[#1#(msg)] p3 retreat #2#"
#event retreatHere "<#1#> p3 retreat #2#"
SUB event_retreatHere(string line, string who, string newMode)
/if (${newMode.Upper.Equal[HERE]}) {
/invoke ${cq.Append[RETREATON;LOCXYZ=${Spawn[pc ${who}].X} ${Spawn[pc ${who}].Y} ${Spawn[pc ${who}].Z}]}
} else /if (${newMode.Upper.Equal[OFF]}) {
/invoke ${cq.Append[RETREATOFF;]}
}
/RETURN
#event anchorHere "[#1#(msg)] p3 anchor #2#"
#event anchorHere "<#1#> p3 anchor #2#"
SUB event_anchorHere(string line, string who, string newMode)
/if (${newMode.Upper.Equal[HERE]}) {
/invoke ${cq.Append[DROPANCHOR;LOCXYZ=${Spawn[pc ${who}].X} ${Spawn[pc ${who}].Y} ${Spawn[pc ${who}].Z}]}
/bc Achor point set at ${who}'s location.
} else /if (${newMode.Upper.Equal[OFF]}) {
/invoke ${cq.Append[RAISEANCHOR;]}
/bc Achor raised.
}
/RETURN
#event adistChange "#*#tells the raid, 'p3 adist #1#'"
#event adistChange "[#*#(msg)] p3 adist #1#"
#event adistChange "<#*#> p3 adist #1#"
#event adistChange "[#*#(msg)] e3 adist #1#"
#event adistChange "<#*#> e3 adist #1#"
SUB EVENT_adistChange(string line, string newDist)
/varset meleeStickDistance ${newDist}
/call setActiveStickParams ${stickMode}
/varset needRestick TRUE
/bc Melee stick distance is now ${newDist}
/RETURN
#EVENT adhocCast "[#1#(msg)] e3 cast #2#@#3#"
#EVENT adhocCast "<#1#> e3 cast #2#@#3#"
#EVENT adhocCast "[#1#(msg)] p3 cast #2#@#3#"
#EVENT adhocCast "<#1#> p3 cast #2#@#3#"
SUB EVENT_adhocCast(string line, string chatSender, string castName, string castTarget)
/call addCastOrder "${castName.Upper}" "${castTarget}" FALSE
/RETURN
#EVENT roamWith "[#1#(msg)] e3 roam with #1#"
#EVENT roamWith "<#*#> e3 roam with #1#"
#EVENT roamWith "[#1#(msg)] p3 roam with #1#"
#EVENT roamWith "<#*#> p3 roam with #1#"
SUB EVENT_roamWith(string line, string spawnSearch)
/if (${Spawn[=${spawnSearch}].ID}==NULL) {
/bc Ignoring because ${spawnSearch} is not in my zone.
/RETURN
}
/varset roamTargetID ${Spawn[${spawnSearch}].ID}
/invoke ${cq.Append[ROAMLOCK;TARGETID=${roamTargetID};]}
/RETURN
#EVENT stopRoam "[#1#(msg)] e3 roam off"
#EVENT stopRoam "<#1#> e3 roam off"
#EVENT stopRoam "[#1#(msg)] p3 roam off"
#EVENT stopRoam "<#1#> p3 roam off"
SUB EVENT_stopRoam(string line, string source) {
/invoke ${cq.Append[ROAMOFF;SOURCENAME=${source};]}
/RETURN
}
#event autoMed "[#1#(msg)] p3 automed #2#"
#event autoMed "<#1#> p3 automed #2#"
SUB event_autoMed(string line, string who, string newMode)
/if (${ignoreAutoMed}==TRUE) /return
/if (${newMode.Upper.Equal[ON]}) {
/call setAutoMed TRUE
} else /if (${newMode.Upper.Equal[OFF]}) {
/call setAutoMed FALSE
}
/RETURN
#EVENT medOffFromHit "#*# YOU for#*#points of dam#*#"
SUB EVENT_medOffFromHit
/if (${doAutoMed}==TRUE) {
/call pauseAutoMed 20s
}
/RETURN
#event expSpammerResponder "#*#You gained raid experience#*#"
#event expSpammerResponder "#*#You gain party experience#*#"
#event expSpammerResponder "#*#You gain experience#*#"
SUB event_expSpammerResponder
/call expTrackerNewExp
/return
#event buffsEnabled "[#1#(msg)] p3 buffs #2#"
#event buffsEnabled "<#1#> p3 buffs #2#"
SUB event_buffsEnabled(string line, string who, string newMode)
/if (${newMode.Upper.Equal[ON]}) {
/varset buffsEnabled TRUE
/bc Buffs are now ON.
} else /if (${newMode.Upper.Equal[OFF]}) {
/varset buffsEnabled FALSE
/bc Buffs are now OFF.
}
/RETURN
#event tauntSuccess "You capture #*# attention!"
#event tauntSuccess "You capture #*# with your unparalleled reproach!"
SUB EVENT_tauntSuccess(string line, string newMode)
/if (${Target.ID}==NULL) /return
/invoke ${tauntSuccessList.Append[${Target.ID}_${MacroQuest.Running}]}
/RETURN
#EVENT autoRezToggle "#*#p3 autorez #1#"
SUB event_autoRezToggle(string line, string newMode)
/if (${newMode.Upper.Equal[ON]}) {
/varset autoRezEnabled TRUE
} else /if (${newMode.Upper.Equal[OFF]}) {
/varset autoRezEnabled FALSE
} else {
/bc Unknown AutoRez mode. Use ON or OFF.
/return
}
/bc AutoRezEnabled is now: ${newMode}.
/RETURN
#EVENT toggleHeals "#*#p3 heals #1#"
SUB event_toggleHeals(string line, string newMode)
/if (${newMode.Upper.Equal[ON]}) {
/varset healsEnabled TRUE
} else /if (${newMode.Upper.Equal[OFF]}) {
/varset healsEnabled FALSE
} else {
/bc Unknown Heals mode. Use ON or OFF.
/return
}
/bc HealsEnabled is now: ${newMode}.
/RETURN
#EVENT toggleAutoMez "#*#p3 automez #1#"
SUB event_toggleAutoMez(string line, string newMode)
/if (${newMode.Upper.Equal[ON]}) {
/varset autoMezEnabled TRUE
} else /if (${newMode.Upper.Equal[OFF]}) {
/varset autoMezEnabled FALSE
} else {
/bc Unknown autoMezEnabled mode. Use ON or OFF.
/return
}
/bc AutoMezEnabled is now: ${newMode}.
/em shrugs.
/RETURN
#EVENT toggleAutoAssist "#*#p3 autoassist #1#"
#EVENT toggleAutoAssist "#*#p3 autoass #1#"
#EVENT toggleAutoAssist "#*#p3 aa #1#"
SUB event_toggleAutoAssist(string line, string newMode)
/if (${newMode.Upper.Equal[ON]}) {
/varset autoAssist TRUE
} else /if (${newMode.Upper.Equal[OFF]}) {
/varset autoAssist FALSE
} else {
/bc Unknown autoAssist mode. Use ON or OFF.
/return
}
/bc AutoAssist is now: ${newMode}.
/em shrugs.
/RETURN
#EVENT mezBroke "#1# has been awakened by#*#"
SUB EVENT_mezBroke(string line, string mobName)
/declare i int local
/declare mob spawn local
/declare mobCount int local ${SpawnCount[=${mobName}]}
| FIND THE CORRECT MOB. INITIATE A RE-MEZ BY REMOVING FROM MEZLIST AND LET MEZ CHECK FIND IT AGAIN
/for i 1 to ${mobCount}
/if (${NearestSpawn[${i},=${mobName}].ID} != NULL) {
/vardata mob NearestSpawn[${i},=${mobName}]
} else {
/break
}
/if (${autoMezList.Index[${mob.ID}]}!=-1) {
/tar id ${mob.ID}
/delay 10
/if (${Target.Mezzed.ID}==NULL) {
/invoke ${autoMezList.Erase[${autoMezList.Index[${mob.ID}]}]}
/call wipeLockout mez_${mob.ID}
/return
}
}
/next i
/RETURN
#event charmOn "[#*#(msg)] p3 charm #1#"
SUB event_charmOn(string line, int spawnID)
/if (${Bool[${charmUseSpell}]}==FALSE) {
/bc I am not configured to accept charm commands.
/RETURN
}
/varset charmSpawnID ${spawnID}
/bc I will attempt to keep spawnID ${spawnID} ( ${Spawn[id ${charmSpawnID}]} ) charmed.
/RETURN
#event charmOff "[#*#(msg)] p3 charm off"
#event charmOff "<#*#> p3 charm off"
SUB event_charmOff(string line)
/if (${Bool[${charmUseSpell}]}==FALSE) /return
/if (${charmSpawnID}==0) /return
/bc I will no longer try to charm spawnID ${charmSpawnID}.
/varset charmSpawnID 0
/RETURN
#event useMelee "[#*#(msg)] p3 melee #1#"
#event useMelee "<#*#> p3 melee #1#"
SUB event_useMelee(string line, string newMode)
/if (${newMode.Upper.Equal[ON]}) {
/varset useMeleeCombat TRUE
} else /if (${newMode.Upper.Equal[OFF]}) {
/varset useMeleeCombat FALSE
} else {
/bc Unknown useMeleeCombat mode. Use ON or OFF.
/return
}
/bc useMeleeCombat is now: ${newMode}.
/RETURN
#event castFizzle "#*#Your spell fizz#*#!"
SUB event_castFizzle(string line)
/varset castResult FIZZLE
/RETURN
#event castPower "#*#Your spell is too power#*#"
SUB event_castPower(string line)
/varset castResult NOHOLD
/RETURN
#event castNoFunction "#*#have entered an area where levitation effects do not function#*#"
SUB event_castNoFunction(string line)
/varset castResult NOHOLD
/RETURN
#event castResist "#*# resisted your #*#!"
#event castResist "#*# resisted the #*# spell."
SUB event_castResist(string line)
/varset castResult RESIST
/RETURN
#event castImmune "Your target is immune to #*#"
SUB event_castImmune(string line)
/varset castResult IMMUNE
/RETURN
#event castNoTakeHold "Your #*# did not take hold#*#"
#event castNoTakeHold "Your spell did not take hold#*#"
SUB event_castNoTakeHold(string line)
/varset castResult NOHOLD
/RETURN
#event castInterrupted "Your #*# spell is interrupted."
#event castInterrupted "Your spell is interrupted."
SUB event_castInterrupted(string line)
/varset castResult INTERRUPT
/RETURN
#event spewItem "[#*#(msg)] e3 item #1#"
#EVENT spewItem "<#*#> e3 item #1#"
#event spewItem "[#*#(msg)] p3 item #1#"
#EVENT spewItem "<#*#> p3 item #1#"
SUB EVENT_spewItem(string line, string slotNumber)
/if (${slotNumber.Upper.Equal[charm]}) /varset slotNumber 0
/if (${slotNumber.Upper.Equal[leftear]}) /varset slotNumber 1
/if (${slotNumber.Upper.Equal[head]}) /varset slotNumber 2
/if (${slotNumber.Upper.Equal[face]}) /varset slotNumber 3
/if (${slotNumber.Upper.Equal[rightear]}) /varset slotNumber 4
/if (${slotNumber.Upper.Equal[neck]}) /varset slotNumber 5
/if (${slotNumber.Upper.Equal[shoulder]}) /varset slotNumber 6
/if (${slotNumber.Upper.Equal[shoulders]}) /varset slotNumber 6
/if (${slotNumber.Upper.Equal[arms]}) /varset slotNumber 7
/if (${slotNumber.Upper.Equal[back]}) /varset slotNumber 8
/if (${slotNumber.Upper.Equal[leftwrist]}) /varset slotNumber 9
/if (${slotNumber.Upper.Equal[rightwrist]}) /varset slotNumber 10
/if (${slotNumber.Upper.Equal[ranged]}) /varset slotNumber 11
/if (${slotNumber.Upper.Equal[hands]}) /varset slotNumber 12
/if (${slotNumber.Upper.Equal[mainhand]}) /varset slotNumber 13
/if (${slotNumber.Upper.Equal[offhand]}) /varset slotNumber 14
/if (${slotNumber.Upper.Equal[leftfinger]}) /varset slotNumber 15
/if (${slotNumber.Upper.Equal[rightfinger]}) /varset slotNumber 16
/if (${slotNumber.Upper.Equal[chest]}) /varset slotNumber 17
/if (${slotNumber.Upper.Equal[legs]}) /varset slotNumber 18
/if (${slotNumber.Upper.Equal[feet]}) /varset slotNumber 19
/if (${slotNumber.Upper.Equal[waist]}) /varset slotNumber 20
/if (${slotNumber.Upper.Equal[powersource]}) /varset slotNumber 21
/if (${slotNumber.Upper.Equal[ammo]}) /varset slotNumber 22
|/bc ${Me.Inventory[${slotNumber}].HP} HP / ${Me.Inventory[${slotNumber}].Mana} MP / ${Me.Inventory[${slotNumber}].AC} AC (${Me.Inventory[${slotNumber}].ItemLink[CLICKABLE]})
/say ${Me.Inventory[${slotNumber}].HP} HP / ${Me.Inventory[${slotNumber}].Mana} MP / ${Me.Inventory[${slotNumber}].AC} AC (${Me.Inventory[${slotNumber}].ItemLink[CLICKABLE]})
/RETURN
#event p3find "[#*#(msg)] p3 find #1#"
#event p3find "<#*#> p3 find #1#"
SUB EVENT_p3find(string line, string itemName) {
/if (${FindItem[${itemName}].ID}!=NULL) {
/say Found in my inventory: ${FindItem[${itemName}].ItemLink[CLICKABLE]}
}
/if (${FindItemBank[${itemName}].ID}!=NULL) {
/say Found in my bank: ${FindItemBank[${itemName}].ItemLink[CLICKABLE]}
}
/RETURN
}
#event mydeath "#*#You have been slain#*#"
SUB EVENT_mydeath(string line)
/if (${beepOnDeath}==TRUE) {
/if (${beepOnDeathSound.Equal[FALSE]}) {
/beep
} else {
/beep sounds/${beepOnDeathSound}
}
}
/RETURN
#event takeTrade "#*#take trade!#*#"
SUB EVENT_takeTrade(string line) {
/notify TradeWnd TRDW_Trade_Button leftmouseup
}
#event autoLootToggle "[#1#(msg)] p3 autoloot #2#"
#event autoLootToggle "<#1#> p3 autoloot #2#"
SUB event_autoLootToggle(string line, string who, string newMode)
/if (${newMode.Upper.Equal[ON]}) {
/varset looter TRUE
/bc AutoLoot is now ON.
/call loadLootIni
} else /if (${newMode.Upper.Equal[OFF]}) {
/varset looter FALSE
/bc AutoLoot is now OFF.
}
/RETURN
#event reloadLootIni "[#1#(msg)] p3 reload loot ini"
#event reloadLootIni "<#1#> p3 reload loot ini"
SUB event_reloadLootIni(string line, string who, string newMode) {
/if (${looter}==FALSE) /return
/bc Reloading autoloot INI.
/call loadLootIni
/RETURN
}
#event addNoTouch "[#1#(msg)] p3 notouch #2#"
#event addNoTouch "<#1#> p3 notouch #2#"
SUB event_addNoTouch(string line, string who, string spawnID)
/call assistAddNoTouchID ${spawnID}
/RETURN
#event cantLootCorpse "#*#You cannot loot this Lore Item. You already have one#*#"
#event cantLootCorpse "#*#You may not loot this corpse#*#"
#event cantLootCorpse "#*#You are too far away to loot#*#"
SUB event_cantLootCorpse(string line, string who, string spawnID)
/varset skipCorpseTrigger TRUE
/RETURN
#event bark "[#1#(msg)] p3 bark #2# #3#"
#event bark "<#1#> p3 bark #2# #3#"
SUB event_bark(string line, string who, string what, string words)
/if (${Spawn[=${what}].ID}!=0) {
/varset what ${Spawn[=${what}].ID}
}
/if (${Spawn[id ${what}].ID}==NULL) {
/bc Don't see a spawn with that ID.
/return
}
/while (${Spawn[id ${what}].Distance}>100) {
/if (${Nav.Active}==FALSE) /nav id ${what}
/delay 3
}
/tar id ${what}
/delay 2
/say ${words}
/RETURN
#event autoFireToggle "[#1#(msg)] p3 autofire #2#"
#event autoFireToggle "<#1#> p3 autofire #2#"
SUB event_autoFireToggle(string line, string who, string newMode)
/if (${newMode.Upper.Equal[ON]}) {
/varset useAutoFire TRUE
/bc UseAutoFire is now ON.
/if (${Me.Combat}==TRUE) /attack off
/invoke ${cq.Append[AUTOFIRETOGGLED;]}
} else /if (${newMode.Upper.Equal[OFF]}) {
/varset useAutoFire FALSE
/bc UseAutoFire is now OFF.
/invoke ${cq.Append[AUTOFIRETOGGLED;]}
}
/RETURN
#event p3pauseSpecific "[#1#(msg)] p3 pause #2#"
#event p3pauseSpecific "<#1#> p3 pause #2#"
SUB event_p3pauseSpecific(string line, string who, string newMode) {
/if (${newMode.Upper.Equal[ON]}) {
/varset p3paused TRUE
/bc p3 paused.
/return
}
/if (${newMode.Upper.Equal[OFF]}) {
/varset p3paused FALSE
/bc p3 unpaused.
/return
}
/RETURN
}
#event p3pauseToggle "<#1#> p3 pause"
#event p3pauseToggle "[#1#(msg)] p3 pause"
SUB event_p3pauseToggle(string line, string who) {
/if (${p3paused}==TRUE) {
/varset p3paused FALSE
/bc p3 unpaused.
/return
}
/if (${p3paused}==FALSE) {
/varset p3paused TRUE
/bc p3 paused.
/return
}
/RETURN
}
#EVENT versionCheck "#*# tells you, 'p3 #2#'"
SUB EVENT_versionCheck(string line, string who, string msg) {
/tell ${who} Version: ${p3version}
/return
}