[Lua] SpawnCreature problem... menu

User Tag List

Results 1 to 6 of 6
  1. #1
    SirRFI's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] SpawnCreature problem...

    Hello, it's again me.

    This time I have problem with custom NPC. Here is the code:
    Code:
    function Necromancer_OnCombat(Unit, Event)
    	Unit:RegisterEvent("Necromancer_Summon", 30000, 0)
    	Unit:RegisterEvent("Necromancer_Fear", 12000, 0)
    	Unit:RegisterEvent("Necromancer_ShadowBolt", 6000, 0)
    end
    
    function Necromancer_Summon(Unit, Event)
    	local x = Unit:GetX()
    	local y = Unit:GetY()
    	local z = Unit:GetZ()
    	local o = Unit:GetO()
    	Unit:SpawnCreature(15654, x, y, z, o, 14, 20000)
    	Unit:SpawnCreature(15658, x+5, y-3, z-1, o, 14, 20000)
    end
    
    function Necromancer_ShadowBolt(Unit, Event)
    	Unit:FullCastSpellOnTarget(1106, Unit:GetMainTank())
    end
    
    function Necromancer_Fear(Unit, Event)
    	Unit:FullCastSpellOnTarget(5782, Unit:GetMainTank())
    end
    
    function Necromancer_OnLeaveCombat(Unit, Event)
    	Unit:RemoveEvents() 
    end
    
    function Necromancer_OnKilledTarget(Unit, Event)
    end
    
    function Necromancer_OnDied(Unit, Event)
    	Unit:RemoveEvents()
    end
    
    RegisterUnitEvent(1000011, 1, "Necromancer_OnCombat")
    RegisterUnitEvent(1000011, 2, "Necromancer_OnLeaveCombat")
    RegisterUnitEvent(1000011, 3, "Necromancer_OnKilledTarget")
    RegisterUnitEvent(1000011, 4, "Necromancer_OnDied")
    He is casting spells etc. everything fine, expect summoning mobs. Just when it's time for summoning - nothing happens like the function doesn't exist. I even tried adding spells to this function and they did work, but summons still didn't work. My NPC summoned mobs only few random times like there is chance for it 1%-5%. I'm out of ideas - I have tried all methods I found and result is same.
    Anyone know how to fix it? I'm using ArcEmu rev 2833 (3.1.3). Mobs 15654 and 15658 exist - first one is a skeleton around 4 lvl and second one is a ghoul. Both of them appears in big amounts near Silvermoon on deathscar.

    [Lua] SpawnCreature problem...
  2. #2
    Vision1000's Avatar Member
    Reputation
    104
    Join Date
    Jun 2008
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If its happening randomly, it sounds like its just a problem with the Lua Engine.

    Otherwise i can't see anything wrong with your script. Or the SpawnCreature function at least.

  3. #3
    SirRFI's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, seems it's problem with Lua Engine. Hallazi (boss from Zul"Aman) is supposed to tranform himself, summon something and summon totems when 75% or below. When he is, I can hear only placing-totem sound. Yes, he's scripted even not by me.

  4. #4
    DarkFever's Avatar Contributor
    Reputation
    84
    Join Date
    Aug 2007
    Posts
    167
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had a similar issue just my NPC spawned but they spawned as boxes :P


  5. #5
    myil's Avatar Member
    Reputation
    1
    Join Date
    Dec 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that means ur npc's display ID is messed lol

  6. #6
    SirRFI's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DarkFever View Post
    I had a similar issue just my NPC spawned but they spawned as boxes :P
    Originally Posted by myil View Post
    that means ur npc's display ID is messed lol
    Yes, when something is in white-blue square boxes, that means the model is missing (wrong displayID of weapon/mob etc or it's missing in your files).
    Still, missing models isn't similar problem to mine. My NPC summoned the mobs very few times.
    I noticed that even scripted bosses like Hallazi etc. cannot spawn his minions, totems etc. Whats more, I'm getting crashed when attacked some scripted npcs (not all scripted npcs, just some but always same), for an example some trolls in Zul"Aman crashing me. Why? Probally of bugged lua commands like ... hmm, knock back? Or bugged mob-spell/skill ? I don't know.

    Is anyone using ArcEmu, similar rev? If yes - tell me if it works...

Similar Threads

  1. LUA script problem
    By uberhak3r in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 07-09-2008, 06:32 PM
  2. [Help] Fairly large Lua script problem
    By Muruk in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 03-16-2008, 09:03 PM
  3. LUA Scripting Problem
    By Knife in forum World of Warcraft Emulator Servers
    Replies: 18
    Last Post: 03-10-2008, 02:00 PM
  4. Lua scripts problem
    By Mr.Ice.Cold in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 02-02-2008, 11:44 AM
  5. .Lua portal problem
    By Kiev in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 01-12-2008, 10:49 AM
All times are GMT -5. The time now is 04:16 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