PDA

View Full Version : [Release] VIP Player Commands



Paradox
20-12-09, 11:36 AM
Well, as the title says, this commands are able to get used by VIP players, I'll edit the script soon, that only a certain rank can use it.
This is a simple script, but good for me to start learning LuaHypArc commands.

--[[
Testing Script, VIP player commands, made by Paradox. First serverhook script, so please dont go to hard on me.
More commands will be added on request.

[code]
--[[
Testing Script, VIP player commands, made by Paradox. First serverhook script, so please dont go to hard on me.
More commands will be added on request.
--]]

print("VIP Commands..")
print("Made By Paradox")

-----Local--------
local MSG_DRINK = "#drink"
local MSG_FOOD = "#food"
local MSG_VIP = "#vip"
local MSG_MALL = "#mall"
local MSG_BUFFS = "#buffs"
local MSG_EVENT = "#event"
local MSG_PVP = "#pvp"

----ID's----------
local FOOD_ID = 45932 -- Can be changed to the things you want.
local DRINK_ID = 42777 -- Can be changed to the things you want.
local CAST_BUFFS = {48161, 48073, 48469, 53307, 20217, 48936, 48932, 15366} ---Change the buff id's to what buffs you want the players to have.(wowhead.com - thottbot.com)

----FUNCTION-------
function OnChat(event, pPlayer, message, type, language)
if(message == MSG_DRINK) then
pPlayer:AddItem(FOOD_ID, amount) ---Change the amount to whatever you want it to be
end

if(message == MSG_FOOD) then
pPlayer:Additem(FOOD_ID, amount) ---Change the amount to whatever you want it to be
end

if(message == MSG_VIP) then
if (pPlayer:CanUseCommand("v") == true) then
pPlayer:Teleport(mapid, x, y, z) -----Change this coords
end
end

if(message == MSG_MALL) then
pPlayer:Teleport(mapid, x, y, z) -----Change this coords.
end

if(message == MSG_BUFFS) then
if (plr:CanUseCommand("v") == true) then
pPlayer:CastSpell(CAST_BUFFS)
end
end

if(message == MSG_PVP) then
if plr:GetPlayerLevel() == 80 then
pPlayer:Teleport(mapid, x, y, z)
end
end

if(message == MSG_EVENT) then
pPlayer:Teleport(mapid, x, y, z)
end
end
RegisterServerHook(16, "OnChat")






Important Note : This is my first script, using serverhooks, so please don't start flaming. If you have any requests, that you want added into it, please say, and I'll try to do my best. If there's an error in the script, post it here, or if I did anything wrong. I tried running it on my test realm, and it didn't gave any errors in world.exe.

MikExV™
24-02-10, 06:27 PM
How Do I install this?

Dimman
24-02-10, 06:41 PM
How Do I install this?
Put them in your core and compile.

StickyIcky
24-02-10, 07:02 PM
This is LUA, you don't compile it IN the core.

TacoNaco
24-02-10, 08:35 PM
Technically this is in the wrong section... isn't it? But +rep cuz i likez uu =P