Need help with LUA Hearthstone 3.1.1 menu

User Tag List

Results 1 to 9 of 9
  1. #1
    andreasv18_2005's Avatar Member
    Reputation
    1
    Join Date
    May 2009
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with LUA Hearthstone 3.1.1

    I'm kinda new to this whole thing, so I went ahead and downloaded Johved's Repack 3 for 3.1.1 and installed. Everything is fine, including custom items but i can't get my WarpNPC to work. I imported the SQL file, fine, I spawn the NPC but the menu isn't there. Here's the SQL script :


    Code:
    insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`) 
    values ('26000000', "Teleporter", "Main Cities", "", '1', '7', '0', '3', '0', '0', '10543', '0', '0', '0', '1', '1', '1', '0');
    
    insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `Item1`, `Item2`, `Item3`, `respawntime`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `resistance7`,  `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `auraimmune_flag`, `vehicle_entry`, `CanMove`) 
    values ('26000000', '80', '80', '7', '9000000', '9000000', '100000', '1', '1', '100', '0', '9999999', '9999999', '0', '0', '0', '0', '0', '0', '20000', '9999', '9999', '9999', '9999', '9999', '9999', '9999', '0', '0', "0", '1', '0', '0', '0', '2.50', '8.00', '14.00', '0', '0', '-1', '7');
    And the LUA :


    Code:
    function On_Gossip(unit, event, player)
    unit:GossipCreateMenu(3544, player, 0)
    unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
    unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
    unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
    unit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus(unit, event, player, id, intid, code)
    
    if(intid == 999) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(2, "Neutral Cities", 1, 0)
    unit:GossipMenuAddItem(2, "Alliance Cities", 2, 0)
    unit:GossipMenuAddItem(2, "Horde Cities", 3, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 1) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Dalaran", 300, 0)
    unit:GossipMenuAddItem(1, "Shattrath", 309, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 2) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Stormwind", 301, 0)
    unit:GossipMenuAddItem(1, "Ironforge", 302, 0)
    unit:GossipMenuAddItem(1, "Darnassus", 303, 0)
    unit:GossipMenuAddItem(1, "Exodar", 304, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 3) then
    unit:GossipCreateMenu(3543, player, 0)
    unit:GossipMenuAddItem(1, "Orgrimmar", 305, 0)
    unit:GossipMenuAddItem(1, "Undercity", 306, 0)
    unit:GossipMenuAddItem(1, "Thunder Bluff", 307, 0)
    unit:GossipMenuAddItem(1, "Silvermoon", 308, 0)
    unit:GossipMenuAddItem(0, "[Back]", 999, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 300) then
    player:Teleport(571, 5798.553711, 645.019287, 647.477783)
    unit:GossipComplete(player)
    end
    
    if(intid == 301) then
    player:Teleport(0, -8913.230469, 554.632996, 93.794830)
    unit:GossipComplete(player)
    end
    
    if(intid == 302) then
    player:Teleport(0, -4982.447266, -880.969604, 501.659882)
    unit:GossipComplete(player)
    end
    
    if(intid == 303) then
    player:Teleport(1, 9946.639648, 2610.149414, 1316.256348)
    unit:GossipComplete(player)
    end
    
    if(intid == 304) then
    player:Teleport(530, -4008.085205, -11885.257813, -1.419589)
    unit:GossipComplete(player)
    end
    
    if(intid == 305) then
    player:Teleport(1, 1505.377319, -4414.602539, 20.598469)
    unit:GossipComplete(player)
    end
    
    if(intid == 306) then
    player:Teleport(0, 1831.750854, 238.543503, 60.478447)
    unit:GossipComplete(player)
    end
    
    if(intid == 307) then
    player:Teleport(1, -1282.347534, 133.302917, 131.218323)
    unit:GossipComplete(player)
    end
    
    if(intid == 308) then
    player:Teleport(530, 9381.675781, -7277.671387, 14.241373)
    unit:GossipComplete(player)
    end
    
    if(intid == 309) then
    player:Teleport(530, -1704.053589, 5376.160156, 3.416441)
    unit:GossipComplete(player)
    end
    end
    
    RegisterUnitGossipEvent(26000000, 1, "On_Gossip")
    RegisterUnitGossipEvent(26000000, 2, "Gossip_Submenus")

    How do I get this to work ? Sorry for taking up your time, and thank you for your help (anticipated).

    Cheers,
    Andreas

    Need help with LUA Hearthstone 3.1.1
  2. #2
    Mircast's Avatar Member
    Reputation
    14
    Join Date
    Sep 2008
    Posts
    139
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello andreasv18_2005,

    When you start up your server, look in your world.exe table.. does the script load or is there a problem at that given time
    ?

  3. #3
    beleko's Avatar Member
    Reputation
    1
    Join Date
    Oct 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lua is not in 3.1.1

  4. #4
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is. Its just not working 100% yet. Was due to the shared pointers being added.


  5. #5
    andreasv18_2005's Avatar Member
    Reputation
    1
    Join Date
    May 2009
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I start world.exe, here's what it says about LUA:

    And I think you misunderstood the problem. I do not know where to put the LUA script, so that it loads. Before, I used ArcEmu and I knew there.

    And just a side note -- the world.exe loads the following DLLs : EventScripts.dll and the ones see in the screenshot.

    King Regards,
    Andreas
    Last edited by andreasv18_2005; 05-14-2009 at 10:46 PM.

  6. #6
    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)
    In the folder where you have hearthstone-world.exe and hearthstone-logonserver.exe make a folder called "scripts" and place the lua in there


  7. #7
    andreasv18_2005's Avatar Member
    Reputation
    1
    Join Date
    May 2009
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried that, but when I spawn the NPC and try to talk to it, the server crashes. Something with Method Destruct, and Call Stack failure. And when there's no script at all, the NPC spawn and says (when I right-click him) a menu appears with : "Greetings, name". What should I do ?

    Best regards,
    Andreas

  8. #8
    AngelSandy's Avatar Member
    Reputation
    19
    Join Date
    Jan 2009
    Posts
    330
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is that the only emulator that supports Lua (Currently) is ArcEMU 3.0.9. Aspire/Heartstone, ****ed their Lua over, when they used Share Pointers for Stabillity. So its mostly not working, and as you see causes crash. Mangos can't use Lua either. Never could? (I don't know heh), but you can't use Lua with AS-HS yet. You would have to get a custom modified Lua Engine which fits the Shared Pointers.

    So you can't really do that much, other than changing to ArcEmu, or know C++ :b (Unless you know someone who could make you a modified Engine, or you can make it yourself)

  9. #9
    andreasv18_2005's Avatar Member
    Reputation
    1
    Join Date
    May 2009
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So if I want to use LUA for my NPCs, and I have to head to ArcEmu. Regarding that, I have some questions :
    1.Can somebody help me modify the LUA script above, to include some instances and Gadgetzan from Tanaris ?
    2.For what version of WoW is designed the latest revision of ArcEmu (SVN download) ?
    3.Should I follow the follwoing guide when compiling ArcEmu for the first time ? http://www.mmowned.com/forums/emulat...u-scratch.html And from this guide, I didn't really understand how to setup MySQL.
    Last edited by andreasv18_2005; 05-16-2009 at 08:18 AM.

Similar Threads

  1. [Lua][ArcEmu] Need help with Lua will Rep
    By Pedregon in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 03-20-2010, 02:39 PM
  2. Need help with Lua script
    By Pieterkii in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 03-04-2010, 07:07 AM
  3. Need help with LUA Boss please!
    By itsonebay in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 02-23-2010, 11:23 AM
  4. Need help with LUA
    By marcelo_20xx in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 11-29-2008, 11:22 AM
  5. Need help with LUA
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 18
    Last Post: 02-28-2008, 12:54 PM
All times are GMT -5. The time now is 04:31 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