[HELP] I need help for a boss lua script menu

User Tag List

Results 1 to 2 of 2
  1. #1
    simoxx's Avatar Private
    Reputation
    1
    Join Date
    May 2012
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP] I need help for a boss lua script

    Hi all ^^ i am new... i try to create a lua script for my boss but it was a FAIL!!! xD
    can you do the script??? ty ^^ (sorry for my bad english i am italian xD)
    Fight
    Phase 1 100-80% health
    Empowered Shadow Bolt (casual target)
    Tenebro Shadowfury (casual target)
    Tenebro Pyroblast (Main Tank)

    Phase 2 80-50% health
    Empowered Shadow Bolt (casual target)
    Tenebro Pyroblast (Main Tank)
    Flash Heal (on boss xD)
    Tenebro Shadowfury (casual target)

    Phase 3 50-30% health
    Change Model (model id : 27082)
    Tenebro Lava Burst (Main Tank)
    Empowered Shadow Bolt (Casual Target)
    Shadowfury (Casual Target)
    Fear(Casual Target)

    Spell id:
    Empowered Shadow Bolt 70281
    Pyroblast : 64698
    Fear : 5782
    Shadow Fury : 45270
    Flash Heal :68024

    TY for help!!!!! +rep bye!!!

    [HELP] I need help for a boss lua script
  2. #2
    Deadendz's Avatar Private
    Reputation
    19
    Join Date
    Jul 2010
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry this took a while, I had problems with my server.
    But anyways, here it is:

    Code:
    -- Replace inside quotes to make the boss say something when entering combat, killing a target, etc...
    -- Leave as "" to say nothing
    local Combat_Enter = "I entered combat"
    local Combat_Kill = "I killed a target"
    local Combat_Dead = "I died"
    local Combat_Wipe = "I left combat"
    -- Fill in the time between each cast of the spell, in miliseconds (1000 = 1 second)
    local Time_ShadowBolt = 6000
    local Time_Pyroblast = 10000
    local Time_Fear = 12000
    local Time_ShadowFury = 8000
    local Time_FlashHeal = 15000
    -- the entry id for the boss
    local entry = 900000
    -- the display id before the dragon
    local display = 24706
    
    -- Dont change anything after this
    kBossk = {}
    local Times = {Time_ShadowBolt,Time_Pyroblast,Time_Fear,Time_ShadowFury,Time_FlashHeal}
    local Messages = {Combat_Enter, Combat_Kill, Combat_Dead, Combat_Wipe}
    local Spells = {70281, 64698, 5782, 45270, 68024}
    
    function kBossk.OnCombat(pUnit, event, pAttacker)
    	local sUnit = tostring(pUnit)
    	kBossk[sUnit] = {}
    	kBossk[sUnit].phase = 1
    	pUnit:RegisterEvent(kBossk.Phases, 2000, 0)
    	pUnit:RegisterEvent(kBossk.Spells, 2000, 1)
    	if(Messages[1] ~= "") then
    		pUnit:SendChatMessage(12, 0, Messages[1])
    	end
    end
    
    function kBossk.OnLeaveCombat(pUnit, event, pLastTarget)
    	local sUnit = tostring(pUnit)
    	if(Messages[4] ~= "") then
    		pUnit:SendChatMessage(12, 0, Messages[4])
    	end
    	pUnit:RemoveEvents()
    	kBossk[sUnit] = {}
    	pUnit:Despawn(1000, 20000)
    end
    
    function kBossk.OnKilledTarget(pUnit, event, pDied)
    	if(Messages[2] ~= "") then
    		pUnit:SendChatMessage(12, 0, Messages[2])
    	end
    end
    
    function kBossk.OnDied(pUnit, event, pLastTarget)
    	local sUnit = tostring(pUnit)
    	pUnit:RemoveEvents()
    	kBossk[sUnit] = {}
    	if(Messages[3] ~= "") then
    		pUnit:SendChatMessage(12, 0, Messages[3])
    	end
    end
    
    function kBossk.OnSpawn(pUnit, event)
    	pUnit:SetModel(display)
    end
    
    function kBossk.Phases(pUnit, event)
    	local sUnit = tostring(pUnit)
    	if(pUnit:GetHealthPct() <= 80 and kBossk[sUnit].phase < 2) then
    		kBossk[sUnit].phase = 2
    		pUnit:RemoveEvents()
    		pUnit:RegisterEvent(kBossk.Phases, 1000, 0)
    		pUnit:RegisterEvent(kBossk.Spells, 100, 1)
    	elseif(pUnit:GetHealthPct() <= 50 and kBossk[sUnit].phase < 3) then
    		kBossk[sUnit].phase = 3
    		pUnit:RemoveEvents()
    		pUnit:SetModel(27082)
    		pUnit:RegisterEvent(kBossk.Phases, 1000, 0)
    		pUnit:RegisterEvent(kBossk.Spells, 100, 1)
    	end
    end
    
    function kBossk.Spells(pUnit, event)
    	local sUnit = tostring(pUnit)
    	if(kBossk[sUnit].phase == 1) then
    		pUnit:RegisterEvent(function() kBossk.CastSpell(pUnit, 1); end,Times[1], 0)
    		pUnit:RegisterEvent(function() kBossk.CastSpell(pUnit, 4); end,Times[4], 0)
    		pUnit:RegisterEvent(function() kBossk.CastSpell(pUnit, 2); end,Times[2], 0)
    	elseif(kBossk[sUnit].phase == 2) then
    		pUnit:RegisterEvent(function() kBossk.CastSpell(pUnit, 1); end,Times[1], 0)
    		pUnit:RegisterEvent(function() kBossk.CastSpell(pUnit, 2); end,Times[2], 0)
    		pUnit:RegisterEvent(function() kBossk.CastSpell(pUnit, 5); end,Times[5], 0)
    		pUnit:RegisterEvent(function() kBossk.CastSpell(pUnit, 4); end,Times[4], 0)
    	else
    		pUnit:RegisterEvent(function() kBossk.CastSpell(pUnit, 1); end,Times[1], 0)
    		pUnit:RegisterEvent(function() kBossk.CastSpell(pUnit, 4); end,Times[4], 0)
    		pUnit:RegisterEvent(function() kBossk.CastSpell(pUnit, 3); end,Times[3], 0)
    	end
    end
    
    function kBossk.CastSpell(pUnit, pSpell)
    	if(pSpell == 1) then
    		pUnit:CastSpellOnTarget(Spells[1], pUnit:GetRandomPlayer(0))
    	elseif(pSpell == 2) then
    		pUnit:CastSpellOnTarget(Spells[2], pUnit:GetMainTank())
    	elseif(pSpell == 3) then
    		pUnit:CastSpellOnTarget(Spells[3], pUnit:GetRandomPlayer(0))
    	elseif(pSpell == 4) then
    		pUnit:CastSpellOnTarget(Spells[4], pUnit:GetRandomPlayer(0))
    	else
    		pUnit:CastSpellOnTarget(Spells[5], pUnit)
    	end
    end
    
    RegisterUnitEvent(entry, 1, kBossk.OnCombat)
    RegisterUnitEvent(entry, 2, kBossk.OnLeaveCombat)
    RegisterUnitEvent(entry, 3, kBossk.OnKilledTarget)
    RegisterUnitEvent(entry, 4, kBossk.OnDied)
    RegisterUnitEvent(entry, 18, kBossk.OnSpawn)
    Replace the stuff in red with what you want and add to your server.

Similar Threads

  1. Need help for arms warrior lua macro for 4.3
    By thor0118 in forum WoW UI, Macros and Talent Specs
    Replies: 3
    Last Post: 09-07-2014, 03:45 PM
  2. [Request] Need help for Sarkoth notAres' DH script
    By 747 in forum Diablo 3 Bots Questions & Requests
    Replies: 7
    Last Post: 06-16-2012, 02:58 PM
  3. Need help fixing some simple lua scripts :-)
    By kaato in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 04-10-2009, 06:11 PM
  4. Boss Lua Script Need help
    By David2222 in forum World of Warcraft General
    Replies: 0
    Last Post: 01-25-2009, 04:22 PM
  5. [LUA] Need Testers for my boss.
    By xerotsuda in forum WoW EMU General Releases
    Replies: 3
    Last Post: 12-23-2008, 03:41 PM
All times are GMT -5. The time now is 09:22 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search