Sei sulla pagina 1di 35

-- With safeCode isn't supposed to stop script on possible errors, but

-- will just silently pause working till cause of error go away


local safeCode = false
-- Distance to search for party members to buff
local SearchDistance = 850
-- Check if L2Tower is running (not paused)
local CheckIfRunning = false
-- How long after last buffing will we leave the party?
local LeaveAfterBuffsTimeout = 2*1000 -- 2 sec
-- Names of Leader of party, ISS name, member to kick
local Names = {
Leader = "DateWithDestiny",
Iss = "RewildYourself",
}
-- Will it work with entering/leaving party?
-- Well it's not really just for OOP anymore, but name remained :)
-- Notes:
-- * If you run script on character specified as "Leader", then Leader will invi
te buffer when buffs are needed
local OOPMode = false
-- "Wizard", "Warrior" and "Knight" stand for type of Harmony to use
local ClassesContainer = {
Magic = {
Buffer = {
{ 17, "Wizard"},
-- Prophet
{ 21, "Warrior"},
-- Swordsinger
{ 34, "Warrior"},
-- Bladedancer
{ 49, "Wizard" },
-- Orc Mystic
{ 50, "Wizard" },
-- Orc Shaman
{ 51, "Warrior" },
-- Overlord
{ 52, "Wizard" },
-- Warcryer
{ 98, "Wizard" },
-- Hierophant
{ 100, "Warrior" },
-- Sword Muse
{ 107, "Warrior" },
-- Spectral Dancer
{ 115, "Wizard" },
-- Dominator
{ 116, "Wizard" },
-- Doomcryer
{
{
{
{
{
{

144,
171,
172,
173,
174,
175,

{
{
{
{
{
{
{

15,
16,
29,
30,
97,
42,
43,

"Warrior"},
"Wizard" },
"Warrior"},
"Warrior"},
"Wizard" },
"Wizard" },

-------

Iss Enchanter
IssHierophant
IssSwordMuse
IssSpectralDancer
IssDominator
IssDoomcryer

--------

Cleric
Bishop
Elven Oracle
Elven Elder
Cardinal
Shillien Oracle
Shillien Elder

},
Healer = {
"Wizard"},
"Wizard"},
"Wizard"},
"Wizard"},
"Wizard"},
"Wizard" },
"Wizard" },

{ 105, "Wizard" },
{ 112, "Wizard" },

-- Eva's Saint
-- Shillien Saint

{
{
{
{

146,
179,
180,
181,

},
},
},
},

-----

Aeore Healer
AeoreCardinal
AeoreEvasSaint
AeoreShillienSaint

{
{
{
{
{
{
{
{
{
{
{
{
{
{

10, "Wizard"},
11, "Wizard"},
12, "Wizard"},
13, "Wizard"},
25, "Wizard"},
26, "Wizard"},
27, "Wizard"},
38, "Wizard" },
39, "Wizard" },
40, "Wizard" },
94, "Wizard" },
95, "Wizard" },
103, "Wizard" },
110, "Wizard" },

---------------

Human Mystic
Human Wizard
Sorceror
Necromancer
Elven Mystic
Elven Wizard
Spellsinger
Dark Mystic
Dark Wizard
Spellhowler
Archmage
Soultaker
Mystic Muse
Storm Screamer

{
{
{
{
{
{

143,
166,
167,
168,
169,
170,

-------

Feoh Wizard
FeohArchmage
FeohSoultaker
FeohMysticMuse
FeohStormScreamer
FeohSoulhound

{
{
{
{
{
{

14, "Wizard"},
28, "Warrior"},
41, "Wizard" },
96, "Wizard" },
104, "Warrior" },
111, "Warrior" },

-------

Warlock
Elemental Summoner
Phantom Summoner
Arcana Lord
Elemental Master
Spectral Master

{
{
{
{

145,
176,
177,
178,

"Wizard"},
"Warrior"},
"Warrior"},
"Warrior"},

-----

Wynn Summoner
WynnArcanaLord
WynnElementalMaster
WynnSpectralMaster

{
{
{
{
{
{
{
{
{
{
{

0, "Warrior"},
1, "Warrior"},
2, "Warrior"},
3, "Warrior"},
18, "Warrior"},
19, "Warrior"},
31, "Warrior"},
44, "Warrior" },
45, "Warrior" },
46, "Warrior" },
47, "Warrior" },

------------

Human Fighter
Warrior
Gladiator
Warlord
Elven Fighter
Elven Knight
Dark Fighter
Orc Fighter
Orc Raider
Destroyer
Monk

"Wizard"
"Wizard"
"Wizard"
"Wizard"

},
Nuker = {

"Wizard"
"Wizard"
"Wizard"
"Wizard"
"Wizard"
"Wizard"

},
},
},
},
},
},

},
Summoner = {

},
},
Physical = {
Warrior = {

{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{
{

48, "Warrior" },
53, "Warrior" },
56, "Warrior" },
57, "Warrior" },
88, "Warrior"},
89, "Warrior" },
113, "Wizard" },
114, "Warrior" },
118, "Warrior" },
123, "Warrior" },
124, "Warrior" },
125, "Warrior" },
126, "Warrior" },
127, "Warrior" },
128, "Warrior" },
129, "Warrior" },
131, "Warrior" },
132, "Warrior" },
133, "Warrior" },
135, "Warrior" },
136, "Warrior" },

----------------------

Tyrant
Dwarven Fighter
Artisan
Warsmith
Duelist
Dreadnought
Titan
Grand Khavatari
Maestro
Male Soldier
Female Soldier
Dragoon
Warder
Berserker
Male Soul Breaker
Female Soul Breaker
Doombringer
Male Soul Hound
Female Soul Hound
Inspector
Judicator

{
{
{
{
{
{
{

140,
152,
153,
154,
155,
156,
157,

},
},
},
},
},
},
},

--------

Tyrr Warrior
TyrrDuelist
TyrrDreadnought
TyrrTitan
TyrrGrandKhavatari
TyrrMaestro
TyrrDoombringer

{
{
{
{
{
{
{
{
{
{
{
{

7, "Warrior"},
8, "Warrior"},
22, "Warrior"},
23, "Warrior"},
35, "Warrior"},
36, "Warrior"},
54, "Warrior" },
55, "Warrior" },
93, "Warrior"},
101, "Warrior" },
108, "Warrior" },
117, "Warrior"},

-------------

Rogue
Treasure Hunter
Elven Scout
Plainswalker
Assassin
Abyss Walker
Scavenger
Bounty Hunter
Adventurer
Wind Rider
Ghost Hunter
Fortune Seeker

{
{
{
{
{

141,
158,
159,
160,
161,

},
},
},
},
},

------

Othell Rogue
OthellAdventurer
OthellWindRider
OthellGhostHunter
OthellFortuneSeeker

{
{
{
{
{
{
{
{

9, "Warrior"},
24, "Warrior"},
37, "Warrior"},
92, "Warrior" },
102, "Warrior" },
109, "Warrior" },
130, "Warrior" },
134, "Warrior" },

---------

Hawkeye
Silver Ranger
Phantom Ranger
Sagittarius
Moonlight Sentinel
Ghost Sentinel
Arbalester
Trickster

"Warrior"
"Warrior"
"Warrior"
"Warrior"
"Warrior"
"Warrior"
"Warrior"

},
Dagger = {

"Warrior"
"Warrior"
"Warrior"
"Warrior"
"Warrior"

},
Archer = {

{
{
{
{
{

142,
162,
163,
164,
165,

"Warrior"
"Warrior"
"Warrior"
"Warrior"
"Warrior"

},
},
},
},
},

------

Yul Archer
YulSagittarius
YulMoonlightSentinel
YulGhostSentinel
YulTrickster

{
{
{
{
{
{
{
{
{
{

4, "Warrior"},
5, "Knight"},
6, "Knight"},
20, "Knight"},
32, "Warrior"},
33, "Knight"},
90, "Knight" },
91, "Knight" },
99, "Knight" },
106, "Warrior" },

-----------

Human Knight
Paladin
Dark Avenger
Temple Knight
Palus Knight
Shillien Knight
Phoenix Knight
Hell Knight
Eva's Templar
Shillien Templar

{
{
{
{
{

139,
148,
149,
150,
151,

------

Sigel Knight
SigelPhoenixKnight
SigelHellKnight
SigelEvasTemplar
SigelShillienTemplar

},
},
Tank = {
Knight = {

"Knight"
"Knight"
"Knight"
"Knight"
"Knight"

},
},
},
},
},

},
}
}
-- If there are multiple values with same name it means it will search for the m
ost nested one (the one furthest to right)
-- Skill Ids which can apply this buff
-- Ids of skills that apply same buff effect (so we don't try cast buff if we ca
nnot override),
-- Must contain also all Skills Ids,
-- Basically it checks if target holds any of Buffs, if it doesn't it tries to u
se any of Skills to apply them
if GetMe():GetClass() == 171 or GetMe():GetClass() == 175 then
BuffsContainer = {
MinTimeLeft = 1000,
-- static minimum time left when we will
rebuff, searchest for the most nested one
LengthToMinTimeLeftMultiplier = 1/5,
-- dynamic minimum time left when we wil
l rebuff, Length * multiplier determines when we will rebuff, so 30 min with 0.1
multiplier makes it rebuffing at 3 min left on buff
Melody = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 1800000, -- 30 min, maximum length of buff in milliseco
nds
Horn = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11517 },
NeedTarget = false,

Buffs = {
9198,
9218,

-- Elixir: Horn Melody


-- Elixir of Blessing - Horn Mel

9227,
9273,
9280,

-- Mentor's Poem of Horn


-- Horn Melody - PC Cafe
-- Horn Melody - Heavenly Cockta

9331,

-- Horn Melody - Refined Cocktai

11517,
11589,
14738,
14779,

-----

14791,

-- Master's Blessing - Horn Melo

ody

il
l
Horn Melody
Horn Frenzy
Olympiad - Horn Melody
Master's Blessing - Horn Melo

dy
dy (Range)
},
},
Drum = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11518 },
NeedTarget = false,
Buffs = {
9199,
9219,

-- Elixir: Drum Melody


-- Elixir of Blessing - Drum Mel

9228,
9274,
9281,

-- Mentor's Poem of Drum


-- Drum Melody - PC Cafe
-- Drum Melody - Heavenly Cockta

9332,

-- Drum Melody - Refined Cocktai

11518,
11590,
14739,
14780,

-----

14792,

-- Master's Blessing - Drum Melo

22213,

-- Mysterious Scroll - Drum Melo

ody

il
l
Drum Melody
Drum Frenzy
Olympiad - Drum Melody
Master's Blessing - Drum Melo

dy
dy (Range)
dy
},
},
PipeOrgan = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11519 },
NeedTarget = false,
Buffs = {
9201,
9221,

-- Elixir: Pipe Organ Melody


-- Elixir of Blessing - Pipe Org

an Melody
9230,
9276,
9283,

-- Mentor's Poem of Organ


-- Pipe Organ Melody - PC Cafe
-- Pipe Organ Melody - Heavenly

9334,

-- Pipe Organ Melody - Refined C

11519,
11591,
14607,

-- Pipe Organ Melody


-- Pipe Organ Frenzy
-- Cry of Fate - Pipe Organ Melo

14693,

-- Cry of Fate - Pipe Organ Melo

14740,
14781,

-- Olympiad - Pipe Organ Melody


-- Master's Blessing - Pipe Orga

14793,

-- Master's Blessing - Pipe Orga

23364,

-- Tree's Blessing - Pipe Organ

23365,

-- Tree's Blessing - Pipe Organ

23366,

-- Tree's Blessing - Pipe Organ

23367,

-- Tree's Blessing - Pipe Organ

23368,

-- Tree's Blessing - Pipe Organ

Cocktail
ocktail

dy
dy
n Melody
n Melody (Range)
Melody
Melody
Melody
Melody
Melody
},
},
Guitar = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11520 },
NeedTarget = false,
Buffs = {
9202,
9222,

-- Elixir: Guitar Melody


-- Elixir of Blessing - Guitar M

9231,
9277,
9284,

-- Mentor's Poem of Guitar


-- Guitar Melody - PC Cafe
-- Guitar Melody - Heavenly Cock

9335,

-- Guitar Melody - Refined Cockt

11520,
11592,
14741,
14782,

-----

14794,

-- Master's Blessing - Guitar Me

23369,

-- Tree's Blessing - Guitar Melo

23370,

-- Tree's Blessing - Guitar Melo

23371,

-- Tree's Blessing - Guitar Melo

elody

tail
ail
Guitar Melody
Guitar Frenzy
Olympiad - Guitar Melody
Master's Blessing - Guitar Me

lody
lody (Range)
dy
dy

dy
23372,

-- Tree's Blessing - Guitar Melo

23373,

-- Tree's Blessing - Guitar Melo

dy
dy
},
},
Harp = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11521 },
NeedTarget = false,
Buffs = {
9203,
9223,

-- Elixir: Harp Melody


-- Elixir of Blessing - Harp Mel

9232,
9278,
9285,

-- Mentor's Poem of Harp


-- Harp Melody - PC Cafe
-- Harp Melody - Heavenly Cockta

9336,

-- Harp Melody - Refined Cocktai

11521,
11593,
14742,
14783,

-----

14795,

-- Master's Blessing - Harp Melo

23374,
23375,
23376,
23377,
23378,

------

ody

il
l
Harp Melody
Harp Frenzy
Olympiad - Harp Melody
Master's Blessing - Harp Melo

dy
dy (Range)
Tree's
Tree's
Tree's
Tree's
Tree's

Blessing
Blessing
Blessing
Blessing
Blessing

Harp
Harp
Harp
Harp
Harp

Melody
Melody
Melody
Melody
Melody

},
},
Lute = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11522 },
NeedTarget = false,
Buffs = {
9200,
9220,

-- Elixir: Lute Melody


-- Elixir of Blessing - Lute Mel

9229,
9275,
9282,

-- Mentor's Poem of Lute


-- Lute Melody - PC Cafe
-- Lute Melody - Heavenly Cockta

9333,

-- Lute Melody - Refined Cocktai

11522,
11594,
14743,

-- Lute Melody
-- Lute Frenzy
-- Olympiad - Lute Melody

ody

il
l

14784,

-- Master's Blessing - Lute Melo

14796,

-- Master's Blessing - Lute Melo

23359,
23360,
23361,
23362,
23363,

------

dy
dy (Range)
Tree's
Tree's
Tree's
Tree's
Tree's

Blessing
Blessing
Blessing
Blessing
Blessing

Lute
Lute
Lute
Lute
Lute

Melody
Melody
Melody
Melody
Melody

},
},
},
Sonata = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 350000, -- 5 min
Prevailing = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11529 },
NeedTarget = false,
Buffs = {
11610,
11600,
11607,
11529,
14993,

------

Prevailing Dance
Frenzied Prevailing Sonata
Prevailing Song
Prevailing Sonata
Master's Blessing - Prevailin

g Sonata
14996,

-- Master's Blessing - Prevailin

g Sonata (range)
},
},
Daring = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11530 },
NeedTarget = false,
Buffs = {
11611,
11530,
11608,
11601,
14994,

------

Daring Dance
Daring Sonata
Daring Song
Frenzied Daring Sonata
Master's Blessing - Daring So

nata
14997,

-- Master's Blessing - Daring So

nata (range)
},
},
Refreshing = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,

Skills = { 11532 },
NeedTarget = false,
Buffs = {
11532,
11602,
11609,
11612,
11602,
14995,

-------

Refreshing Sonata
Frenzied Refreshing Sonata
Refreshing Song
Refreshing Dance
Frenzied Refreshing Sonata
Master's Blessing - Refreshin

g Sonata
14998,

-- Master's Blessing - Refreshin

g Sonata (range
},
},
},
Protection = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 1800000, -- 30 min
Elemental = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11565 },
NeedTarget = true,
Buffs = {
1352,
11565,
11790,
23247,

-----

Elemental Protection
Elemental Protection
Superior Elemental Protection
Master's Blessing - Elemental

Protection
23295,

-- Master's Blessing - Elemental

Protection
},
},
Divine = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11566, 803 },
NeedTarget = true,
Buffs = {
11566,
1353,
803,

-- Divine Protection
-- Divine Protection
-- Healer Ability - Divine Prote

ction
},
},
Mental = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11567 },
NeedTarget = true,

Buffs = {
11567,
},

-- Mental Protection

},
},
Harmony = {
MinTimeLeft = nil,
Length = 1800000, -- 30 min
Knight = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11523 },
NeedTarget = true,
Buffs = {
9376,
11523,
11595,
14744,
14785,

------

Mentor Guardian's Harmony


Knight's Harmony
Knight's Frenzied Harmony
Olympiad - Guardian's Harmony
Master's Blessing - Guardian'

s Harmony
14797,

-- Master's Blessing - Guardian'

s Harmony (Range)
},
},
Warrior = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11524 },
NeedTarget = true,
Buffs = {
9378,
11524,
11596,
14745,

-----

Mentor's Berserker's Harmony


Warrior's Harmony
Warrior's Frenzied Harmony
Olympiad - Berserker's Harmon

y
14786,

-- Master's Blessing - Berserker

14798,

-- Master's Blessing - Berserker

's Harmony
's Harmony (Range)
},
},
Wizard = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11525 },
NeedTarget = true,
Buffs = {
9377,
11525,
11597,

-- Mentor's Magician's Harmony


-- Wizard's Harmony
-- Wizard's Frenzied Harmony

14746,
14787,

-- Olympiad - Magician's Harmony


-- Master's Blessing - Magician'

14799,

-- Master's Blessing - Magician'

s Harmony
s Harmony (Range)
},
},
},
}
elseif GetMe():GetClass() == 172 then
BuffsContainer = {
MinTimeLeft = 1000,
-- static minimum time left when we will
rebuff, searchest for the most nested one
LengthToMinTimeLeftMultiplier = 1/5,
-- dynamic minimum time left when we wil
l rebuff, Length * multiplier determines when we will rebuff, so 30 min with 0.1
multiplier makes it rebuffing at 3 min left on buff
Melody = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 1800000, -- 30 min, maximum length of buff in milliseco
nds
Horn = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11517 },
NeedTarget = false,
Buffs = {
9198,
9218,

-- Elixir: Horn Melody


-- Elixir of Blessing - Horn Mel

9227,
9273,
9280,

-- Mentor's Poem of Horn


-- Horn Melody - PC Cafe
-- Horn Melody - Heavenly Cockta

9331,

-- Horn Melody - Refined Cocktai

11517,
11589,
14738,
14779,

-----

14791,

-- Master's Blessing - Horn Melo

ody

il
l
Horn Melody
Horn Frenzy
Olympiad - Horn Melody
Master's Blessing - Horn Melo

dy
dy (Range)
},
},
Drum = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11518 },
NeedTarget = false,
Buffs = {
9199,
9219,

-- Elixir: Drum Melody


-- Elixir of Blessing - Drum Mel

ody
9228,
9274,
9281,

-- Mentor's Poem of Drum


-- Drum Melody - PC Cafe
-- Drum Melody - Heavenly Cockta

9332,

-- Drum Melody - Refined Cocktai

11518,
11590,
14739,
14780,

-----

14792,

-- Master's Blessing - Drum Melo

22213,

-- Mysterious Scroll - Drum Melo

il
l
Drum Melody
Drum Frenzy
Olympiad - Drum Melody
Master's Blessing - Drum Melo

dy
dy (Range)
dy
},
},
PipeOrgan = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11519 },
NeedTarget = false,
Buffs = {
9201,
9221,

-- Elixir: Pipe Organ Melody


-- Elixir of Blessing - Pipe Org

an Melody
9230,
9276,
9283,

-- Mentor's Poem of Organ


-- Pipe Organ Melody - PC Cafe
-- Pipe Organ Melody - Heavenly

9334,

-- Pipe Organ Melody - Refined C

11519,
11591,
14607,

-- Pipe Organ Melody


-- Pipe Organ Frenzy
-- Cry of Fate - Pipe Organ Melo

14693,

-- Cry of Fate - Pipe Organ Melo

14740,
14781,

-- Olympiad - Pipe Organ Melody


-- Master's Blessing - Pipe Orga

14793,

-- Master's Blessing - Pipe Orga

23364,

-- Tree's Blessing - Pipe Organ

23365,

-- Tree's Blessing - Pipe Organ

23366,

-- Tree's Blessing - Pipe Organ

23367,

-- Tree's Blessing - Pipe Organ

23368,

-- Tree's Blessing - Pipe Organ

Cocktail
ocktail

dy
dy
n Melody
n Melody (Range)
Melody
Melody
Melody
Melody
Melody
},
},

