All pastes #981874 Raw Edit

Stuff

public text v1 · immutable
·published 2008-04-12 02:36 UTC
rendered paste body
------------- OZ
local Oz = DBM:NewBossMod("Oz", DBM_OZ_NAME, DBM_OZ_DESCRIPTION, DBM_KARAZHAN, DBM_KARAZHAN_TAB, 7);

Oz.Version			= "1.0";
Oz.Author			= "Tandanu";

Oz:RegisterEvents(
	"CHAT_MSG_MONSTER_YELL",
	"SPELL_CAST_START"
);

Oz:RegisterCombat("YELL", DBM_OZ_YELL_DOROTHEE, nil, nil, DBM_OZ_CRONE_NAME, 25);

Oz:AddOption("RangeCheck", true, DBM_OZ_OPTION_1);

Oz:AddBarOption("Roar")
Oz:AddBarOption("Strawman")
Oz:AddBarOption("Tinhead")
Oz:AddBarOption("Tito")

function Oz:OnCombatStart(delay)
	self:StartStatusBarTimer(14.5 - delay, "Roar", "Interface\\Icons\\Ability_Druid_ChallangingRoar");
	self:StartStatusBarTimer(24 - delay, "Strawman", "Interface\\Icons\\INV_Helmet_34");
	self:StartStatusBarTimer(33 - delay, "Tinhead", "Interface\\Icons\\INV_Helmet_02");
	self:StartStatusBarTimer(47.5 - delay, "Tito", "Interface\\Icons\\Ability_Mount_WhiteDireWolf");
end

function Oz:OnCombatEnd()
	if self.Options.RangeCheck then
		DBM_Gui_DistanceFrame_Hide();
	end
end

function Oz:OnEvent(event, arg1)
	if event == "CHAT_MSG_MONSTER_YELL" then
		if arg1 == DBM_OZ_YELL_ROAR then
			self:Announce(DBM_OZ_WARN_ROAR, 2);
		elseif arg1 == DBM_OZ_YELL_STRAWMAN then
			self:Announce(DBM_OZ_WARN_STRAWMAN, 2);
		elseif arg1 == DBM_OZ_YELL_TINHEAD then
			self:Announce(DBM_OZ_WARN_TINHEAD, 2);
		elseif arg1 == DBM_OZ_YELL_CRONE then
			self:Announce(DBM_OZ_WARN_CRONE, 3);
			if self.Options.RangeCheck then
				DBM_Gui_DistanceFrame_Show();
			end
		end
		
	elseif event == "SPELL_CAST_START" then
		if arg1.spellId == 31014 then
			if not self:GetStatusBarTimerTimeLeft("Tito") then
				self:StartStatusBarTimer(47.5, "Tito", "Interface\\Icons\\Ability_Mount_WhiteDireWolf");
			end
			self:UpdateStatusBarTimer("Tito", 46.5, 47.5);
			
			self:Announce(DBM_OZ_WARN_TITO, 2);
		end
	end
end

-------------------------------BBW
local BBW = DBM:NewBossMod("BigBadWolf", DBM_BBW_NAME, DBM_BBW_DESCRIPTION, DBM_KARAZHAN, DBM_KARAZHAN_TAB, 5);

BBW.Version			= "1.0";
BBW.Author			= "Tandanu";

BBW:RegisterEvents(
	"SPELL_AURA_APPLIED"
);

BBW:RegisterCombat("YELL", DBM_BBW_YELL_1);

BBW:AddOption("FearWarn", true, DBM_BBW_OPTION_1);
BBW:AddOption("Whisper", true, DBM_BBW_OPTION_2);

BBW:AddBarOption("Fear")
BBW:AddBarOption("Red Riding Hood")
BBW:AddBarOption("Next Red Riding Hood")

