Quantcast
Channel: OwnedCore - World of Warcraft Exploits, Hacks, Bots and Guides.
Viewing all articles
Browse latest Browse all 280060

[Lua Script] RegisterEvent lua function not working! HELP!

$
0
0
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?

Viewing all articles
Browse latest Browse all 280060

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>