scr_bootMetaKnightArt()

if (global.playerclass != 15)
{
    script_execute(scr_itemswap)
    global.state = 1 //global.playerstorage[28]
    global.reserveitem = global.playerstorage[29]
    global.playerclass = 15
    global.playerhpmode = 3
    global.playerhpmax = 3
    global.playerhp = global.playerhpmax
}
//=============================
// Variables set for Meta Knight
//=============================

//============================= 

//=============================
// Soundtracks set for Mario
//=============================

//ini_open("playersongs.ini")
//External MP3 file to play as the Starman invincibility theme
global.starman_musicfile = "music/mp3_starman_kirby.mp3"
sound_replace(snd_dead,"external/players/10/dead.mp3",3,1)
sound_replace(snd_flagsong,"external/players/15/flagsong.mp3",3,1)

// Unique SFX
//sound_replace(snd_dead,mydeathsong,3,1)
//sound_replace(snd_flagsong,myflagsong,3,1)

//ini_close()

//============================= 

// Label's and intro art
sprite_replace(spr_mariostart,"external/players/15/start.png",1,0,0,0,0)
sprite_replace(spr_hud_lives,"external/players/15/lives.png",1,1,0,12,0)
sprite_replace(spr_mariobottom,"external/players/15/maplives.png",1,1,0,0,0)
// Mario's Powerups
sprite_replace(spr_mushroom,"external/players/1/Z/mushroom.bmp",1,1,0,0,0)
sprite_replace(spr_tanookisuit,"external/players/1/Z/tanookisuit.bmp",1,1,0,0,0)
sprite_replace(spr_leaf,"external/players/1/Z/leafsuit.bmp",2,1,0,0,0)
sprite_replace(spr_hammersuit,"external/players/15/Z/hammersuit.bmp",1,1,0,0,0)
sprite_replace(spr_fireflower,"external/players/15/Z/fireflower.bmp",1,1,0,0,0)
sprite_replace(spr_1up,"external/players/15/Z/1up.bmp",1,1,0,0,0)
sprite_replace(spr_poison,"external/players/1/Z/poison.bmp",1,1,0,0,0)
sprite_replace(spr_spartansphere,"external/players/1/Z/spartansphere.bmp",4,1,0,0,0)
sprite_replace(spr_megamansuit,"external/players/1/Z/megamansuit.bmp",2,1,0,0,0)
sprite_replace(spr_suit_blueshell,"external/players/1/Z/blueshellsuit.bmp",4,1,0,0,0)
sprite_replace(spr_suit_troop,"external/players/1/Z/world2suit.png",2,1,0,0,0)
sprite_replace(spr_sonicmonitor_items,"external/players/1/Z/sonicitems.bmp",4,0,0,0,0)
sprite_replace(spr_sonicmonitor_powerups,"external/players/1/Z/sonicpowerups.bmp",7,0,0,0,0)
////Mario style "Coins"
//sprite_replace(spr_coin,"external/players/1/Z/coins.bmp",4,1,0,0,0,0,0)
//sprite_replace(spr_pcoin,"external/players/1/Z/pcoins.bmp",4,1,0,0,0,0,0)

