[Lua] Despawn npc menu

User Tag List

Results 1 to 2 of 2
  1. #1
    Emanuel095's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Despawn npc

    Hello, i was trying to do my first lua script to a custom boss
    It involvs an add that is spawned at 70%, but when im dying the add is still there, so i was wondering if it's possible to make it disappear when players wipe.

    I also wondering if it's possible to make another npc talk in the same script.
    Example of what i mean, copied from Stoneharry's Lich king Script, using another thing then pUnit:
    Code:
    function epiashgyophopapea_Lich_King_Is_Not_A_Happy_Bunny(pUnit, Event)
    	Terenas:SendChatMessage(14,0,"Rise up, champions of the Light!")

    [Lua] Despawn npc
  2. #2
    Mildan's Avatar Member
    Reputation
    10
    Join Date
    Feb 2009
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Emanuel095 View Post
    Hello, i was trying to do my first lua script to a custom boss
    It involvs an add that is spawned at 70%, but when im dying the add is still there, so i was wondering if it's possible to make it disappear when players wipe.

    I also wondering if it's possible to make another npc talk in the same script.
    Example of what i mean, copied from Stoneharry's Lich king Script, using another thing then pUnit:
    Im not quite following you, if you want the add to disappear just add the
    Code:
    pUnit:RemoveEvents()
    In the leave combat one.

    Example:
    Code:
    Function Testeststt_Pull(pUnit, Event)
    pUnit:SendChatMessage(.....)
    end
    
    function testeststt_LeaveCombat(pUnit, Event)
    pUnit:RemoveEvents()
    end
    
    RegisterUnitEvent(NPCID, 1, "Testeststt_Pull")
    RegisterUnitEvent(NPCID, 2, "Testeststt_LeaveCombat")
    This just means that when the guy leaves combat, everything will disappear/reset.

    As for having multiple targets talk at the same time you would be using variables at each NPC, like Harry did, he just assigned Terenas as this NPC in a variable, along with the LK and Tirion, thereby he could make them all say this and that, by timers, and the variables.

    By using pUnit:SendChatMessage you are limited to ONLY that specific unit.
    So if you want to have more at the same time, I'd shoot for variables.

Similar Threads

  1. [LUA]Music NPC
    By Edude in forum WoW EMU General Releases
    Replies: 19
    Last Post: 11-08-2008, 06:59 AM
  2. Lua Warp Npc , but it wont load -.-
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 06-28-2008, 02:58 AM
  3. LUA Tele NPC.
    By Ickybad in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-08-2008, 06:08 AM
  4. [Help] Despawn NPCs?
    By eterared in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-28-2008, 08:37 PM
  5. Despawn NPC's in AV-towers.
    By Nyman in forum World of Warcraft Exploits
    Replies: 5
    Last Post: 01-21-2008, 09:15 AM
All times are GMT -5. The time now is 07:32 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search