[Request] NPC Lua event! menu

User Tag List

Results 1 to 9 of 9
  1. #1
    ilikepiehehe's Avatar Sergeant
    Reputation
    1
    Join Date
    Feb 2013
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Request] NPC Lua event!

    Hey Ownedcore I'm pretty new to this kind of stuff and i have no idea how to script. I would like a Lua script on my private server so once the player talks to the NPC he will summon scourge (or any kind of npc in waves). i would also like him to talk EX: on talking to him he will say "Get Ready!". I know it would be simple to do but i have no idea how to. Thanks!

    [Request] NPC Lua event!
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Global bool to flag when to start. Starts off as false.

    On spawn, check for flag every second. When flag becomes true, remove events and execute script (messages/spawning mobs).

    Gossip script, have the menu set up and set the bool to true and flags to quest giver when gossip is selected (to stop you talking to him again).

    Example script: [Lua] local i = 0 local can_start = false local obja = nil local objb = nil lo - Pastebin.com
    YouTube of example script: https://www.youtube.com/watch?v=AhLoUR1q9eQ

  3. #3
    ilikepiehehe's Avatar Sergeant
    Reputation
    1
    Join Date
    Feb 2013
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Damn, That's a great script harry! but i still don't really understand i was looking for something more like this Battle for Caer Darrow. - YouTube. If you have a sample script of that then your the best :P

    But i would like it to do the event on tlaking to the npc rather then a quest pick up.

  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ilikepiehehe View Post
    Damn, That's a great script harry! but i still don't really understand i was looking for something more like this Battle for Caer Darrow. - YouTube. If you have a sample script of that then your the best :P

    But i would like it to do the event on tlaking to the npc rather then a quest pick up.
    It's the same logic as the previous script I posted.

    The guy who made that script though did it really badly, the code is messy and it is implemented poorly: [Lua] -- Scourges Ambush - Caer Darrow Latest Quest. -- You will have to stay alive t - Pastebin.com

  5. #5
    ilikepiehehe's Avatar Sergeant
    Reputation
    1
    Join Date
    Feb 2013
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks harry i got it to work!

    EDIT: The i was able to make a script from it and it works pretty well, I spawned a game object (Wintergrasp Fortress Gate) and i want the npc to despawn it when he reaches the end of the script this is what i have but it's not working =/

    local b = pUnit:GetGameObjectNearestCoords(289.859955, -53.497280, 31.493578, 3.183993)
    if b then
    bespawn(1,0)
    end
    local gate = pUnit:GetGameObjectNearestCoords(289.859955, -53.497280, 31.493578, 3.183993)
    if gate then
    gateespawn(0, 0)
    end
    Last edited by ilikepiehehe; 03-01-2013 at 09:42 PM.

  6. #6
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Getting the game object is x y z id not x y z o.

    http://www.arcemu.org/wiki/Unit_Commands

    ID = ID of the gameobject your trying to find.
    Last edited by stoneharry; 03-02-2013 at 11:03 AM.

  7. #7
    ilikepiehehe's Avatar Sergeant
    Reputation
    1
    Join Date
    Feb 2013
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    Getting the game object is x y z id not x y z o.

    Unit Commands - ArcEmu-Wiki

    ID = ID of the gameobject your trying to find.
    /love thanks so much i got it to work the event it epic! I would + rep you if had any ^-^
    Last edited by ilikepiehehe; 03-03-2013 at 01:15 PM.

  8. #8
    ilikepiehehe's Avatar Sergeant
    Reputation
    1
    Join Date
    Feb 2013
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you show me a example of a script of like 3 npc's just talking no spawning or casting. Just npc's talking i tried to do it based off the script u linked but i can only make one other npc talk instead of all 3. and you would start the rp from talking to someone.
    Last edited by ilikepiehehe; 03-11-2013 at 04:04 PM.

  9. #9
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ilikepiehehe View Post
    Could you show me a example of a script of like 3 npc's just talking no spawning or casting. Just npc's talking i tried to do it based off the script u linked but i can only make one other npc talk instead of all 3. and you would start the rp from talking to someone.
    I guess, something like this:

    Code:
    -- Final Dragon Boss ---------------------------------------------------------
    
    function ZG.VAR.DragonBossEvent_COT(pUnit, Event)
    	if Event == 4 then
    		pUnit:RemoveEvents()
    	elseif Event == 18 then
    		pUnit:RegisterEvent("ZG.VAR.SetUpCreatures_Dragon", 1000, 1)
    	end
    end
    
    RegisterUnitEvent(115831, 4, "ZG.VAR.DragonBossEvent_COT")
    RegisterUnitEvent(115831, 18, "ZG.VAR.DragonBossEvent_COT")
    
    function ZG.VAR.SetUpCreatures_Dragon(pUnit)
    	pUnit:SetMaxPower(100, 2)
    	pUnit:SetPower(100, 2)
    	pUnit:SetPowerType(2)
    	--pUnit:SetPosition(pUnit:GetX(), pUnit:GetY(), pUnit:GetZ()+6, pUnit:GetO())
    	local id = pUnit:GetInstanceID()
    	if id == nil then id = 1 end
    	ZG[id] = ZG[id] or {VAR={}}
    	ZG[id].VAR.leader = pUnit:SpawnCreature(36544, -11062, -2306, 145.9, 1.290404, 35, 0, 50429) -- Leader
    	ZG[id].VAR.addA = pUnit:SpawnCreature(4052, -11075, -2307, 145, 1.058709, 35, 0, 45212)
    	ZG[id].VAR.addB = pUnit:SpawnCreature(4052, -11066, -2311, 145.9, 1.184373, 35, 0, 45212)
    	ZG[id].VAR.addC = pUnit:SpawnCreature(4052, -11057, -2314, 147.3, 1.549583, 35, 0, 45212)
    	ZG[id].VAR.addD = pUnit:SpawnCreature(4052, -11049, -2311, 146.3, 2, 35, 0, 45212)
    	pUnit:RegisterEvent("ZG.VAR.WhileNoPlayer_DoVisual", 1500, 1)
    	pUnit:RegisterEvent("ZG.VAR.CheckForPlayers_ToStart", 1000, 0)
    end
    
    function ZG.VAR.WhileNoPlayer_DoVisual(pUnit)
    	local id = pUnit:GetInstanceID()
    	if id == nil then id = 1 end
    	ZG[id] = ZG[id] or {VAR={}}
    	ZG[id].VAR.leader:ChannelSpell(48185, pUnit)
    	ZG[id].VAR.addA:ChannelSpell(49128, ZG[id].VAR.leader)
    	ZG[id].VAR.addB:ChannelSpell(49128, ZG[id].VAR.leader)
    	ZG[id].VAR.addC:ChannelSpell(49128, ZG[id].VAR.leader)
    	ZG[id].VAR.addD:ChannelSpell(49128, ZG[id].VAR.leader)
    end
    
    function ZG.VAR.CheckForPlayers_ToStart(pUnit)
    	local id = pUnit:GetInstanceID()
    	if id == nil then id = 1 end
    	ZG[id] = ZG[id] or {VAR={}}
    	local plr = ZG[id].VAR.leader:GetClosestPlayer()
    	if plr ~= nil then
    		if ZG[id].VAR.leader:GetDistanceYards(plr) < 10 then
    			if plr:IsAlive() then
    				pUnit:SetMovementFlags(2)
    				ZG[id].VAR.leader:SendChatMessage(12,0,"Hurry mortals, I cannot hold the beast back for long!")
    				pUnit:RemoveEvents()
    				pUnit:RegisterEvent("ZG.VAR.HEREWEGO_DRAGON", 4000, 1)
    			end
    		end
    	end
    end
    
    function ZG.VAR.HEREWEGO_DRAGON(pUnit)
    	local id = pUnit:GetInstanceID()
    	if id == nil then id = 1 end
    	ZG[id] = ZG[id] or {VAR={}}
    	pUnit:SendChatMessage(14,0,"ENOUGH! Now you vermin shall feel the force of my birthright: The Fury of the Earth itself!")
    	pUnit:SpawnGameObject(146086, -11095.85, -2318.86, 147.5, 6.154612, 900000, 100) -- cave in
    	ZG[id].VAR.leader:PlaySoundToSet(8289)
    	ZG[id].VAR.leader:StopChannel()
    	ZG[id].VAR.addA:StopChannel()
    	ZG[id].VAR.addB:StopChannel()
    	ZG[id].VAR.addC:StopChannel()
    	ZG[id].VAR.addD:StopChannel()
    	pUnit:RegisterEvent("ZG.VAR.WaitForVisualsToPlayDURP", 250, 1)
    	ZG[id].VAR.e = 0
    	ZG[id].VAR.hpCount = 1
    	ZG[id].VAR.hpList = {90,80,70,60,50,40,30,20,10}
    	pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 7000, 1)
    	pUnit:RegisterEvent("ZG.VAR.DrainDragonBossHealth", 500, 0)
    	pUnit:RegisterEvent("ZG.VAR.DragonBossCheckForWipe_Astarot", 2000, 0)
    	pUnit:RegisterEvent("ZG.VAR.DragonDespawnDeadTrash", 10000, 0)
    end
    
    function ZG.VAR.WaitForVisualsToPlayDURP(pUnit)
    	-- commented out as knockdown visual is broke
    	--[[local id = pUnit:GetInstanceID()
    	if id == nil then id = 1 end
    	ZG[id] = ZG[id] or {VAR={}}
    	ZG[id].VAR.leader:CastSpell(68848)
    	ZG[id].VAR.addA:CastSpell(68848) -- knockdown visual
    	ZG[id].VAR.addB:CastSpell(68848)
    	ZG[id].VAR.addC:CastSpell(68848)
    	ZG[id].VAR.addD:CastSpell(68848)]]
    end
    
    function ZG.VAR.DrainDragonBossHealth(pUnit)
    	local id = pUnit:GetInstanceID()
    	if id == nil then id = 1 end
    	ZG[id] = ZG[id] or {VAR={}}
    	if pUnit:GetHealthPct() > ZG[id].VAR.hpList[ZG[id].VAR.hpCount] then
    		pUnit:SetHealth(pUnit:GetHealth()-200)
    	end
    	--[[if pUnit:GetPower() < pUnit:GetMaxPower() then
    		pUnit:SetPower(pUnit:GetPower(2)+1, 2)
    	end]]
    end
    
    function ZG.VAR.BeginZeEventZZ(pUnit)
    	local id = pUnit:GetInstanceID()
    	if id == nil then id = 1 end
    	ZG[id] = ZG[id] or {VAR={}}
    	ZG[id].VAR.e = ZG[id].VAR.e + 1
    	if ZG[id].VAR.e == 1 then
    		ZG[id].VAR.leader:SendChatMessage(12,0,"Mortals, you must defend us while we attempt to destroy this being, or all hope is lost!")
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 3000, 1)
    	elseif ZG[id].VAR.e == 2 then
    		ZG[id].VAR.addA:ChannelSpell(49128, ZG[id].VAR.leader)
    		ZG[id].VAR.addB:ChannelSpell(49128, ZG[id].VAR.leader)
    		ZG[id].VAR.addC:ChannelSpell(49128, ZG[id].VAR.leader)
    		ZG[id].VAR.addD:ChannelSpell(49128, ZG[id].VAR.leader)		
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 1000, 1)
    	elseif ZG[id].VAR.e == 3 then
    		ZG[id].VAR.leader:ChannelSpell(48185, pUnit)
    		--ZG[id].VAR.e = 15 -- DEBUG -------------------------------------------------------------------------
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 1000, 1)
    	elseif ZG[id].VAR.e == 4 then
    		pUnit:CastSpellAoF(-11062.66, -2297.34, 146, 68926)
    		pUnit:SpawnCreature(21234, -11062.66, -2297.34, 146, 0, 15, 300000)
    		ZG[id].VAR.dragons = 0
    		pUnit:RegisterEvent("ZG.VAR.SpawnMoreDamnDragonLords", 5000, 2)
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 20000, 1)
    	elseif ZG[id].VAR.e == 5 then
    		local found = false
    		for _,unit in pairs(pUnit:GetInRangeUnits()) do
    			local entry = unit:GetEntry()
    			if entry == 871111 or entry == 497111 then
    				if unit:IsAlive() then
    					found = true
    					break
    				end
    			end
    		end
    		if not found then
    			ZG[id].VAR.leader:PlaySoundToSet(8291)
    			pUnit:SendChatMessage(14,0,"Impossible! Rise my minions! Serve your master once more!")
    			ZG[id].VAR.hpCount = ZG[id].VAR.hpCount + 1
    		else
    			ZG[id].VAR.e = ZG[id].VAR.e - 1
    		end
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 1000, 1)
    	elseif ZG[id].VAR.e == 6 then
    		ZG[id].VAR.dragons = 0
    		pUnit:RegisterEvent("ZG.VAR.SpawnMoreDamnDragonLords", 5000, 3)
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 20000, 1)		
    	elseif ZG[id].VAR.e == 7 then
    		local found = false
    		for _,unit in pairs(pUnit:GetInRangeUnits()) do
    			local entry = unit:GetEntry()
    			if entry == 871111 or entry == 497111 then
    				if unit:IsAlive() then
    					found = true
    					break
    				end
    			end
    		end
    		if not found then
    			ZG[id].VAR.hpCount = ZG[id].VAR.hpCount + 1
    			ZG[id].VAR.leader:PlaySoundToSet(8290)
    			pUnit:SendChatMessage(14,0,"Burn, you wretches! Burn!")
    			ZG[id].VAR.hpCount = ZG[id].VAR.hpCount + 1
    			local trigger = pUnit:GetCreatureNearestCoords(ZG[id].VAR.leader:GetX(),ZG[id].VAR.leader:GetY(),ZG[id].VAR.leader:GetZ(),27942)
    			trigger:SetScale(0.8)
    			trigger:CastSpell(63894) -- shield
    		else
    			ZG[id].VAR.e = ZG[id].VAR.e - 1
    		end
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 1000, 1)
    	elseif ZG[id].VAR.e == 8 then
    		ZG[id].VAR.leader:SendChatMessage(14,0,"Quick, get within the barrier!")
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 4000, 1)
    	elseif ZG[id].VAR.e == 9 then
    		for i=1,100 do
    			pUnit:RegisterEvent("ZG.VAR.METEORSINCOMINGDUN_DUN", math.random(1000,20000),1)
    		end
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 23000, 1)
    	elseif ZG[id].VAR.e == 10 then
    		pUnit:GetCreatureNearestCoords(ZG[id].VAR.leader:GetX(),ZG[id].VAR.leader:GetY(),ZG[id].VAR.leader:GetZ(),27942):RemoveAura(63894) -- shield
    		ZG[id].VAR.leader:PlaySoundToSet(8292)
    		pUnit:SendChatMessage(14,0,"This cannot be! I am the Master here! You mortals are nothing to my kind! DO YOU HEAR? NOTHING!")
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 4000, 1)
    	elseif ZG[id].VAR.e == 11 then
    		ZG[id].VAR.hpCount = ZG[id].VAR.hpCount + 1
    		ZG[id].VAR.dragons = 0
    		pUnit:RegisterEvent("ZG.VAR.SpawnMoreDamnDragonLords", 5000, 4)
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 21000, 1)
    	elseif ZG[id].VAR.e == 12 then
    		local found = false
    		for _,unit in pairs(pUnit:GetInRangeUnits()) do
    			local entry = unit:GetEntry()
    			if entry == 871111 or entry == 497111 then
    				if unit:IsAlive() then
    					found = true
    					break
    				end
    			end
    		end
    		if not found then
    			for _,unit in pairs(pUnit:GetInRangeUnits()) do
    				if unit:GetEntry() == 21234 then
    					unit:Kill(unit)
    					break
    				end
    			end
    			ZG[id].VAR.leader:PlaySoundToSet(8291)
    			pUnit:SendChatMessage(14,0,"Impossible! Rise my minions! Serve your master once more!")
    			ZG[id].VAR.hpCount = ZG[id].VAR.hpCount + 1
    			ZG[id].VAR.dragons = 0
    			pUnit:RegisterEvent("ZG.VAR.SpawnMoreDamnDragonLords", 5000, 3)
    			pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 21000, 1)
    		else
    			ZG[id].VAR.e = ZG[id].VAR.e - 1
    			pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 5000, 1)
    		end
    	elseif ZG[id].VAR.e == 13 then
    		local found = false
    		for _,unit in pairs(pUnit:GetInRangeUnits()) do
    			local entry = unit:GetEntry()
    			if entry == 871111 or entry == 497111 then
    				if unit:IsAlive() then
    					found = true
    					break
    				end
    			end
    		end
    		if not found then
    			ZG[id].VAR.hpCount = ZG[id].VAR.hpCount + 1
    			ZG[id].VAR.leader:PlaySoundToSet(8290)
    			pUnit:SendChatMessage(14,0,"Burn, you wretches! Burn!")
    			ZG[id].VAR.hpCount = ZG[id].VAR.hpCount + 1
    			local trigger = pUnit:GetCreatureNearestCoords(ZG[id].VAR.leader:GetX(),ZG[id].VAR.leader:GetY(),ZG[id].VAR.leader:GetZ(),27942)
    			trigger:SetScale(0.8)
    			trigger:CastSpell(63894) -- shield
    		else
    			ZG[id].VAR.e = ZG[id].VAR.e - 1
    		end
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 1000, 1)	
    	elseif ZG[id].VAR.e == 14 then
    		ZG[id].VAR.leader:SendChatMessage(14,0,"Quick, get within the barrier!")
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 2500, 1)
    	elseif ZG[id].VAR.e == 15 then
    		for i=1,100 do
    			pUnit:RegisterEvent("ZG.VAR.METEORSINCOMINGDUN_DUN", math.random(1000,20000),1)
    		end
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 23000, 1)
    	elseif ZG[id].VAR.e == 16 then
    		pUnit:GetCreatureNearestCoords(ZG[id].VAR.leader:GetX(),ZG[id].VAR.leader:GetY(),ZG[id].VAR.leader:GetZ(),27942):RemoveAura(63894) -- shield
    		ZG[id].VAR.leader:PlaySoundToSet(8292)
    		pUnit:SendChatMessage(14,0,"This cannot be! I am the Master here! You mortals are nothing to my kind! DO YOU HEAR? NOTHING!")
    		pUnit:SetHealthPct(10)
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 5000, 1)
    	elseif ZG[id].VAR.e == 17 then
    		--pUnit:ChannelSpell(68834, ZG[id].VAR.leader)
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 1000, 1)
    	elseif ZG[id].VAR.e == 18 then
    		ZG[id].VAR.leader:SendChatMessage(14,0,"No!")
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 2000, 1)
    	elseif ZG[id].VAR.e == 19 then
    		ZG[id].VAR.leader:SendChatMessage(12,0,"Death to the interlopers.")
    		ZG[id].VAR.leader:StopChannel()
    		ZG[id].VAR.leader:CastSpell(41535) -- chains visual
    		ZG[id].VAR.addA:StopChannel()
    		ZG[id].VAR.addB:StopChannel()
    		ZG[id].VAR.addC:StopChannel()
    		ZG[id].VAR.addD:StopChannel()
    		ZG[id].VAR.addcount = 0
    		pUnit:RegisterEvent("ZG.VAR.SetFactionsOfNPCSDragon", 1000, 4)
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 5000, 1)
    	elseif ZG[id].VAR.e == 20 then
    		ZG[id].VAR.addA:SetFaction(21)
    		ZG[id].VAR.addB:SetFaction(21)
    		ZG[id].VAR.addC:SetFaction(21)
    		ZG[id].VAR.addD:SetFaction(21)
    		ZG[id].VAR.leader:SetFaction(21)
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 2000, 1)
    	elseif ZG[id].VAR.e == 21 then
    		local found = false
    		for _,unit in pairs(pUnit:GetInRangeUnits()) do
    			local entry = unit:GetEntry()
    			if entry == 36544 or entry == 4052 then
    				if unit:IsAlive() then
    					found = true
    					break
    				end
    			end
    		end
    		if not found then
    			ZG[id].VAR.leader:PlaySoundToSet(8293)
    			pUnit:SendChatMessage(14,0,"Worthless wretch! Your friends will join you soon enough!")
    			pUnit:SetHealth(132)
    		else
    			ZG[id].VAR.e = ZG[id].VAR.e - 1
    		end
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 1000, 1)		
    	elseif ZG[id].VAR.e == 22 then
    		pUnit:MoveTo(-11064, -2310.88, 146.2, 0)
    		pUnit:RegisterEvent("ZG.VAR.VisuzlzzBoss", 100, 0)
    		pUnit:RegisterEvent("ZG.VAR.BeginZeEventZZ", 6000, 1)	
    	elseif ZG[id].VAR.e == 23 then
    		pUnit:RemoveEvents()
    		--[[for _,plrs in pairs(pUnit:GetInRangePlayers()) do
    			if pUnit:IsAlive() then
    				plrs:CastSpellOnTarget(11, pUnit)
    			end
    		end]]
    		for _,unit in pairs(pUnit:GetInRangeUnits()) do
    			local entry = unit:GetEntry()
    			if entry == 21234 or entry == 871111 or entry == 36544 or entry == 497111 or entry == 4052 then
    				if not unit:IsAlive() then
    					unit:Despawn(1,0)
    				end
    			end
    		end
    		local object = pUnit:GetGameObjectNearestCoords(-11095.5, -2318.3, 147.5, 146086) -- rocks
    		if object ~= nil then
    			object:Despawn(1,0)
    		end
    		pUnit:SpawnGameObject(355101, -11064, -2329.5, 146.6, 4.679757, 300000, 100) -- chest
    		pUnit:Kill(pUnit)
    	end
    end
    Excerpt from a boss script.

Similar Threads

  1. Replies: 2
    Last Post: 06-01-2010, 05:29 AM
  2. NPC LUA Request
    By Pedregon in forum WoW EMU Questions & Requests
    Replies: 9
    Last Post: 03-21-2010, 04:49 PM
  3. [Release] Portal Lua Event
    By Spartansp in forum World of Warcraft Emulator Servers
    Replies: 28
    Last Post: 02-04-2008, 09:46 AM
  4. [Request] Npc/Quest creator guide
    By Swordfish999 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 01-06-2008, 01:02 PM
  5. [Request]Some lua scripts
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 12-28-2007, 11:59 PM
All times are GMT -5. The time now is 11:24 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