[Lua][Share] Global Chat, Rock Paper Scissors, & Custom City Dismounting menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Hellgawd's Avatar Account not activated by Email
    Reputation
    710
    Join Date
    Jun 2007
    Posts
    2,480
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua][Share] Global Chat, Rock Paper Scissors, & Custom City Dismounting

    Here are a few Lua scripts I have come upon during my journeys across Google. :P
    Thought I would share them here for those that might be interested in them. I did not make these.


    Global Chat System

    With Rock Paper Scissors game!


    Worldchat: This script will allow players to typ #chat msg. Everyone in the world will see that msg. If the player is an admin he will get [Admin] for his name. Same for GM and vip. You can ban players from the chat, and players can block the chat, so they dont see it.

    Game script: This script will allow player to typ #game plrname. Then a msg will be send to that player to choose paper, stone or scissors. If he doesnt choose anything before 20 sec. It will mean he did not accept it. You can block players from challanging you to a game. Also everytime you play a game, it will get logged into a database. Same for the games you won and the games you lost. Players can use #gameinfo plrname to see the players blockstatus, how many games he played, and how many he won and lost.

    Commands:


    #chat - #chat msg, will broadcast a msg that every player can see unless they are banned or blocked the chat.
    #blockchat - Blocks the chat.
    #unblockchat - Unblocks the chat.
    #banchatplr - #banchatplr plrname. Player will be banned from chat, you can use this while player is offline.
    #unbanchatplr - Same as above but then for unban.
    #game - #game plrname, will challange a player by name
    #stone - You can only use this while playing a game, will make you choose stone
    #scissors - Same as above but for scissors.
    #paper - Same as above but for paper.
    #blockgame - Blocks the game
    #unblockgame - Unblocks the game
    #gameinfo - #gameinfo plrname, shows if the player have blocked the game settings, how many games he played, and how many he won and lost.
    #commands - Shows a command list ingame.


    There are some DB Queries that need to be ran in order to use this. I have just put them in code boxes so you don't need to download anything:


    Code:
    DROP TABLE IF EXISTS `chat`;
    CREATE TABLE `chat` (
    `Player` varchar(21) collate latin1_general_ci default NULL,
    `Banned` tinyint(3) default NULL,
    `Block` tinyint(3) default NULL,
    `Game` varchar(21) collate latin1_general_ci default NULL,
    `Gphase` tinyint(3) default NULL,
    `Played` tinyint(3) default NULL,
    `Won` tinyint(3) default NULL,
    `Lost` tinyint(3) default NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
    As well, if your configuration files do not already have this LuaHypArc variable, make sure to add it to the end somewhere:
    Code:
    <LuaHypArc AllowCharDBQueries="1">
    VIEW SCRIPT: Lua pastebin - collaborative debugging tool

    ---

    Custom City Dismounting

    If you've built a custom city, either with game objects or model editing, for your server, often you don't want people either gunning around on their mounts or flying over things that are supposed to be walls.
    This little script will help you!
    Just edit the values in RED :
    RED = The zone ID of your custom city.
    LIME = The Z (height) coordinates of where you want anti-mounting to be.
    You can also add new X or Y coordinates to customize this even further, to make just a specific part in a zone (for example, one part of a city, or one field in the barrens or something.)

    Code:
     --[[
    Dismounting Script
    ]]
    
    print "City Dismount Script loaded."
    
    function Plr_OnZoneEnter (Event, player, zoneId)
        if (zoneId == XXXX) then
            if (player:IsMounted() == true) and (player:HasAura(58600) == false) then
                if (player:GetZ() <= XXX) and (player:GetZ() >= XXX) then
                player:SendAreaTriggerMessage("You have entered a no-mount zone and are about to be dismounted!")
                player:CastSpell(58600)
                RegisterTimedEvent("Player_Dismount", 9900, 1)
                end
            end
        end
    end
    
    
    
    function Plr_OnZoneEnterK (Event, player, zoneId)
        if (zoneId == XXXX) and (player:HasAura(58600) == true) then
        player:RemoveAura(58600)
        end
    end
    
    function Player_Dismount (pUnit, Event, player)
        if (player:HasAura(58600) == true) then
        player:Dismount()
        player:CastSpell(50085) -- Slow fall.
        end
    end
        
    RegisterServerHook(12, "Plr_OnZoneEnter")
    RegisterServerHook(12, "Plr_OnZoneEnterK")

    [Lua][Share] Global Chat, Rock Paper Scissors, &amp; Custom City Dismounting
  2. #2
    Dombo's Avatar Banned
    Reputation
    622
    Join Date
    Nov 2008
    Posts
    1,421
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice, +4 useful for those who would like to create custom cities

  3. #3
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quite nice, thanks for the share!
    Need to spread :/

    Freelance Digital Artist
    https://reflectionartwork.deviantart.com
    You did not desert me
    My brothers in arms


  4. #4
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Who made these? I've seen these before.

    Nice share though.

  5. #5
    Hellgawd's Avatar Account not activated by Email
    Reputation
    710
    Join Date
    Jun 2007
    Posts
    2,480
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I forgot who the original poster was, to be completely honest.
    They were just sitting in my copypasta folder on my HDD so I thought I would share them XD
    EDIT: Grandelf was the coder.

  6. #6
    Daskin's Avatar Member
    Reputation
    1
    Join Date
    Jul 2009
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The dismounting one is mine

Similar Threads

  1. [Trinity] [Eluna Lua Script] World Chat Script
    By Foereaper in forum WoW EMU General Releases
    Replies: 1
    Last Post: 06-04-2013, 03:45 PM
  2. Protected LUA Code and Chat Addons
    By Ultraviolence in forum WoW UI, Macros and Talent Specs
    Replies: 0
    Last Post: 04-20-2010, 12:01 AM
  3. [Lua] Player & GM Chat Commands!
    By Ground Zero in forum WoW EMU General Releases
    Replies: 18
    Last Post: 01-09-2010, 05:06 PM
  4. [Share] STOCKS your rocks off!
    By PrimoPie in forum Art & Graphic Design
    Replies: 0
    Last Post: 08-21-2008, 08:06 AM
  5. [Share] Anoziar the Great, LUA Boss!
    By Creepfold in forum World of Warcraft Emulator Servers
    Replies: 21
    Last Post: 01-07-2008, 07:40 PM
All times are GMT -5. The time now is 09:55 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search