Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Credits
- --[[
- Henslock
- Kibblebit
- Grandelf1
- ]]--
- --[[Tables]]--
- ChatCoolDowns = {}
- LevelCoolDown = {}
- --Command to use chat
- local msg = "#c" --Command use to talk.
- --Command to find other commands
- local cmd = "#cmd" -- Command used to show all other commands.
- --Player Editing Commands
- local pot = "#potions" -- Command to recieve a player defined amount of potions.
- local goldmsg = "#gold" -- Command to give the player a certain ammount of gold.
- local buffs = "#buffs" -- Command to give the player a full set of level 80 buffs.
- local save = "#save" -- Command to save the players character.
- local gender = "#gender" -- Command to change your gender.
- local mount = "#mount" --Command to set a players mount Id.
- local dismount = "#dismount" -- Dismount from mount.
- local play = "#play" -- Plays sound id defined by player.
- local speed = "#speed" -- Sets the speed of a player.
- local morph = "#morph" -- Sets the display of a player.
- local demorph = "#demorph" -- Removes the display of a player.
- local color = "#color" -- Shows you what ranks are what colors.
- local heal = "#heal" -- Restores your health to full(Must be out of combat)
- local revive = "#revive" -- Revives your self.
- local level ="#level" -- Gives one free level every 86,400 seconds(1 day).
- --Player Info Commands
- local arena = "#arena" -- Displays players total arena points.
- local honor = "#honor" -- Displays players total honor.
- --Title Configs
- local tag = "World" -- Tag to show before user rank.
- --Value Configs
- local goldamount = "1000000" -- Amount of gold to give players ( defined in copper )
- local pot2 = 40070 -- Id of the potion the player shall recieve from #potions.
- --Anti-Spam(added by henslock)--
- local antispam = true -- True = on False = off
- local antispamtimer = 1.5 -- Amount of time ( In seconds )
- --Do Not Touch--
- function ChatCoolDowns.worldchat (event, player, message, type, language)
- if (message:find(msg.." ")) then
- local text = message:gsub(msg.." ", "")
- if(antispam==true) and (ChatCoolDowns[player:GetName()]~=nil) and ((os.clock()-ChatCoolDowns[player:GetName()]))<=antispamtimer then
- player:SendBroadcastMessage("|cFF00CC99["..tag.."]|r |cFFFF99CC[Spam Filter]|r |cFF00CCFFPlease do not spam the world chat|r")
- else
- ChatCoolDowns[player:GetName()] = os.clock()
- for _, v in pairs(GetPlayersInWorld()) do
- local rank = player:GetGmRank()
- if (player:IsGm()==true) and (rank == 'az') then
- v:SendBroadcastMessage("|cFF00CC99["..tag.."]|r |cFF99CC00["..player:GetName().."]:|r |cFFFFFF99"..text.."|r")
- elseif (player:IsGm()==true) and (rank == 'a') then
- v:SendBroadcastMessage("|cFF00CC99["..tag.."]|r |cFF333300["..player:GetName().."]:|r |cFFFFFF99"..text.."|r")
- elseif (player:IsGm()==true) and (rank == '3') then
- v:SendBroadcastMessage("|cFF00CC99["..tag.."]|r |cFFCC0099["..player:GetName().."]:|r |cFFFFFF99"..text.."|r")
- elseif (player:IsGm()==true) and (rank == 'donator') then
- v:SendBroadcastsMessage("|cFF00CC99["..tag.."]|r |cFF9900FF["..player:GetName().."]:|r |cFFFFFF99"..text.."|r")
- elseif (player:IsGm()==false) and (player:GetTeam() == 0) then
- v:SendBroadcastMessage("|cFF00CC99["..tag.."]|r |cFF3399FF["..player:GetName().."]:|r |cFFFFFF99"..text.."|r")
- elseif (player:IsGm()==false) and (player:GetTeam() == 1) then
- v:SendBroadcastMessage("|cFF00CC99["..tag.."]|r |cFFFF3300["..player:GetName().."]:|r |cFFFFFF99"..text.."|r")
- end
- end
- end
- return 0
- end
- if (message == cmd) then
- if (player:GetGmRank() == 'donator') then
- player:SendBroadcastMessage("World Chat Commands")
- player:SendBroadcastMessage(""..msg.." Sends message to world")
- player:SendBroadcastMessage(""..pot.." Gives you a set of potions")
- player:SendBroadcastMessage(""..goldmsg.." Gives you 100 gold.")
- player:SendBroadcastMessage(""..buffs.." Gives you a set of buffs.")
- player:SendBroadcastMessage(""..save.." Saves your character instantly.")
- player:SendBroadcastMessage(""..gender.." Changes your players sex.")
- player:SendBroadcastMessage(""..mount.." Makes you mount any mount you want.")
- player:SendBroadcastMessage(""..dismount.." Dismounts any mount your on.")
- player:SendBroadcastMessage(""..play.." Play any sound id defined by the player.")
- player:SendBroadcastMessage(""..speed.." Set your speed up to the max value of 15.")
- player:SendBroadcastMessage(""..morph.." Sets your display to whatever.")
- player:SendBroadcastMessage(""..demorph.." Removes your display.")
- player:SendBroadcastMessage(""..heal.." Heals you to full health.")
- return 0
- elseif (player:GetGmRank() == 'az' or player:GetGmRank() == 'a' or player:GetGmRank() == '3') then
- player:SendBroadcastMessage("World Chat Commands")
- player:SendBroadcastMessage(""..msg.." Sends message to world")
- player:SendBroadcastMessage(""..pot.." Gives you a set of potions")
- player:SendBroadcastMessage(""..goldmsg.." Gives you 100 gold.")
- player:SendBroadcastMessage(""..buffs.." Gives you a set of buffs.")
- player:SendBroadcastMessage(""..save.." Saves your character instantly.")
- player:SendBroadcastMessage(""..gender.." Changes your players sex.")
- player:SendBroadcastMessage(""..mount.." Makes you mount any mount you want.")
- player:SendBroadcastMessage(""..dismount.." Dismounts any mount your on.")
- player:SendBroadcastMessage(""..play.." Play any sound id defined by the player.")
- player:SendBroadcastMessage(""..speed.." Set your speed up to the max value of 15.")
- player:SendBroadcastMessage(""..morph.." Sets your display to whatever.")
- player:SendBroadcastMessage(""..demorph.." Removes your display.")
- player:SendBroadcastMessage(""..heal.." Heals you to full health.")
- return 0
- else
- player:SendBroadcastMessage("World Chat Commands")
- player:SendBroadcastMessage(""..msg.." Sends message to world")
- player:SendBroadcastMessage(""..buffs.." Gives you a set of buffs.")
- player:SendBroadcastMessage(""..save.." Saves your character instantly.")
- player:SendBroadcastMessage(""..play.." Play any sound id defined by the player.")
- return 0
- end
- end
- ----------------------------------------Gold
- if (player:GetGmRank() == '0') then
- player:SendBroadcastMessage("You do not have permission to use this command!")
- else
- if (message == goldmsg) then
- player:DealGoldMerit(goldamount)
- return 0
- end
- end
- ----------------------------------------Buffs
- if (message == buffs) then
- if (player:IsInCombat() == false) then
- player:CastSpell(48161)
- player:CastSpell(48073)
- player:CastSpell(48469)
- player:CastSpell(48451)
- player:CastSpell(42995)
- return 0
- else
- player:SendBroadcastMessage("Get out of combat!")
- end
- end
- ----------------------------------------Save
- if (message == save) then
- if (player:IsInCombat() == false) then
- player:SavePlayer()
- player:SendBroadcastMessage("You are now saved!")
- return 0
- else
- player:SendBroadcastMessage("Get out of combat!")
- end
- end
- ----------------------------------------Potions
- local msg = message:lower()
- local msg, ctmsg = string.find(message, "#potion")
- if (player:GetGmRank() == '0') then
- player:SendBroadcastMessage("You do not have permission to use this command!")
- else
- if(msg == 1) then
- local text = message:gsub("#potion", "")
- player:AddItem(pot2, text)
- return 0
- end
- end
- ----------------------------------------Gender
- local msg = message:lower()
- local msg, ctmsg = string.find(message, "#gender")
- if (player:GetGmRank() == '0') then
- player:SendBroadcastMessage("You do not have permission to use this command!")
- else
- if(msg == 1) then
- local text = message:gsub("#gender", "")
- if(text == " 0") then
- player:SendBroadcastMessage("Gender set to Male. Please re-log for it to take effect.")
- player:SetGender(text)
- return 0;
- elseif(text == " 1") then
- player:SendBroadcastMessage("Gender set to Female. Please re-log for it to take effect.")
- player:SetGender(text)
- return 0;
- elseif(text ~= " 0" and text ~= " 1") then
- player:SendBroadcastMessage("Good job your now Micheal Jackson")
- return 0;
- end
- end
- end
- -----------------------------------------Mounts
- local msg = message:lower()
- local msg, ctmsg = string.find(message, "#mount")
- if (player:GetGmRank() == '0') then
- player:SendBroadcastMessage("You do not have permission to use this command!")
- else
- if(msg == 1) then
- local text = message:gsub("#mount", "")
- player:SetMount(text)
- return 0;
- end
- if(message == dismount) then
- player:Dismount()
- end
- end
- ------------------------------------------Sound
- local msg = message:lower()
- local msg, ctmsg = string.find(message, "#play")
- if(msg == 1) then
- local text = message:gsub("#play", "")
- player:PlaySoundToPlayer(text)
- return 0;
- end
- ------------------------------------------Speed
- local msg = message:lower()
- local msg, ctmsg = string.find(message, "#speed")
- if (player:GetGmRank() == '0') then
- player:SendBroadcastMessage("You do not have permission to use this command!")
- else
- if(msg == 1) then
- local text = message:gsub("#speed", "")
- player:SetPlayerSpeed(text)
- return 0;
- else
- if(text > 25) then
- player:SetPlayerSpeed(25)
- end
- end
- end
- ------------------------------------------Morph
- local msg = message:lower()
- local msg, ctmsg = string.find(message, "#morph")
- if (player:GetGmRank() == '0') then
- player:SendBroadcastMessage("You do not have permission to use this command!")
- else
- if(msg == 1) then
- local text = message:gsub("#morph", "")
- player:SetModel(text)
- return 0;
- end
- end
- ------------------------------------------DeMorph
- if (player:GetGmRank() == '0') then
- player:SendBroadcastMessage("You do not have permission to use this command!")
- else
- if (message == demorph) then
- player:DeMorph()
- end
- end
- ------------------------------------------Color
- if (message == color) then
- player:SendBroadcastMessage("Red -- Horde")
- player:SendBroadcastMessage("Blue -- Alliance")
- player:SendBroadcastMessage("Green -- Admin")
- player:SendBroadcastMessage("Purple -- Donator")
- player:SendBroadcastMessage("Dark Green -- Developer")
- player:SendBroadcastMessage("Pink -- Gamemaster")
- end
- ------------------------------------------Healing
- if (player:GetGmRank() == '0') then
- player:SendBroadcastMessage("You do not have permission to use this command!")
- else
- if (message == heal) then
- if (player:IsInCombat() == false) then
- player:SetHealthPct(100)
- else
- player:SendBroadcastMessage("Get out of Combat!")
- end
- end
- end
- ------------------------------------------Revive
- if (player:GetGmRank() == '0') then
- player:SendBroadcastMessage("You do not have permission to use this command!")
- else
- if (message == revive) then
- if (player:IsDead() == true) then
- player:ResurrectPlayer()
- end
- end
- end
- ------------------------------------------Arena Points
- if (message == arena) then
- local pts = player:GetArenaPoints()
- player:SendBroadcastMessage("Your total arena points is: "..pts.."")
- end
- -----------------------------------------Total Honor
- if (message == honor) then
- local hon = player::GetTotalHonor()
- player:SendBroadcastMessage("Your total honor is: "..hon.."")
- end
- -------------------------------------------Level
- if (player:GetGmRank() == '0') then
- player:SendBroadcastMessage("You do not have permission to use this command!")
- elseif (message == level) then
- if LevelCoolDown[player:GetName()] ~= nil and ((os.clock()-LevelCoolDown[player:GetName()])) <= 86400 then
- player:SendBroadcastMessage("You may not obtain your free level for today!")
- else
- LevelCoolDown[player:GetName()] = os.clock()
- local slvl = player:GetPlayerLevel()
- player:SetLevel(slvl + 1)
- end
- end
- end
- RegisterServerHook(16, "ChatCoolDowns.worldchat")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement