COM_AddCommand("sell_a_life", function(player) if player.lives > 0 then player.rings = player.rings + 25 player.lives = player.lives - 1 S_StartSound(player.mo, sfx_dmpain) end end, 1) COM_AddCommand("sell_2_lives", function(player) if player.lives >= 2 then player.rings = player.rings + 50 player.lives = player.lives - 2 S_StartSound(player.mo, sfx_dmpain) end end, 1) COM_AddCommand("sell_3_lives", function(player) if player.lives >= 3 then player.rings = player.rings + 75 player.lives = player.lives - 3 S_StartSound(player.mo, sfx_dmpain) end end, 1) COM_AddCommand("sell_5_lives", function(player) if player.lives >= 5 then player.rings = player.rings + 125 player.lives = player.lives - 5 S_StartSound(player.mo, sfx_dmpain) end end, 1) COM_AddCommand("sell_10_lives", function(player) if player.lives >= 10 then player.rings = player.rings + 250 player.lives = player.lives - 10 S_StartSound(player.mo, sfx_dmpain) end end, 1) COM_AddCommand("sell_50_lives", function(player) if player.lives >= 50 then player.rings = player.rings + 1250 player.lives = player.lives - 50 S_StartSound(player.mo, sfx_dmpain) end end, 1) COM_AddCommand("buy_homingthok", function(player) if player.rings >= 15 then player.rings = player.rings - 15 player.charability = CA_HOMINGTHOK S_StartSound(player.mo, sfx_altow1) end end, 1) COM_AddCommand("buy_jumpthok", function(player) if player.rings >= 15 then player.rings = player.rings - 15 player.charability = CA_JUMPTHOK S_StartSound(player.mo, sfx_altow1) end end, 1) COM_AddCommand("buy_dashmode", function(player) if player.rings >= 15 then player.rings = player.rings - 15 player.charflags = player.charflags | SF_DASHMODE S_StartSound(player.mo, sfx_altow2) end end, 1) COM_AddCommand("buy_swim", function(player) if player.rings >= 15 then player.rings = player.rings - 15 player.charability = CA_SWIM S_StartSound(player.mo, sfx_altow1) end end, 1) COM_AddCommand("buy_wallbuster", function(player) if player.rings >= 12 then player.rings = player.rings - 12 player.charflags = $ | SF_CANBUSTWALLS S_StartSound(player.mo, sfx_altow2) else player.charflags = player.charflags & ~SF_CANBUSTWALLS player.rings = player.rings + 6 end end, 1) COM_AddCommand("buy_killerdash", function(player) if player.rings >= 16 then player.rings = player.rings - 16 player.charflags = $ | SF_DASHMODE | SF_MACHINE S_StartSound(player.mo, sfx_altow2) else player.charflags = player.charflags & ~SF_DASHMODE & ~SF_MACHINE player.rings = player.rings + 16 end end, 1) COM_AddCommand("buy_allowsuper", function(player) if player.rings >= 20 then player.rings = player.rings - 20 player.charflags = $ | SF_SUPER S_StartSound(player.mo, sfx_altow2) else player.charflags = player.charflags & ~SF_SUPER player.rings = player.rings + 10 end end, 1) COM_AddCommand("buy_waterrunning", function(player) if player.rings >= 10 and (player.charflags & SF_RUNONWATER) == 0 then player.rings = player.rings - 10 player.charflags = $ | SF_RUNONWATER S_StartSound(player.mo, sfx_altow2) else player.charflags = player.charflags & ~SF_RUNONWATER player.rings = player.rings + 5 end end, 1) COM_AddCommand("sell_jumpdamage", function(player) if player.rings >= 0 then player.rings = player.rings + 75 player.charflags = $ | SF_NOJUMPDAMAGE S_StartSound(player.mo, sfx_dmpain) end end, 1) COM_AddCommand("buy_jumpdamage", function(player) if player.rings >= 0 then player.rings = player.rings - 80 player.charflags = $ & ~SF_NOJUMPDAMAGE S_StartSound(player.mo, sfx_altow2) end end, 1) COM_AddCommand("buy_metalstyle", function(player) if player.rings >= 9 and (player.charflags & SF_MACHINE) == 0 then player.rings = player.rings - 9 player.charflags = $ | SF_MACHINE S_StartSound(player.mo, sfx_altow2) else player.charflags = $ & ~SF_MACHINE player.rings = player.rings + 4 end end, 1) COM_AddCommand("buy_multiability", function(player) if player.rings >= 35 and (player.charflags & SF_MULTIABILITY) == 0 then player.rings = player.rings - 35 player.charflags = $ | SF_MULTIABILITY S_StartSound(player.mo, sfx_altow2) else player.charflags = $ & ~SF_MULTIABILITY player.rings = player.rings + 10 end end, 1) COM_AddCommand("sell_shieldpowers", function(player) if player.rings >= 0 then player.rings = player.rings + 25 player.charflags = $ | SF_NOSHIELDABILITY S_StartSound(player.mo, sfx_altow2) end end, 1) COM_AddCommand("buy_shieldpowers", function(player) if player.rings >= 30 then player.rings = player.rings - 30 player.charflags = $ & ~SF_NOSHIELDABILITY S_StartSound(player.mo, sfx_altow2) end end, 1) COM_AddCommand("buy_spindash", function(player) if player.rings >= 8 and player.charability == 1 then player.rings = player.rings - 8 player.charability2 = 1 S_StartSound(player.mo, sfx_altow2) else player.rings = player.rings + 4 end end, 1) COM_AddCommand("buy_melee", function(player) if player.rings >= 20 and player.charability == 3 then player.rings = player.rings - 20 player.charability2 = 3 S_StartSound(player.mo, sfx_altow2) else player.rings = player.rings + 10 end end, 1) COM_AddCommand("shopping_list", function(player) if player.rings >= 0 then print([[ sell_a_life Description: Removes 1 life and gives you 25 rings. Cost: 1 life. Reward: +25 rings. sell_2_lives Description: removes 2 lives and gives you 50 rings. Cost: 2 lives. Reward: +50 rings. sell_3_lives Description: Reduces the player’s lives by 3 and gives them 75 rings. Cost: 3 lives. Reward: +75 rings. sell_5_lives Description: Reduces the player’s lives by 5 and gives them 125 rings. Cost: 5 lives. Reward: +125 rings. sell_10_lives Description: Reduces the player’s lives by 10 and gives them 250 rings. Cost: 10 lives. Reward: +250 rings. sell_50_lives Description: Reduces the player’s lives by 50 and gives them 1,250 rings. Cost: 50 lives. Reward: +1,250 rings. Abilities buy_homingthok Description: Gives the player the Homing Thok ability for 15 rings. Cost: 15 rings. Reward: Homing Thok ability. buy_jumpthok Description: Gives the player the Jump Thok ability for 15 rings. Cost: 15 rings. Reward: Jump Thok ability. buy_dashmode Description: Enables DashMode for the player for 15 rings! Cost: 15 rings. Reward: Dash Mode. buy_swim Description: Grants the player the Swim ability for 10 rings. Refunds 5 rings if canceled. Cost: 10 rings. Reward: Swim ability (+5 rings if canceled). buy_wallbuster Description: Grants the player the ability to break walls for ONLY 12 rings! Cost: 12 rings. Reward: Wall-busting ability (+6 rings if canceled). buy_killerdash Description: Enables Dashmode and Machine, is a combo. combo for 16 rings. Refunds 16 rings if canceled. Cost: 16 rings. Reward: Killer Dash and Machine Mode (+16 rings if canceled). buy_allowsuper Description: Grants the player the ability to go super for 20 rings. does NOT give the emeralds, but allows amy and fang and etc to go super Cost: 20 rings. Reward: Super transformation (+10 rings if canceled). buy_waterrunning Description: Grants the player the ability to run on water for 10 rings. Refunds 5 rings if canceled. Cost: 10 rings. Reward: Water-running ability (+5 rings if canceled). sell_jumpdamage Description: Removes jump damage for the player for 75 rings. Cost: 0 rings. Reward: +75 rings. buy_jumpdamage Description: enables jump damage for the player again for 80 rings. Cost: 0 rings. Reward: gives you the damage from jumping again! buy_metalstyle Description: Grants the player machine flag for 9 rings. Cost: 9 rings. Reward: +4 rings if canceled. buy_multiability Description: Provides multi-ability for the player for 35 rings. Cost: 35 rings. Reward: +10 rings if canceled. buy_shieldpowers Description: Shields powers return to you after selling, costs 30 rings. Cost: 30 rings. Reward: +6 rings if canceled. sell_shieldpowers Description: removes shield special powers (ex: the bubble shield won't bounce anymore) for 25 rings. Cost: 0 rings. Reward: +25 rings. buy_flying Gives the flying ability if you dont have it! Cost: 15 rings -in future updates, do not try yet!- buy_thok Grants thok ability if not already owned. Cost: 4 rings buy_doublejump Grants double jump ability if not already owned. Cost: 7 rings buy_float Grants float (metal's ability in normal SRB2.) ability if not already owned. Cost: 9 rings buy_slowfall Grants slow fall ability if not already owned... Cost: 5 rings buy_telekinesis Gives you the telekinesis ability if not already owned! Cost: 12 rings buy_fallswitch Grants fall switch ability if not already owned by you! Cost: 6 rings buy_airdrill Grants air drill ability if not already owned! Cost: 14 rings buy_bounce Grants bounce ability (fang's ability in normal SRB2.) if not already owned. Cost: 8 rings buy_twinspin Grants twinspin ability (amy's ability in normal SRB2.)f not already owned. Cost: 13 rings Hope you like playing the mod as much as i did coding it! Check out the Message Board to cool uptade on thisand more mods! _Segabest1991 :3 ]]) end end, 1) COM_AddCommand("buy_multidash", function(player) if player.rings >= 16 and player.charflags & ~SF_DASHMODE & ~SF_MULTIABILITY == player.charflags then player.rings = player.rings - 16 player.charflags = player.charflags | SF_DASHMODE | SF_MULTIABILITY S_StartSound(player.mo, sfx_altow2) else player.charflags = player.charflags & ~SF_DASHMODE & ~SF_MULTIABILITY player.rings = player.rings + 16 end end, 1) COM_AddCommand("buy_bubbleshield", function(player) if player.rings >= 16 and player.powers[pw_shield] == 2049 then player.rings = player.rings - 16 player.powers[pw_shield] = 2049 S_StartSound(player.mo, sfx_altow2) else player.powers[pw_shield] = 0 player.rings = player.rings + 5 end end, 1) COM_AddCommand("buy_windshield", function(player) if player.rings >= 16 and player.powers[pw_shield] == 2 then player.rings = player.rings - 16 player.powers[pw_shield] = 2 S_StartSound(player.mo, sfx_altow2) else player.powers[pw_shield] = 0 player.rings = player.rings + 5 end end, 1) COM_AddCommand("buy_imortal", function(player) if player.rings >= 1000 and player.pflags & ~PF_GODMODE == player.pflags then player.rings = player.rings - 1000 player.pflags = player.pflags | PF_GODMODE S_StartSound(player.mo, sfx_altow2) else player.pflags = player.pflags & ~PF_GODMODE player.rings = player.rings + 250 end end, 1) COM_AddCommand("buy_fireshield", function(player) if player.rings >= 16 and player.powers[pw_shield] == 4097 then player.rings = player.rings - 16 player.powers[pw_shield] = 1025 S_StartSound(player.mo, sfx_altow2) else player.powers[pw_shield] = 0 player.rings = player.rings + 5 end end, 1) COM_AddCommand("buy_nukeshield", function(player) if player.rings >= 16 and player.powers[pw_shield] == 3 then player.rings = player.rings - 16 player.powers[pw_shield] = 3 S_StartSound(player.mo, sfx_altow2) else player.powers[pw_shield] = 0 player.rings = player.rings + 5 end end, 1) COM_AddCommand("buy_amyshield", function(player) if player.rings >= 16 and player.powers[pw_shield] == 4 then player.rings = player.rings - 16 player.powers[pw_shield] = 4 S_StartSound(player.mo, sfx_altow2) else player.powers[pw_shield] = 0 player.rings = player.rings + 5 end end, 1) COM_AddCommand("buy_eletricshield", function(player) if player.rings >= 16 and player.powers[pw_shield] == 4098 then player.rings = player.rings - 16 player.powers[pw_shield] = 4098 S_StartSound(player.mo, sfx_altow2) else player.powers[pw_shield] = 0 player.rings = player.rings + 5 end end, 1) COM_AddCommand("buy_magnetshield", function(player) if player.rings >= 16 and player.powers[pw_shield] == 4097 then player.rings = player.rings - 16 player.powers[pw_shield] = 4097 S_StartSound(player.mo, sfx_altow2) else player.powers[pw_shield] = 0 player.rings = player.rings + 5 end end, 1) COM_AddCommand("buy_token", function(player) if player and player.mo and player.mo.valid and player.rings >= 25 then player.rings = player.rings - 25 local spawn_x = player.mo.x + FixedMul(100 * FRACUNIT, cos(player.mo.angle)) local spawn_y = player.mo.y + FixedMul(100 * FRACUNIT, sin(player.mo.angle)) local spawn_z = player.mo.z P_SpawnMobj(spawn_x, spawn_y, spawn_z, MT_TOKEN) S_StartSound(player.mo, sfx_altow2) end end) COM_AddCommand("buy_flying", function(player) if player.rings >= 15 then player.rings = player.rings - 15 player.charability = CA_FLY S_StartSound(player.mo, sfx_altow1) end end, 1)