function BBW:OnEvent(event, arg1)
	if event == "SPELL_AURA_APPLIED" then
		if arg1.spellId == 30753 then
			local target = tostring(arg1.destName)
			if target == UnitName("player") then
				self:AddSpecialWarning(DBM_BBW_RUN_AWAY)
			end
			self:SendSync(target)		
		elseif arg1.spellId == 30752 then
			self:StartStatusBarTimer(24, "Fear", "Interface\\Icons\\Ability_Devour");
			if self.Options.FearWarn then
				self:Announce(DBM_BBW_FEAR_WARN, 2);
			end
			self:UnScheduleSelf("FearWarning", "soon");
			self:ScheduleSelf(23, "FearWarning", "soon");
		end
		
	elseif event == "ClearIcon" and arg1 then
		DBM.ClearIconByName(arg1);
		
	elseif event == "FearWarning" and arg1 == "soon" and self.Options.FearWarn then
		self:Announce(DBM_BBW_FEAR_SOON, 2);
	
	elseif event == "RRHSoonWarn" then
		self:Announce(DBM_BBW_RRH_SOON_WARN, 1);
	end
end

function BBW:OnSync(target)
	if target then
		if self.Options.Whisper and self.Options.Announce and DBM.Rank >= 1 then
			self:SendHiddenWhisper(DBM_BBW_RUN_AWAY_WHISP, target);			
		end
		self:EndStatusBarTimer("Next Red Riding Hood");
		self:StartStatusBarTimer(30, "Next Red Riding Hood", "Interface\\Icons\\INV_Helmet_28");
		self:StartStatusBarTimer(20, "Red Riding Hood", "Interface\\Icons\\INV_Helmet_28");
		self:Announce(string.format(DBM_BBW_RRH_WARN, target), 3);
		self:SetIcon(target, 20);
		self:ScheduleSelf(20, "ClearIcon", target);
		self:ScheduleSelf(27, "RRHSoonWarn");
	end
end

------------------------R&J
local RaJ = DBM:NewBossMod("RomuloAndJulianne", DBM_RJ_NAME, DBM_RJ_DESCRIPTION, DBM_KARAZHAN, DBM_KARAZHAN_TAB, 6);
--Edit by Nightkiller@日落沼澤(kc10577@巴哈;Azael)
RaJ.Version			= "1.1";
RaJ.Author			= "Tandanu";

RaJ:RegisterEvents(
	"SPELL_AURA_APPLIED",
	"CHAT_MSG_MONSTER_YELL",
	"SPELL_CAST_START"
);

RaJ:RegisterCombat("COMBAT", 5, DBM_RJ_JULIANNE, DBM_RJ_NAME, {DBM_RJ_ROMULO, DBM_RJ_JULIANNE}, 20);

RaJ:AddOption("WarnHeal", true, DBM_RJ_OPTION_1);
RaJ:AddOption("PosionWarn", true, DBM_RJ_OPTION_2);

RaJ:AddBarOption("Heal")

function RaJ:OnEvent(event, arg1)
	if event == "SPELL_AURA_APPLIED" then
		if arg1.spellId == 30841 then
			self:Announce(DBM_RJ_DARING_WARN, 2);
		elseif arg1.spellId == 30887 then
			self:Announce(DBM_RJ_DEVOTION_WARN, 2);
		elseif arg1.spellId == 30822 or arg1.spellId == 30830 then
			if target and self.Options.PosionWarn then
				self:Announce(string.format(DBM_RJ_POISON_WARN, tostring(arg1.destName)), 2);
			end
		end
	elseif event == "CHAT_MSG_MONSTER_YELL" then
		if arg1 == DBM_RJ_PHASE2_YELL then
			self:ScheduleSelf(3, "SetPhase");
		end
	elseif event == "SetPhase" then
		self.Phase = 2; --needed for combat end detection, because the "xyz dies." event is fired when you kill one of them in phase 1.
	elseif event == "SPELL_CAST_START" then
		if arg1.spellId == 30878 and self.Options.WarnHeal then
			self:Announce(DBM_RJ_HEAL_WARN);
			self:StartStatusBarTimer(2, "Heal", "Interface\\Icons\\Spell_Holy_Heal");
		end
	end
end

function RaJ:OnCombatStart()
	self.Phase = 0;
end

function RaJ:OnCombatEnd()
	self.Phase = 0;
end