Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.53 KB | None | 0 0
  1. --[[
  2. Patch Notes
  3.  - Work on authentication
  4.  - Work on database integration
  5.  - Work on UI
  6.  - Work on backend
  7. ]]
  8.  local adminrights = false
  9.  local playerName = UnitName("player");
  10.  
  11. function OnLoad_Message()
  12.     DEFAULT_CHAT_FRAME:AddMessage("Dumb message inc.", 3.1, 0.9, 0.1); 
  13. end
  14.  
  15.  
  16. -- TEXT UI COMMAND LIST
  17. SLASH_CONFIG1 = "/ss"
  18. function SlashCmdList.CONFIG(msg, editbox)
  19.  if msg == "check" then
  20.     DEFAULT_CHAT_FRAME:AddMessage("You've chosen to check for playername permission.", 3.1, 0.9, 0.1);
  21.         if playerName == Daemios then
  22.             DEFAULT_CHAT_FRAME:AddMessage("Your admin rights are enabled.", 3.1, 0.9, 0.1);
  23.             adminrights = true
  24.         else
  25.             DEFAULT_CHAT_FRAME:AddMessage("Your admin rights are not enabled.", 3.1, 0.9, 0.1);
  26.             adminrights = false
  27.         end
  28.  elseif msg == "status" then
  29.  
  30.     if adminrights == true then
  31.         DEFAULT_CHAT_FRAME:AddMessage("You are currently an admin.", 3.1, 0.9, 0.1);
  32.     else
  33.         DEFAULT_CHAT_FRAME:AddMessage("You are not currently an admin.", 3.1, 0.9, 0.1);
  34.     end
  35.    
  36.  elseif msg == "name" then
  37.  
  38.         DEFAULT_CHAT_FRAME:AddMessage("Your name is "..playerName..".", 3.1, 0.9, 0.1);
  39.    
  40.  else
  41.     DEFAULT_CHAT_FRAME:AddMessage("----------------", 3.1, 0.9, 0.1);
  42.     DEFAULT_CHAT_FRAME:AddMessage("Skillscore by Daemios of Stormreaver.", 3.1, 0.9, 0.1);
  43.     DEFAULT_CHAT_FRAME:AddMessage("You've either entered an invalid option, or you've just typed /ss. Status, check, and name are the only current options.", 3.1, 0.9, 0.1);
  44.     DEFAULT_CHAT_FRAME:AddMessage("----------------", 3.1, 0.9, 0.1);
  45.  end
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement