LUA spawn help menu

User Tag List

Results 1 to 3 of 3
  1. #1
    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)

    LUA spawn help

    Hey, i was just wondering how a LUA script would look like if i wanted to make an NPC spawn a specific mob after accepting a quest. Any help would be appreciated. Thanks in advance

    LUA spawn help
  2. #2
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    --[[ The QuestGiver ]]--
    
    function QuestGiver_OnSpawn(pUnit, Event)
     QuestGiver = pUnit
    end
    
    RegisterUnitEvent(QUESTGIVERID, 18, "QuestGiver_OnSpawn")
    
    
    
    
    --[[ Quest ]]--
    
    function Quest_OnAccept(pUnit, Event)
     QuestGiver:SpawnCreature(SPAWNEDCREATURE, x, y, z, o, faction, duration)
    end
    
    RegisterQuestEvent(QUESTID, 1, "Quest_OnAccept")
    You can use it like me to Spawn a creature if you accept a q, but if you want, you can spawn a gameobject too.

    (if you want to spawn a npc change the the red to your wishes.)

    (change QUESTGIVERID to your MobID who has the quest, change QUESTID for the ID of your quest)
    Last edited by Kaidos; 08-15-2009 at 12:03 PM.

  3. #3
    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)
    thanks a lot =)

Similar Threads

  1. [Help] Costum portal spawning help...
    By Nubbadon in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-19-2008, 12:27 PM
  2. [Help] New to LUA, Need help with script.
    By nickelo in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 03-14-2008, 11:23 PM
  3. Lua script help and general questions from beginner
    By WinKIller0 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 02-23-2008, 04:38 AM
  4. Need LUA Scripting Help ?
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-04-2008, 12:36 PM
  5. help .lua portal help
    By Tom_2001 in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 01-24-2008, 03:21 PM
All times are GMT -5. The time now is 09:59 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