Actor selection : Inventory
{
inventory.maxamount 15
}
ACTOR Coins : Ammo 15555
{
	Game Doom
	SpawnID 11
	Inventory.PickupMessage "Picked up 1 dollar coins."
	Inventory.Amount 2
	scale 0.4
	Inventory.MaxAmount 1000
	Ammo.BackpackAmount 5
	Ammo.BackpackMaxAmount 50000
	Inventory.Icon "MONYA0"
	States
	{
	Spawn:
		MONY A 2 bright A_spawnitem("YellowFlareSmall",0,10)
		loop
	}
}
ACTOR 10_Coins : Coins 15556
{
	Game Doom
	SpawnID 11
	Inventory.PickupMessage "Picked up 10 dollar coins."
	Inventory.Amount 10
	scale 0.7
	Ammo.BackpackAmount 0
	States
	{
	Spawn:
		MONY A 1 bright A_spawnitem("YellowFlareMedium",0,18)
		loop
	}
}
ACTOR 20_Coins : Coins 15557
{
	Game Doom
	SpawnID 11
	Inventory.PickupMessage "Picked up 20 dollar coins."
	Inventory.Amount 20
	scale 1.0
	Ammo.BackpackAmount 0
	States
	{
	Spawn:
		MONY A 1 bright A_spawnitem("YellowFlareMedium",0,27)
		MONY A 0 bright A_spawnitem("YellowFlareSmall",0,27)
		loop
	}
}
actor ITEM_STORE : BDweapon
{
Weapon.AmmoUse 0
weapon.selectionorder 5000000
+noalert
+WEAPON.WIMPY_WEAPON
+WEAPON.NO_AUTO_SWITCH
+WEAPON.CHEATNOTWEAPON
Weapon.AmmoGive 0
Weapon.AmmoType1 "Coins"
states
{
  Deselect:
    PUNG A 0 A_Lower
    Loop
  Select:
    PUNG A 0 A_Raise
    Loop
	

  Ready:
	tnt1 a 0 A_jumpifinventory("selection",15,"Ready_CellPack")
	tnt1 a 0 A_jumpifinventory("selection",14,"Ready_Cell")
	tnt1 a 0 A_jumpifinventory("selection",13,"Ready_RocketBox")
	tnt1 a 0 A_jumpifinventory("selection",12,"Ready_Rocket")
	tnt1 a 0 A_jumpifinventory("selection",11,"Ready_ShellBox")
    tnt1 a 0 A_jumpifinventory("selection",10,"Ready_Shells")
	tnt1 a 0 A_jumpifinventory("selection",9,"Ready_50CalClip")
    tnt1 a 0 A_jumpifinventory("selection",8,"Ready_RIFBox")
	tnt1 a 0 A_jumpifinventory("selection",7,"Ready_RIFClip")
	tnt1 a 0 A_jumpifinventory("selection",6,"Ready_PISClip")
	tnt1 a 0 A_jumpifinventory("selection",5,"Ready_MEDI")
	tnt1 a 0 A_jumpifinventory("selection",4,"Ready_STIM")
	tnt1 a 0 A_jumpifinventory("selection",3,"Ready_Hbon")
	tnt1 a 0 A_jumpifinventory("selection",2,"Ready_BArmor")
	tnt1 a 0 A_jumpifinventory("selection",1,"Ready_GArmor")
////////////////////////////////////////////////
//health/armor
////////////////////////////////////////////////
	Ready_Abon:
		ITEM A 1 bright A_WeaponReady
		Loop
	Ready_GArmor:
		ITEM B 1 bright A_WeaponReady
		Loop
	Ready_BArmor:
		ITEM C 1 bright A_WeaponReady
		Loop
////////////////////////////////////////////////
	Ready_Hbon:
		ITEM D 1 bright A_WeaponReady
		Loop
	Ready_STIM:
		ITEM E 1 bright A_WeaponReady
		Loop
	Ready_MEDI:
		ITEM F 1 bright A_WeaponReady
		Loop
////////////////////////////////////////////////
//Ammo
////////////////////////////////////////////////
	Ready_PISClip:
		ITEM G 1 bright A_WeaponReady
		Loop
	Ready_RIFClip:
		ITEM H 1 bright A_WeaponReady
		Loop
	Ready_RIFBox:
		ITEM I 1 bright A_WeaponReady
		Loop
	Ready_50CalClip:
		ITEM J 1 bright A_WeaponReady
		Loop
///////////////////////////////////////////////
	Ready_Shells:
		ITEM K 1 bright A_WeaponReady
		Loop
	Ready_ShellBox:
		ITEM L 1 bright A_WeaponReady
		Loop
///////////////////////////////////////////////
	Ready_Rocket:
		ITEM N 1 bright A_WeaponReady
		Loop
	Ready_RocketBox:
		ITEM O 1 bright A_WeaponReady
		Loop
///////////////////////////////////////////////
	Ready_Cell:
		ITEM M 1 bright A_WeaponReady
		Loop
	Ready_CellPack:
		ITEM P 1 bright A_WeaponReady
		Loop
	
  Fire:
	tnt1 a 0 A_jumpifinventory("selection",15,"fire_CellPack")
	tnt1 a 0 A_jumpifinventory("selection",14,"fire_Cell")
	tnt1 a 0 A_jumpifinventory("selection",13,"fire_RocketBox")
	tnt1 a 0 A_jumpifinventory("selection",12,"fire_Rocket")
	tnt1 a 0 A_jumpifinventory("selection",11,"fire_ShellBox")
    tnt1 a 0 A_jumpifinventory("selection",10,"fire_Shells")
	tnt1 a 0 A_jumpifinventory("selection",9,"fire_50CalClip")
    tnt1 a 0 A_jumpifinventory("selection",8,"fire_RIFBox")
	tnt1 a 0 A_jumpifinventory("selection",7,"fire_RIFClip")
	tnt1 a 0 A_jumpifinventory("selection",6,"fire_PISClip")
	tnt1 a 0 A_jumpifinventory("selection",5,"fire_MEDI")
	tnt1 a 0 A_jumpifinventory("selection",4,"fire_STIM")
	tnt1 a 0 A_jumpifinventory("selection",3,"fire_Hbon")
	tnt1 a 0 A_jumpifinventory("selection",2,"fire_BArmor")
	tnt1 a 0 A_jumpifinventory("selection",1,"fire_GArmor")
////////////////////////////////////////////////
//health/armor
////////////////////////////////////////////////
	Fire_Abon:
	ITEM a 1 A_jumpifinventory("coins",5,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",5)
		ITEM QQQQQ 1 A_spawnitemEX("ArmorShard",45,0,3,0,0,0,0)
		tnt1 a 0
		goto ready
		
	Fire_GArmor:
	ITEM b 1 A_jumpifinventory("coins",25,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",25)
		ITEM Q 5 A_spawnitemEX("GreenArmor",45,0,3,0,0,0,0)
		goto ready
		
	Fire_BArmor:
	ITEM c 1 A_jumpifinventory("coins",50,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",50)
		ITEM Q 5 A_spawnitemEX("BlueArmor",45,0,3,0,0,0,0)
		goto ready
////////////////////////////////////////////////
	Fire_Hbon:
	ITEM d 1 A_jumpifinventory("coins",5,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",5)
		ITEM QQQQQ 1 A_spawnitemEX("Healthbonus",45,0,3,0,0,0,0)
		goto ready
		
	Fire_STIM:
	ITEM e 1 A_jumpifinventory("coins",15,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",15)
		ITEM Q 5 A_spawnitemEX("Stimpack",45,0,3,0,0,0,0)
		goto ready
		
	Fire_MEDI:
	ITEM f 1 A_jumpifinventory("coins",25,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",25)
		ITEM Q 5 A_spawnitemEX("Medikit",45,0,3,0,0,0,0)
		goto ready
////////////////////////////////////////////////
//Ammo
////////////////////////////////////////////////
	Fire_PISClip:
	ITEM G 1 A_jumpifinventory("coins",10,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",10)
		ITEM Q 5 A_spawnitemEX("Magazine",45,0,3,0,0,0,0)
		goto ready
		
	Fire_RIFClip:
	ITEM H 1 A_jumpifinventory("coins",10,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",10)
		ITEM Q 5 A_spawnitemEX("clip2",45,0,3,0,0,0,0)
		goto ready
		
	Fire_RIFBox:
	ITEM I 1 A_jumpifinventory("coins",60,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",60)
		ITEM Q 5 A_spawnitemEX("clipbox2",45,0,3,0,0,0,0)
		goto ready
		
	Fire_50CalClip:
	ITEM J 1 A_jumpifinventory("coins",30,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",30)
		ITEM Q 5 A_spawnitemEX("DMRClip",45,0,3,0,0,0,0)
		goto ready
		
///////////////////////////////////////////////
	Fire_Shells:
	ITEM K 1 A_jumpifinventory("coins",10,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",10)
		ITEM Q 5 A_spawnitemEX("Shell2",45,0,3,0,0,0,0)
		goto ready
		
		
	Fire_ShellBox:
	ITEM L 1 A_jumpifinventory("coins",40,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",40)
		ITEM Q 5 A_spawnitemEX("Shellbox",45,0,3,0,0,0,0)
		goto ready
		
///////////////////////////////////////////////
	Fire_Rocket:
	ITEM N 1 A_jumpifinventory("coins",5,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",5)
		ITEM Q 5 A_spawnitemEX("rocketammo",45,0,3,0,0,0,0)
		goto ready
		
	Fire_RocketBox:
	ITEM O 1 A_jumpifinventory("coins",5,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",5)
		ITEM Q 5 A_spawnitemEX("rocketbox",45,0,3,0,0,0,0)
		goto ready
///////////////////////////////////////////////
	Fire_Cell:
	ITEM M 1 A_jumpifinventory("coins",30,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",30)
		ITEM Q 5 A_spawnitemEX("Cell",45,0,3,0,0,0,0)
		goto ready
	
	Fire_CellPack:
	ITEM P 1 A_jumpifinventory("coins",80,1)
	goto ready
	tnt1 a 0 A_takeinventory("coins",80)
		ITEM Q 5 A_spawnitemEX("Cellpack",45,0,3,0,0,0,0)
		goto ready
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
	Altfire:
		ITEM c 0 A_jumpifinventory("selection",15,3)
		ITEM Q 5 A_giveinventory("selection",1)
		goto ready
		tnt1 a 0
		ITEM Q 5 A_takeinventory("selection",15)
		goto ready
}
}