Script or lua help! menu

User Tag List

Results 1 to 6 of 6
  1. #1
    keeevin92's Avatar Member
    Reputation
    8
    Join Date
    Jul 2007
    Posts
    203
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Script or lua help!

    Hello Iam new to Scripting and Lua scripts and I have had many problems that havent be solved yet like the hide and seek by murlock.
    So I wonder what is needed to make a lua command work
    In the Murlocks Hide and seek script it was like this:
    Code:
     function On_Gossip (pUnit, event, player)
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(9, "Claim Your Prize!", 1, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus(pUnit, event, player, id, intid, code)
    if(intid == 1) then
    pUnit:GossipCreateMenu(101, player, 0)
    pUnit:GossipMenuAddItem(9, "ITEM_NAME", 2, 0)
    pUnit:GossipMenuAddItem(9, "ITEM_NAME", 3, 0)
    pUnit:GossipMenuAddItem(9, "ITEM_NAME", 4, 0)
    pUnit:GossipSendMenu(player)
    end
    
    if(intid == 2) then
    pUnit:SendChatMessage(14, 0, "I have been found! The event is over!")
    player:AddItem(ITEMID, 1)
    pUnit:Despawn(0, 0)
    end
    
    if(intid == 3) then
    pUnit:SendChatMessage(14, 0, "I have been found! The event is over!")
    player:AddItem(ITEMID, 1)
    pUnit:Despawn(0, 0)
    end
    
    if(intid == 4) then
    pUnit:SendChatMessage(14, 0, "I have been found! The event is over!")
    player:AddItem(ITEMID, 1)
    pUnit:Despawn(0, 0)
    end
    end
    
    RegisterUnitGossipEvent(NPCID, 1, "On_Gossip")
    RegisterUnitGossipEvent(NPCID, 2, "Gossip_Submenus")
    So I changed the things in the red marked to my id and name of weapon and also my id to my npc. Than i restarted my server and it stood that the lua script was loaded. But than the mob didnt say anything and didnt disapear though i did exactly as it stood in the guide. So i tried to add the items to the vendor in the db and he showed the items but still no disapearing or yelling. So after all try i decided to get help. So what do i need to do? Do i need to download any special program for making this working? Have had problems with all scripts I made though I followed the guides. + rep for help

    Script or lua help!
  2. #2
    Zudrik's Avatar Member
    Reputation
    52
    Join Date
    Dec 2008
    Posts
    169
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    About the Lua, is it enabled on your server?

    In the world config you should see

    Code:
    <ScriptBackends LUA="1"
                    AS="1">

  3. #3
    Choices's Avatar Member
    Reputation
    94
    Join Date
    Apr 2008
    Posts
    231
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If your on a compile, question: Have you compiled Scripts and Extra Scripts?

  4. #4
    keeevin92's Avatar Member
    Reputation
    8
    Join Date
    Jul 2007
    Posts
    203
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes I have compiled the script by doing the script in notebook. Than I remade it to .lua and put it into the scripts in my server. It stands that the lua works but nothing happens. Its just like a regular vendor that sells the item. he doesnt say iam found or despawn
    Same in the keazain's repack all the vendors and scripts made for them doenst work. Like hes pvptitle rewared or level rewared.

  5. #5
    shadowslayer133's Avatar Active Member
    Reputation
    61
    Join Date
    May 2008
    Posts
    313
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure the NPC has Gossip Enabled in the Npc's Flags

    Done by piersd
    Gamer tag - Midnight133

  6. #6
    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)
    In the creature_proto table make sure the flags of the npc is set to 1.
    Next make sure your using a fairly decent Lua engine, I know the default Aspire one didn't work at all last time I tried, the only thing it was doing was casting spells, and even then it casted them on it's self.
    If you don't know where to get a better Lua engine search for sun++ or Blua, I havn't tried them recently, but they will work better than the Aspire version. The best Lua engine I have found is the ArcEmu AppArc engine, but it's only compatable with ArcEmu.
    Hope this helps.

Similar Threads

  1. [lua help] my lich king script wont work
    By bomsemann in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 01-31-2009, 09:17 PM
  2. Script lua Help
    By transasmacanudo in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 08-31-2008, 07:29 PM
  3. Noob LUA script, need some help.
    By pancakebuddy in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 05-14-2008, 08:33 AM
  4. [Help me] Lua script error? please help.
    By Szharz in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-22-2008, 12:20 PM
  5. [Help] i need Lua help with this script...
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 25
    Last Post: 03-03-2008, 03:45 PM
All times are GMT -5. The time now is 09:32 AM. 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