Hey there, i'm running an Arcemu 2.4.3 server and i've been trying to make a teleporter NPC using LUA, however it wont work right. It doesn't even show up a menu or something, just the standard text i put in the NPC text table. LUA is enabled in the configs, boss LUA scripts work perfect and most other commands do too. So can anyone tell if i made mistake in my script?
the NPC id is 104144 same as the values i put in NPC_gossip_textid and NPC_textid tables.
here is the script:
Code:
function Register_OnTalk(Unit, Event, Player)
Unit:GossipCreateMenu(104144, player, 0)
Unit:GossipMenuAddItem(0, "Enter Awesome Arena.", 1, 0)
Unit:GossipMenuAddItem(0, "Nevermind. 2, 0)
Unit:GossipSendMenu(player)
end
function Register_OnSelect(Unit, Event, player, id, intid, code, pMisc)
if (intid == 1) then
player:SendBroadcastMessage("Have fun!")
player:Teleport(0, -10884.901367, 1514.177002, 91.469772)
Unit:GossipComplete()
end
end
if (intid == 2) then
Unit:GossipComplete()
end
RegisterUnitGossipEvent(104144, 1, "Register_OnTalk")
RegisterUnitGossipEvent(104144, 2, "Register_OnSelect")