Post by nefariis on Mar 3, 2021 18:31:00 GMT
Here are two scripts to GM provoking, one basic one and one that is a little more advanced.
This script will have the toon run around in a circle keeping whatever monster you are provoking, continually chasing after you.
The best monster for this is a weak/boggling (don't bother having a horse, you will be dismounted a lot) or something similarly as slow.
If you choose a faster monster or you notice that you are getting hit a lot, you can up the radius from 7 to 8 or 9 and or reduce the sleep timer between movements.
Here is the basic script - it doesn't worry if the provoking skill is on cooldown or if a second monster has started attacking you, but it will get you to GM in an empty field or in a pen.
-- LoA 1.4.0.0
-- LoU 1.2.1.0
FindMobile("F04646") -- This searches for any "red" creature
local radius = 7 -- radius from center to run around
local provokeMacro = 0 -- provocation macro
local healMacro = 2 -- heal self macro
local x1,z1 = CHARPOSX, CHARPOSZ
local monster = FINDMOBILE[1].ID
function doMove(angle)
radian = angle * (math.pi /180)
x2 = radius * math.cos(radian)
z2 = radius * math.sin(radian)
Move(x1 + x2, CHARPOSY, z1 + z2)
end
function doHeal()
if HEALTH < 70 then
Macro(healMacro)
end
end
function doProvoke()
Macro(provokeMacro)
WaitForTarget()
TargetDynamic(monster)
WaitForTarget()
TargetSelf()
end
while true do
for angle = 0, 330, 30 do
doHeal()
doMove()
doProvoke()
sleep(1500)
end
end
Here is a more advanced script - this does wait for provoking to come off cooldown, and if a second monster comes into play, this will have the two monsters attack each other and then ignore the resulting corpse.
This one is great if you are in an area were a mob might spawn and or you are not going to be fully attentive on the macro.
-- LoA 1.4.0.0
-- LoU 1.2.1.0
local radius = 7
local provokeMacro = 0
local healMacro = 2
local x1,z1 = CHARPOSX, CHARPOSZ
function doMove(angle)
radian = angle * (math.pi /180)
x2 = radius * math.cos(radian)
z2 = radius * math.sin(radian)
Move(x1 + x2, CHARPOSY, z1 + z2)
end
function doHeal()
if HEALTH < 70 then
Macro(heal)
end
end
function findMonsters()
FindMobile("F04646")
monsters = {}
if FINDMOBILE then
for monster in FINDMOBILE do
if not string.match(monster.NAME, "Corpse")
and monster.DISTANCE < 15.5 then
table.insert(monsters, monster.ID)
end
end
end
return monsters
end
function doProvoke()
cooldown = false
if CHARBUFFS then
for buff in CHARBUFFS do
if string.match(buff, "Bard") then
cooldown = true
end
end
end
if not cooldown then
monsters = findMonsters()
if monsters then
Macro(provoke)
WaitForTarget()
TargetDynamic(monsters[1])
WaitForTarget()
if #monsters == 1 then
TargetSelf()
elseif #monsters > 1 then
TargetDynamic(monsters[2])
end
end
end
end
while true do
for angle = 0, 330, 30 do
doHeal()
doMove()
doProvoke()
sleep(1500)
end
end