Guitar = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11520 },
NeedTarget = false,
Buffs = {
9202,
9222,

-- Elixir: Guitar Melody


-- Elixir of Blessing - Guitar M

9231,
9277,
9284,

-- Mentor's Poem of Guitar


-- Guitar Melody - PC Cafe
-- Guitar Melody - Heavenly Cock

9335,

-- Guitar Melody - Refined Cockt

11520,
11592,
14741,
14782,

-----

14794,

-- Master's Blessing - Guitar Me

23369,

-- Tree's Blessing - Guitar Melo

23370,

-- Tree's Blessing - Guitar Melo

23371,

-- Tree's Blessing - Guitar Melo

23372,

-- Tree's Blessing - Guitar Melo

23373,

-- Tree's Blessing - Guitar Melo

elody

tail
ail
Guitar Melody
Guitar Frenzy
Olympiad - Guitar Melody
Master's Blessing - Guitar Me

lody
lody (Range)
dy
dy
dy
dy
dy
},
},
Harp = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11521 },
NeedTarget = false,
Buffs = {
9203,
9223,

-- Elixir: Harp Melody


-- Elixir of Blessing - Harp Mel

9232,
9278,
9285,

-- Mentor's Poem of Harp


-- Harp Melody - PC Cafe
-- Harp Melody - Heavenly Cockta

9336,

-- Harp Melody - Refined Cocktai

11521,
11593,
14742,
14783,

-----

14795,

-- Master's Blessing - Harp Melo

ody

il
l
Harp Melody
Harp Frenzy
Olympiad - Harp Melody
Master's Blessing - Harp Melo

dy

dy (Range)
23374,
23375,
23376,
23377,
23378,

------

Tree's
Tree's
Tree's
Tree's
Tree's

Blessing
Blessing
Blessing
Blessing
Blessing

Harp
Harp
Harp
Harp
Harp

Melody
Melody
Melody
Melody
Melody

},
},
Lute = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11522 },
NeedTarget = false,
Buffs = {
9200,
9220,

-- Elixir: Lute Melody


-- Elixir of Blessing - Lute Mel

9229,
9275,
9282,

-- Mentor's Poem of Lute


-- Lute Melody - PC Cafe
-- Lute Melody - Heavenly Cockta

9333,

-- Lute Melody - Refined Cocktai

11522,
11594,
14743,
14784,

-----

14796,

-- Master's Blessing - Lute Melo

23359,
23360,
23361,
23362,
23363,

------

ody

il
l
Lute Melody
Lute Frenzy
Olympiad - Lute Melody
Master's Blessing - Lute Melo

dy
dy (Range)
Tree's
Tree's
Tree's
Tree's
Tree's

Blessing
Blessing
Blessing
Blessing
Blessing

Lute
Lute
Lute
Lute
Lute

Melody
Melody
Melody
Melody
Melody

},
},
},
Sonata = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 350000, -- 5 min
Prevailing = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11607 },
NeedTarget = false,
Buffs = {
11610,
11600,
11607,
11529,
14993,

------

Prevailing Dance
Frenzied Prevailing Sonata
Prevailing Song
Prevailing Sonata
Master's Blessing - Prevailin

g Sonata
14996,

-- Master's Blessing - Prevailin

g Sonata (range)
},
},
Daring = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11608 },
NeedTarget = false,
Buffs = {
11611,
11530,
11608,
11601,
14994,

------

Daring Dance
Daring Sonata
Daring Song
Frenzied Daring Sonata
Master's Blessing - Daring So

nata
14997,

-- Master's Blessing - Daring So

nata (range)
},
},
Refreshing = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11609 },
NeedTarget = false,
Buffs = {
11532,
11602,
11609,
11612,
11602,
14995,

-------

Refreshing Sonata
Frenzied Refreshing Sonata
Refreshing Song
Refreshing Dance
Frenzied Refreshing Sonata
Master's Blessing - Refreshin

g Sonata
14998,

-- Master's Blessing - Refreshin

g Sonata (range
},
},
},
Protection = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 1800000, -- 30 min
Elemental = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11565 },
NeedTarget = true,
Buffs = {
1352,

-- Elemental Protection

11565,
11790,
23247,

-- Elemental Protection
-- Superior Elemental Protection
-- Master's Blessing - Elemental

23295,

-- Master's Blessing - Elemental

Protection
Protection
},
},
Divine = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11566, 803 },
NeedTarget = true,
Buffs = {
11566,
1353,
803,

-- Divine Protection
-- Divine Protection
-- Healer Ability - Divine Prote

ction
},
},
Mental = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11567 },
NeedTarget = true,
Buffs = {
11567,
},

-- Mental Protection

},
},
Harmony = {
MinTimeLeft = nil,
Length = 1800000, -- 30 min
Knight = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11523 },
NeedTarget = true,
Buffs = {
9376,
11523,
11595,
14744,
14785,

------

Mentor Guardian's Harmony


Knight's Harmony
Knight's Frenzied Harmony
Olympiad - Guardian's Harmony
Master's Blessing - Guardian'

s Harmony
14797,
s Harmony (Range)
},
},
Warrior = {
MinTimeLeft = nil,

-- Master's Blessing - Guardian'

LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11524 },
NeedTarget = true,
Buffs = {
9378,
11524,
11596,
14745,

-----

Mentor's Berserker's Harmony


Warrior's Harmony
Warrior's Frenzied Harmony
Olympiad - Berserker's Harmon

y
14786,

-- Master's Blessing - Berserker

14798,

-- Master's Blessing - Berserker

's Harmony
's Harmony (Range)
},
},
Wizard = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11525 },
NeedTarget = true,
Buffs = {
9377,
11525,
11597,
14746,
14787,

------

Mentor's
Wizard's
Wizard's
Olympiad
Master's

Magician's Harmony
Harmony
Frenzied Harmony
- Magician's Harmony
Blessing - Magician'

s Harmony
14799,

-- Master's Blessing - Magician'

s Harmony (Range)
},
},
},
}
elseif GetMe():GetClass() == 173 then
BuffsContainer = {
MinTimeLeft = 1000,
-- static minimum time left when we will
rebuff, searchest for the most nested one
LengthToMinTimeLeftMultiplier = 1/5,
-- dynamic minimum time left when we wil
l rebuff, Length * multiplier determines when we will rebuff, so 30 min with 0.1
multiplier makes it rebuffing at 3 min left on buff
Melody = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 1800000, -- 30 min, maximum length of buff in milliseco
nds
Horn = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11517 },
NeedTarget = false,
Buffs = {

9198,
9218,

-- Elixir: Horn Melody


-- Elixir of Blessing - Horn Mel

9227,
9273,
9280,

-- Mentor's Poem of Horn


-- Horn Melody - PC Cafe
-- Horn Melody - Heavenly Cockta

9331,

-- Horn Melody - Refined Cocktai

11517,
11589,
14738,
14779,

-----

14791,

-- Master's Blessing - Horn Melo

ody

il
l
Horn Melody
Horn Frenzy
Olympiad - Horn Melody
Master's Blessing - Horn Melo

dy
dy (Range)
},
},
Drum = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11518 },
NeedTarget = false,
Buffs = {
9199,
9219,

-- Elixir: Drum Melody


-- Elixir of Blessing - Drum Mel

9228,
9274,
9281,

-- Mentor's Poem of Drum


-- Drum Melody - PC Cafe
-- Drum Melody - Heavenly Cockta

9332,

-- Drum Melody - Refined Cocktai

11518,
11590,
14739,
14780,

-----

14792,

-- Master's Blessing - Drum Melo

22213,

-- Mysterious Scroll - Drum Melo

ody

il
l
Drum Melody
Drum Frenzy
Olympiad - Drum Melody
Master's Blessing - Drum Melo

dy
dy (Range)
dy
},
},
PipeOrgan = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11519 },
NeedTarget = false,
Buffs = {
9201,
9221,

-- Elixir: Pipe Organ Melody


-- Elixir of Blessing - Pipe Org

an Melody
9230,

-- Mentor's Poem of Organ

9276,
9283,

-- Pipe Organ Melody - PC Cafe


-- Pipe Organ Melody - Heavenly

9334,

-- Pipe Organ Melody - Refined C

11519,
11591,
14607,

-- Pipe Organ Melody


-- Pipe Organ Frenzy
-- Cry of Fate - Pipe Organ Melo

14693,

-- Cry of Fate - Pipe Organ Melo

14740,
14781,

-- Olympiad - Pipe Organ Melody


-- Master's Blessing - Pipe Orga

14793,

-- Master's Blessing - Pipe Orga

23364,

-- Tree's Blessing - Pipe Organ

23365,

-- Tree's Blessing - Pipe Organ

23366,

-- Tree's Blessing - Pipe Organ

23367,

-- Tree's Blessing - Pipe Organ

23368,

-- Tree's Blessing - Pipe Organ

Cocktail
ocktail

dy
dy
n Melody
n Melody (Range)
Melody
Melody
Melody
Melody
Melody
},
},
Guitar = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11520 },
NeedTarget = false,
Buffs = {
9202,
9222,

-- Elixir: Guitar Melody


-- Elixir of Blessing - Guitar M

9231,
9277,
9284,

-- Mentor's Poem of Guitar


-- Guitar Melody - PC Cafe
-- Guitar Melody - Heavenly Cock

9335,

-- Guitar Melody - Refined Cockt

11520,
11592,
14741,
14782,

-----

14794,

-- Master's Blessing - Guitar Me

23369,

-- Tree's Blessing - Guitar Melo

23370,

-- Tree's Blessing - Guitar Melo

23371,

-- Tree's Blessing - Guitar Melo

23372,

-- Tree's Blessing - Guitar Melo

elody

tail
ail
Guitar Melody
Guitar Frenzy
Olympiad - Guitar Melody
Master's Blessing - Guitar Me

lody
lody (Range)
dy
dy
dy

dy
23373,

-- Tree's Blessing - Guitar Melo

dy
},
},
Harp = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11521 },
NeedTarget = false,
Buffs = {
9203,
9223,

-- Elixir: Harp Melody


-- Elixir of Blessing - Harp Mel

9232,
9278,
9285,

-- Mentor's Poem of Harp


-- Harp Melody - PC Cafe
-- Harp Melody - Heavenly Cockta

9336,

-- Harp Melody - Refined Cocktai

11521,
11593,
14742,
14783,

-----

14795,

-- Master's Blessing - Harp Melo

23374,
23375,
23376,
23377,
23378,

------

ody

il
l
Harp Melody
Harp Frenzy
Olympiad - Harp Melody
Master's Blessing - Harp Melo

dy
dy (Range)
Tree's
Tree's
Tree's
Tree's
Tree's

Blessing
Blessing
Blessing
Blessing
Blessing

Harp
Harp
Harp
Harp
Harp

Melody
Melody
Melody
Melody
Melody

},
},
Lute = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11522 },
NeedTarget = false,
Buffs = {
9200,
9220,

-- Elixir: Lute Melody


-- Elixir of Blessing - Lute Mel

9229,
9275,
9282,

-- Mentor's Poem of Lute


-- Lute Melody - PC Cafe
-- Lute Melody - Heavenly Cockta

9333,

-- Lute Melody - Refined Cocktai

11522,
11594,
14743,
14784,

-----

ody

il
l

dy

Lute Melody
Lute Frenzy
Olympiad - Lute Melody
Master's Blessing - Lute Melo

14796,

-- Master's Blessing - Lute Melo

23359,
23360,
23361,
23362,
23363,

------

dy (Range)
Tree's
Tree's
Tree's
Tree's
Tree's

Blessing
Blessing
Blessing
Blessing
Blessing

Lute
Lute
Lute
Lute
Lute

Melody
Melody
Melody
Melody
Melody

},
},
},
Sonata = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 350000, -- 5 min
Prevailing = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11610 },
NeedTarget = false,
Buffs = {
11610,
11600,
11607,
11529,
14993,

------

Prevailing Dance
Frenzied Prevailing Sonata
Prevailing Song
Prevailing Sonata
Master's Blessing - Prevailin

g Sonata
14996,

-- Master's Blessing - Prevailin

g Sonata (range)
},
},
Daring = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11611 },
NeedTarget = false,
Buffs = {
11611,
11530,
11608,
11601,
14994,

------

Daring Dance
Daring Sonata
Daring Song
Frenzied Daring Sonata
Master's Blessing - Daring So

nata
14997,

-- Master's Blessing - Daring So

nata (range)
},
},
Refreshing = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11612 },
NeedTarget = false,

