MMOCoin

Likes Likes:  0
Results 1 to 5 of 5

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sergeant
    Paradox's Avatar
    Join Date
    Jul 2009
    Posts
    71
    Post Thanks / Like
    Rep Power
    17
    Reputation
    26

    [Release] VIP Player Commands

    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.
    [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.

    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.




  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Senior Sergeant
    MikExV™'s Avatar
    Join Date
    Feb 2010
    Location
    Ohio
    Posts
    117
    Post Thanks / Like
    Rep Power
    17
    Reputation
    35
    How Do I install this?

  4. #3
    Elite Member
    Dimman's Avatar
    Join Date
    Apr 2009
    Posts
    1,091
    Post Thanks / Like
    Rep Power
    22
    Reputation
    319
    Quote Originally Posted by MikExV™ View Post
    How Do I install this?
    Put them in your core and compile.
    No touching please.

  5. #4
    Contributor
    StickyIcky's Avatar
    Join Date
    Jul 2008
    Location
    127.0.0.1
    Posts
    747
    Post Thanks / Like
    Rep Power
    20
    Reputation
    188
    This is LUA, you don't compile it IN the core.

  6. #5
    Sergeant
    TacoNaco's Avatar
    Join Date
    Feb 2009
    Posts
    73
    Post Thanks / Like
    Rep Power
    18
    Reputation
    67
    Technically this is in the wrong section... isn't it? But cuz i likez uu =P
    Last edited by TacoNaco; 24-02-10 at 09:39 PM.
    Someone if you like their work... =)

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •