Hello. I've been working on my first lua called RapidMods. (I got the idea from Rich's RapidEmotes) It basically allows you to change the gametype by pressing a button on the numpad. Im outrageously experienced in lua and couldn't find what i was looking for on any of the tut sites, because they are obviously made for people that actually know what they are talking about
well heres the code, and i was thinking about adding a ton more mods onto it, but realized it would get incredibly confusing having so many different keys for all the mods. is there a way to change the
if(key == 267) then so instead of pressing the button you could type /wushu and activate the run_cmd's?
sorry for being confusing i have no idea what i am talking about
local function keydown(key)
if(key == 267) then
run_cmd("set flags 15")
run_cmd("set engagedistance 250")
run_cmd("set disqualification 1")
run_cmd("set turnframes 50")
run_cmd("set matchframes 500")
run_cmd("set mod classic")
run_cmd("set sumo 1")
run_cmd("set fracture 1")
run_cmd("set fracturethreshold 100")
run_cmd("set dismemberthreshold 150")
run_cmd("set dismemberment 1")
run_cmd("set flags 15")
run_cmd("set dojosize 0")
run_cmd("set dojotype 0")
run_cmd("set dqflag 0")
run_cmd("set engageheight 0")
run_cmd("set engagerotation 0")
run_cmd("set engagesapce 0")
run_cmd("set gravity 0.00 0.00 -9.82")
echo("Mod switched to Wushu")
add_hook("key_down", "keypressdown", keydown)
end
if(key == 269) then
run_cmd("set flags 3")
run_cmd("set engagedistance 80")
run_cmd("set disqualification 1")
run_cmd("set turnframes 70")
run_cmd("set matchframes 1000")
run_cmd("set mod classic")
run_cmd("set sumo 1")
run_cmd("set fracture 0")
run_cmd("set fracturethreshold 100")
run_cmd("set dismemberthreshold 100")
run_cmd("set dismemberment 1")
run_cmd("set dojosize 0")
run_cmd("set dojotype 0")
run_cmd("set dqflag 0")
run_cmd("set engageheight 0")
run_cmd("set engagerotation 0")
run_cmd("set engagesapce 0")
run_cmd("set gravity 0.00 0.00 -9.82")
echo("Mod switched to judo")
add_hook("key_down", "keypressdown", keydown)
end
if(key == 268) then
run_cmd("set flags 3")
run_cmd("set engagedistance 140")
run_cmd("set disqualification 1")
run_cmd("set turnframes 20")
run_cmd("set matchframes 220")
run_cmd("set mod classic")
run_cmd("set sumo 1")
run_cmd("set fracture 0")
run_cmd("set dismemberthreshold 100")
run_cmd("set dismemberment 1")
run_cmd("set dojosize 0")
run_cmd("set dojotype 0")
run_cmd("set dqflag 0")
run_cmd("set engageheight 0")
run_cmd("set engagerotation 0")
run_cmd("set engagesapce 0")
run_cmd("set gravity 0.00 0.00 -9.82")
echo("Mod switched to Kickbox")
add_hook("key_down", "keypressdown", keydown)
end
if(key == 270) then
run_cmd("set flags 3")
run_cmd("set engagedistance 180")
run_cmd("set disqualification 1")
run_cmd("set turnframes 10")
run_cmd("set matchframes 120")
run_cmd("set mod classic")
run_cmd("set sumo 1")
run_cmd("set fracture 0")
run_cmd("set dismemberthreshold 100")
run_cmd("set dismemberment 1")
run_cmd("set dojosize 0")
run_cmd("set dojotype 0")
run_cmd("set dqflag 0")
run_cmd("set engageheight 0")
run_cmd("set engagerotation 0")
run_cmd("set engagesapce 0")
run_cmd("set gravity 0.00 0.00 -9.82")
echo("Mod switched to taek")
add_hook("key_down", "keypressdown", keydown)
end
if(key == 271) then
run_cmd("set flags 11")
run_cmd("set engagedistance 90")
run_cmd("set disqualification 1")
run_cmd("set turnframes 10,20,20,30,35,35,40,40,40,50")
run_cmd("set matchframes 350")
run_cmd("set mod sambo.tbm")
run_cmd("set sumo 1")
run_cmd("set fracture 1")
run_cmd("set fracturethreshold 200")
run_cmd("set dismemberthreshold 325")
run_cmd("set dismemberment 1")
run_cmd("set dojosize 425")
run_cmd("set dojotype 0")
run_cmd("set dqflag 0")
run_cmd("set engageheight 0")
run_cmd("set engagerotation 0")
run_cmd("set engagesapce 0")
run_cmd("set gravity 0.00 0.00 -30.00")
run_cmd("set disqualification 1")
echo("Mod switched to aikido")
add_hook("key_down", "keypressdown", keydown)
end
end
echo("Script by Shlimmy")
echo("lol... copied rich's script creds to him")
add_hook("key_down", "keypressdown", keydown)