// Map Sprites
sprite_replace(spr_mapmario_small,"external/players/1/Z/small.bmp",2,1,0,0,0)
sprite_replace(spr_mapmario_big,"external/players/15/Z/big.bmp",4,1,0,7,13)
sprite_replace(spr_mapmario_fire,"external/players/1/Z/fire.bmp",2,1,0,0,16)
sprite_replace(spr_mapmario_leaf,"external/players/1/Z/leaf.bmp",2,1,0,0,16)
sprite_replace(spr_mapmario_hammer,"external/players/1/Z/hammer.bmp",2,1,0,0,16)
sprite_replace(spr_mapmario_spartan,"external/players/1/Z/spartan.bmp",2,1,0,0,16)
sprite_replace(spr_mapmario_tanooki,"external/players/1/Z/tanooki.bmp",2,1,0,0,16)
sprite_replace(spr_mapmario_megaman,"external/players/1/Z/megaman.bmp",2,1,0,0,16)
sprite_replace(spr_mapmario_blueshell,"external/players/1/Z/blueshell.bmp",2,1,0,0,16)
sprite_replace(spr_mapmario_troop,"external/players/1/Z/world2.png",2,1,0,0,16)
// Extra Sprites
sprite_replace(spr_mario_dead,"external/players/15/dead.bmp",3,1,0,20,-3)
sprite_replace(spr_mario_leaf_spin,"external/players/1/leafspin.bmp",5,1,0,20,0)
sprite_replace(spr_mario_tanooki_spin,"external/players/1/tanookispin.bmp",5,1,0,20,0)
sprite_replace(spr_statue,"external/players/1/statue.bmp",1,1,0,20,0)
sprite_replace(spr_megamanshot_huge,"external/players/1/Y/spr_megamanshot.bmp",4,1,0,18,15)
sprite_replace(spr_megamanshot_xpl,"external/players/1/Y/spr_megamanshot_xpl.bmp",3,1,0,16,16)
// Small Mario
sprite_replace(spr_mario_small_walk,"external/players/15/A/teleport.bmp",13,1,0,20,0)
sprite_replace(spr_mario_small_jump,"external/players/15/A/cape.bmp",4,1,0,20,0)
sprite_replace(spr_mario_small_run,"external/players/15/A/slide.bmp",1,1,0,20,0)
sprite_replace(spr_mario_small_runjump,"external/players/15/B/slide.png",2,1,0,0,14)
sprite_replace(spr_mario_small_skid,"external/players/15/A/flight.bmp",6,1,0,20,0)
sprite_replace(spr_mario_small_climb,"external/players/15/A/attack2.bmp",6,1,0,20,0)
sprite_replace(spr_mario_small_swim,"external/players/15/A/attack3.bmp",3,1,0,20,0)
sprite_replace(spr_mario_small_hold,"external/players/15/B/attack4.png",1,1,0,0,0)
sprite_replace(spr_mario_small_carry,"external/players/1/E/carry.bmp",2,1,0,8,-16)
sprite_replace(spr_mario_small_goal,"external/players/1/E/goal.bmp",1,1,0,16,-16)
sprite_replace(spr_mario_small_warp,"external/players/1/E/warp.bmp",1,1,0,8,-16)
sprite_replace(spr_mario_small_win,"external/players/1/E/win.bmp",1,1,0,20,0)
sprite_replace(spr_mario_small_spin,"external/players/1/E/spin.bmp",4,1,0,8,-16)
sprite_replace(spr_mario_small_stun,"external/players/1/E/stun.bmp",4,1,0,8,-16)
// Big Mario
sprite_replace(spr_mario_big_stand,"external/players/15/A/stand.bmp",1,1,0,20,0)
sprite_replace(spr_mario_big_walk,"external/players/15/A/walk.bmp",10,1,0,20,0)
sprite_replace(spr_mario_big_jump,"external/players/15/A/jump.bmp",9,1,0,20,0)
sprite_replace(spr_mario_big_run,"external/players/15/A/run.bmp",8,1,0,20,0)
sprite_replace(spr_mario_big_runjump,"external/players/15/A/attack1.bmp",7,1,0,20,-1)
sprite_replace(spr_mario_big_skid,"external/players/15/A/skid.bmp",1,1,0,20,0)
sprite_replace(spr_mario_big_climb,"external/players/15/A/climb.bmp",4,1,0,20,0)
sprite_replace(spr_mario_big_swim,"external/players/15/A/swim.bmp",8,1,0,20,0)
sprite_replace(spr_mario_big_hold,"external/players/15/A/hold.bmp",10,1,0,20,0)
sprite_replace(spr_mario_big_carry,"external/players/15/A/carry.bmp",10,1,0,20,0)
sprite_replace(spr_mario_big_duck,"external/players/15/A/duck.bmp",1,1,0,20,0)
sprite_replace(spr_mario_big_goal,"external/players/15/A/goal.bmp",1,1,0,28,0)
sprite_replace(spr_mario_big_warp,"external/players/15/A/warp.bmp",1,1,0,20,0)
sprite_replace(spr_mario_big_spin,"external/players/15/A/spin.bmp",8,1,0,20,0)
sprite_replace(spr_mario_big_win,"external/players/15/A/win.bmp",14,1,0,20,0)
sprite_replace(spr_mario_big_stun,"external/players/15/A/stun.bmp",6,1,0,20,0)
sprite_replace(spr_mario_big_extra2,"external/players/15/A/attack7.bmp",9,1,0,20,0)
sprite_replace(spr_mario_big_extra3,"external/players/15/A/attack5.bmp",9,1,0,20,3)
sprite_replace(spr_mario_big_extra4,"external/players/15/A/attack6.bmp",3,1,0,20,0)
// Fire Flower Mario
sprite_replace(spr_mario_fire_stand,"external/players/15/B/stand.png",1,1,0,0,22)
sprite_replace(spr_mario_fire_walk,"external/players/15/B/walk.png",10,1,0,0,23)
sprite_replace(spr_mario_fire_jump,"external/players/15/B/jump.png",9,1,0,0,14)
sprite_replace(spr_mario_fire_run,"external/players/15/B/run.png",8,1,0,0,16)
sprite_replace(spr_mario_fire_runjump,"external/players/15/B/wings.png",6,1,0,0,0)
sprite_replace(spr_mario_fire_skid,"external/players/15/B/skid.png",1,1,0,0,14)
sprite_replace(spr_mario_fire_climb,"external/players/15/B/climb.png",4,1,0,0,16)
sprite_replace(spr_mario_fire_swim,"external/players/15/B/swim.png",8,1,0,0,22)
sprite_replace(spr_mario_fire_hold,"external/players/15/B/hold.png",4,1,0,20,0)
sprite_replace(spr_mario_fire_carry,"external/players/15/B/carry.png",4,1,0,20,0)
sprite_replace(spr_mario_fire_duck,"external/players/15/B/duck.png",1,1,0,0,15)
sprite_replace(spr_mario_fire_goal,"external/players/15/B/goal.png",1,1,0,20,0)
sprite_replace(spr_mario_fire_warp,"external/players/15/B/warp.png",1,1,0,20,0)
sprite_replace(spr_mario_fire_shoot,"external/players/15/B/attack1.png",7,1,0,0,48)
sprite_replace(spr_mario_fire_spin,"external/players/15/B/spin.png",8,1,0,23,23)
sprite_replace(spr_mario_fire_win,"external/players/15/B/win.png",1,1,0,20,0)
sprite_replace(spr_mario_fire_stun,"external/players/15/B/stun.png",1,1,0,20,0)
sprite_replace(spr_mario_fire_extra2,"external/players/15/B/attack7.png",9,1,0,0,48)
sprite_replace(spr_mario_fire_extra3,"external/players/15/B/attack5.png",4,1,0,24,50)
sprite_replace(spr_mario_fire_extra4,"external/players/15/B/attack6.png",2,1,0,0,0)
// Hammer Bros Mario
sprite_replace(spr_mario_hammer_stand,"external/players/1/C/stand.bmp",1,1,0,20,0)
sprite_replace(spr_mario_hammer_walk,"external/players/1/C/walk.bmp",4,1,0,20,0)
sprite_replace(spr_mario_hammer_jump,"external/players/1/C/jump.bmp",1,1,0,20,0)
sprite_replace(spr_mario_hammer_run,"external/players/1/C/run.bmp",4,1,0,20,0)
sprite_replace(spr_mario_hammer_runjump,"external/players/1/C/runjump.bmp",1,1,0,20,0)
sprite_replace(spr_mario_hammer_skid,"external/players/1/C/skid.bmp",1,1,0,20,0)
sprite_replace(spr_mario_hammer_climb,"external/players/1/C/climb.bmp",2,1,0,20,0)
sprite_replace(spr_mario_hammer_swim,"external/players/1/C/swim.bmp",2,1,0,20,0)
sprite_replace(spr_mario_hammer_hold,"external/players/1/C/hold.bmp",4,1,0,20,0)
sprite_replace(spr_mario_hammer_carry,"external/players/1/C/carry.bmp",4,1,0,20,0)
sprite_replace(spr_mario_hammer_duck,"external/players/1/C/duck.bmp",1,1,0,20,0)
sprite_replace(spr_mario_hammer_goal,"external/players/1/C/goal.bmp",1,1,0,20,0)
sprite_replace(spr_mario_hammer_warp,"external/players/1/C/warp.bmp",1,1,0,20,0)
sprite_replace(spr_mario_hammer_shoot,"external/players/1/C/shoot.bmp",2,1,0,20,0)
sprite_replace(spr_mario_hammer_spin,"external/players/1/C/spin.bmp",4,1,0,20,0)
sprite_replace(spr_mario_hammer_win,"external/players/1/C/win.bmp",1,1,0,20,0)
sprite_replace(spr_mario_hammer_stun,"external/players/1/C/stun.bmp",1,1,0,20,0)
// Racoon Mario
sprite_replace(spr_mario_leaf_stand,"external/players/1/D/stand.bmp",1,1,0,20,0)
sprite_replace(spr_mario_leaf_walk,"external/players/1/D/walk.bmp",4,1,0,20,0)
sprite_replace(spr_mario_leaf_jump,"external/players/1/D/jump.bmp",4,1,0,20,0)
sprite_replace(spr_mario_leaf_run,"external/players/1/D/run.bmp",4,1,0,20,0)
sprite_replace(spr_mario_leaf_runjump,"external/players/1/D/runjump.bmp",4,1,0,20,0)
sprite_replace(spr_mario_leaf_skid,"external/players/1/D/skid.bmp",1,1,0,20,0)
sprite_replace(spr_mario_leaf_climb,"external/players/1/D/climb.bmp",2,1,0,20,0)
sprite_replace(spr_mario_leaf_swim,"external/players/1/D/swim.bmp",2,1,0,20,0)
sprite_replace(spr_mario_leaf_hold,"external/players/1/D/hold.bmp",4,1,0,20,0)
sprite_replace(spr_mario_leaf_carry,"external/players/1/D/carry.bmp",4,1,0,20,0)
sprite_replace(spr_mario_leaf_duck,"external/players/1/D/duck.bmp",4,1,0,20,0)
sprite_replace(spr_mario_leaf_goal,"external/players/1/D/goal.bmp",1,1,0,20,0)
sprite_replace(spr_mario_leaf_warp,"external/players/1/D/warp.bmp",1,1,0,20,0)
sprite_replace(spr_mario_leaf_spin,"external/players/1/D/spin.bmp",4,1,0,20,0)
sprite_replace(spr_mario_leaf_win,"external/players/1/D/win.bmp",1,1,0,20,0)
sprite_replace(spr_mario_leaf_stun,"external/players/1/D/stun.bmp",1,1,0,20,0)
// Spartan Mario (Halo Suit)
sprite_replace(spr_mario_spartan_stand,"external/players/1/F/stand.bmp",1,1,0,20,0)
sprite_replace(spr_mario_spartan_walk,"external/players/1/F/walk.bmp",4,1,0,20,0)
sprite_replace(spr_mario_spartan_jump,"external/players/1/F/jump.bmp",1,1,0,20,0)
sprite_replace(spr_mario_spartan_run,"external/players/1/F/run.bmp",4,1,0,20,0)
sprite_replace(spr_mario_spartan_runjump,"external/players/1/F/runjump.bmp",1,1,0,20,0)
sprite_replace(spr_mario_spartan_skid,"external/players/1/F/skid.bmp",1,1,0,20,0)
sprite_replace(spr_mario_spartan_climb,"external/players/1/F/climb.bmp",2,1,0,20,0)
sprite_replace(spr_mario_spartan_swim,"external/players/1/F/swim.bmp",2,1,0,20,0)
sprite_replace(spr_mario_spartan_hold,"external/players/1/F/hold.bmp",4,1,0,20,0)
sprite_replace(spr_mario_spartan_carry,"external/players/1/F/carry.bmp",4,1,0,20,0)
sprite_replace(spr_mario_spartan_duck,"external/players/1/F/duck.bmp",1,1,0,20,0)
sprite_replace(spr_mario_spartan_goal,"external/players/1/F/goal.bmp",1,1,0,20,0)
sprite_replace(spr_mario_spartan_warp,"external/players/1/F/warp.bmp",1,1,0,20,0)
sprite_replace(spr_mario_spartan_melee,"external/players/1/F/melee.bmp",10,1,0,28,3)
sprite_replace(spr_mario_spartan_spin,"external/players/1/F/spin.bmp",4,1,0,20,0)
sprite_replace(spr_mario_spartan_win,"external/players/1/F/win.bmp",1,1,0,20,0)
// Tanooki Mario
sprite_replace(spr_mario_tanooki_stand,"external/players/1/G/stand.bmp",1,1,0,20,0)
sprite_replace(spr_mario_tanooki_walk,"external/players/1/G/walk.bmp",4,1,0,20,0)
sprite_replace(spr_mario_tanooki_jump,"external/players/1/G/jump.bmp",4,1,0,20,0)
sprite_replace(spr_mario_tanooki_run,"external/players/1/G/run.bmp",4,1,0,20,0)
sprite_replace(spr_mario_tanooki_runjump,"external/players/1/G/runjump.bmp",4,1,0,20,0)
sprite_replace(spr_mario_tanooki_skid,"external/players/1/G/skid.bmp",1,1,0,20,0)
sprite_replace(spr_mario_tanooki_climb,"external/players/1/G/climb.bmp",2,1,0,20,0)
sprite_replace(spr_mario_tanooki_swim,"external/players/1/G/swim.bmp",2,1,0,20,0)
sprite_replace(spr_mario_tanooki_hold,"external/players/1/G/hold.bmp",4,1,0,20,0)
sprite_replace(spr_mario_tanooki_carry,"external/players/1/G/carry.bmp",4,1,0,20,0)
sprite_replace(spr_mario_tanooki_duck,"external/players/1/G/duck.bmp",4,1,0,20,0)
sprite_replace(spr_mario_tanooki_goal,"external/players/1/G/goal.bmp",1,1,0,20,0)
sprite_replace(spr_mario_tanooki_warp,"external/players/1/G/warp.bmp",1,1,0,20,0)
sprite_replace(spr_mario_tanooki_spin,"external/players/1/G/spin.bmp",4,1,0,20,0)
sprite_replace(spr_mario_tanooki_win,"external/players/1/G/win.bmp",1,1,0,20,0)
sprite_replace(spr_mario_tanooki_stun,"external/players/1/G/stun.bmp",1,1,0,20,0)
// Megaman Mario
sprite_replace(spr_mario_megaman_stand,"external/players/1/H/stand.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_walk,"external/players/1/H/walk.bmp",4,1,0,20,0)
sprite_replace(spr_mario_megaman_standshoot,"external/players/1/H/standshoot.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_walkshoot,"external/players/1/H/walkshoot.bmp",4,1,0,20,0)
sprite_replace(spr_mario_megaman_jump,"external/players/1/H/jump.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_jumpshoot,"external/players/1/H/jumpshoot.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_recoilshoot,"external/players/1/H/recoilshoot.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_run,"external/players/1/H/run.bmp",4,1,0,20,0)
sprite_replace(spr_mario_megaman_runjump,"external/players/1/H/runjump.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_skid,"external/players/1/H/skid.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_climb,"external/players/1/H/climb.bmp",2,1,0,20,0)
sprite_replace(spr_mario_megaman_swim,"external/players/1/H/swim.bmp",2,1,0,20,0)
sprite_replace(spr_mario_megaman_swimshoot,"external/players/1/H/swimshoot.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_hold,"external/players/1/H/hold.bmp",4,1,0,20,0)
sprite_replace(spr_mario_megaman_carry,"external/players/1/H/carry.bmp",4,1,0,20,0)
sprite_replace(spr_mario_megaman_duck,"external/players/1/H/duck.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_goal,"external/players/1/H/goal.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_warp,"external/players/1/H/warp.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_slide,"external/players/1/H/slide.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_spin,"external/players/1/H/spin.bmp",4,1,0,20,0)
sprite_replace(spr_mario_megaman_stun,"external/players/1/H/stun.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_win,"external/players/1/H/win.bmp",1,1,0,20,0)
sprite_replace(spr_mario_megaman_teleport,"external/players/1/H/teleport.bmp",5,1,0,20,0)
// Blue Shell Mario
sprite_replace(spr_mario_blueshell_stand,"external/players/1/L/stand.bmp",1,1,0,20,0)
sprite_replace(spr_mario_blueshell_walk,"external/players/1/L/walk.bmp",4,1,0,20,0)
sprite_replace(spr_mario_blueshell_jump,"external/players/1/L/jump.bmp",1,1,0,20,0)
sprite_replace(spr_mario_blueshell_run,"external/players/1/L/run.bmp",4,1,0,20,0)
sprite_replace(spr_mario_blueshell_runjump,"external/players/1/L/runjump.bmp",1,1,0,20,0)
sprite_replace(spr_mario_blueshell_skid,"external/players/1/L/skid.bmp",1,1,0,20,0)
sprite_replace(spr_mario_blueshell_climb,"external/players/1/L/climb.bmp",2,1,0,20,0)
sprite_replace(spr_mario_blueshell_swim,"external/players/1/L/swim.bmp",2,1,0,20,0)
sprite_replace(spr_mario_blueshell_hold,"external/players/1/L/hold.bmp",4,1,0,20,0)
sprite_replace(spr_mario_blueshell_carry,"external/players/1/L/carry.bmp",4,1,0,20,0)
sprite_replace(spr_mario_blueshell_duck,"external/players/1/L/duck.bmp",1,1,0,20,0)
sprite_replace(spr_mario_blueshell_goal,"external/players/1/L/goal.bmp",1,1,0,20,0)
sprite_replace(spr_mario_blueshell_warp,"external/players/1/L/warp.bmp",1,1,0,20,0)
sprite_replace(spr_mario_blueshell_spin,"external/players/1/L/spin.bmp",4,1,0,20,0)
sprite_replace(spr_mario_blueshell_win,"external/players/1/L/win.bmp",1,1,0,20,0)
sprite_replace(spr_mario_blueshell_stun,"external/players/1/L/stun.bmp",1,1,0,20,0)
sprite_replace(spr_mario_blueshell_extra1,"external/players/1/L/attack.bmp",6,1,0,20,0)
// Troop Mario
sprite_replace(spr_mario_troop_stand,"external/players/1/I/stand.bmp",6,1,0,20,0)
sprite_replace(spr_mario_troop_walk,"external/players/1/I/walk.bmp",4,1,0,20,0)
sprite_replace(spr_mario_troop_jump,"external/players/1/I/jump.bmp",2,1,0,20,0)
sprite_replace(spr_mario_troop_run,"external/players/1/I/run.bmp",4,1,0,20,0)
sprite_replace(spr_mario_troop_runjump,"external/players/1/I/runjump.bmp",2,1,0,20,0)
sprite_replace(spr_mario_troop_skid,"external/players/1/I/skid.bmp",2,1,0,20,0)
sprite_replace(spr_mario_troop_climb,"external/players/1/I/climb.bmp",2,1,0,20,0)
sprite_replace(spr_mario_troop_swim,"external/players/1/I/swim.bmp",2,1,0,20,0)
sprite_replace(spr_mario_troop_hold,"external/players/1/I/hold.bmp",4,1,0,20,0)
sprite_replace(spr_mario_troop_carry,"external/players/1/I/carry.bmp",4,1,0,20,0)
sprite_replace(spr_mario_troop_duck,"external/players/1/I/duck.bmp",1,1,0,20,0)
sprite_replace(spr_mario_troop_goal,"external/players/1/I/goal.bmp",1,1,0,20,0)
sprite_replace(spr_mario_troop_warp,"external/players/1/I/warp.bmp",1,1,0,20,0)
sprite_replace(spr_mario_troop_spin,"external/players/1/I/spin.bmp",4,1,0,20,0)
sprite_replace(spr_mario_troop_win,"external/players/1/I/win.bmp",1,1,0,20,0)
sprite_replace(spr_mario_troop_stun,"external/players/1/I/stun.bmp",2,1,0,20,0)
sprite_replace(spr_mario_troop_extra1,"external/players/1/I/walkshoot.bmp",4,1,0,20,0)
sprite_replace(spr_mario_troop_extra2,"external/players/1/I/runshoot.bmp",4,1,0,20,0)
sprite_replace(spr_mario_troop_extra3,"external/players/1/I/swimshoot.bmp",2,1,0,20,0)
sprite_replace(spr_mario_troop_extra4,"external/players/1/I/bullet.bmp",2,1,1,4,4)

Sword draw event:

//draws the sword

if stunned = 1 and hitenemy = 0
exit

if stunned = 1 and hitenemy = 1
{
draw_sprite_ext(spr_mario_fire_jump,0,round(x)-(direct * 10),y+3,direct,1,0,c_white,1)
exit
}

if sprite_index = spr_mario_big_stand
draw_sprite_ext(spr_mario_fire_stand,0,round(x)-(direct * -10),y+23,direct,1,0,c_white,1)

if sprite_index = spr_mario_big_duck
draw_sprite_ext(spr_mario_fire_duck,0,round(x)-(direct * -10),y+28,direct,1,0,c_white,1)

if sprite_index = spr_mario_small_run
draw_sprite_ext(spr_mario_small_runjump,0,round(x)-(direct * 21),y+12,direct,1,0,c_white,1)

if sprite_index = spr_mario_big_walk
{
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_walk,0,round(x)-(direct * -10),y+24,direct,1,0,c_white,1)
else if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_walk,1,round(x)-(direct * -11),y+23,direct,1,0,c_white,1)
else if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_walk,2,round(x)-(direct * -11),y+21,direct,1,0,c_white,1)
else if image_index >= 3 and image_index < 4
draw_sprite_ext(spr_mario_fire_walk,3,round(x)-(direct * -12),y+24,direct,1,0,c_white,1)
else if image_index >= 4 and image_index < 5
draw_sprite_ext(spr_mario_fire_walk,4,round(x)-(direct * -12),y+23,direct,1,0,c_white,1)
else if image_index >= 5 and image_index < 6
draw_sprite_ext(spr_mario_fire_walk,5,round(x)-(direct * -11),y+23,direct,1,0,c_white,1)
else if image_index >= 6 and image_index < 7
draw_sprite_ext(spr_mario_fire_walk,6,round(x)-(direct * -7),y+21,direct,1,0,c_white,1)
else if image_index >= 7 and image_index < 8
draw_sprite_ext(spr_mario_fire_walk,7,round(x)-(direct * -9),y+23,direct,1,0,c_white,1)
else if image_index >= 8 and image_index < 9
draw_sprite_ext(spr_mario_fire_walk,8,round(x)-(direct * -12),y+23,direct,1,0,c_white,1)
else if image_index >= 9 and image_index < 10
draw_sprite_ext(spr_mario_fire_walk,9,round(x)-(direct * -12),y+22,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_big_jump
{
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_jump,0,round(x)-(direct * 10),y+3,direct,1,0,c_white,1)
else if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_jump,1,round(x)-(direct * -4),y+27,direct,1,0,c_white,1)
else if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_jump,2,round(x)-(direct * -5),y+30,direct,1,0,c_white,1)
else if image_index >= 3 and image_index < 4
draw_sprite_ext(spr_mario_fire_jump,3,round(x)-(direct * -11),y+25,direct,1,0,c_white,1)
else if image_index >= 4 and image_index < 5
draw_sprite_ext(spr_mario_fire_jump,4,round(x)-(direct * -12),y+23,direct,1,0,c_white,1)
else if image_index >= 5 and image_index < 6
draw_sprite_ext(spr_mario_fire_jump,5,round(x)-(direct * -9),y+15,direct,1,0,c_white,1)
else if image_index >= 6 and image_index < 7
draw_sprite_ext(spr_mario_fire_jump,6,round(x)-(direct * -10),y+10,direct,1,0,c_white,1)
else if image_index >= 7 and image_index < 8
draw_sprite_ext(spr_mario_fire_jump,7,round(x)-(direct * -12),y+6,direct,1,0,c_white,1)
else if image_index >= 8 and image_index < 9
draw_sprite_ext(spr_mario_fire_jump,8,round(x)-(direct * -11),y+7,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_big_run
{
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_run,0,round(x)-(direct * 10),y+7,direct,1,0,c_white,1)
else if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_run,1,round(x)-(direct * 10),y+8,direct,1,0,c_white,1)
else if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_run,2,round(x)-(direct * 12),y+8,direct,1,0,c_white,1)
else if image_index >= 3 and image_index < 4
draw_sprite_ext(spr_mario_fire_run,3,round(x)-(direct * 11),y+7,direct,1,0,c_white,1)
else if image_index >= 4 and image_index < 5
draw_sprite_ext(spr_mario_fire_run,4,round(x)-(direct * 11),y+6,direct,1,0,c_white,1)
else if image_index >= 5 and image_index < 6
draw_sprite_ext(spr_mario_fire_run,5,round(x)-(direct * 12),y+8,direct,1,0,c_white,1)
else if image_index >= 6 and image_index < 7
draw_sprite_ext(spr_mario_fire_run,6,round(x)-(direct * 13),y+8,direct,1,0,c_white,1)
else if image_index >= 7 and image_index < 8
draw_sprite_ext(spr_mario_fire_run,7,round(x)-(direct * 9),y+10,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_big_spin
{
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_spin,0,round(x)-(direct * -9),y+17,direct,1,0,c_white,1)
if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_spin,1,round(x)-(direct * -9),y+26,direct,1,0,c_white,1)
if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_spin,2,round(x),y+26,direct,1,0,c_white,1)
if image_index >= 3 and image_index < 4
draw_sprite_ext(spr_mario_fire_spin,3,round(x)-(direct * 9),y+28,direct,1,0,c_white,1)
if image_index >= 4 and image_index < 5
draw_sprite_ext(spr_mario_fire_spin,4,round(x)-(direct * 9),y+17,direct,1,0,c_white,1)
if image_index >= 5 and image_index < 6
draw_sprite_ext(spr_mario_fire_spin,5,round(x)-(direct * 10),y+8,direct,1,0,c_white,1)
if image_index >= 6 and image_index < 7
draw_sprite_ext(spr_mario_fire_spin,6,round(x),y+6,direct,1,0,c_white,1)
if image_index >= 7 and image_index < 8
draw_sprite_ext(spr_mario_fire_spin,7,round(x)-(direct * -9),y+6,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_big_runjump
{
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_shoot,0,round(x)-(direct * 22),y+15,direct,1,0,c_white,1)
if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_shoot,1,round(x)-(direct * -3),y+12,direct,1,0,c_white,1)
if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_shoot,2,round(x)-(direct * -18),y+19,direct,1,0,c_white,1)
if image_index >= 3 and image_index < 4
draw_sprite_ext(spr_mario_fire_shoot,3,round(x)-(direct * -9),y+43,direct,1,0,c_white,1)
if image_index >= 4 and image_index < 5
draw_sprite_ext(spr_mario_fire_shoot,4,round(x)-(direct * -9),y+43,direct,1,0,c_white,1)
if image_index >= 5 and image_index < 6
draw_sprite_ext(spr_mario_fire_shoot,5,round(x)-(direct * 12),y+40,direct,1,0,c_white,1)
if image_index >= 6 and image_index < 7
draw_sprite_ext(spr_mario_fire_shoot,6,round(x)-(direct * 12),y+40,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_big_swim
{
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_swim,0,round(x)-(direct * 7),y+47,direct,1,0,c_white,1)
if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_swim,1,round(x)-(direct * 9),y+47,direct,1,0,c_white,1)
if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_swim,2,round(x)-(direct * 11),y+47,direct,1,0,c_white,1)
if image_index >= 3 and image_index < 4
draw_sprite_ext(spr_mario_fire_swim,3,round(x)-(direct * 12),y+47,direct,1,0,c_white,1)
if image_index >= 4 and image_index < 5
draw_sprite_ext(spr_mario_fire_swim,4,round(x)-(direct * 11),y+47,direct,1,0,c_white,1)
if image_index >= 5 and image_index < 6
draw_sprite_ext(spr_mario_fire_swim,5,round(x)-(direct * 7),y+47,direct,1,0,c_white,1)
if image_index >= 6 and image_index < 7
draw_sprite_ext(spr_mario_fire_swim,6,round(x)-(direct * 2),y+47,direct,1,0,c_white,1)
if image_index >= 7 and image_index < 8
draw_sprite_ext(spr_mario_fire_swim,7,round(x)-(direct * 1),y+48,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_big_climb
{
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_climb,0,round(x)-(direct * 9),y+6,direct,1,0,c_white,1)
if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_climb,1,round(x)-(direct * 10),y+6,direct,1,0,c_white,1)
if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_climb,2,round(x)-(direct * 12),y+11,direct,1,0,c_white,1)
if image_index >= 3 and image_index < 4
draw_sprite_ext(spr_mario_fire_climb,3,round(x)-(direct * 12),y+11,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_small_skid
{
if holding = 0
draw_sprite_ext(spr_mario_fire_jump,0,round(x)-(direct * 10),y+3,direct,1,0,c_white,1)
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_runjump,0,round(x)-(direct * 27),y-18,direct,1,0,c_white,1)
if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_runjump,1,round(x)-(direct * 33),y-9,direct,1,0,c_white,1)
if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_runjump,2,round(x)-(direct * 28),y-12,direct,1,0,c_white,1)
if image_index >= 3 and image_index < 4
draw_sprite_ext(spr_mario_fire_runjump,3,round(x)-(direct * 34),y-18,direct,1,0,c_white,1)
if image_index >= 4 and image_index < 5
draw_sprite_ext(spr_mario_fire_runjump,4,round(x)-(direct * 27),y+17,direct,1,0,c_white,1)
if image_index >= 5 and image_index < 6
draw_sprite_ext(spr_mario_fire_runjump,5,round(x)-(direct * 22),y+17,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_big_extra2
{
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_extra2,0,round(x)-(direct * 18),y+10,direct,1,0,c_white,1)
if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_extra2,1,round(x)-(direct * 18),y+10,direct,1,0,c_white,1)
if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_extra2,2,round(x)-(direct * -9),y+44,direct,1,0,c_white,1)
if image_index >= 3 and image_index < 4
draw_sprite_ext(spr_mario_fire_extra2,3,round(x)-(direct * 6),y+28,direct,1,0,c_white,1)
if image_index >= 4 and image_index < 5
draw_sprite_ext(spr_mario_fire_extra2,4,round(x)-(direct * 6),y+28,direct,1,0,c_white,1)
if image_index >= 5 and image_index < 6
draw_sprite_ext(spr_mario_fire_extra2,5,round(x)-(direct * -3),y+26,direct,1,0,c_white,1)
if image_index >= 6 and image_index < 7
draw_sprite_ext(spr_mario_fire_extra2,6,round(x)-(direct * -3),y+26,direct,1,0,c_white,1)
if image_index >= 7 and image_index < 8
draw_sprite_ext(spr_mario_fire_extra2,7,round(x)-(direct * -15),y+26,direct,1,0,c_white,1)
if image_index >= 8 and image_index < 9
draw_sprite_ext(spr_mario_fire_extra2,8,round(x)-(direct * -15),y+26,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_big_extra3
{
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_extra3,0,round(x)-(direct * -8),y+29,direct,1,0,c_white,1)
if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_extra3,0,round(x)-(direct * -7),y+29,direct,1,0,c_white,1)
if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_extra3,1,round(x)-(direct * -12),y+13,direct,1,0,c_white,1)
if image_index >= 3 and image_index < 4
draw_sprite_ext(spr_mario_fire_extra3,1,round(x)-(direct * -10),y+2,direct,1,0,c_white,1)
if image_index >= 4 and image_index < 5
draw_sprite_ext(spr_mario_fire_extra3,2,round(x)-(direct * -6),y+2,direct,1,0,c_white,1)
if image_index >= 5 and image_index < 6
draw_sprite_ext(spr_mario_fire_extra3,3,round(x)-(direct * -6),y-2,direct,1,0,c_white,1)
if image_index >= 6 and image_index < 7
draw_sprite_ext(spr_mario_fire_extra3,1,round(x)-(direct * -7),y-2,direct,1,0,c_white,1)
if image_index >= 7 and image_index < 8
draw_sprite_ext(spr_mario_fire_extra3,1,round(x)-(direct * - 10),y+2,direct,1,0,c_white,1)
if image_index >= 8 and image_index < 9
draw_sprite_ext(spr_mario_fire_extra3,1,round(x)-(direct * -12),y+13,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_big_extra4
{
if image_index >= 0 and image_index < 1
draw_sprite_ext(spr_mario_fire_extra4,0,round(x)-(direct * -10),y+2,direct,1,0,c_white,1)
if image_index >= 1 and image_index < 2
draw_sprite_ext(spr_mario_fire_extra4,1,round(x)-(direct * 3),y+27,direct,1,0,c_white,1)
if image_index >= 2 and image_index < 3
draw_sprite_ext(spr_mario_fire_extra4,1,round(x)-(direct * 3),y+16,direct,1,0,c_white,1)
}

if sprite_index = spr_mario_big_skid
draw_sprite_ext(spr_mario_fire_skid,0,round(x)-(direct * -12),y+14,direct,1,0,c_white,1)

if sprite_index = spr_mario_small_swim and attack = 4
draw_sprite_ext(spr_mario_small_hold,0,round(x)-(direct * -9),y+18,direct,1,0,c_white,1)