[Lua] spawning gameobjects menu

User Tag List

Results 1 to 13 of 13
  1. #1
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] spawning gameobjects

    this is a really newbie question lol but how do you spawn gameobjects with a lua script? lol

    [Lua] spawning gameobjects
  2. #2
    syrtan's Avatar Member
    Reputation
    11
    Join Date
    May 2007
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this what you are looking for unit:SpawnGameObject(entry, x, y, z, o, duration, scale) ?

  3. #3
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea that is but is there a way to do it with no duration? like constantly keep it there? and spawn it in diff phases? like spawn it in phase 2 and phase 3? cuz i am trying to make a guild housing system in lua:P

  4. #4
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure if this is supported in Lua yet, or even in the database, when you get the ArcEmu SVN it comes with all the Lua commands, take a look in there to see if they have updated it for phases etc.




  5. #5
    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)
    Set duration to 0 and it should last till a restart, you will need to execute a query into the database to make it stay there forever (just get syntex then get the values you need etc).
    Also you can get object on spawn depending on location and then set phase, phase is part of the query when executing into your database.

  6. #6
    Dynashock's Avatar Contributor

    Reputation
    176
    Join Date
    Nov 2007
    Posts
    203
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    Set duration to 0 and it should last till a restart, you will need to execute a query into the database to make it stay there forever (just get syntex then get the values you need etc).
    Also you can get object on spawn depending on location and then set phase, phase is part of the query when executing into your database.
    They added saving to the function sometime ago. Latest rev's syntax would be:
    SpawnGameObject(entry, x, y, z, o, duration, scale, phase, save)

    Entry, x, y, z, o, scale and phase speak for itself. If a duration of 0 is specified the object will last until a restart. If save is 1 the object will be saved to the DB, too, meaning it'll last forever even after restarts.
    Ignorance is bliss.

  7. #7
    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)
    Ah I didn't know that. Quite helpful actually for something such as guild housing.

  8. #8
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks guys i will get back to work on the guild housing system through LUA
    and stoneharry could you help me with the mysql querys you can use with lua they dont seem to be working when i try to use them

  9. #9
    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)
    Originally Posted by trujillo View Post
    thanks guys i will get back to work on the guild housing system through LUA
    and stoneharry could you help me with the mysql querys you can use with lua they dont seem to be working when i try to use them

    CharDBQuery()
    and
    WorldDBQuery()
    Are needed to be able enabled in the option configuration to be able to work, add this line at the bottom of your optional config and then a blank line:

    Code:
    <LUAppArc AllowWorldDBQueries="1" AllowCharDBQueries="1">

  10. #10
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm well i havent tried that yet i just put it in my configs but when GZ used those commands for his npc that logged items in the database it worked fine for me for that one so yea lol i am very confused on how to use these commands but i will give that one a try

  11. #11
    RyeRye's Avatar Contributor
    Reputation
    240
    Join Date
    Aug 2008
    Posts
    996
    Thanks G/R
    0/1
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SpawnGameObject(entry, x, y, z, o, duration, scale, phase, save)
    when your where your at type .gps, and then fill in that information.



  12. #12
    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)
    Originally Posted by RyeRye View Post
    SpawnGameObject(entry, x, y, z, o, duration, scale, phase, save)
    when your where your at type .gps, and then fill in that information.
    Well done on reading the thread! /fail

  13. #13
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ^
    He needs to work out how to execute queries into the database now not how to spawn a object




Similar Threads

  1. making an item that spawns gameobjects
    By SupernovaHH in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 07-27-2009, 07:19 PM
  2. [LUA] Spawn Mobs on Item Use Hmm
    By DontCareQQ in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 09-05-2008, 08:32 AM
  3. How to Spawn Gameobjects Easily!
    By Moondar in forum WoW EMU Guides & Tutorials
    Replies: 3
    Last Post: 04-27-2008, 04:25 PM
  4. LUA, spawned creatures attack tank?
    By CairiFEA in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 04-16-2008, 04:25 AM
  5. Spawning Gameobjects Permanently (Easy way)
    By Relentlesserv in forum WoW EMU Guides & Tutorials
    Replies: 9
    Last Post: 09-21-2007, 10:43 AM
All times are GMT -5. The time now is 11:05 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