Waypoint initiated go/creature spawn not working menu

User Tag List

Results 1 to 3 of 3
  1. #1
    tyeeeee1's Avatar Member
    Reputation
    6
    Join Date
    Feb 2008
    Posts
    95
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Waypoint initiated go/creature spawn not working

    Hey,

    I'm working on a small event where you talk to a unit and then she walks to waypoint 1. Then the below script should cause a flame effect and a monster to spawn. But it won't do either. I've tried fixing this but it just keeps crashing the server.

    Code:
    function OnReachWaypoint(pUnit, Event, WaypointId)
       if (WaypointId ==  1) then
          pUnit:SendChatMessage(14, 7, "Come demon's we will defeat you!")
    	  pUnit:SpawnGameObject(3267442, 8712.102539, 941.799072, 14.266078, 2.966595, 8000, 1, 0, 0) 
    	  pUnit:SpawnCreature(500063,8712.102539, 941.799072, 14.266078,2.966595, 900000, 0, 0, 0, 0, 0)
       end
    end
    
    RegisterUnitEvent(500047, 19, "OnReachWaypoint")

    Waypoint initiated go/creature spawn not working
  2. #2
    covert_cat's Avatar Member
    Reputation
    55
    Join Date
    Sep 2009
    Posts
    96
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use the PerformIngameSpawn command. And once the creature spawns, have it cast a cosmetic spell on spawn that creates a fire effect, instead of spawning a gameobject.

    I haven't tested this, but tell me if it works:
    Code:
    function OnReachWaypoint(pUnit, event, WaypointId)
       if (WaypointId ==  1) then
          local mapid = pUnit:GetMapID()
          pUnit:SendChatMessage(14, 7, "Come demons; we will defeat you!")
          PerformIngameSpawn(1, 500063, mapid, 8712.102, 941.799, 14.266, 2.966595, 14, 900000)
       end
    end
    
    function Burn_OnSpawn(pUnit, event)
    pUnit:FullCastSpell(43541)
    end
    
    RegisterUnitEvent(500047, 19, "OnReachWaypoint")
    RegisterUnitEvent(500063, 18, "Burn_OnSpawn")
    I think that would work.
    Last edited by covert_cat; 08-23-2010 at 08:22 PM.

  3. #3
    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)
    Spawning objects through Lua was always bugged whenever I tried, from debugging it I found the gameobjects spawned at too large a scale to see - the solution would be to get that gameobject and then make it smaller again.

    Although it would probably be best to actually find the problem first.

    Try this script and see if it all appears in your console screen properly when it is called:
    Code:
    function OnReachWaypoint(pUnit, Event, WaypointId)
        print("---------------------------------------------")
       print(pUnit)
       print(Event)
       print(WaypointId)
          print("---------------------------------------------")
       print("The results should of been something like:")
       print("3085252 : GUID")
       print("19")
       print("1")
    end
    
    RegisterUnitEvent(500047, 19, "OnReachWaypoint")

Similar Threads

  1. .NPC spawn <ENTRYID> not working
    By Bloodthunder1 in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 06-22-2014, 07:13 PM
  2. [ArcEmu] Creatures in Instances do not work properly
    By renfer in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 04-11-2010, 11:48 PM
  3. Character to Creature edits not working. Please help.
    By Aradroth in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 06-28-2008, 04:00 PM
  4. npc spawn command not working
    By Ganoran in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 11-01-2007, 09:06 PM
  5. Spawn NPC not working..
    By Volcomchamp in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 10-01-2007, 04:27 AM
All times are GMT -5. The time now is 12:21 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