Сайт гильдии Moon
Вы хотите отреагировать на этот пост ? Создайте аккаунт всего в несколько кликов или войдите на форум.

Сайт гильдии Moon

Moon Runes of Magic Raido
 
ФорумПоследние изображенияПоискРегистрацияВход

 

 Mакросы и аддоны

Перейти вниз 
АвторСообщение
Akikir




Сообщения : 4
Дата регистрации : 2010-05-21

Mакросы и аддоны Empty
СообщениеТема: Mакросы и аддоны   Mакросы и аддоны Icon_minitimeВс Июн 27, 2010 6:03 pm

Смена снаряжения в случае если хп < 30%

function Smena1()
if UnitMaxHealth("player")>5000 then
if (UnitHealth("player")/UnitMaxHealth("player") < 0.3) then
SwapEquipmentItem(); -- смена снаряжения
end
end;
end;
Вернуться к началу Перейти вниз
Akikir




Сообщения : 4
Дата регистрации : 2010-05-21

Mакросы и аддоны Empty
СообщениеТема: Re: Mакросы и аддоны   Mакросы и аддоны Icon_minitimeВс Июн 27, 2010 6:09 pm

local usdos="Улучшенные доспехи" --усиленные доспехи
local svp="Священная печать"
local TimeX
local Timebezkl
local Timegluh
local kompsn=1 --комплект снаряжения
local dvuruk=1 --1 одноручка и щит 2 двуручка
local vragmag=0 --1 моя цель магообразная 0 рогообразная
local spvp=0 --0 не пвп бой 1..3 этапы боя

function Msg(outstr)
if outstr == nil then
outstr = ":nil:"
end;
DEFAULT_CHAT_FRAME:AddMessage(outstr)
end;

function Inform()
local ixp
local ukl
local s1
local s2
local s3
vragmag=0;
ixp=UnitHealth("target");
ukl=UnitClass("target");
if ukl=="Маг" then vragmag=1 end;
if ukl=="Священник" then vragmag=1 end;
if ukl=="Друид" then vragmag=1 end;
Msg(ukl)
Msg(ixp)
Msg(vragmag)
s1, s2, s3 = UnitCastingTime("target");
Msg(s1);
Msg(s2);
Msg(s3);
end

function Magilirog()
local ixp
local ukl
vragmag=0;
ixp=UnitHealth("target");
ukl=UnitClass("target");
if ukl=="Маг" then vragmag=1 end;
if ukl=="Священник" then vragmag=1 end;
if ukl=="Друид" then vragmag=1 end;
end


function Lechit()
if (UnitHealth("player")/UnitMaxHealth("player") < 0.5) then
if GetActionUsable(20) then UseAction(20) end;
end;
if (UnitHealth("player")/UnitMaxHealth("player") < 0.7) then
if GetActionUsable(19) then UseAction(19) end;
end;
if (UnitMaxHealth("player")-UnitHealth("player") > 1500) then
UseItemByName("Растение духа")
end;
if (UnitMaxHealth("player")-UnitHealth("player") > 2000) then
UseItemByName("Сильное снадобье")
end;
if (UnitMaxMana("player")-UnitMana("player") > 1000) then
if GetActionUsable(57) then UseAction(57) end;
end
end;

