Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- http://unrealsoftware.de/forum_posts.php?post=408883#jn
- -- rewritten by VADemon
- --[[ Sample
- commands[""] = {
- arguments = 0,
- syntax = "",
- admin = true,
- func = function (id, arguments)
- end
- }
- ]]
- -- AUTO HEAL --
- kevindurant_heal = {}
- -- while true, each player is healed
- kevindurant_autoheal = false -- if true then it is automatically turned on
- kevindurant_regenhp = 1 -- how much HP to restore per tick
- kevindurant_timer = 2 -- cooldown in seconds
- -- create heal entry
- -- is also used inside _healsecond, if a player entry doesn't exist
- addhook("join", "kevindurant_joinheal")
- function kevindurant_joinheal(id)
- kevindurant_heal[id] = {}
- kevindurant_heal[id].timer = kevindurant_timer
- end
- -- remove heal entry
- addhook("leave", "kevindurant_leaveheal")
- function kevindurant_leaveheal(id)
- kevindurant_heal[id] = nil
- end
- addhook("second","kevindurant_healsecond")
- function kevindurant_healsecond()
- if kevindurant_autoheal then
- local playertable = player(0,"tableliving")
- for i = 1, #playertable do
- local id = playertable[i]
- if not kevindurant_heal[id] then
- kevindurant_joinheal(id)
- end
- if kevindurant_heal[id].timer <= 0 then
- parse("sethealth "..id.." "..player(id,"health") + kevindurant_regenhp)
- else
- kevindurant_heal[id].timer = kevindurant_heal[id].timer - 1
- end
- end
- end
- end
- addhook("hit","kevindurant_healreset")
- function kevindurant_healreset(id, s)
- if kevindurant_heal[id] then
- kevindurant_heal[id].timer = kevindurant_timer -- or any other value. I don't care
- end
- end
- -- COMMANDS --
- commands["!heal"] = {
- arguments = 1,
- syntax = "<hp per tick>",
- admin = true,
- func = function (id, arguments)
- local hp = tonumber(arguments[1])
- if hp and hp~=0 then
- msg("Auto-heal was turned ON! ".. hp .." HP/tick@C")
- kevindurant_regenhp = hp
- kevindurant_autoheal = true
- elseif (not hp) or hp == 0 then
- msg("Auto-heal was turned OFF!@C")
- kevindurant_autoheal = false
- end
- end
- }
- commands["!ffa"] = {
- arguments = 0,
- syntax = "",
- admin = true,
- func = function (id, arguments)
- msg("Setting server to !FFA mode!@C")
- parse("restart")
- --parse("sv_name lone | FFA/DM")
- parse("sv_gamemode 1")
- parse("mp_radar 0")
- parse("mp_freezetime 5")
- parse("mp_autoteambalance 0")
- parse("sv_specmode 1")
- parse("mp_idlekick 0")
- parse("mp_kickpercent 0")
- parse("mp_mapvoteratio 0")
- parse("mp_tkpunish 0")
- end
- }
- commands["!settings"] = {
- arguments = 0,
- syntax = "",
- admin = true,
- func = function (id, arguments)
- msg("Setting server to !settings mode!@C")
- parse("restart")
- --parse("sv_name lone | Standard")
- parse("sv_gamemode 0")
- parse("mp_radar 1")
- parse("mp_respawndelay 0")
- parse("mp_freezetime 3")
- parse("mp_autoteambalance 1")
- parse("sv_specmode 1")
- parse("mp_idlekick 0")
- parse("mp_kickpercent 0")
- parse("mp_mapvoteratio 0")
- parse("mp_tkpunish 0")
- parse("mp_startmoney 16000")
- end
- }
- commands["!ctf"] = {
- arguments = 0,
- syntax = "",
- admin = true,
- func = function (id, arguments)
- msg("Setting server to !ctf mode!@C")
- parse("restart")
- --parse("sv_name lone | CTF/Con")
- parse("sv_gamemode 3")
- parse("mp_freezetime 3")
- parse("sv_specmode 2")
- parse("mp_autoteambalance 0")
- parse("mp_dispenser_money 1000")
- parse("mp_building_limit Turret 9")
- parse("mp_building_limit Dispenser 9")
- parse("mp_building_limit Teleporter Entrance 9")
- parse("mp_building_limit Teleporter Exit 9")
- parse("mp_building_limit Gate Field 9")
- parse("mp_building_limit Supply 9")
- parse("mp_idlekick 0")
- parse("mp_kickpercent 0")
- parse("mp_mapvoteratio 0")
- parse("mp_tkpunish 0")
- end
- }
- commands["!mixctf"] = {
- arguments = 0,
- syntax = "",
- admin = true,
- func = function (id, arguments)
- msg("Setting server to !mixctf mode!@C")
- parse("restart")
- --parse("sv_name lone | Mix/Match CTF")
- parse("sv_gamemode 3")
- parse("sv_password match")
- parse("sv_specmode 2")
- parse("mp_autoteambalance 0")
- parse("mp_freezetime 7")
- parse("mp_startmoney 6000")
- parse("mp_dispenser_money 500")
- parse("mp_building_limit Turret 3")
- parse("mp_building_limit Dispenser 1")
- parse("mp_building_limit Teleporter Entrance 1")
- parse("mp_building_limit Teleporter Exit 1")
- parse("mp_building_limit Gate Field 9")
- parse("mp_idlekick 0")
- parse("mp_kickpercent 0")
- parse("mp_mapvoteratio 0")
- parse("mp_tkpunish 0")
- end
- }
- commands["!dom"] = {
- arguments = 0,
- syntax = "",
- admin = true,
- func = function (id, arguments)
- msg("Setting server to !dom mode!@C")
- parse("restart")
- --parse("sv_name lone | Domination")
- parse("sv_gamemode 2")
- parse("mp_freezetime 3")
- parse("sv_specmode 2")
- parse("mp_autoteambalance 0")
- parse("mp_idlekick 0")
- parse("mp_kickpercent 0")
- parse("mp_mapvoteratio 0")
- parse("mp_tkpunish 0")
- end
- }
- commands["!mixdom"] = {
- arguments = 0,
- syntax = "",
- admin = true,
- func = function (id, arguments)
- msg("Setting server to !mixdom mode!@C")
- parse("sv_restart")
- --parse("sv_name lone | Mix/Match Domination")
- parse("sv_password match")
- parse("mp_autoteambalance 0")
- parse("mp_freezetime 7")
- parse("sv_specmode 2")
- parse("mp_respawndelay 3")
- parse("mp_idlekick 0")
- parse("mp_kickpercent 0")
- parse("mp_mapvoteratio 0")
- parse("mp_tkpunish 0")
- end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement