RegisterEvent lua function not working! HELP! menu

User Tag List

Results 1 to 1 of 1
  1. #1
    hinur's Avatar Member
    Reputation
    1
    Join Date
    Jul 2015
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RegisterEvent lua function not working! HELP!

    I've started learning the lua code recently and I was trying to create a custom lua boss for my arcemu server when this occurred. When I start the gossip function he talks but the RegisterEvent function doesn't work! I've tried for a day now to get it working, there isn't even an error with the code, can somebody take a look at it and find out whats wrong... I'm not sure if this has anything to do with the problem but when the RegisterEvent function should occur, in my chat box is says "there is no such command, or you don't have access to it".

    -------------------------------------CODE--------------------------------

    local Morgan = 98000
    local Necrolord = 99050

    function GossipMenu_Send(pUnit, event, player)
    pUnit:GossipCreateMenu(1000, player, 0)
    pUnit:GossipMenuAddItem(7, "Begin the face-off...", 1, 0)
    pUnit:GossipMenuAddItem(7, "Not yet", 2, 0)
    pUnit:GossipSendMenu(player)
    end

    function GossipMenu_Selection(pUnit, event, player, id, intid, code)
    if(intid == 1) then
    pUnit:SetNPCFlags(2) -- Makes it so you cant touch him which normally resets him
    pUnit:SendChatMessage(12, 0, "This Necrolord has caused enough carnage in Azeroth already! Lets bring him down...")
    pUnit:MoveTo(186.530838, 22.437296, 115.707848, 0.007836)
    pUnit:RegisterEvent("MorganCinematic1", 5000, 1)
    player:GossipComplete()
    end

    if(intid == 2) then
    player:GossipComplete()
    end
    end

    -- After this make it so that Necrolord spawns, they have a conversation, then Morgan teleports out and you fight Necrolord.

    RegisterUnitGossipEvent(98000, 1, "GossipMenu_Send")
    RegisterUnitGossipEvent(98000, 2, "GossipMenu_Selection")

    function MorganCinematic1(pUnit, event, player) -- Something is wrong with this bit, fix it...
    pUnit:SendChatMessage(12, 0, "SHOW YOURSELF NECROMANCER!")
    pUnit:CastSpell(47820)
    pUnit:RegisterEvent("MorganCinematic2", 5000, 1)
    end

    ---------------------------------------------------------------------------

    anything wrong?
    Last edited by hinur; 10-30-2015 at 12:45 PM.

    RegisterEvent lua function not working! HELP!

Similar Threads

  1. Replies: 4
    Last Post: 07-07-2008, 09:56 AM
  2. [Help] Lua Script Not Working
    By Muruk in forum World of Warcraft Emulator Servers
    Replies: 26
    Last Post: 03-16-2008, 02:13 PM
  3. LUA portals not working
    By roguesownu in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 02-23-2008, 05:49 PM
  4. Simple Lua Script , not working need help!
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 12-30-2007, 02:06 PM
  5. SQL file not working help please
    By n7e7b7 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 09-22-2007, 10:40 PM
All times are GMT -5. The time now is 02:16 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