ES Recruitment Drive
Original Post
[REL] aRules.lua
-- aRules.lua
-- helps you with tourney rules
-- by HoboJoey with the help of hampa

pressed = 0

local function RunCommand(cmd)
    run_cmd("cp \n"..cmd)
end

local function say_rules()
         RunCommand("SAY ^02Welcome to my tourney. The mod is wushufixed.tbm, prizes are 6k/3k.")
        RunCommand("SAY ^02Rules are:")
        RunCommand("SAY ^02No flamming, no caps, no spam, no trading, no linking, no colored text, no clan talk, no backseatmodearating.")
        RunCommand("SAY ^02Have Fun.")
        pressed = 1
end

local function key_up(key)
    if key == string.byte('j') then
        if pressed == 0 then
            say_rules()
        end
    end
end

add_hook("key_up","RulesHelper",key_up)
Its for the people who like to host tourney but dont have the MuteAll Script.
You have to download it and put it in Toribash/data/scripts/. Then you press esc ingame and go to settings -> Script and load it. If you press 'j' now it says the rules.

Post bugs and ideas pls.

HJ
Attached Files
aRules.lua (682 Bytes, 39 views)
i liek this script, and im sure this could be used for pt tourneys aswell,

Gj =]
        RunCommand("SAY ^02Welcome to my tourney. The mod is wushufixed.tbm, prizes are 6k/3k.")
        RunCommand("SAY ^02Rules are:")
        RunCommand("SAY ^02No flamming, no caps, no spam, no trading, no linking, no colored text, no clan talk, no backseatmodearating.")
        RunCommand("SAY ^02Have Fun.")
If i just used this, would it work. Just w/o having to press j it types it all at once
or would that not work.
Also its Flaming not flamming
Last edited by Chickenpox; Aug 7, 2009 at 07:02 PM.
copy the RunCommand("SAY ^02Have Fun.") in another line and change the "^02 have fun." for what you want to put
The "press a key" function is to provide the flood kick.
You need to wait a moment before pressing and not press tenth time in a row, or else you'll get flood kicked.
A good way to avoid this would be a timer or a wait in the script itself.
The host press the key once, and the whole text is sent, with a pause between each lines to "fool" the flood-kick system.
[FROG] - [Toribash-FR] - [OLDA] - \m/
Français, english: Click