Buffs = {
11532,
11602,
11609,
11612,
11602,
14995,

-------

Refreshing Sonata
Frenzied Refreshing Sonata
Refreshing Song
Refreshing Dance
Frenzied Refreshing Sonata
Master's Blessing - Refreshin

g Sonata
14998,

-- Master's Blessing - Refreshin

g Sonata (range
},
},
},
Protection = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 1800000, -- 30 min
Elemental = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11565 },
NeedTarget = true,
Buffs = {
1352,
11565,
11790,
23247,

-----

Elemental Protection
Elemental Protection
Superior Elemental Protection
Master's Blessing - Elemental

Protection
23295,

-- Master's Blessing - Elemental

Protection
},
},
Divine = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11566, 803 },
NeedTarget = true,
Buffs = {
11566,
1353,
803,

-- Divine Protection
-- Divine Protection
-- Healer Ability - Divine Prote

ction
},
},
Mental = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11567 },
NeedTarget = true,
Buffs = {
11567,

-- Mental Protection

},
},
},
Harmony = {
MinTimeLeft = nil,
Length = 1800000, -- 30 min
Knight = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11523 },
NeedTarget = true,
Buffs = {
9376,
11523,
11595,
14744,
14785,

------

Mentor Guardian's Harmony


Knight's Harmony
Knight's Frenzied Harmony
Olympiad - Guardian's Harmony
Master's Blessing - Guardian'

s Harmony
14797,

-- Master's Blessing - Guardian'

s Harmony (Range)
},
},
Warrior = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11524 },
NeedTarget = true,
Buffs = {
9378,
11524,
11596,
14745,

-----

Mentor's Berserker's Harmony


Warrior's Harmony
Warrior's Frenzied Harmony
Olympiad - Berserker's Harmon

y
14786,

-- Master's Blessing - Berserker

14798,

-- Master's Blessing - Berserker

's Harmony
's Harmony (Range)
},
},
Wizard = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11525 },
NeedTarget = true,
Buffs = {
9377,
11525,
11597,
14746,
14787,

------

Mentor's
Wizard's
Wizard's
Olympiad
Master's

Magician's Harmony
Harmony
Frenzied Harmony
- Magician's Harmony
Blessing - Magician'

s Harmony
14799,

-- Master's Blessing - Magician'

s Harmony (Range)
},
},
},
}
elseif GetMe():GetClass() == 174 then
BuffsContainer = {
MinTimeLeft = 1000,
-- static minimum time left when we will
rebuff, searchest for the most nested one
LengthToMinTimeLeftMultiplier = 1/5,
-- dynamic minimum time left when we wil
l rebuff, Length * multiplier determines when we will rebuff, so 30 min with 0.1
multiplier makes it rebuffing at 3 min left on buff
Melody = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 1800000, -- 30 min, maximum length of buff in milliseco
nds
Horn = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11589 },
NeedTarget = false,
Buffs = {
9198,
9218,

-- Elixir: Horn Melody


-- Elixir of Blessing - Horn Mel

9227,
9273,
9280,

-- Mentor's Poem of Horn


-- Horn Melody - PC Cafe
-- Horn Melody - Heavenly Cockta

9331,

-- Horn Melody - Refined Cocktai

11517,
11589,
14738,
14779,

-----

14791,

-- Master's Blessing - Horn Melo

ody

il
l
Horn Melody
Horn Frenzy
Olympiad - Horn Melody
Master's Blessing - Horn Melo

dy
dy (Range)
},
},
Drum = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11590 },
NeedTarget = false,
Buffs = {
9199,
9219,

-- Elixir: Drum Melody


-- Elixir of Blessing - Drum Mel

ody
9228,

-- Mentor's Poem of Drum

9274,
9281,

-- Drum Melody - PC Cafe


-- Drum Melody - Heavenly Cockta

9332,

-- Drum Melody - Refined Cocktai

11518,
11590,
14739,
14780,

-----

14792,

-- Master's Blessing - Drum Melo

22213,

-- Mysterious Scroll - Drum Melo

il
l
Drum Melody
Drum Frenzy
Olympiad - Drum Melody
Master's Blessing - Drum Melo

dy
dy (Range)
dy
},
},
PipeOrgan = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11591 },
NeedTarget = false,
Buffs = {
9201,
9221,

-- Elixir: Pipe Organ Melody


-- Elixir of Blessing - Pipe Org

an Melody
9230,
9276,
9283,

-- Mentor's Poem of Organ


-- Pipe Organ Melody - PC Cafe
-- Pipe Organ Melody - Heavenly

9334,

-- Pipe Organ Melody - Refined C

11519,
11591,
14607,

-- Pipe Organ Melody


-- Pipe Organ Frenzy
-- Cry of Fate - Pipe Organ Melo

14693,

-- Cry of Fate - Pipe Organ Melo

14740,
14781,

-- Olympiad - Pipe Organ Melody


-- Master's Blessing - Pipe Orga

14793,

-- Master's Blessing - Pipe Orga

23364,

-- Tree's Blessing - Pipe Organ

23365,

-- Tree's Blessing - Pipe Organ

23366,

-- Tree's Blessing - Pipe Organ

23367,

-- Tree's Blessing - Pipe Organ

23368,

-- Tree's Blessing - Pipe Organ

Cocktail
ocktail

dy
dy
n Melody
n Melody (Range)
Melody
Melody
Melody
Melody
Melody
},
},
Guitar = {
MinTimeLeft = nil,

LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11592 },
NeedTarget = false,
Buffs = {
9202,
9222,

-- Elixir: Guitar Melody


-- Elixir of Blessing - Guitar M

9231,
9277,
9284,

-- Mentor's Poem of Guitar


-- Guitar Melody - PC Cafe
-- Guitar Melody - Heavenly Cock

9335,

-- Guitar Melody - Refined Cockt

11520,
11592,
14741,
14782,

-----

14794,

-- Master's Blessing - Guitar Me

23369,

-- Tree's Blessing - Guitar Melo

23370,

-- Tree's Blessing - Guitar Melo

23371,

-- Tree's Blessing - Guitar Melo

23372,

-- Tree's Blessing - Guitar Melo

23373,

-- Tree's Blessing - Guitar Melo

elody

tail
ail
Guitar Melody
Guitar Frenzy
Olympiad - Guitar Melody
Master's Blessing - Guitar Me

lody
lody (Range)
dy
dy
dy
dy
dy
},
},
Harp = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11593 },
NeedTarget = false,
Buffs = {
9203,
9223,

-- Elixir: Harp Melody


-- Elixir of Blessing - Harp Mel

9232,
9278,
9285,

-- Mentor's Poem of Harp


-- Harp Melody - PC Cafe
-- Harp Melody - Heavenly Cockta

9336,

-- Harp Melody - Refined Cocktai

11521,
11593,
14742,
14783,

-----

14795,

-- Master's Blessing - Harp Melo

23374,

-- Tree's Blessing - Harp Melody

ody

il
l
Harp Melody
Harp Frenzy
Olympiad - Harp Melody
Master's Blessing - Harp Melo

dy
dy (Range)

23375,
23376,
23377,
23378,

-----

Tree's
Tree's
Tree's
Tree's

Blessing
Blessing
Blessing
Blessing

Harp
Harp
Harp
Harp

Melody
Melody
Melody
Melody

},
},
Lute = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11594 },
NeedTarget = false,
Buffs = {
9200,
9220,

-- Elixir: Lute Melody


-- Elixir of Blessing - Lute Mel

9229,
9275,
9282,

-- Mentor's Poem of Lute


-- Lute Melody - PC Cafe
-- Lute Melody - Heavenly Cockta

9333,

-- Lute Melody - Refined Cocktai

11522,
11594,
14743,
14784,

-----

14796,

-- Master's Blessing - Lute Melo

23359,
23360,
23361,
23362,
23363,

------

ody

il
l
Lute Melody
Lute Frenzy
Olympiad - Lute Melody
Master's Blessing - Lute Melo

dy
dy (Range)
Tree's
Tree's
Tree's
Tree's
Tree's

Blessing
Blessing
Blessing
Blessing
Blessing

Lute
Lute
Lute
Lute
Lute

Melody
Melody
Melody
Melody
Melody

},
},
},
Sonata = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 350000, -- 5 min
Prevailing = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11600 },
NeedTarget = false,
Buffs = {
11610,
11600,
11607,
11529,
14993,

------

Prevailing Dance
Frenzied Prevailing Sonata
Prevailing Song
Prevailing Sonata
Master's Blessing - Prevailin

g Sonata
14996,

-- Master's Blessing - Prevailin

g Sonata (range)
},
},
Daring = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11601 },
NeedTarget = false,
Buffs = {
11611,
11530,
11608,
11601,
14994,

------

Daring Dance
Daring Sonata
Daring Song
Frenzied Daring Sonata
Master's Blessing - Daring So

nata
14997,

-- Master's Blessing - Daring So

nata (range)
},
},
Refreshing = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11602 },
NeedTarget = false,
Buffs = {
11532,
11602,
11609,
11612,
11602,
14995,

-------

Refreshing Sonata
Frenzied Refreshing Sonata
Refreshing Song
Refreshing Dance
Frenzied Refreshing Sonata
Master's Blessing - Refreshin

g Sonata
14998,

-- Master's Blessing - Refreshin

g Sonata (range
},
},
},
Protection = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = 1800000, -- 30 min
Elemental = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11565 },
NeedTarget = true,
Buffs = {
1352,
11565,
11790,

-- Elemental Protection
-- Elemental Protection
-- Superior Elemental Protection

23247,

-- Master's Blessing - Elemental

23295,

-- Master's Blessing - Elemental

Protection
Protection
},
},
Divine = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11566, 803 },
NeedTarget = true,
Buffs = {
11566,
1353,
803,

-- Divine Protection
-- Divine Protection
-- Healer Ability - Divine Prote

ction
},
},
Mental = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Skills = { 11567 },
NeedTarget = true,
Buffs = {
11567,
},

-- Mental Protection

},
},
Harmony = {
MinTimeLeft = nil,
Length = 1800000, -- 30 min
Knight = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11595 },
NeedTarget = true,
Buffs = {
9376,
11523,
11595,
14744,
14785,

------

Mentor Guardian's Harmony


Knight's Harmony
Knight's Frenzied Harmony
Olympiad - Guardian's Harmony
Master's Blessing - Guardian'

s Harmony
14797,

-- Master's Blessing - Guardian'

s Harmony (Range)
},
},
Warrior = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,

Skills = { 11596 },
NeedTarget = true,
Buffs = {
9378,
11524,
11596,
14745,

-----

Mentor's Berserker's Harmony


Warrior's Harmony
Warrior's Frenzied Harmony
Olympiad - Berserker's Harmon

y
14786,

-- Master's Blessing - Berserker

14798,

-- Master's Blessing - Berserker

's Harmony
's Harmony (Range)
},
},
Wizard = {
MinTimeLeft = nil,
LengthToMinTimeLeftMultiplier = nil,
Length = nil,
Skills = { 11597 },
NeedTarget = true,
Buffs = {
9377,
11525,
11597,
14746,
14787,

------

Mentor's
Wizard's
Wizard's
Olympiad
Master's

Magician's Harmony
Harmony
Frenzied Harmony
- Magician's Harmony
Blessing - Magician'

s Harmony
14799,

-- Master's Blessing - Magician'

s Harmony (Range)
},
},
},
}
end;
function GetRebuffTimeLeft( buffsC, skillId)
if buffsC and tar and skillId or not safeCode then
if type(buffsC) == "table" then
for Type,vT in pairs(buffsC) do
if type(vT) == "table" then
for lBuff,vlB in pairs(vT) do
if type(vlB) == "table" then
for i=1,#vlB.Skills do
if vlB.Skills[i]
== skillId then
local l
= vlB.Length or vT.Length or 0
local m
= vlB.LengthToMinTimeLeftMultiplier or vT.LengthToMinTimeLeftMultiplier or buffs
C.LengthToMinTimeLeftMultiplier or 0
local mt
l = vlB.MinTimeLeft or vT.MinTimeLeft or buffsC.MinTimeLeft or 0
return m
ath.max(l * m, mtl)
end
end
end

