local cv_rakon = CV_RegisterVar({ name = "rak_session", defaultvalue = "Off", flags = CV_SHOWMODIF|CV_NETVAR, possiblevalue = CV_OnOff }) -- prevent collisions between players local function noplayercollide(mo,mo2) if not (cv_rakon.value) then return end if mo2 and mo2.valid and mo2.player return false end end addHook("MobjCollide", noplayercollide, MT_PLAYER) addHook("MobjMoveCollide", noplayercollide, MT_PLAYER) --thanks tyron for the "localplayer" thing, gonna have to see if i can mess with splitscreen through local localplayer = nil hud.add(function(v, p, c) localplayer = p end) --SPB Attack has been sponsored by this code steal (thanks amper and Tyron) local cv_hudleft = CV_RegisterVar({ name = "rahud_leftside", defaultvalue = "Off", flags = CV_SAVE|CV_SHOWMODIF|CV_HIDDEN, possiblevalue = CV_OnOff }) local function go4medal(p, arg) if not (cv_rakon.value) then CONS_Printf(p, "Please turn Record Attack Kart on via \"rak_session on\" before using this command.") return end local howtocommand = "rak_go4medal <0:Off/1:Silver/2:Gold>: Sets your medal trial challenge in the next level." if not arg then CONS_Printf(p, howtocommand) return end local arg_num = tonumber(arg) -- use that to check for 0 / 1 local arg_s = arg:lower() -- use that to check for "off" / "on" if ((arg_num == 0) or (arg_s == "off")) if (p.cv_go4medal != 0) CONS_Printf(p, "You've turned \133OFF\128 the medal challenge, this will take effect in the next round.") p.nms = 0 else CONS_Printf(p, "You've already turned \133OFF\128 the medal challenge.") end elseif ((arg_num == 1) or (arg_s == "silver")) --(arg_num == 1) or (arg_s == "silver") if (p.cv_go4medal != 1) p.nms = 1 CONS_Printf(p, "You set your medal challenge to \134SILVER\128, this will take effect in the next round.") else CONS_Printf(p, "You've already set the medal challenge to \134SILVER\128.") end elseif ((arg_num == 2) or (arg_s == "gold")) --(arg_num == 2) or (arg_s == "gold") if (p.cv_go4medal != 2) p.nms = 2 CONS_Printf(p, "You set your medal challenge to \130GOLD\128, this will take effect in the next round.") else CONS_Printf(p, "You've already set the medal challenge to \130GOLD\128.") end else CONS_Printf(p, howtocommand) end end COM_AddCommand("rak_go4medal", go4medal) /*addHook("IntermissionThinker", do for p in players.iterate if p.nms == 1 CONS_Printf(p, "Your medal challenge has been set to \134SILVER\128.") p.cv_go4medal = 1 p.nms = 0 end if p.nms == 2 CONS_Printf(p, "Your medal challenge has been set to \130GOLD\128.") p.cv_go4medal = 2 p.nms = 0 end end end)*/ COM_AddCommand("rak_help", function(p) CONS_Printf(p, "rak_session : Turns on/off all of the features of Record Attack Kart.") CONS_Printf(p, "rahud_leftside : Place the record attack input HUD on either the left or right side of the screen.") CONS_Printf(p, "rak_go4medal <0:Off/1:Silver/2:Gold>: Sets your medal trial challenge in the next level.") CONS_Printf(p, "rak_tamode (Server/Admin only): Automatically makes the server customized to be just like Time Attack mode, or to revert it back to Vanilla gameplay.") end) COM_AddCommand("rak_tamode", function(p, arg) if not (cv_rakon.value) then CONS_Printf(p, "Please turn Record Attack Kart on via \"rak_session on\" before using this command.") return end local howtocommand = "rak_tamode : Automatically makes the server customized to be just like Time Attack mode, or to revert it back to Vanilla gameplay." if arg == nil then CONS_Printf(p, howtocommand) return end --Lat' is the god we all needed but never deserved (thanks so much) local arg_num = tonumber(arg) -- use that to check for 0 / 1 local arg_s = arg:lower() -- use that to check for "off" / "on" local oncecheck = 0 if ((arg_num == 1) or (arg_s == "on")) COM_BufInsertText(p, "jawz off") COM_BufInsertText(p, "dualjawz off") COM_BufInsertText(p, "orbinaut off") COM_BufInsertText(p, "tripleorbinaut off") COM_BufInsertText(p, "quadorbinaut off") COM_BufInsertText(p, "banana off") COM_BufInsertText(p, "triplebanana off") COM_BufInsertText(p, "decabanana off") COM_BufInsertText(p, "rocketsneaker off") COM_BufInsertText(p, "triplesneaker off") COM_BufInsertText(p, "mine off") COM_BufInsertText(p, "pogospring off") COM_BufInsertText(p, "invincibility off") COM_BufInsertText(p, "hyudoro off") COM_BufInsertText(p, "grow off") COM_BufInsertText(p, "shrink off") COM_BufInsertText(p, "ballhog off") COM_BufInsertText(p, "eggmanmonitor off") COM_BufInsertText(p, "selfpropelledbomb off") COM_BufInsertText(p, "thundershield off") COM_BufInsertText(p, "kitchensink off") COM_BufInsertText(p, "sneaker on") COM_BufInsertText(p, "kartspeed hard") COM_BufInsertText(p, "karteliminatelast off") COM_BufInsertText(p, "respawnitem off") print("Your game has been changed to reflect Time Attack.\n-All Items except the sneaker are toggled off\n-Game Speed has been set to Hard\n-The last player won't be eliminated immediately\n-Items boxes will not respawn.") elseif ((arg_num == 0) or (arg_s == "off")) COM_BufInsertText(p, "jawz on") COM_BufInsertText(p, "dualjawz on") COM_BufInsertText(p, "orbinaut on") COM_BufInsertText(p, "tripleorbinaut on") COM_BufInsertText(p, "quadorbinaut on") COM_BufInsertText(p, "banana on") COM_BufInsertText(p, "triplebanana on") COM_BufInsertText(p, "decabanana on") COM_BufInsertText(p, "rocketsneaker on") COM_BufInsertText(p, "triplesneaker on") COM_BufInsertText(p, "mine on") COM_BufInsertText(p, "pogospring on") COM_BufInsertText(p, "invincibility on") COM_BufInsertText(p, "hyudoro on") COM_BufInsertText(p, "grow on") COM_BufInsertText(p, "shrink on") COM_BufInsertText(p, "ballhog on") COM_BufInsertText(p, "eggmanmonitor on") COM_BufInsertText(p, "selfpropelledbomb on") COM_BufInsertText(p, "thundershield on") COM_BufInsertText(p, "kitchensink on") COM_BufInsertText(p, "sneaker on") COM_BufInsertText(p, "karteliminatelast on") COM_BufInsertText(p, "respawnitem on") print("Your game has been changed to reflect Vanilla gameplay.\n-All Items are now toggled on\n-The last player will be eliminated immediately at the end of the race\n-Items boxes will respawn again\nIf you want to change your game speed, please use the 'kartspeed' command.") else CONS_Printf(p, howtocommand) end end, 1) local function countActive() local pc = 0 for q in players.iterate if not q.spectator then pc = $ + 1 end end return pc end local function buildTimeString(x) if x == nil or x == 99999999 then return "N/A" end return ""..string.format("%02d", G_TicsToMinutes(x)).."' "..string.format("%02d", G_TicsToSeconds(x))..'" '..string.format("%02d", G_TicsToCentiseconds(x)) end local maptimes = { --{ 0, 0 }, //MAP00 (Dummy) --RING CUP [1]={ {TICRATE*110, 3021}, {"boinciel"} }, // MAP01 (Green Hills) [2]={ {TICRATE*160, 4466}, {"Ezo Richards"} }, // MAP02 (Dark Race) [3]={ {TICRATE*160, 4337}, {"VelocitOni"} }, // MAP03 (Northern District) [4]={ {TICRATE*120, 3452}, {"Jeck Jims"} }, // MAP04 (Darkville Garden) [5]={ {TICRATE*140, 3525}, {"Blade"} }, // MAP05 (Daytona Speedway) --SNEAKER CUP [6]={ {TICRATE*140, 4047}, {"TehRealSalt"} }, // MAP06 (Egg Zeppelin) [7]={ {TICRATE*110, 4041}, {"SeventhSentinel"} }, // MAP07 (Sonic Speedway) [8]={ {TICRATE*170, 3281}, {"SeventhSentinel"} }, // MAP08 (Hill Top) [9]={ {TICRATE*140, 4764}, {"Chrome"} }, // MAP09 (Misty Maze) [10]={ {TICRATE*120, 4378}, {"Sryder"} }, // MAP10 (Grand Metropolis) --WATER CUP [11]={ {TICRATE*130, 3678}, {"VelocitOni"} }, // MAP11 (Sunbeam Paradise) [12]={ {TICRATE*135, 3928}, {"Ezo Richards"} }, // MAP12 (Diamond Square) [13]={ {TICRATE*120, 3846}, {"toaster"} }, // MAP13 (Midnight Meadow) [14]={ {TICRATE*120, 3278}, {"TehRealSalt"} }, // MAP14 (Twinkle Cart) [15]={ {TICRATE*160, 3591}, {"Jeck Jims"} }, // MAP15 (Pleasure Castle) --LIGHTNING CUP [16]={ {TICRATE*170, 5187}, {"Ryuspark"} }, // MAP16 (Paradise Hill) [17]={ {TICRATE*145, 4976}, {"Blitz-T"} }, // MAP17 (Sub-Zero Peak) [18]={ {TICRATE*140, 3696}, {"Blade"} }, // MAP18 (Sapphire Coast) [19]={ {TICRATE*120, 4931}, {"Chrome"} }, // MAP19 (Sand Valley) [20]={ {TICRATE*150, 4220}, {"Blitz-T"} }, // MAP20 (Megablock Castle) --FIRE CUP [21]={ {TICRATE*170, 4053}, {"Ryuspark"} }, // MAP21 (Canyon Rush) [22]={ {TICRATE*150, 3613}, {"Blitz-T"} }, // MAP22 (Casino Resort) [23]={ {TICRATE*120, 4385}, {"Sryder"} }, // MAP23 (Silvercloud Island) [24]={ {TICRATE*160, 5321}, {"Chrome"} }, // MAP24 (Blue Mountain) [25]={ {TICRATE*150, 4476}, {"CoatRack"} }, // MAP25 (Petroleum Refinery) --INVINSIBLE CUP [26]={ {TICRATE*170, 3295}, {"TehRealSalt"} }, // MAP26 (Desert Palace) [27]={ {TICRATE*135, 4765}, {"SeventhSentinel"} }, // MAP27 (Aurora Atoll) [28]={ {TICRATE*160, 4670}, {"TehRealSalt"} }, // MAP28 (Barren Badlands) [29]={ {TICRATE*160, 5888}, {"DrTapeworm"} }, // MAP29 (Red Barrage) [30]={ {TICRATE*150, 4047}, {"Chrome"} }, // MAP30 (Midnight Channel) --EMERALD CUP [31]={ {TICRATE*120, 4944}, {"TehRealSalt"} }, // MAP31 (Vanilla Hotel) [32]={ {TICRATE*165, 4638}, {"VelectOni"} }, // MAP32 (Toxic Palace) [33]={ {TICRATE*110, 4036}, {"Jeck Jims"} }, // MAP33 (Ancient Tomb) [34]={ {TICRATE*130, 3595}, {"VelectOni"} }, // MAP34 (Cloud Cradle K) [35]={ {TICRATE*165, 4705}, {"Blitz-T"} }, // MAP35 (Volcanic Valley) --EGG CUP [36]={ {TICRATE*145, 3314}, {"boinciel"} }, // MAP36 (Kodachrome Void) [37]={ {TICRATE*120, 3501}, {"Wolfy"} }, // MAP37 (Boiling Bedrock) [38]={ {TICRATE*100, 4920}, {"Jeck Jims"} }, // MAP38 (Egg Quarters) [39]={ {TICRATE*110, 4318}, {"Chrome"} }, // MAP39 (Virtual Highway) [40]={ {TICRATE*120, 3550}, {"VelectOni"} }, // MAP40 (Eggman's Nightclub) --CHAO CUP [41]={ {TICRATE*110, 2572}, {"Ezo Richards"} }, // MAP41 (Ganbare Dochu) [42]={ {TICRATE*130, 3091}, {"Ezo Richards"} }, // MAP42 (Chao Circuit 1) [43]={ {TICRATE*110, 3454}, {"Ezo Richards"} }, // MAP43 (Chao Circuit 2) [44]={ {TICRATE*130, 2958}, {"Ezo Richards"} }, // MAP44 (Cloud Tops 2) [45]={ {TICRATE*110, 3693}, {"Ezo Richards"} }, // MAP45 (Regal Raceway) --SWAP CUP [46]={ {TICRATE*105, 3437}, {"Ryuspark"} }, // MAP46 (Balloon Panic) [47]={ {TICRATE*120, 3238}, {"Sryder"} }, // MAP47 (Dimension Heist 3) [48]={ {TICRATE*100, 3063}, {"SeventhSentinel"} }, // MAP48 (Sky Garden) [49]={ {TICRATE*105, 2980}, {"SeventhSentinel"} }, // MAP49 (Peach Gardens) [50]={ {TICRATE*120, 2914}, {"TehRealSalt"} }, // MAP50 (Rainbow Road) --SMK CUP [51]={ {TICRATE*105, 3003}, {"TehRealSalt"} }, // MAP51 (Donut Plains 1) [52]={ {TICRATE*105, 2930}, {"TehRealSalt"} }, // MAP52 (Mario Circuit 2) [53]={ {TICRATE*90 , 2389}, {"VelectOni"} }, // MAP53 (Ghost Valley 2) [54]={ {TICRATE*150, 4292}, {"TehRealSalt"} }, // MAP54 (Bowser Castle 3) [55]={ {TICRATE*90 , 2346}, {"TehRealSalt"} }, // MAP55 (Vanilla Lake 2) --COMMUNITY CUP (Records by community) --Modder's note: man I am TRASH at these stages and confirming records are going to be a nightmare as a Sonic Main [56]={ {TICRATE*150, 4061}, {"MystwalkerMX7"} }, // MAP56 (Lake Margorite) (Gold Time by MystwalkerMX7) [57]={ {TICRATE*130, 3535}, {"Rubber Ruff#1337"} }, // MAP57 (Coastal Temple) (Gold Time by Rubber Ruff#1337) [58]={ {TICRATE*150, 3721}, {"webkinz9#6161"} }, // MAP58 (Kart Airlines) (Gold Time by webkinz9#6161) [59]={ {TICRATE*130, 4020}, {"SoupBowler64#8188"} }, // MAP59 (Honeybee Industry) (Gold Time by SoupBowler64#8188) --:thinking: DO I want to give Crimson Core the time of day? nah. //MAP60 (Crimson Core) (Gold Time by "Actual Kart Gods") --STARDUST CUP (By Fayt) [652]={ {TICRATE*150, 3975}, {"Star#7631"} }, // MAPPC (Monster Monarch) [655]={ {TICRATE*150, 4375}, {"yoshimo#6922"} }, // MAPPF (Stardust Drive) [656]={ {TICRATE*170, 4232}, {"Purps#5586"} }, // MAPPG (Super Rainbow Road) [657]={ {TICRATE*130, 4011}, {"FaytxStay#4941"} }, // MAPPH (Cosmic Eclipse) --To my knowledge there are no other races that have gold or silver medal times. Custom maps will not be getting support other than RA Extended, assuming I know how to get those specific maps into the table as it is. } --wh- am i making something myself? OH NO!!! --special thanks to ashnal for inspiring me to copy straight off of the source :p --so we're gonna steal this from source because all of this has to be remade from scratch :| local colortranslation = { --Fun fact: entry 0 was actually 1, so we're commenting that out because WOW I did not realize that. --{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // SKINCOLOR_NONE {120, 120, 120, 120, 0, 2, 5, 8, 9, 11, 14, 17, 20, 22, 25, 28}, // SKINCOLOR_WHITE { 0, 1, 2, 3, 5, 7, 9, 12, 13, 15, 18, 20, 23, 25, 27, 30}, // SKINCOLOR_SILVER { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31}, // SKINCOLOR_GREY { 3, 5, 8, 11, 15, 17, 19, 21, 23, 24, 25, 26, 27, 29, 30, 31}, // SKINCOLOR_NICKEL { 4, 7, 11, 15, 20, 22, 24, 27, 28, 28, 28, 29, 29, 30, 30, 31}, // SKINCOLOR_BLACK {120, 120, 0, 2, 4, 10, 16, 22, 23, 24, 25, 26, 27, 28, 29, 31}, // SKINCOLOR_SKUNK {120, 120, 121, 121, 122, 123, 10, 14, 16, 18, 20, 22, 24, 26, 28, 31}, // SKINCOLOR_FAIRY {120, 96, 97, 98, 99, 71, 32, 11, 13, 16, 18, 21, 23, 26, 28, 31}, // SKINCOLOR_POPCORN { 97, 176, 177, 162, 163, 179, 12, 14, 16, 18, 20, 22, 24, 26, 28, 31}, // SKINCOLOR_ARTICHOKE { 0, 208, 209, 211, 226, 202, 14, 15, 17, 19, 21, 23, 25, 27, 29, 31}, // SKINCOLOR_PIGEON { 0, 1, 3, 5, 7, 9, 34, 36, 38, 40, 42, 44, 60, 61, 62, 63}, // SKINCOLOR_SEPIA {120, 65, 67, 69, 32, 34, 36, 38, 40, 42, 44, 45, 46, 47, 62, 63}, // SKINCOLOR_BEIGE { 3, 6, 32, 33, 35, 37, 51, 52, 54, 55, 57, 58, 60, 61, 63, 30}, // SKINCOLOR_WALNUT { 67, 70, 73, 76, 48, 49, 51, 53, 54, 56, 58, 59, 61, 63, 29, 30}, // SKINCOLOR_BROWN { 72, 76, 48, 51, 53, 55, 57, 59, 61, 63, 28, 28, 29, 29, 30, 31}, // SKINCOLOR_LEATHER {120, 120, 120, 121, 121, 122, 123, 124, 126, 127, 129, 131, 133, 135, 137, 139}, // SKINCOLOR_SALMON {120, 121, 121, 122, 144, 145, 146, 147, 148, 149, 150, 151, 134, 136, 138, 140}, // SKINCOLOR_PINK {144, 145, 146, 147, 148, 149, 150, 151, 134, 135, 136, 137, 138, 139, 140, 141}, // SKINCOLOR_ROSE { 64, 67, 70, 73, 146, 147, 148, 150, 118, 118, 119, 119, 156, 159, 141, 143}, // SKINCOLOR_BRICK { 68, 75, 48, 50, 52, 94, 152, 136, 137, 138, 139, 140, 141, 142, 143, 31}, // SKINCOLOR_CINNAMON {120, 121, 144, 145, 147, 149, 132, 133, 134, 136, 198, 198, 199, 255, 30, 31}, // SKINCOLOR_RUBY {120, 121, 122, 123, 124, 125, 126, 127, 128, 130, 131, 134, 136, 137, 139, 140}, // SKINCOLOR_RASPBERRY {120, 65, 67, 69, 71, 124, 125, 127, 132, 133, 135, 136, 138, 139, 140, 141}, // SKINCOLOR_CHERRY {122, 123, 124, 126, 129, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142}, // SKINCOLOR_RED {123, 125, 128, 131, 133, 135, 136, 138, 140, 140, 141, 141, 142, 142, 143, 31}, // SKINCOLOR_CRIMSON {123, 124, 126, 128, 132, 135, 137, 27, 28, 28, 28, 29, 29, 30, 30, 31}, // SKINCOLOR_MAROON {120, 96, 97, 98, 99, 65, 122, 144, 123, 124, 147, 149, 151, 153, 156, 159}, // SKINCOLOR_LEMONADE {120, 97, 112, 113, 113, 85, 87, 126, 149, 150, 151, 252, 253, 254, 255, 29}, // SKINCOLOR_FLAME { 99, 113, 113, 84, 85, 87, 126, 128, 130, 196, 197, 198, 199, 240, 243, 246}, // SKINCOLOR_SCARLET {103, 113, 113, 84, 85, 88, 127, 130, 131, 133, 134, 136, 138, 139, 141, 143}, // SKINCOLOR_KETCHUP {120, 121, 122, 123, 124, 147, 148, 91, 93, 95, 152, 154, 156, 159, 141, 143}, // SKINCOLOR_DAWN { 98, 112, 113, 84, 85, 87, 89, 149, 150, 251, 251, 205, 206, 207, 29, 31}, // SKINCOLOR_SUNSET {120, 120, 80, 80, 81, 82, 83, 83, 84, 85, 86, 88, 89, 91, 93, 95}, // SKINCOLOR_CREAMSICLE { 80, 81, 82, 83, 84, 85, 86, 88, 89, 91, 94, 95, 154, 156, 158, 159}, // SKINCOLOR_ORANGE { 82, 83, 84, 85, 87, 89, 90, 92, 94, 152, 153, 155, 157, 159, 141, 142}, // SKINCOLOR_PUMPKIN { 83, 85, 88, 90, 92, 94, 152, 153, 154, 156, 157, 159, 140, 141, 142, 143}, // SKINCOLOR_ROSEWOOD { 84, 86, 89, 91, 152, 154, 155, 157, 158, 159, 140, 141, 142, 143, 31, 31}, // SKINCOLOR_BURGUNDY { 98, 98, 112, 112, 113, 113, 84, 85, 87, 89, 91, 93, 95, 153, 156, 159}, // SKINCOLOR_TANGERINE {120, 80, 66, 70, 72, 76, 148, 149, 150, 151, 153, 154, 156, 61, 62, 63}, // SKINCOLOR_PEACH { 64, 66, 68, 70, 72, 74, 76, 78, 48, 50, 52, 54, 56, 58, 60, 62}, // SKINCOLOR_CARAMEL {120, 96, 96, 97, 98, 82, 84, 77, 50, 54, 57, 59, 61, 63, 29, 31}, // SKINCOLOR_CREAM { 96, 97, 98, 112, 113, 114, 115, 116, 117, 151, 118, 119, 157, 159, 140, 143}, // SKINCOLOR_GOLD { 97, 112, 113, 113, 114, 78, 53, 252, 252, 253, 253, 254, 255, 29, 30, 31}, // SKINCOLOR_ROYAL {112, 113, 114, 115, 116, 117, 118, 119, 156, 157, 158, 159, 141, 141, 142, 143}, // SKINCOLOR_BRONZE {120, 99, 113, 114, 116, 117, 119, 61, 63, 28, 28, 29, 29, 30, 30, 31}, // SKINCOLOR_COPPER { 96, 97, 98, 99, 104, 105, 106, 107, 117, 152, 154, 156, 159, 141, 142, 143}, // SKINCOLOR_QUARRY { 96, 97, 98, 100, 101, 102, 104, 113, 114, 115, 116, 117, 118, 119, 156, 159}, // SKINCOLOR_YELLOW { 96, 98, 99, 112, 113, 114, 114, 106, 106, 107, 107, 108, 108, 109, 110, 111}, // SKINCOLOR_MUSTARD {120, 96, 97, 98, 176, 113, 114, 106, 115, 107, 108, 109, 110, 174, 175, 31}, // SKINCOLOR_CROCODILE { 98, 101, 104, 105, 106, 115, 107, 108, 182, 109, 183, 110, 174, 111, 30, 31}, // SKINCOLOR_OLIVE { 0, 121, 122, 144, 71, 84, 114, 115, 107, 108, 109, 183, 223, 207, 30, 246}, // SKINCOLOR_VOMIT { 98, 99, 112, 101, 113, 114, 106, 179, 180, 180, 181, 182, 183, 173, 174, 175}, // SKINCOLOR_GARDEN {120, 96, 97, 98, 99, 176, 177, 163, 164, 166, 168, 170, 223, 207, 243, 31}, // SKINCOLOR_LIME { 98, 104, 105, 105, 106, 167, 168, 169, 170, 171, 172, 173, 174, 175, 30, 31}, // SKINCOLOR_HANDHELD {120, 120, 176, 176, 176, 177, 177, 178, 178, 179, 179, 180, 180, 181, 182, 183}, // SKINCOLOR_TEA {120, 120, 176, 176, 177, 177, 178, 179, 165, 166, 167, 168, 169, 170, 171, 172}, // SKINCOLOR_PISTACHIO {178, 178, 178, 179, 179, 180, 181, 182, 183, 172, 172, 173, 173, 174, 174, 175}, // SKINCOLOR_MOSS { 64, 66, 69, 32, 34, 37, 40, 182, 171, 172, 172, 173, 173, 174, 174, 175}, // SKINCOLOR_CAMOUFLAGE {120, 176, 160, 165, 167, 168, 169, 182, 182, 171, 60, 61, 63, 29, 30, 31}, // SKINCOLOR_ROBOHOOD {120, 176, 176, 176, 177, 163, 164, 165, 167, 221, 221, 222, 223, 207, 207, 31}, // SKINCOLOR_MINT {160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175}, // SKINCOLOR_GREEN {161, 163, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 30, 30, 31}, // SKINCOLOR_PINETREE {160, 184, 184, 185, 185, 186, 186, 187, 187, 188, 188, 189, 189, 190, 191, 175}, // SKINCOLOR_EMERALD {160, 184, 185, 186, 187, 188, 189, 190, 191, 191, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_SWAMP {120, 120, 80, 80, 81, 177, 162, 164, 228, 228, 204, 204, 205, 205, 206, 207}, // SKINCOLOR_DREAM { 97, 176, 160, 184, 185, 186, 187, 229, 229, 205, 206, 207, 28, 29, 30, 31}, // SKINCOLOR_PLAGUE {208, 209, 210, 211, 213, 220, 216, 167, 168, 188, 188, 189, 190, 191, 30, 31}, // SKINCOLOR_ALGAE {120, 176, 177, 160, 185, 220, 216, 217, 229, 229, 204, 205, 206, 254, 255, 31}, // SKINCOLOR_CARIBBEAN {120, 96, 97, 98, 177, 220, 216, 217, 218, 204, 252, 253, 254, 255, 30, 31}, // SKINCOLOR_AZURE {120, 208, 208, 210, 212, 214, 220, 220, 220, 221, 221, 222, 222, 223, 223, 191}, // SKINCOLOR_AQUA {210, 213, 220, 220, 220, 216, 216, 221, 221, 221, 222, 222, 223, 223, 191, 31}, // SKINCOLOR_TEAL {120, 120, 208, 208, 209, 210, 211, 212, 213, 215, 216, 217, 218, 219, 222, 223}, // SKINCOLOR_CYAN {120, 120, 208, 209, 210, 226, 215, 216, 217, 229, 229, 205, 205, 206, 207, 31}, // SKINCOLOR_JAWZ {208, 209, 211, 213, 215, 216, 216, 217, 217, 218, 218, 219, 205, 206, 207, 207}, // SKINCOLOR_CERULEAN {211, 212, 213, 215, 216, 218, 219, 205, 206, 206, 207, 207, 28, 29, 30, 31}, // SKINCOLOR_NAVY {120, 0, 0, 200, 200, 201, 11, 14, 17, 218, 222, 223, 238, 240, 243, 246}, // SKINCOLOR_PLATINUM {120, 120, 200, 200, 200, 201, 201, 201, 202, 202, 202, 203, 204, 205, 206, 207}, // SKINCOLOR_SLATE {120, 200, 200, 201, 201, 202, 202, 203, 203, 204, 204, 205, 205, 206, 207, 31}, // SKINCOLOR_STEEL { 96, 97, 98, 112, 113, 114, 11, 203, 204, 205, 205, 237, 239, 241, 243, 246}, // SKINCOLOR_THUNDER { 64, 66, 68, 70, 32, 34, 36, 203, 204, 205, 24, 25, 26, 28, 29, 31}, // SKINCOLOR_RUST { 81, 72, 76, 48, 51, 55, 252, 205, 205, 206, 240, 241, 242, 243, 244, 246}, // SKINCOLOR_WRISTWATCH {225, 226, 227, 228, 229, 205, 205, 206, 207, 207, 28, 28, 29, 29, 30, 31}, // SKINCOLOR_JET {208, 209, 211, 213, 215, 217, 229, 230, 232, 234, 236, 238, 240, 242, 244, 246}, // SKINCOLOR_SAPPHIRE {120, 120, 224, 225, 226, 202, 227, 228, 229, 230, 231, 233, 235, 237, 239, 241}, // SKINCOLOR_PERIWINKLE {224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 235, 236, 238, 242, 244, 246}, // SKINCOLOR_BLUE {226, 228, 229, 230, 232, 233, 235, 237, 239, 240, 242, 244, 246, 31, 31, 31}, // SKINCOLOR_BLUEBERRY {120, 112, 82, 83, 84, 124, 248, 228, 228, 204, 205, 206, 207, 29, 30, 31}, // SKINCOLOR_NOVA {120, 208, 209, 210, 211, 226, 202, 249, 194, 195, 196, 197, 198, 199, 255, 30}, // SKINCOLOR_PASTEL {120, 224, 201, 226, 202, 249, 250, 196, 197, 198, 199, 140, 141, 142, 143, 31}, // SKINCOLOR_MOONSLAM {120, 64, 81, 122, 192, 249, 203, 221, 221, 219, 219, 223, 223, 191, 191, 31}, // SKINCOLOR_ULTRAVIOLET {121, 145, 192, 249, 250, 251, 204, 204, 205, 205, 206, 206, 207, 29, 30, 31}, // SKINCOLOR_DUSK {120, 96, 64, 121, 67, 144, 123, 192, 193, 194, 195, 196, 197, 198, 199, 30}, // SKINCOLOR_BUBBLEGUM {121, 145, 192, 192, 193, 194, 195, 196, 196, 197, 197, 198, 198, 199, 30, 31}, // SKINCOLOR_PURPLE {120, 122, 124, 125, 126, 150, 196, 197, 198, 198, 199, 199, 240, 242, 244, 246}, // SKINCOLOR_FUCHSIA {120, 120, 176, 176, 177, 6, 8, 10, 249, 250, 196, 197, 198, 199, 143, 31}, // SKINCOLOR_TOXIC { 96, 97, 98, 112, 113, 73, 146, 248, 249, 251, 205, 205, 206, 207, 29, 31}, // SKINCOLOR_MAUVE {121, 145, 192, 248, 249, 250, 251, 252, 252, 253, 253, 254, 254, 255, 30, 31}, // SKINCOLOR_LAVENDER {201, 248, 249, 250, 251, 252, 253, 254, 255, 255, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_BYZANTIUM {144, 145, 146, 147, 148, 149, 150, 251, 251, 252, 252, 253, 254, 255, 29, 30}, // SKINCOLOR_POMEGRANATE {120, 120, 120, 121, 121, 122, 122, 123, 192, 248, 249, 250, 251, 252, 253, 254}, // SKINCOLOR_LILAC {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 96, 100, 104, 113, 116, 119}, // SKINCOLOR_SUPER1 {120, 120, 120, 120, 120, 120, 120, 120, 96, 98, 101, 104, 113, 115, 117, 119}, // SKINCOLOR_SUPER2 {120, 120, 120, 120, 120, 120, 96, 98, 100, 102, 104, 113, 114, 116, 117, 119}, // SKINCOLOR_SUPER3 {120, 120, 120, 120, 96, 97, 99, 100, 102, 104, 113, 114, 115, 116, 117, 119}, // SKINCOLOR_SUPER4 {120, 120, 96, 120, 120, 120, 120, 120, 104, 113, 114, 115, 116, 117, 118, 119}, // SKINCOLOR_SUPER5 {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 80, 82, 85, 115, 117, 119}, // SKINCOLOR_TSUPER1 {120, 120, 120, 120, 120, 120, 120, 120, 80, 81, 83, 85, 115, 116, 117, 119}, // SKINCOLOR_TSUPER2 {120, 120, 120, 120, 120, 120, 80, 81, 82, 83, 85, 115, 116, 117, 118, 119}, // SKINCOLOR_TSUPER3 {120, 120, 120, 120, 80, 81, 82, 83, 84, 85, 115, 115, 116, 117, 118, 119}, // SKINCOLOR_TSUPER4 {120, 120, 80, 80, 81, 82, 83, 84, 85, 115, 115, 116, 117, 117, 118, 119}, // SKINCOLOR_TSUPER5 {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 121, 123, 125, 127, 129, 132}, // SKINCOLOR_KSUPER1 {120, 120, 120, 120, 120, 120, 120, 120, 121, 122, 124, 125, 127, 128, 130, 132}, // SKINCOLOR_KSUPER2 {120, 120, 120, 120, 120, 120, 121, 122, 123, 124, 125, 127, 128, 129, 130, 132}, // SKINCOLOR_KSUPER3 {120, 120, 120, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132}, // SKINCOLOR_KSUPER4 {120, 120, 121, 121, 122, 123, 124, 125, 126, 126, 127, 128, 129, 130, 131, 132}, // SKINCOLOR_KSUPER5 {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 0, 122, 124, 248, 251, 255}, // SKINCOLOR_PSUPER1 {120, 120, 120, 120, 120, 120, 120, 120, 0, 121, 122, 124, 248, 250, 252, 255}, // SKINCOLOR_PSUPER2 {120, 120, 120, 120, 120, 120, 0, 121, 122, 123, 124, 248, 249, 251, 253, 255}, // SKINCOLOR_PSUPER3 {120, 120, 120, 120, 0, 121, 122, 123, 124, 248, 249, 250, 251, 252, 253, 255}, // SKINCOLOR_PSUPER4 {120, 120, 0, 121, 122, 123, 124, 248, 248, 249, 250, 251, 252, 253, 254, 255}, // SKINCOLOR_PSUPER5 {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 224, 225, 227, 228, 230, 232}, // SKINCOLOR_BSUPER1 {120, 120, 120, 120, 120, 120, 120, 120, 224, 225, 226, 227, 228, 229, 230, 232}, // SKINCOLOR_BSUPER2 {120, 120, 120, 120, 120, 120, 224, 224, 225, 226, 227, 228, 229, 230, 231, 232}, // SKINCOLOR_BSUPER3 {120, 120, 120, 120, 224, 224, 225, 226, 226, 227, 228, 229, 229, 230, 231, 232}, // SKINCOLOR_BSUPER4 {120, 120, 224, 224, 225, 225, 226, 227, 227, 228, 228, 229, 230, 230, 231, 232}, // SKINCOLOR_BSUPER5 {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 208, 210, 212, 215, 220, 222}, // SKINCOLOR_ASUPER1 {120, 120, 120, 120, 120, 120, 120, 120, 208, 209, 211, 213, 215, 220, 221, 223}, // SKINCOLOR_ASUPER2 {120, 120, 120, 120, 120, 120, 208, 209, 210, 211, 212, 213, 215, 220, 221, 223}, // SKINCOLOR_ASUPER3 {120, 120, 120, 120, 208, 209, 210, 211, 212, 213, 214, 215, 220, 221, 222, 223}, // SKINCOLOR_ASUPER4 {120, 120, 208, 208, 209, 210, 211, 211, 212, 213, 214, 215, 220, 221, 222, 223}, // SKINCOLOR_ASUPER5 {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 176, 160, 163, 167, 171, 175}, // SKINCOLOR_GSUPER1 {120, 120, 120, 120, 120, 120, 120, 120, 176, 176, 160, 163, 166, 169, 172, 175}, // SKINCOLOR_GSUPER2 {120, 120, 120, 120, 120, 120, 176, 176, 160, 162, 164, 166, 168, 170, 172, 175}, // SKINCOLOR_GSUPER3 {120, 120, 120, 120, 176, 176, 176, 160, 161, 163, 165, 167, 169, 171, 173, 175}, // SKINCOLOR_GSUPER4 {120, 120, 176, 176, 176, 160, 161, 163, 164, 166, 167, 169, 170, 172, 173, 175}, // SKINCOLOR_GSUPER5 {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120}, // SKINCOLOR_WSUPER1 {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 0, 4, 9}, // SKINCOLOR_WSUPER2 {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 0, 2, 4, 6, 8, 11}, // SKINCOLOR_WSUPER3 {120, 120, 120, 120, 120, 120, 120, 0, 1, 3, 4, 6, 8, 9, 11, 13}, // SKINCOLOR_WSUPER4 {120, 120, 120, 120, 0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 15}, // SKINCOLOR_WSUPER5 {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 96, 98, 99, 81, 73, 79}, // SKINCOLOR_CSUPER1 {120, 120, 120, 120, 120, 120, 120, 120, 96, 97, 98, 81, 81, 71, 75, 79}, // SKINCOLOR_CSUPER2 {120, 120, 120, 120, 120, 120, 96, 97, 98, 99, 81, 81, 70, 73, 76, 79}, // SKINCOLOR_CSUPER3 {120, 120, 120, 120, 96, 96, 97, 98, 99, 81, 81, 70, 72, 74, 76, 79}, // SKINCOLOR_CSUPER4 {120, 120, 96, 96, 97, 98, 98, 99, 81, 81, 69, 71, 73, 75, 77, 79}, // SKINCOLOR_CSUPER5 } local lvloffset = 0 local count = 0 local function rahud(v, p, c) if not (cv_rakon.value) then return end if (p and p.valid) and (p.mo and p.mo.valid) and not (p.spectator) and not (splitscreen) and leveltime > 113 and not G_BattleGametype() local wheel = v.cachePatch("K_WHEEL"+abs(p.weirdcounter)) local BW = 8 local BH = 11 local accent1 = colortranslation[p.skincolor][5] local accent2 = colortranslation[p.skincolor][9] if not (cv_hudleft.value) hud.disable("position") hud.disable("freeplay") else hud.enable("position") hud.enable("freeplay") end --Accelerate if (p.cmd.buttons & BT_ACCELERATE) --didya press it? v.drawFill(p.hudx+(-2*BW), p.hudy+2, BW-1, BH, accent1|p.hudside) v.draw(p.hudx+1+(-2*BW), p.hudy+3, v.cachePatch("TNYFN065"), p.hudside) else --you didn't press it v.drawFill(p.hudx+(-2*BW), p.hudy, BW-1, BH, accent2|p.hudside) v.draw(p.hudx+1+(-2*BW), p.hudy+1, v.cachePatch("TNYFN065"), p.hudside) v.drawFill(p.hudx+(-2*BW), p.hudy+BH, BW-1, 2, 31|p.hudside) end --Brake if (p.cmd.buttons & BT_BRAKE) --didya press it? v.drawFill(p.hudx+(-BW), p.hudy+2, BW-1, BH, accent1|p.hudside) v.draw(p.hudx+1+(-BW), p.hudy+3, v.cachePatch("TNYFN066"), p.hudside) else --you didn't press it v.drawFill(p.hudx+(-BW), p.hudy, BW-1, BH, accent2|p.hudside) v.draw(p.hudx+1+(-BW), p.hudy+1, v.cachePatch("TNYFN066"), p.hudside) v.drawFill(p.hudx+(-BW), p.hudy+BH, BW-1, 2, 31|p.hudside) end --Drift if (p.cmd.buttons & BT_DRIFT) --didya press it? v.drawFill(p.hudx, p.hudy+2, BW-1, BH, accent1|p.hudside) v.draw(p.hudx+1, p.hudy+3, v.cachePatch("TNYFN068"), p.hudside) else --you didn't press it v.drawFill(p.hudx, p.hudy, BW-1, BH, accent2|p.hudside) v.draw(p.hudx+1, p.hudy+1, v.cachePatch("TNYFN068"), p.hudside) v.drawFill(p.hudx, p.hudy+BH, BW-1, 2, 31|p.hudside) end --Item if (p.cmd.buttons & BT_ATTACK) --didya press it? v.drawFill(p.hudx+(BW), p.hudy+2, BW-1, BH, accent1|p.hudside) v.draw(p.hudx+1+(BW), p.hudy+3, v.cachePatch("TNYFN073"), p.hudside) else --you didn't press it v.drawFill(p.hudx+(BW), p.hudy, BW-1, BH, accent2|p.hudside) v.draw(p.hudx+1+(BW), p.hudy+1, v.cachePatch("TNYFN073"), p.hudside) v.drawFill(p.hudx+(BW), p.hudy+BH, BW-1, 2, 28|p.hudside) end --Da Wheel --static if (p.weirdcounter == 0) v.draw(p.hudx, p.hudy, wheel, p.hudside, v.getColormap(p.mo.skin, p.skincolor)) end --turn right if (p.weirdcounter < 0) v.draw(p.hudx-1, p.hudy, wheel, p.hudside|V_FLIP, v.getColormap(p.mo.skin, p.skincolor)) end --turn left if (p.weirdcounter > 0) v.draw(p.hudx, p.hudy, wheel, p.hudside, v.getColormap(p.mo.skin, p.skincolor)) end end end local function challengetime(v, p, c) if not (cv_rakon.value) then return end if (p and p.valid) and (p.mo and p.mo.valid) and not (p.spectator) and not (splitscreen) local medaltype = p.cv_go4medal == 1 and "\134SILVER\128" or p.cv_go4medal == 2 and "\130GOLD\128" if (p.trial) --You finished the race if (p.exiting) if (maptimes[gamemap] and maptimes[gamemap][1][p.cv_go4medal]) then if p.realtime < maptimes[gamemap][1][p.cv_go4medal] if (p.cv_go4medal == 1) if (p.infromright == 0) if (leveltime%6<=3) v.drawString(160,135,"You got the \134SILVER\128 Medal!", V_SNAPTOBOTTOM|V_ALLOWLOWERCASE, "center") else v.drawString(160,135,"You got the SILVER Medal!", V_SNAPTOBOTTOM|V_ALLOWLOWERCASE, "center") end if (leveltime%2==0) v.draw(170, 115, v.cachePatch("GOTITB"), V_SNAPTOBOTTOM) end else v.drawString(160+p.infromright,135,"You got the \134SILVER\128 Medal!", V_SNAPTOBOTTOM|V_ALLOWLOWERCASE|p.opac< 7*TICRATE) if (p.trial) if (maptimes[gamemap] and maptimes[gamemap][1][p.cv_go4medal]) then v.drawString(295,190,"You're currently going for the "+medaltype+" medal.",V_ALLOWLOWERCASE|V_SNAPTOBOTTOM|V_50TRANS,"thin-right") if p.realtime <= maptimes[gamemap][1][p.cv_go4medal] if (p.cv_go4medal == 1) if (leveltime%15==0) v.drawString(300,25, buildTimeString(maptimes[gamemap][1][p.cv_go4medal]), V_GRAYMAP|V_SNAPTOTOP|V_SNAPTORIGHT, "right") else v.drawString(300,25, buildTimeString(maptimes[gamemap][1][p.cv_go4medal]), V_SNAPTOTOP|V_SNAPTORIGHT, "right") end v.drawScaled(220*FRACUNIT, 25*FRACUNIT, FRACUNIT/2, v.cachePatch("GOTITB"), V_SNAPTOTOP|V_SNAPTORIGHT) end if (p.cv_go4medal == 2) if (leveltime%15==0) v.drawString(300,25, buildTimeString(maptimes[gamemap][1][p.cv_go4medal]), V_YELLOWMAP|V_SNAPTOTOP|V_SNAPTORIGHT, "right") else v.drawString(300,25, buildTimeString(maptimes[gamemap][1][p.cv_go4medal]), V_SNAPTOTOP|V_SNAPTORIGHT, "right") end v.drawScaled(220*FRACUNIT, 25*FRACUNIT, FRACUNIT/2, v.cachePatch("GOTITA"), V_SNAPTOTOP|V_SNAPTORIGHT) end else v.drawString(300, 25, buildTimeString(maptimes[gamemap][1][p.cv_go4medal]), V_SNAPTOTOP|V_SNAPTORIGHT|V_TRANSLUCENT, "right") v.drawScaled(220*FRACUNIT, 25*FRACUNIT, FRACUNIT/2, v.cachePatch("NEEDIT"), V_SNAPTOTOP|V_SNAPTORIGHT|V_TRANSLUCENT) end else if p.cv_go4medal == 0 then return end v.drawString(300,25, "Do your best!", V_SNAPTOTOP|V_SNAPTORIGHT|V_ALLOWLOWERCASE, "right") v.drawString(295,190,"There's no medal on this stage, anything goes.",V_ALLOWLOWERCASE|V_SNAPTOBOTTOM|V_50TRANS,"thin-right") end end end else if (leveltime > 7*TICRATE) v.drawString(300,190,"Type \"rak_go4medal\" in the console to start a challenge.",V_ALLOWLOWERCASE|V_SNAPTOBOTTOM|V_50TRANS,"thin-right") end end end end hud.add(challengetime) hud.add(rahud) addHook("PlayerCmd", function(p, cmd) if not (cv_rakon.value) then return end if not (p.kartstuff[k_itemroulette]) return end if (cmd.buttons & BT_ATTACK and p.kartstuff[k_itemroulette] != 0) cmd.buttons = $ & ~BT_ATTACK end end) addHook("PlayerMsg", function(source, msgtype, target, msg) if not (cv_rakon.value) then return end if msgtype != 0 then return end if not (msg:sub(1, 1):lower() == "!") then return end if msg:find(";",0,true) or msg:len() > 25 or (countActive() > 1) then chatprintf(source, "\133* Nice Try!", true) return true end if not source.spectator then COM_BufAddText(server, 'map "'..msg:sub(2)..'"') end end) local rm = 0 local tip = 0 local cmd = 0 local remindertimer = 0 addHook("ThinkFrame", do if (cv_rakon) then return end --print(remindertimer) //if (remindertimer == 1) if (leveltime == TICRATE*2) rm = P_RandomRange(1, 2) if rm == 1 tip = P_RandomRange(1, 9) end if rm == 2 cmd = P_RandomRange(1, 4) end if tip == 1 print("Speed characters are great for long stretches of road, but will have trouble on maps with lots of curves.") end if tip == 2 print("Always pick the best character for a map you know you can win in, especially for getting around as fast as possible.") end if tip == 3 print("You can't spam the item button here, just like in Time Attack. Fun fact: Not getting your item earlier gives you better odds in a race. Really useful incase you're behind and need to catch up.") end if tip == 4 print("Don't think you're so clever if you manage to find and use exploits against other players in a map. You can and will get banned if you're found out. It's not fair to other racers to essentially cheat against a map's shortcomings.") end if tip == 5 print("Acceleration characters are much slower than speed characters, but they can make up for it by getting stronger miniturbos quicker. A map with a lot of curves can be really good for you.") end if tip == 6 print("Characters with a lot of handling are sort of easy to play with and control, but with kart collision in mind, are light as a feather. Heavier characters can ruin your speed and even bump you off the map very easily if you're not careful.") end if tip == 7 print("Heavyweights tend to have the advantage of controlling their surroundings of other players, as their weight forcefully bumps players around and into walls. But they can't get hit by a single item or else they may have a lot of difficulty catching up.") end if tip == 8 print("Brake-Drifting is a very useful strategy for corners you might be hitting too fast. In Time Attack, however, it tends to never be used for even the best of records due to advanced racers getting used to the map.") end if tip == 9 print("Sliptiding is letting go of drift in the middle of a boost, this strategy is KEY to making sharp turns a non-issue in some maps, and it's pretty cool to look at.") end if cmd == 1 print("Using \"rak_go4medal 1\" is easier to score extra points for if you're good enough, however, you only get 3 points, it may not be enough to help raise your score.") end if cmd == 2 print("Using \"rak_go4medal 2\" is tougher to score extra points for if you're not the best at the map, 5 points can get you a long way, but the reward must be earned.") end if cmd == 3 print("Think your input HUD should be on the left side? Use \"rahud_leftside\" to put your HUD next to the position faces.") end if cmd == 4 print("Want to test your skills? Type \"rak_help\" to find out how to score more points or change your input HUD position.") end else rm = 0 cmd = 0 tip = 0 end end) addHook("ThinkFrame", do if not (cv_rakon) then return end if (leveltime < 113) count = (leveltime - 105) lvloffset = 64 end if cv_hudleft.value lvloffset = -lvloffset end --print(lvloffset) if count-1 > 0 lvloffset = $/2 end server.raklastCountActive = countActive() if (server.raklastCountActive == 0 and countActive() == 1) G_ExitLevel(gamemap, true) end end) addHook("ThinkFrame", do if not (cv_rakon) then return end for p in players.iterate if (p.mo and p.mo.valid) and not (p.spectator) if not (p.weirdcounter) then p.weirdcounter = 0 end -- we're just gonna use some stuff from source, no one will ever know :p p.weirdcounter = ((abs(p.cmd.driftturn) - 1)/125) if (p.cmd.driftturn < 0) p.weirdcounter = -p.weirdcounter end if (encoremode) p.weirdcounter = -p.weirdcounter end --check to make sure we don't go over 4 here if (p.weirdcounter < -4) p.weirdcounter = -4 end if (p.weirdcounter > 4) p.weirdcounter = 4 end if not (p.hudx) then p.hudx = 0 end if not (p.hudy) then p.hudy = 0 end if not (p.hudside) then p.hudside = 0 end if not (p.trial) then p.trial = false end if not (p.winsent) then p.winsent = false end if not (p.infromright) then p.infromright = 0 end if not (p.downfromabove) then p.downfromabove = 0 end if not (p.opac) then p.opac = 0 end if not (p.cv_go4medal) p.cv_go4medal = 0 end if not (p.nms) p.nms = 0 end if (p.trial) if (p.exiting) if (p.infromright > 0) p.infromright = $-10 end if (p.infromright%10==0) and (p.infromright <= 90) and (p.opac > 0) p.opac = $-1 end end if (leveltime > 113) if p.downfromabove > 0 p.downfromabove = $/2 end end if (p.downfromabove == 1) S_StartSound(p.mo, sfx_shield, true) end if (maptimes[gamemap] and maptimes[gamemap][1][p.cv_go4medal]) then if p.realtime < (maptimes[gamemap][1][p.cv_go4medal]) if (p.infromright == 90) and (p.winsent == false) if (p.cv_go4medal == 1) print(p.name+" has cleared with a \134SILVER\128 Medal and earned an extra \1343 points\128!") --print("If you wanna get medal points, do 'rak_go4medal 1' in the console.") p.score = $+3 end if (p.cv_go4medal == 2) print(p.name+" has cleared with a \130GOLD\128 Medal and earned an extra \1305 points\128!") --print("If you want to get medal points, do 'rak_go4medal 2' in the console.") p.score = $+5 end S_StartSound(p.mo, sfx_s3kac, true) p.winsent = true end else if (p.infromright == 90) and (p.winsent == false) S_StartSound(p.mo, sfx_shldls, true) p.winsent = true end end if p.realtime == (maptimes[gamemap][1][p.cv_go4medal]) S_StartSound(p.mo, sfx_doord2, true) end end end if not cv_hudleft.value p.hudy = 176 p.hudx = 288 p.hudside = V_SNAPTORIGHT|V_SNAPTOBOTTOM else p.hudx = 50 p.hudy = 140 p.hudside = V_SNAPTOLEFT|V_SNAPTOBOTTOM end p.hudx = $+lvloffset --print(opac) if localplayer != p then p.mo.frame = $|FF_TRANS50 end end end end) addHook("MapLoad", do if not (cv_rakon.value) then return end --print(gamemap) for p in players.iterate p.winsent = false p.infromright = 700 p.opac = 9 p.downfromabove = 64 if p.nms == 1 CONS_Printf(p, "Your medal challenge has been set to \134SILVER\128.") p.cv_go4medal = 1 p.nms = 0 end if p.nms == 2 CONS_Printf(p, "Your medal challenge has been set to \130GOLD\128.") p.cv_go4medal = 2 p.nms = 0 end if (p.cv_go4medal) p.trial = true else p.trial = false end end end) addHook("NetVars", function(x) remindertimer = x($) rm = x($) tip = x($) cmd = x($) lvloffset = x($) count = x($) end)