forked from Logitech2k17/ogasaiTBC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcore.lua
45 lines (42 loc) · 915 Bytes
/
core.lua
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
function Jump()
JumpOrAscendStart();
end
function StopJump()
AscendStop();
end
function Cast(spellName, targetGUID)
target = GetGUIDTarget(targetGUID);
if (HasSpell(spellName)) then
if (not IsMoving()) then
if (IsSpellInRange(target, spellName)) then
if (not IsSpellOnCD(spellName)) then
if (not IsAutoCasting(spellName)) then
if (IsInLineOfSight(target)) then
FaceTarget(target);
CastSpell(spellName, target);
return true;
end
end
end
end
end
end
return false;
end
function Buff(spellName, player)
if (IsStanding()) then
if (not IsMoving()) then
if (HasSpell(spellName)) then
if (not IsSpellOnCD(spellName)) then
if (not IsAutoCasting(spellName)) then
if (not HasBuff(player, spellName)) then
CastSpell(spellName, player);
return true;
end
end
end
end
end
end
return false;
end