end
end
end
end
end
return nil
end
function GetHarmonyType( classesC, tar )
if tar and classesC or not safeCode then
if type(classesC) == "table" then
for Type,vT in pairs(classesC) do
if type(vT) == "table" then
for SubType,vS in pairs(vT) do
if type(vS) == "table" then
for i=1,#vS do
c = tar:GetClass
()
if c == vS[i][1]
then
harmony
= vS[i][2]
return h
armony
end
end
end
end
end
end
end
end
return nil
end
function BuffInfo( buffsC, tar, skillId )
if buffsC and tar and skillId or not safeCode then
if type(buffsC) == "table" then
for Type,vT in pairs(buffsC) do
if type(vT) == "table" then
for lBuff,vlB in pairs(vT) do
if type(vlB) == "table" then
for i=1,#vlB.Skills do
if vlB.Skills[i]
== skillId then
if type(
vlB.Buffs) == "table" then
timeLeft = 86400000
for j=1,#vlB.Buffs do
buff = tar:GetBuff(vlB.Buffs[j])
if buff then

timeLeft = buff.endTime - GetTime()


return true, vlB.NeedTarget, vlB.Buffs[j], timeLeft
end
end
return false, vlB.NeedTarget, nil, nil
end
end
end
end
end
end
end
end
end
return false
end
function CastBuff( skills, buffsC, tar, id, dist, justCheck )
if skills and buffsC and tar and tar:GetHp() ~= 0 and id and dist or not
safeCode then
local hasBuff, needTarget, _, timeLeft = BuffInfo( buffsC, tar,
id )
local rtl = GetRebuffTimeLeft( buffsC, id)
if not hasBuff or rtl and timeLeft and timeLeft <= rtl and timeL
eft > 0 then
if justCheck then
return true
end
local skill = skills:FindById(id)
if skill and skill:CanBeUsed() then
for d=dist-50,50,-100 do
if not tar or tar:GetHpPercent() == 0 th
en
return false
end
--if tar:GetDistance() > dist or not tar
:CanSeeMe() then
if tar:GetDistance() > dist then
--loc = tar:GetLocation()
--MoveTo(loc.X, loc.Y, loc.Z, d)
tar = GetUserById(tar:GetId())
end
end
if needTarget then
Target(tar)
for i=1,5 do
myTar = GetTarget()
if myTar and myTar:GetId() == ta
r:GetId() then
UseSkillRaw(id,false,fal

se)
Sleep(200);
ClearTargets();
return true
end
end
else
UseSkillRaw(id,false,false)
Sleep(200);
return true
end
end
end
end
return false
end
function BuffHarmony( skills, buffsC, classesC, tar, justCheck )
if skills and buffsC and classesC and tar and harmonies or not safeCode
then
local ht = GetHarmonyType(classesC, tar)
if ht or not safeCode then
local harmony = buffsC.Harmony[ht]
for i=1,#harmony.Skills do
if CastBuff( skills, buffsC, tar, harmony.Skills
[i], 900, justCheck ) then
return true
end
end
end
end
return false
end
local LastBuffTime = GetTime()
function BuffTarget( skills, buffsC, classesC, tar, justCheck )
if skills and buffsC and classesC and tar or not safeCode then
if type(buffsC) == "table" then
for BT,vBT in pairs(buffsC) do
if BT == "Harmony" then
if BuffHarmony( skills, buffsC, classesC
, tar, justCheck ) then
LastBuffTime = GetTime()
return true
end
else
if type(vBT) == "table" then
for kB,vB in pairs(vBT) do
if type(vB) == "table" a
nd type(vB.Skills) == "table" then
for i=1,#vB.Skil
ls do
if CastB
uff( skills, buffsC, tar, vB.Skills[i], 900, justCheck ) then

LastBuffTime = GetTime()
return true
end
end
end
end
end
end
end
end
end
return false
end
function BuffParty( skills, buffsC, classesC, distance, justCheck, names )
if skills and buffsC and classesC and distance and (names or not justChe
ck) or not safeCode then
local me = GetMe()
if BuffTarget( skills, buffsC, classesC, me, justCheck ) then
return true
end
local party = GetPartyList()
for p in party.list do
if not (names and not (justCheck)) and p:GetDistance() <
distance and BuffTarget( skills, buffsC, classesC, p, justCheck ) then
return true
end
end
end
return false
end
function PartyNeedBuffs( skills, buffsC, classesC, distance, justCheck, names )
return BuffParty( skills, buffsC, classesC, distance, true, names )
end
function BuffPartyAndLeave( skills, buffsC, classesC, distance, names )
if PartyNeedBuffs( skills, buffsC, classesC, distance ) then
BuffParty( skills, buffsC, classesC, distance )
elseif GetPartyMaster() then
if GetTime() - LastBuffTime > LeaveAfterBuffsTimeout then
LeaveParty()
end
end
end
function Invite( names )
if me and names and names.Leader == me:GetName() and names.Iss or not sa
feCode then
tar = GetPlayerList():GetByName(names.Iss)
if tar and not tar:IsMyPartyMember() then

Command("/invite ".. names.Iss)


return true
end
end
return false
end
function Main()
local me = GetMe()
if me then
if OOPMode and me:GetName() == Names.Leader then
if PartyNeedBuffs(GetSkills(), BuffsContainer, ClassesCo
ntainer, SearchDistance) then
Invite(Names)
end
elseif me:GetName() == Names.Iss or not OOPMode then
if not ((me:GetClass() == 173) or (me:GetClass() == 175)
or (me:GetClass() == 172) or (me:GetClass() == 171) or (me:GetClass() == 174))
then
ShowToClient("ISS", "You are not ISS!")
return false
end
local leader = GetPlayerList():GetByName(Names.Leader)
if leader and OOPMode then
return BuffPartyAndLeave(GetSkills(), BuffsConta
iner, ClassesContainer, SearchDistance, Names)
else
return BuffParty(GetSkills(), BuffsContainer, Cl
assesContainer, SearchDistance)
end
end
end
return false
end
repeat
if not CheckIfRunning or not IsPaused() then
Main()
end
Sleep(1000)
until false

Potrebbero piacerti anche