Code: Select all
ACTOR ExpOrb2 : CustomInventory
{
Inventory.Amount 1
Inventory.MaxAmount 99999
Inventory.PickupMessage "Got some Exp"
+INVENTORY.KEEPDEPLETED
+INVENTORY.AUTOACTIVATE
Scale 0.2
States
{
Spawn:
BON1 ABCDCB 6 Bright
Loop
Pickup:
TNT1 A 0 A_RailWait
Stop
Use:
TNT1 A 0 A_Overlay(-100,"ExpOrb")
Fail
ExpOrb:
TNT1 A 1
TNT1 A 0 A_JumpIfInventory("ExpOrb2",50,"LevelUp")
Loop
LevelUp:
TNT1 A 0 A_TakeInventory("ExpOrb2",50)
TNT1 A 0 A_JumpIfInventory("ExpTier",3,"ExpOrb")
TNT1 A 0 A_JumpIfInventory("ExpTier",2,"Tier2")
TNT1 A 0 A_JumpIfInventory("ExpTier",1,"Tier1")
Goto Tier0
Tier0:
TNT1 A 0 A_GiveInventory("ExpT0",1)
TNT1 A 0 {If(CountInv("ExpT0")>=3){A_GiveInventory("ExpTier",1);}}
Tier0t:
TNT1 A 0 A_Jump(256,1,3,5)
TNT1 A 0 A_JumpIfInventory("Shotgun",1,"Tier0t")
TNT1 A 0 {A_Print("Got the Shotgun!"); A_GiveInventory("Shotgun",1);}
Goto ExpOrb
TNT1 A 0 A_JumpIfInventory("Chaingun",1,"Tier0t")
TNT1 A 0 {A_Print("Got the Chaingun!"); A_GiveInventory("Chaingun",1);}
Goto ExpOrb
TNT1 A 0 A_JumpIfInventory("Chainsaw",1,"Tier0t")
TNT1 A 0 {A_Print("Got the Chainsaw!"); A_GiveInventory("Chainsaw",1);}
Goto ExpOrb
Tier1:
TNT1 A 0 A_GiveInventory("ExpT1",1)
TNT1 A 0 {If(CountInv("ExpT1")>=3){A_GiveInventory("ExpTier",1);}}
Tier1t:
TNT1 A 0 A_Jump(256,1,3,5)
TNT1 A 0 A_JumpIfInventory("SuperShotgun",1,"Tier1t")
TNT1 A 0 {A_Print("Got the Super Shotgun!"); A_GiveInventory("SuperShotgun",1);}
Goto ExpOrb
TNT1 A 0 A_JumpIfInventory("RocketLauncher",1,"Tier1t")
TNT1 A 0 {A_Print("Got the Rocket Launcher!"); A_GiveInventory("RocketLauncher",1);}
Goto ExpOrb
TNT1 A 0 A_JumpIfInventory("Backpack",1,"Tier1t")
TNT1 A 0 {A_Print("Got the Backpack!"); A_GiveInventory("Backpack",1);}
Goto ExpOrb
Tier2:
TNT1 A 0 A_GiveInventory("ExpT2",1)
TNT1 A 0 {If(CountInv("ExpT2")>=3){A_GiveInventory("ExpTier",1);}}
Tier2t:
TNT1 A 0 A_Jump(256,1,3,5)
TNT1 A 0 A_JumpIfInventory("PlasmaRifle",1,"Tier2t")
TNT1 A 0 {A_Print("Got the Plasma Gun!"); A_GiveInventory("PlasmaRifle",1);}
Goto ExpOrb
TNT1 A 0 A_JumpIfInventory("BFG9000",1,"Tier2t")
TNT1 A 0 {A_Print("Got the BFG9000!"); A_GiveInventory("BFG9000",1);}
Goto ExpOrb
TNT1 A 0 A_JumpIfInventory("PowerStrength",1,"Tier2t")
TNT1 A 0 {A_Print("Got the Berserk!"); A_GiveInventory("PowerStrength",1);}
Goto ExpOrb
}
}
ACTOR ExpTier : Inventory {Inventory.MaxAmount 3}
ACTOR ExpT0 : Inventory {Inventory.MaxAmount 3}
ACTOR ExpT1 : Inventory {Inventory.MaxAmount 3}
ACTOR ExpT2 : Inventory {Inventory.MaxAmount 3}