Hello Mmowned 
I'm abit stuck with a lua script, and hoping to find some awnsers. Since arcemu blocked ReloadLuaEngine() from r3089+ there is no way to reload them apart from a restart or console access. then I stumbled across dofile(), which would essentially solve my problems for remote access.
I've looked into some scripts here and there, and made some edits to http://www.mmowned.com/forums/emulat...e-any-rev.html
This is what came out:
Code:
-- Start Config
local ID_RELOADER = 98312
function Reloader_Gossip(Unit, event, Player)
local Playername = Player:GetName()
if (Player:IsGm() == true) then
Unit:GossipCreateMenu(13006, Player, 0)
Unit:GossipMenuAddItem(7, "I would like to reload a Lua Script", 1, 0)
Unit:GossipMenuAddItem(3, "Nevermind, Goodbye", 3, 0)
Unit:GossipSendMenu(Player)
else
SendWorldMessage("|cffff6060Disconnecting Player: "..Playername..". Reason: Attempt to use GM tool without rights.", 2)
Player:SoftDisconnect()
end
end
function Reloader_Script(Unit, Event, Player, id, intid, code)
local GMname = Player:GetName()
if (intid == 1) then
Unit:GossipCreateMenu(14000005, Player, 0)
Unit:GossipMenuAddItem(7, "I understand, Continue", 2, 1)
Unit:GossipMenuAddItem(3, "Nevermind, Goodbye", 3, 0)
Unit:GossipSendMenu(Player)
end
if (intid == 2) then
if code ~= nil and code ~= "" then
dofile("scripts/"..code..".lua")
end
SendWorldMessage("|cFFFFEBCDGM "..GMname.." initiated server-side reload of "..code..".lua. The Server may experience some lag while this occurs.", 2)
Player:GossipComplete()
end
if (intid == 3) then
Player:GossipComplete()
end
end
RegisterUnitGossipEvent(ID_RELOADER, 1, "Reloader_Gossip")
RegisterUnitGossipEvent(ID_RELOADER, 2, "Reloader_Script")
gossip wise it all works. Only, no matter what I do with it I can't get it to actually reload the script
. dofile() seems to be ignoring the other file's existance or do nothing with it whatsoever. Am I doing something wrong or is dofile not working? I'm running Arcemu r3247 with luahyparc.
ofcourse +Rep to those that try to help
Thanks in advance