Player Commands
By Dr. Livingstone
Info
These lua player commands are all highly customizable and can easily be tailored to fit your needs! Players must simply type in the given command to easily utilize this feature. If you want to turn off any one of the commands you just have to change the 'true' to 'false' and you won't have to worry about it anymore.
Current Version: 1.0
Revive - #revive
Repair - #repair
Teleport To Mall - #mall
Set Hearthstone - #sethearth
Code:
-- Config --
local AllowRevive = true -- [True/False] If true, then allows players to revive themselves and sets their health/mana to 500
local AllowRepair = true -- [True/False] If true, then allows players to repair their equipment with a chat command
local AllowMall = true --[True/False] If true, then allows players to teleport to their respective malls
local AllowSetHearth = true --[True/False] If true, then allows players to set their hearthstones to their current location
local AllyMall = "X, Y, Z" -- Change to the X, Y, and Z of your Alliance Mall
local HordeMall = "X, Y, Z" -- Change to the X, Y, Z of your Horde Mall
local ReviveMessage = "#revive"
local RepairMessage = "#repair"
local MallMessage = "#mall"
local SetHearthMessage = "#sethearth"
function Player_OnChat(event, pPlayer, message, type, language)
local LCM = message:lower()
if (LCM == ReviveMessage) and (AllowRevive == true) then
pPlayer:RessurectPlayer()
pPlayer:SetHealth(1000)
pPlayer:SetMana(500)
elseif (LCM == RepairMessage) and (AllowRepair == true) then
pPlayer:RepairItem()
elseif (LCM == MallMessage) and (AllowMall == true) and (pPlayer:GetFaction() == 0) then
pPlayer:Teleport(Allymall)
elseif (LCM == MallMessage) and (AllowMall == true) and (pPlayer:GetFaction() == 1) then
pPlayer:Teleport(HordeMall)
elseif (LCM == SetHearthMessage) and (AllowSetHearth == true) then
local X = pPlayer:GetX()
local Y = pPlayer:GetY()
local Z = pPlayer:GetZ()
pPlayer:SetBindPoint(X, Y, Z)
end
end
RegisterServerHook(16, "Player_OnChat")
Coming Soon:
GM Commands
Please post ideas!