-- name: \\#ff0303\\New 64 Movesets -- incompatible: moveset -- description: The New Super Mario Bros Wii moveset now on Super Mario 64! Made by: Pepitosxd Spin, double jump and ground pound shake by: Dremy_Bowser local movesetvariable = true gStateExtras = {} for i = 0, (MAX_PLAYERS - 1) do gStateExtras[i] = {} local m = gMarioStates[i] local e = gStateExtras[i] e.forca = 0 e.timer = 0 end -- spin, ground pound shake and double jump by Dremy_Bowser (Thx a lot Dremy_Bowser!) ACT_FUNNY_JUMP_CANCEL = allocate_mario_action(ACT_GROUP_AIRBORNE | ACT_FLAG_AIR | ACT_FLAG_ALLOW_VERTICAL_WIND_ACTION | ACT_FLAG_CONTROL_JUMP_HEIGHT) function mario_on_set_action(m) local e = gStateExtras[m.playerIndex] if m.action == ACT_FUNNY_JUMP_CANCEL then m.vel.y = 60 end e.lastAction = action end hook_event(HOOK_ON_SET_MARIO_ACTION, mario_on_set_action) function act_funny_jump_cancel(m) local e = gStateExtras[m.playerIndex] if m.actionTimer == 0 then m.particleFlags = m.particleFlags | PARTICLE_MIST_CIRCLE e.animFrame = 68 e.rotAngle = m.faceAngle.y e.animArg = math.floor(math.random(1, 2)) end local stepResult = common_air_action_step(m, ACT_DOUBLE_JUMP_LAND, MARIO_ANIM_TWIRL, AIR_STEP_CHECK_LEDGE_GRAB | AIR_STEP_CHECK_HANG) m.particleFlags = m.particleFlags | PARTICLE_SPARKLES m.faceAngle.y = m.intendedYaw if (m.input & INPUT_Z_PRESSED) ~= 0 then return set_mario_action(m, ACT_GROUND_POUND, 0) end if (m.input & INPUT_NONZERO_ANALOG) ~= 0 then mario_set_forward_vel(m, math.abs(m.forwardVel)) end if stepResult == AIR_STEP_LANDED then if should_get_stuck_in_ground(m) ~= 0 then queue_rumble_data_mario(m, 5, 80) play_sound(SOUND_MARIO_OOOF2, m.marioObj.header.gfx.cameraToObject) m.particleFlags = m.particleFlags | PARTICLE_MIST_CIRCLE set_mario_action(m, ACT_FEET_STUCK_IN_GROUND, 0) else play_sound(SOUND_ACTION_TERRAIN_LANDING, m.marioObj.header.gfx.cameraToObject) set_mario_action(m, ACT_DOUBLE_JUMP_LAND, 0) end end e.rotAngle = e.rotAngle + 0x2000 m.marioObj.header.gfx.angle.y = e.rotAngle m.actionTimer = m.actionTimer + 1 return 0 end hook_mario_action(ACT_FUNNY_JUMP_CANCEL, { every_frame = act_funny_jump_cancel }) function mario_update(m) local e = gStateExtras[m.playerIndex] if m.action == ACT_FUNNY_JUMP_CANCEL then play_character_sound(m, CHAR_SOUND_TWIRL_BOUNCE) end end hook_event(HOOK_ON_SET_MARIO_ACTION, mario_update) function mario_update(m) if m.action == ACT_PICKING_UP or m.action == ACT_PICKING_UP_BOWSER or m.action == ACT_THROWING or m.action == ACT_HOLDING_BOWSER or m.action == ACT_RELEASING_BOWSER or m.action == ACT_HOLD_HEAVY_IDLE or m.action == ACT_HOLD_HEAVY_WALKING or m.action == ACT_HOLD_IDLE or m.action == ACT_HOLD_JUMP then return end -- double jump local shouldDoubleJump = (m.action == ACT_TRIPLE_JUMP or m.action == ACT_WALL_KICK or m.action == ACT_DOUBLE_JUMP or m.action == ACT_JUMP or m.action == ACT_SIDE_FLIP or m.action == ACT_BACKFLIP or m.action == ACT_FREEFALL or m.action == ACT_SPIN_POUND or m.action == ACT_DIVE or m.action == ACT_TWIRLING) if not movesetvariable then return end if shouldDoubleJump and m.actionTimer > 0 and (m.controller.buttonPressed & A_BUTTON) ~= 0 then return set_mario_action(m, ACT_FUNNY_JUMP_CANCEL, 0) end if shouldDoubleJump then m.actionTimer = m.actionTimer + 1 end end hook_event(HOOK_MARIO_UPDATE, mario_update) -- spin local can_press_x = 0 function x_pressed(m) if m.action == ACT_STAR_DANCE_EXIT or m.action == ACT_STAR_DANCE_NO_EXIT or m.action == ACT_STAR_DANCE_WATER or m.action == ACT_READING_NPC_DIALOG or m.action == ACT_READING_AUTOMATIC_DIALOG or m.action == ACT_DISAPPEARED or m.action == ACT_SPAWN_SPIN_AIRBONE or m.action == ACT_SPAWN_SPIN_LANDING or m.action == ACT_SPAWN_NO_SPIN_AIRBORNE or m.action == ACT_SPAWN_NO_SPIN_LANDING or m.action == ACT_PULLING_DOOR or m.action == ACT_PUSHING_DOOR or m.action == ACT_WARP_DOOR_SPAWN or m.action == ACT_ENTERING_STAR_DOOR or m.action == ACT_UNLOCKING_STAR_DOOR or m.action == ACT_DEATH_EXIT or m.action == ACT_DEATH_EXIT_LAND or m.action == ACT_DEATH_ON_BACK or m.action == ACT_DEATH_ON_STOMACH or m.action == ACT_FALLING_DEATH_EXIT or m.action == ACT_QUICKSAND_DEATH or m.action == ACT_SPECIAL_DEATH_EXIT then return end if m.health < 0x100 or m.hurtCounter ~= 0 then return end if (m.action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED then return end if m.playerIndex ~= 0 then return end if not movesetvariable then return end if m.controller.buttonPressed & X_BUTTON ~= 0 then if x_press_counter > 0 then set_jumping_action(m, ACT_FUNNY_JUMP_CANCEL, 0) x_press_counter = x_press_counter - 1 end end if (m.action & ACT_FLAG_AIR) == 0 then x_press_counter = 2 end end hook_event(HOOK_MARIO_UPDATE, x_pressed) -- ground pound shake function mario_update(m) if not movesetvariable then return end if m.action == ACT_GROUND_POUND_LAND then set_camera_shake_from_hit(SHAKE_MED_DAMAGE) end end hook_event(HOOK_MARIO_UPDATE, mario_update) -- disable long jump function before_set_mario_action(m, action) if not movesetvariable then return end if action == ACT_LONG_JUMP then return 1 end end hook_event(HOOK_BEFORE_SET_MARIO_ACTION, before_set_mario_action) -- disable backflip function before_set_mario_action(m, action) if not movesetvariable then return end if action == ACT_BACKFLIP then return 1 end end hook_event(HOOK_BEFORE_SET_MARIO_ACTION, before_set_mario_action) --- @param msg string --this is the function for enabling or disabling some moveset, local function movesettoggle_command(msg) local m = string.lower(msg) --making the msg string be lowercase if m == 'on' then movesetvariable = true djui_chat_message_create('New 64 moveset is \\#00C7FF\\on\\#ffffff\\!') return true elseif m == 'off' then movesetvariable = false djui_chat_message_create('New 64 moveset is \\#A02200\\off\\#ffffff\\!') return true end return false end hook_chat_command('new64', "[on|off] turn New 64 moveset \\#00C7FF\\on \\#ffffff\\or \\#A02200\\off \\#ffffff\\. ", movesettoggle_command)