[Question] Spawning NPC on top of the Main Tank menu

User Tag List

Results 1 to 2 of 2
  1. #1
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] Spawning NPC on top of the Main Tank

    I made a script that is kind of like fire that you would stand in, in a raid, but a lot more ghetto, and I wanted to know how to spawn the fire npc on the main tank, or a random player. Will Rep any help.

    Deadly Deadly Fire Script
    Code:
    function DeadlyDeadlyFire_OnCombat(Unit, Event)
      Unit:Root(99999999999999999)
      Unit:RegisterEvent("DeadlyDeadlyFire_TimetoDie", 500, 0)
      Unit:Despawn(10000, 0)
      end
    
    function DeadlyDeadlyFire_TimetoDie(Unit, Event)
      Unit:CastSpellAoF(Unit:GetX(), Unit:GetY(), Unit:GetZ(), 72170) --flame strike
    end
      
    function DeadlyDeadlyFire_OnDied(Unit, Event)
      Unit:RemoveEvents()
      Unit:Despawn(1,0)
    end
    
    function DeadlyDeadlyFire_OnLeaveCombat(Unit, Event)
      Unit:RemoveEvents()
      Unit:Despawn(1,0)
    end
    
    RegisterUnitEvent(900047, 1, "DeadlyDeadlyFire_OnCombat")
    RegisterUnitEvent(900047, 4, "DeadlyDeadlyFire_OnDied")
    RegisterUnitEvent(900047, 2, "DeadlyDeadlyFire_OnLeaveCombat")
    Scizzle, Spawner of the Deadly Deadly Fire script so far (Broken)
    Code:
    function ScizzleDeadlyDeadlyFireSpawner_OnCombat(Unit, Event)
      Unit:Root(99999999999999999)
      Unit:RegisterEvent("ScizzleDeadlyDeadlyFireSpawner_TimetoDie", 500, 0)
      end
    
    function ScizzleDeadlyDeadlyFireSpawner_TimetoDie(Unit, Event)
      Unit:SpawnCreature(900047, Unit:GetMainTank(), Unit:GetX(), Unit:GetY(), Unit:GetZ(), 2212, 10000)
    end
      
    function ScizzleDeadlyDeadlyFireSpawner_OnDied(Unit, Event)
      Unit:RemoveEvents()
      Unit:Despawn(1,0)
    end
    
    function ScizzleDeadlyDeadlyFireSpawner_OnLeaveCombat(Unit, Event)
      Unit:RemoveEvents()
      Unit:Despawn(1,0)
    end
    
    RegisterUnitEvent(900048, 1, "ScizzleDeadlyDeadlyFireSpawner_OnCombat")
    RegisterUnitEvent(900048, 4, "ScizzleDeadlyDeadlyFireSpawner_OnDied")
    RegisterUnitEvent(900048, 2, "ScizzleDeadlyDeadlyFireSpawner_OnLeaveCombat")

    [Question] Spawning NPC on top of the Main Tank
  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)
    :Root() has no parameters, so remove the 999999999999999999999999999999999999999999999999999999999.

    I believe this would crash, since the events are still be fired even though the creature has despawned. Instead have an event happen in 10 seconds that removes events then despawns (1,0).

    To spawn on the player you would do:

    Code:
    local plr = pUnit:GetRandomPlayer(0) -- Change to what you need
    if plr ~= nil then
    pUnit:SpawnCreature(id, plr:GetX(), plr:GetY(), plr:GetZ(), plr:GetO(), faction, time)
    end

Similar Threads

  1. On Top of the Goldshire Buildings!
    By WhoStoleMyOrc in forum World of Warcraft Exploration
    Replies: 8
    Last Post: 01-02-2007, 09:53 AM
  2. Something very odd in AV on top of the alliance main base in
    By JoKeR` in forum World of Warcraft Exploits
    Replies: 11
    Last Post: 08-20-2006, 03:58 AM
  3. On Top of the CoT hourglass how?
    By bezike in forum World of Warcraft General
    Replies: 2
    Last Post: 08-06-2006, 02:12 AM
  4. Getting on top of the Forlorn Ridge 1.9
    By Matt in forum World of Warcraft Guides
    Replies: 7
    Last Post: 05-07-2006, 07:50 AM
  5. Top of the Deadmines Wall
    By Matt in forum World of Warcraft Guides
    Replies: 0
    Last Post: 05-02-2006, 11:48 PM
All times are GMT -5. The time now is 07:13 PM. 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