Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathNoSystem.lua
More file actions
Latest commit
73 lines (55 loc) · 1.96 KB
/
Copy pathNoSystem.lua
File metadata and controls
73 lines (55 loc) · 1.96 KB
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
keneanung.bashing.systems.none= {
startAttack=function()
ifkeneanung.bashing.attacking>0then
enableTrigger(keneanung.bashing.systems.none.queueTrigger)
send("queue add eqbal keneanungki", false)
end
end,
stopAttack=function()
disableTrigger(keneanung.bashing.systems.none.queueTrigger)
send("cq all")
end,
flee=function()
keneanung.bashing.systems.none.stopAttack()
send("queue prepend eqbal " ..keneanung.bashing.fleeDirection)
end,
warnFlee=function(avg)
echo("Better run or get ready to die!")
end,
notifyFlee=function(avg)
echo("Running as you have not enough health left.")
end,
handleShield=function()
ifkeneanung.bashing.configuration.autorazethen
localcommand
send("queue prepend eqbal keneanungra", false)
end
end,
setup=function()
keneanung.bashing.systems.none.queueTrigger=tempRegexTrigger("^\\[System\\]: Running queued eqbal command: (?:KENEANUNGKI|KENEANUNGRA)",
[[
local system = keneanung.bashing.getSystem()
keneanung.bashing.attacks = keneanung.bashing.attacks + 1
local avgDmg = keneanung.bashing.damage / keneanung.bashing.attacks
local avgHeal = keneanung.bashing.healing / keneanung.bashing.attacks
local estimatedDmg = avgDmg * 2 - avgHeal
local fleeat = keneanung.bashing.calcFleeValue(keneanung.bashing.configuration.fleeing)
local warnat = keneanung.bashing.calcFleeValue(keneanung.bashing.configuration.warning)
if estimatedDmg > gmcp.Char.Vitals.hp - fleeat and keneanung.bashing.configuration.autoflee then
system.notifyFlee(estimatedDmg)
system.flee()
else
if estimatedDmg > gmcp.Char.Vitals.hp - warnat then
system.warnFlee(estimatedDmg)
end
send("queue add eqbal keneanungki", false)
end
]])
disableTrigger(keneanung.bashing.systems.none.queueTrigger)
end,
teardown=function()
ifkeneanung.bashing.systems.none.queueTriggerthen
killTrigger(keneanung.bashing.systems.none.queueTrigger)
end
end,
}