problem with lua menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  1. #1
    Pieterkii's Avatar Member
    Reputation
    7
    Join Date
    Jan 2009
    Posts
    89
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem with lua

    Code:
    local npcid = 111000
    local timebetweenannounce = 45000
    local restarttime = 120000 
    local yellortalk = 14 
    local message1 = "Hey there! Talk to me and choose a level!" 
    
    
    function Announcer_Yell(pUnit, Event)
       pUnit:SendChatMessage(yellortalk, 0, message1)
       pUnit:RemoveEvents();
       pUnit:RegisterEvent("Announcer2_Yell", timebetweenannounce, 0) 
    end
    
    function Announcer_Start(pUnit, Event)
       pUnit:RegisterEvent("Announcer_Yell", 1000, 0)
    end
     
    function Menu_OnGossipTalk(pUnit, event, player, pMisc)
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "I wana be lvl 20!", 1, 0)
    pUnit:GossipMenuAddItem(2, "I wana be lvl 30!", 2, 0)
    pUnit:GossipMenuAddItem(3, "I wana be lvl 40!", 3, 0)
    pUnit:GossipMenuAddItem(4, "I wana be lvl 50!", 4, 0)
    pUnit:GossipMenuAddItem(5, "I wana be lvl 60!", 5, 0)
    pUnit:GossipMenuAddItem(6, "I wana be lvl 70!", 6, 0)
    pUnit:GossipMenuAddItem(7, "I wana be lvl 80!", 7, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function NPC_OnGossip_select(pUnit, event, player, id, intid, code)
    if(intid == 1) then
    	player:SetPlayerLevel(20) 
            pUnit:SendChatMessage(12, 0, "you are now level 20")
    end
    
    if(intid == 2) then
    	player:SetPlayerLevel(30) 
            pUnit:SendChatMessage(12, 0, "you are now level 30")
    end
    if(intid == 3) then
    	player:SetPlayerLevel(40) 
            pUnit:SendChatMessage(12, 0, "you are now level 40")
    end
    if(intid == 4) then
    	player:SetPlayerLevel(50) 
            pUnit:SendChatMessage(12, 0, "you are now level 50")
    
    end
    if(intid == 5) then
    	player:SetPlayerLevel(60) 
            pUnit:SendChatMessage(12, 0, "you are now level 60")
    end
    if(intid == 6) then
    	player:SetPlayerLevel(70) 
            pUnit:SendChatMessage(12, 0, "you are now level 70")
    end
    if(intid == 7) then
    	player:SetPlayerLevel(80) 
            pUnit:SendChatMessage(12, 0, "you are now level 80")
    end
    
    RegisterUnitGossipEvent(111000,1,"Menu_OnGossipTalk")
    RegisterUnitEvent(111000, 6, "Announcer_Start")
    can sum1 put the correct code at the bottom..this doesnt show a menu on my npc on wow at all

    problem with lua
  2. #2
    Vision1000's Avatar Member
    Reputation
    104
    Join Date
    Jun 2008
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    local npcid = 111000
    local timebetweenannounce = 45000
    local restarttime = 120000 
    local yellortalk = 14 
    local message1 = "Hey there! Talk to me and choose a level!" 
    
    
    function Announcer_Yell(pUnit, Event)
       pUnit:SendChatMessage(yellortalk, 0, message1)
       pUnit:RemoveEvents();
       pUnit:RegisterEvent("Announcer2_Yell", timebetweenannounce, 0) 
    end
    
    function Announcer_Start(pUnit, Event)
       pUnit:RegisterEvent("Announcer_Yell", 1000, 0)
    end
     
    function Menu_OnGossipTalk(pUnit, Event, player)
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(1, "I wana be lvl 20!", 1, 0)
    pUnit:GossipMenuAddItem(2, "I wana be lvl 30!", 2, 0)
    pUnit:GossipMenuAddItem(3, "I wana be lvl 40!", 3, 0)
    pUnit:GossipMenuAddItem(4, "I wana be lvl 50!", 4, 0)
    pUnit:GossipMenuAddItem(5, "I wana be lvl 60!", 5, 0)
    pUnit:GossipMenuAddItem(6, "I wana be lvl 70!", 6, 0)
    pUnit:GossipMenuAddItem(7, "I wana be lvl 80!", 7, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function NPC_OnGossip_select(pUnit, Event, player, id, intid, code)
    if(intid == 1) then
    	player:SetPlayerLevel(20) 
            pUnit:SendChatMessage(12, 0, "you are now level 20")
    end
    
    if(intid == 2) then
    	player:SetPlayerLevel(30) 
            pUnit:SendChatMessage(12, 0, "you are now level 30")
    end
    if(intid == 3) then
    	player:SetPlayerLevel(40) 
            pUnit:SendChatMessage(12, 0, "you are now level 40")
    end
    if(intid == 4) then
    	player:SetPlayerLevel(50) 
            pUnit:SendChatMessage(12, 0, "you are now level 50")
    
    end
    if(intid == 5) then
    	player:SetPlayerLevel(60) 
            pUnit:SendChatMessage(12, 0, "you are now level 60")
    end
    if(intid == 6) then
    	player:SetPlayerLevel(70) 
            pUnit:SendChatMessage(12, 0, "you are now level 70")
    end
    if(intid == 7) then
    	player:SetPlayerLevel(80) 
            pUnit:SendChatMessage(12, 0, "you are now level 80")
    end
    
    RegisterUnitGossipEvent(111000,1,"Menu_OnGossipTalk")
    RegisterUnitGossipEvent(111000,2,"Menu_OnGossip_select")
    RegisterUnitEvent(111000, 6, "Announcer_Start")
    Try this,

    I added in the proper code at the bottom. But if that doesn't work you should trying changing textid -->pUnit:GossipCreateMenu(3543, player, 0) to something else, like 100 just to test. Sometimes for certain text_id's gossip npc's bug out. No clue why (Might just happen on my server too)
    Last edited by Vision1000; 08-01-2009 at 05:59 PM.

Similar Threads

  1. Problem with Lua scripts!
    By wour55 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 09-12-2010, 04:10 PM
  2. Problem with lua script :/ please help!
    By robinelitenn in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 10-24-2009, 05:10 PM
  3. Problem with LUA scripted Mobs
    By foamysquirl in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 07-24-2009, 02:45 PM
  4. Problem with lua boss script
    By nickeg in forum WoW EMU Questions & Requests
    Replies: 13
    Last Post: 08-16-2008, 09:22 AM
  5. [Help] problem with Lua
    By Edude in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 08-05-2008, 11:15 AM
All times are GMT -5. The time now is 09:33 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