/* Mod made by TheLastKitchenGun please don't make mandatory music wads, this is supposed to work client side (and also, the MS rules has a limit of 20 MB mandatory download music mods.) couldn't get golden to add a feature like this by asking because of a situation where you'd have to download 157148967 MB music mods so I decided to just make it myself "XSTEN1", "XSTEN2, "XSTEN3", "XSTEN4", "XSTEN5" sstsonglist[1] = { num = #songs+1, lump = tostring(arg) } */ local track = 1 //current track local sstsonglist = {} sstsonglist[1] = { num = 1, lump = "XSTEN1" } sstsonglist[2] = { num = 2, lump = "XSTEN2" } sstsonglist[3] = { num = 3, lump = "XSTEN3" } sstsonglist[4] = { num = 4, lump = "XSTEN4" } sstsonglist[5] = { num = 5, lump = "XSTEN5" } COM_AddCommand("addtenkaichitrack", function(player,arg) if (arg == nil) CONS_Printf(player, "\x82"+"Adds a Song to the Super Sonic Tenkaichi list") CONS_Printf(player, "\x82"+"Usage: addtenkaichitrack ") else //add one to the list sstsonglist[#sstsonglist+1] = { num = #sstsonglist+1, //I need to find a way to do this shit better I feel like a dumbass lump = tostring(arg) } CONS_Printf(player, "\x82"+"added track "+tostring(arg)+" to Super Sonic Tenkaichi track list") end end, COM_LOCAL) COM_AddCommand("swapssttrack", function(player) local list = sstsonglist //check if the current track is able to be changed if track < #list track = $ + 1 elseif track == #list track = 1 end CONS_Printf(player, "\x82"+"Swapped to the next track"+" ("+track+")") end, COM_LOCAL) --removals just in case you mess up adding one or something COM_AddCommand("resettenkaichitracks", function(player) CONS_Printf(player, "\x85"+"Reset Super Sonic Tenkaichi songs list.") sstsonglist = nil sstsonglist = {} sstsonglist[1] = { num = 1, lump = "XSTEN1" } sstsonglist[2] = { num = 2, lump = "XSTEN2" } sstsonglist[3] = { num = 3, lump = "XSTEN3" } sstsonglist[4] = { num = 4, lump = "XSTEN4" } sstsonglist[5] = { num = 5, lump = "XSTEN5" } end, COM_LOCAL) local notice = 0 addHook("ThinkFrame", function() if notice <= 5 notice = $ + 1 elseif notice == 6 notice = 7 print("\x82"+"Mod by "+"\x85"+"TheLastKitchenGun,"+"\x82"+" for use with"+"\x84"+" X Sonic "+"\x82"+"by "+"\x84"+"Blue Blur"+"\x82"+" and Golden Shine") end if (consoleplayer ~= nil and consoleplayer.mo ~= nil and consoleplayer.mo.valid) if (consoleplayer.imstupidsoIhavetocheckifyoureinabattle == nil) consoleplayer.imstupidsoIhavetocheckifyoureinabattle = true end if (consoleplayer.mo.XS_PVPCD == 50) //50 usually is when you get out of a battle soooooo if track < #sstsonglist //line 63 track = $ + 1 elseif track == #sstsonglist track = 1 end COM_BufInsertText(consoleplayer, "tunes -default") end if (consoleplayer.xsonictable ~= nil and consoleplayer.xsonictable.FreeFlight and consoleplayer.xsonictable.FreeFlight.LockOn and consoleplayer.xsonictable.FreeFlight.LockOn.valid) and (sstsonglist[track].lump ~= nil) S_ChangeMusic(sstsonglist[track].lump, true, consoleplayer) //if you're in a battle, do the thing consoleplayer.imstupidsoIhavetocheckifyoureinabattle = true else if (consoleplayer.imstupidsoIhavetocheckifyoureinabattle == true) consoleplayer.imstupidsoIhavetocheckifyoureinabattle = false COM_BufInsertText(player, "tunes -default") end end end end)