Lua Housing System help menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Confucius's Avatar Panda of Worlds The Idiot

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1389
    Join Date
    Oct 2007
    Posts
    2,590
    Thanks G/R
    267/283
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua Housing System help

    no longer need help resolved issue
    Last edited by Confucius; 07-23-2009 at 08:33 PM.

    Lua Housing System help
  2. #2
    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)
    player:RemoveItem(ITEMID, 1) will remove the item on use.
    About the spawning.. doesn't it get saved when you just use SpawnGameObject?

    If not, you'll have to execute a query (which requires a special Lua engine).
    I'm using aspire's database here though, so I'm not sure how much ArcEmu's differs.

    Code:
    Execute(1, "INSERT INTO gameobject_spawns (`ID`,`Entry`,`Map`,`position_x`,`position_y`,`position_z`,`Facing`,`orientation1`,`orientation2`,`orientation3`,`orientation4`,`State`,`Flags`,`Faction`,`Scale`,`phase`) VALUES ('0','GAMEOBJECTIDHERE','"..player:GetMapID().."','"..player:GetX().."','"..player:GetY().."','"..player:GetZ().."','"..player:GetO().."','0','0','0','0','1','0','0','1','1');")
    Last edited by Dynashock; 07-23-2009 at 05:37 PM.

  3. #3
    Confucius's Avatar Panda of Worlds The Idiot

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1389
    Join Date
    Oct 2007
    Posts
    2,590
    Thanks G/R
    267/283
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm using aspire too hehe thanks for that command +Rep what lua engine can do that?

    ahh I'm on cooldown I'll give you your Rep later

  4. #4
    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)
    GuaEngine can do that. If you're not using it yet and you're using Lua I'd recommend getting it anyway.

  5. #5
    Confucius's Avatar Panda of Worlds The Idiot

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1389
    Join Date
    Oct 2007
    Posts
    2,590
    Thanks G/R
    267/283
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have Gua engine! is that thing u posted above the command

  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)
    The thing in the codebox is indeed the command for spawning the gameobject right on top of the player. It executes a query into the gameobject_spawns table directly.

    In case you're wondering, it doesn't need a prefix (prefix is the thing before the command usually, like player:GetX()) as it's a core function.

  7. #7
    Confucius's Avatar Panda of Worlds The Idiot

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1389
    Join Date
    Oct 2007
    Posts
    2,590
    Thanks G/R
    267/283
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I loves u ty!!! +Rep when I can!!! this will be epic housing system

  8. #8
    Confucius's Avatar Panda of Worlds The Idiot

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1389
    Join Date
    Oct 2007
    Posts
    2,590
    Thanks G/R
    267/283
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there was error I will post and script


    script

    Code:
    function standardhouse_Trigger(item, event, player, id, intid, code)
    x = player:GetX()
    y = player:GetY()
    z = player:GetZ()
    o = player:GetO()
    z = z - 3
    player:SpawnGameObject(2,x,y,z,o,0)
    Execute(1, "INSERT INTO gameobject_spawns (`ID`,`Entry`,`Map`,`position_x`,`position_y`,`position_z`,`Facing`,`orientation1`,`orientation2`,`orientation3`,`orientation4`,`State`,`Flags`,`Faction`,`Scale`,`phase`) VALUES ('0','2','"..player:GetMapID().."','"..player:GetX().."','"..player:GetY().."','"..player:GetZ().."','"..player:GetO().."','0','0','0','0','1','0','0','1','1');")
    player:RemoveItem(2, 1)
    end
       
    RegisterItemGossipEvent(2,1,"standardhouse_Trigger")
    RegisterItemGossipEvent(2,2,"OnSelect")
    Last edited by Confucius; 07-23-2009 at 05:50 PM.

  9. #9
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not to be mean but this would be much better done in C++. You could take advantage of phasing, among other things.


  10. #10
    Confucius's Avatar Panda of Worlds The Idiot

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1389
    Join Date
    Oct 2007
    Posts
    2,590
    Thanks G/R
    267/283
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know no C++ though D:

  11. #11
    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)
    As far as I know 'attempt to call method 'something' (a nil value)' means the function doesn't exist/work. It could be that the syntax is slightly different so try player:GetMapId() instead. (The d being upper-case could have caused it as Lua is case-sensitive. So make sure the d is lower-case now.)

  12. #12
    Confucius's Avatar Panda of Worlds The Idiot

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1389
    Join Date
    Oct 2007
    Posts
    2,590
    Thanks G/R
    267/283
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    same error, could I just set the map ID if players are only gonna spawn in certain places?

  13. #13
    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)
    Yeah, should be possible too. Command will then be:

    Code:
    Execute(1, "INSERT INTO gameobject_spawns (`ID`,`Entry`,`Map`,`position_x`,`position_y`,`position_z`,`Facing`,`orientation1`,`orientation2`,`orientation3`,`orientation4`,`State`,`Flags`,`Faction`,`Scale`,`phase`) VALUES ('0','2','MAPIDHERE','"..player:GetX().."','"..player:GetY().."','"..player:GetZ().."','"..player:GetO().."','0','0','0','0','1','0','0','1','1');")

  14. #14
    Confucius's Avatar Panda of Worlds The Idiot

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1389
    Join Date
    Oct 2007
    Posts
    2,590
    Thanks G/R
    267/283
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hehe ty .

  15. #15
    Confucius's Avatar Panda of Worlds The Idiot

    CoreCoins Purchaser Authenticator enabled
    Reputation
    1389
    Join Date
    Oct 2007
    Posts
    2,590
    Thanks G/R
    267/283
    Trade Feedback
    7 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    error about attempt to call global execute

Page 1 of 2 12 LastLast

Similar Threads

  1. New to LUA, need some help please.
    By C-Death in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 06-30-2008, 02:37 PM
  2. LUA Script Error, Help would be appreciated!
    By pachuco55 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 06-20-2008, 06:03 PM
  3. LUA Boss Script Help
    By neurothymia in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-05-2008, 02:57 PM
  4. DKP System, Help Wanted!
    By Jotunheim in forum WoW Instances & Raiding
    Replies: 3
    Last Post: 09-28-2007, 11:18 PM
  5. System Help[!]
    By Londas in forum World of Warcraft General
    Replies: 10
    Last Post: 02-02-2007, 02:05 AM
All times are GMT -5. The time now is 12:54 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search