function Lechitpvp()
if (UnitHealth("player")/UnitMaxHealth("player") < 0.6) then
if GetActionUsable(20) then UseAction(20) end;
end;
if (UnitHealth("player")/UnitMaxHealth("player") < 0.Cool then
if GetActionUsable(19) then UseAction(19) end;
end;
end;


function Lechman()
if (UnitHealth("player")/UnitMaxHealth("player") < 0.6) then
Lechitpvp()
end;
if (UnitHealth("player")/UnitMaxHealth("player") < 0.3) then
UseItemByName("Растение духа")
UseItemByName("Сильное снадобье")
end;
if (UnitMana("player")/UnitMaxMana("player") < 0.1) then
if GetActionUsable(57) then UseAction(57) end;
end;
if (UnitMana("player")/UnitMaxMana("player") < 0.3) then
UseItemByName("Элементальный камень духа")
end;
if (UnitHealth("player")/UnitMaxHealth("player") < 0.5) then
if GetActionUsable(47) then UseAction(47) end; --неуязвимость 5 сек
end
if (UnitHealth("player")/UnitMaxHealth("player") < 0.35) then
if GetActionUsable(48) then UseAction(48) end; --неуязвимость 4 сек леденец
end
end;

function ChkBuff(buffname)
local counter=1
local currentbuff="none"
while currentbuff ~= nil do
currentbuff=UnitBuff("player",counter)
if currentbuff == buffname then
return true
else
counter=counter+1
end
end
return false
end;

function Celb(buffname)
local counter=1
local currentbuff="none"
while currentbuff ~= nil do
currentbuff=UnitDebuff("target",counter);
if currentbuff==buffname then
return false
else
counter=counter+1
end
end
return true
end;

function Celb2(buf1,buf2)
local counter=1
local currentbuff="none"
while currentbuff ~= nil do
currentbuff=UnitDebuff("target",counter);
if currentbuff == buf1 then
return false
end;
if currentbuff == buf2 then
return false
else
counter=counter+1
end
end
return true
end;

function Ya(buffname)
if not ChkBuff(buffname) then
CastSpellByName(buffname);
return false
end;
return true
end;

function Cel(harakt,buffname)
if Celb(harakt) then
CastSpellByName(buffname);
return true
end;
return false
end;


function Osleplenie(j)
if (vragmag<0.5) then
if Celb2("Усиленная слепота","Длительное ослепление") then
if GetActionUsable(67) then
UseAction(67);
return false
end
end;
end;
return true
end;

function Init()
TimeX=os.time();
Timebezkl=os.time();
Timegluh=os.time();
Dvuruchka()
end;

function Svepechat()
if not Celb("Печать Света III") then
if (UnitMana("player") > 200) then
CastSpellByName("Кара");
return false
end;
end;
return true
end;

function bezumkli() --безумные клинки
if (os.difftime(os.time(),Timebezkl)>60) then
Timebezkl=os.time();
if Ya("Безумные клинки") then
return true
end
return false
end
return true
end;

function Prosto()
local sud=0 --возможность священного удара
local gluh=0 --возможность глухаря
Lechit();
Sbitcast();
if GetActionUsable(68) then
sud=1;
if GetActionUsable(51) then
UseAction(51);
gluh=1
end
end;
if (gluh<0.5) then
if Ya(usdos) then
if Svepechat() then
if Ya(svp) then
if bezumkli() then
if Osleplenie(osl) then
end;
end;
end;
end;
end;
end;
if GetActionUsable(69) then
UseAction(69)
else
if (sud>0.5) then UseAction(68) end;
end;
end;

function Bafshit()
if (spvp<1.5) then --одеть щит и одноручку
TimeX=os.time();
if (dvuruk>1.5) then
Dvuruchka()
end
end;
if (dvuruk<1.5) then --бафы со щитом
if (spvp>15) then --одеть двуручку
Dvuruchka()
end;
if GetActionUsable(49) then
UseAction(49)
else
if (vragmag>0.5) then
if GetActionUsable(50) then UseAction(50) end;
end;
end;
end;
end;

function Sbitcast()
local s1
local s2
local s3
s1, s2, s3 = UnitCastingTime("target");
if s1~=nil then
if s2>1.5 then
if s2-s3<1 then
if GetActionUsable(45) then UseAction(45) end;
end
end
end
end;

function Pvpudar()
local tud=0
local Time1
UseSkill(1,1); -- атака
Lechitpvp();
spvp=spvp+1;
Bafshit();
Sbitcast();
if (tud<0.5) then --глухарь
if GetActionUsable(51) then UseAction(51); tud=4; end;
end;
if (tud<0.5) then
if Ya(usdos) then
if Svepechat() then
if Ya(svp) then
if bezumkli() then
if Osleplenie(osl) then
end
end;
end;
end;
end;
end;
if GetActionUsable(68) then UseAction(68) end;
if GetActionUsable(69) then UseAction(69) end;
end;


function Masudar()
local tud=0
Vibratcel();
Lechit();
if UnitExists("target") then
if GetActionUsable(68) then
if GetActionUsable(43) then UseAction(43); tud=1 end; --аое
if (tud<0.5) then -- глухарь
if GetActionUsable(44) then UseAction(44); tud=2 end;
end
end
end;
if (tud<0.5) then
if Ya(usdos) then
if Svepechat() then
if Ya(svp) then
if bezumkli() then
if Osleplenie(osl) then
end;
end;
end;
end;
end;
end;
if GetActionUsable(68) then UseAction(68) end;
if GetActionUsable(69) then UseAction(69) end;
end;


function Tank(j)
local kl=0
local tud=0
Lechman();
if GetActionUsable(56) then UseAction(56); tud=1 end;
if (tud<0.5) then
if GetActionUsable(55) then UseAction(55); tud=2 end;
end;
if (tud<0.5) then
if GetActionUsable(52) then UseAction(52); tud=3 end;
end;
if (tud<0.5) then
if Ya(usdos) then
if Svepechat() then
if Ya(svp) then
bezumkli()
end;
end;
end;
end;
if GetActionUsable(68) then UseAction(68) end;
if GetActionUsable(69) then UseAction(69) end;
end;

function Masagro()
local tud=0
Vibratcel();
Lechit();
if GetActionUsable(56) then UseAction(56); tud=1 end;
if (tud<0.5) then
if GetActionUsable(55) then UseAction(55); tud=2 end;
end;
if (tud<0.5) then
if UnitExists("target") then
if GetActionUsable(68) then
if GetActionUsable(46) then UseAction(46); tud=1 end; --аое
if GetActionUsable(43) then UseAction(43); tud=1 end; --аое
if (tud<0.5) then -- глухарь
if GetActionUsable(44) then UseAction(44); tud=2 end;
end
end
end
end;
if (tud<0.5) then
if Ya(usdos) then
if Ya(svp) then
if bezumkli() then
if Osleplenie(osl) then

end;
end;
end;
end;
end;
if GetActionUsable(68) then UseAction(68) end;
if GetActionUsable(69) then UseAction(69) end;
end;


function Smena1()
if UnitMaxHealth("player")>15000 then
if (UnitHealth("player")/UnitMaxHealth("player") < 0.3) then
SwapEquipmentItem(); -- смена снаряжения
kompsn=2
end
end;
end;

function Smena2()
if UnitMaxHealth("player")<15000 then
if (UnitHealth("player")/UnitMaxHealth("player") > 0.5) then
SwapEquipmentItem(); -- смена снаряжения
kompsn=1
end
end;
end

function Smena()
if kompsn==1 then
kompsn=2
else
kompsn=1
end;
SwapEquipmentItem(); -- смена снаряжения
end;

function Vibratcel() --выбрать ближайшую цель
Smena2();
if not (UnitCanAttack("player","target")) then
TargetUnit("none");
end;
if not UnitExists("target") then
TargetNearestEnemy()
spvp=0
end;
if UnitIsDeadOrGhost("target") then TargetUnit("none") end;
end;

function Udcel() --выбрать ближайшую цель если её нет и атаковать
Smena2();
Vibratcel();
Magilirog();
if UnitIsPlayer("target") then
Pvpudar();
Smena1();
else
Prosto();
spvp=0
end;
end;

function Udcelstop() --атаковать цель
Smena2();
Magilirog();
if UnitIsPlayer("target") then
Pvpudar();
Smena1();
else
Prosto()
end;
end;

function Dvigai(j) --начать движенние
Smena2();
if not (UnitCanAttack("player","target")) then
TargetUnit("none")
end;
if UnitExists("target") then -- если есть цель то
if GetActionUsable(68) then
MoveForwardStop();
UseAction(41);
else
MoveForwardStart();
end
else
MoveForwardStart();
end;
Magilirog();
if UnitIsPlayer("target") then
Pvpudar();
Smena1();
else
Prosto()
end;
end;


function Rogprosto() --рог бой
Lechit();
if GetActionUsable(43) then
UseAction(43);
end;
if Ya(usdos) then
if Osleplenie(osl) then

end;
end;
if GetActionUsable(47) then UseAction(47) end;
if GetActionUsable(48) then UseAction(48) end;
if GetActionUsable(49) then UseAction(49) end;
end;

function Rogpvp() --пвп для рога
local tud=0
Lechitpvp();
if GetActionUsable(43) then UseAction(43); tud=1 end;
if (tud<0.5) then
if GetActionUsable(44) then UseAction(44); tud=2 end;
end;
if (tud<0.5) then
if GetActionUsable(45) then UseAction(45); tud=3 end;
end;
if (tud<0.5) then
if GetActionUsable(46) then UseAction(46); tud=4 end;
end;
if (tud<0.5) then
if Ya(usdos) then
if Osleplenie(osl) then

end;
end;
end;
if GetActionUsable(47) then UseAction(47) end;
if GetActionUsable(48) then UseAction(48) end;
if GetActionUsable(49) then UseAction(49) end;
end;

function Rogudcel() --для разбойника выбрать ближайшую цель если её нет и атаковать
Smena2();
if not (UnitCanAttack("player","target")) then
TargetUnit("none")
end;
if not UnitExists("target") then TargetNearestEnemy() end;
if UnitHealth("target") < 1 then TargetUnit("none") end;
MoveForwardStop();
Magilirog();
if UnitIsPlayer("target") then
Rogpvp();
Smena1();
else
Rogprosto()
end;
end;

function Rogdvigai(j) --начать движенние
Smena2();
if not (UnitCanAttack("player","target")) then
TargetUnit("none")
end;
if UnitExists("target") then -- если есть цель то
MoveForwardStart();
UseAction(41);
else
MoveForwardStart();
end;
Magilirog();
if UnitIsPlayer("target") then
Rogpvp();
Smena1();
else
Rogprosto()
end;
end;

function Dvuruchka()
if kompsn<1.5 then
if dvuruk<1.5 then --1 одноручка и щит 2 двуручка
dvuruk=2;
UseItemByName("Кровавый молот")
else
dvuruk=1;
UseItemByName("Молот Арлона");
UseItemByName("Королевский круглый щит");
end
end
end
Вернуться к началу Перейти вниз
 
Mакросы и аддоны
Вернуться к началу 
Страница 1 из 1
 Похожие темы
-
» Аддоны

Права доступа к этому форуму:Вы не можете отвечать на сообщения
Сайт гильдии Moon :: Наша гильдия :: Новости гильдии-
Перейти: