SLASH_COMMANDS["/afk"] = function() local status, msg if GetPlayerStatus() == PLAYER_STATUS_AWAY then status = PLAYER_STATUS_ONLINE msg = "Welcome back." else status = PLAYER_STATUS_AWAY msg = "Away from keyboard." end SelectPlayerStatus(status) d(msg) end
You have to put it to the .lua file.
Or whatever, I can make a tiny addon which will add this commad:
https://www.dropbox.com/s/qjwb3uxn47u0b0p/AFK.zip
By .lua file I ment file with .lua extension inside of Addons folder.
I have packaged the code as an addon, so you do not need to worry about it. Just download AFK.zip and extract its content to the Addons folder.
( Addons folder = My Documents\Elder Scrolls Online\live\AddOns\ )