Code: Select all
Actor CountToken : Inventory
{
Inventory.MaxAmount 0x7FFFFFFF
Inventory.PickupMessage "You're not supposed to see this"
}
Actor CustomShotgun : CustomInventory replaces Shotgun //This Shotgun can be picked up only if you already have less than 4 weapons, except of Fist
{
States
{
Spawn:
SHOT A -1
Pickup:
TNT1 A 0 A_TakeInventory("CountToken") //Reset any cap tokens before checks ladder begins
TNT1 A 0 A_JumpIfInventory("ChainSaw",1,1) //Now we start to check weapon each having and if it presented, then...
Goto Pickup+3 //... otherwise lets do another check...
TNT1 A 0 A_GiveInventory("CountToken") //... then we increase "CountToken", otherwise...^
TNT1 A 0 A_JumpIfInventory("Pistol",1,1)
Goto Pickup+5
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Shotgun",1,1)
Goto Pickup+7
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Chaingun",1,1)
Goto Pickup+9
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("SuperShotgun",1,1)
Goto Pickup+11
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("RocketLauncher",1,1)
Goto Pickup+13
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("PlasmaRifle",1,1)
Goto Pickup+15
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("BFG9000",1,1) //... do another check until we check all arsenal, and if finaly if total "CountToken" amount more than 4 then...
Goto Pickup+17
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("CountToken",4,2) //... then just give...
TNT1 A 0 A_GiveInventory("Shotgun") //... then just pickup the Shotgun
Stop
TNT1 A 0 A_GiveInventory("Shell",8) //... give 8 Shells instead, but if it number less of 5, then...^
Stop
}
}
Actor CustomPistol : CustomInventory replaces Pistol //This Pistol can be picked up only if you already have less than 4 weapons, except of Fist
{
States
{
Spawn:
PIST A -1
Pickup:
TNT1 A 0 A_TakeInventory("CountToken") //Reset any cap tokens before checks ladder begins
TNT1 A 0 A_JumpIfInventory("ChainSaw",1,1) //Now we start to check weapon each having and if it presented, then...
Goto Pickup+3 //... otherwise lets do another check...
TNT1 A 0 A_GiveInventory("CountToken") //... then we increase "CountToken", otherwise...^
TNT1 A 0 A_JumpIfInventory("Pistol",1,1)
Goto Pickup+5
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Shotgun",1,1)
Goto Pickup+7
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Chaingun",1,1)
Goto Pickup+9
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("SuperShotgun",1,1)
Goto Pickup+11
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("RocketLauncher",1,1)
Goto Pickup+13
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("PlasmaRifle",1,1)
Goto Pickup+15
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("BFG9000",1,1) //... do another check until we check all arsenal, and if finaly if total "CountToken" amount more than 4 then...
Goto Pickup+17
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("CountToken",4,2) //... then just give...
TNT1 A 0 A_GiveInventory("Pistol") //... then just pickup the Shotgun
Stop
TNT1 A 0 A_GiveInventory("clip",6) //... give 8 Shells instead, but if it number less of 4, then...^
Stop
}
}
Actor CustomSuperShotgun : CustomInventory replaces Supershotgun //This Supershotgun can be picked up only if you already have less than 5 weapons, except of Fist
{
States
{
Spawn:
SGN2 A -1
Pickup:
TNT1 A 0 A_TakeInventory("CountToken") //Reset any cap tokens before checks ladder begins
TNT1 A 0 A_JumpIfInventory("ChainSaw",1,1) //Now we start to check weapon each having and if it presented, then...
Goto Pickup+3 //... otherwise lets do another check...
TNT1 A 0 A_GiveInventory("CountToken") //... then we increase "CountToken", otherwise...^
TNT1 A 0 A_JumpIfInventory("Pistol",1,1)
Goto Pickup+5
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Shotgun",1,1)
Goto Pickup+7
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Chaingun",1,1)
Goto Pickup+9
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("SuperShotgun",1,1)
Goto Pickup+11
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("RocketLauncher",1,1)
Goto Pickup+13
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("PlasmaRifle",1,1)
Goto Pickup+15
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("BFG9000",1,1) //... do another check until we check all arsenal, and if finaly if total "CountToken" amount more than 4 then...
Goto Pickup+17
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("CountToken",4,2) //... then just give...
TNT1 A 0 A_GiveInventory("Supershotgun") //... then just pickup the Shotgun
Stop
TNT1 A 0 A_GiveInventory("Shell",8) //... give 8 Shells instead, but if it number less of 4, then...^
Stop
}
}
Actor CustomChaingun : CustomInventory replaces Chaingun //This Chaingun can be picked up only if you already have less than 5 weapons, except of Fist
{
States
{
Spawn:
MGUN A -1
Pickup:
TNT1 A 0 A_TakeInventory("CountToken") //Reset any cap tokens before checks ladder begins
TNT1 A 0 A_JumpIfInventory("ChainSaw",1,1) //Now we start to check weapon each having and if it presented, then...
Goto Pickup+3 //... otherwise lets do another check...
TNT1 A 0 A_GiveInventory("CountToken") //... then we increase "CountToken", otherwise...^
TNT1 A 0 A_JumpIfInventory("Pistol",1,1)
Goto Pickup+5
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Shotgun",1,1)
Goto Pickup+7
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Chaingun",1,1)
Goto Pickup+9
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("SuperShotgun",1,1)
Goto Pickup+11
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("RocketLauncher",1,1)
Goto Pickup+13
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("PlasmaRifle",1,1)
Goto Pickup+15
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("BFG9000",1,1) //... do another check until we check all arsenal, and if finaly if total "CountToken" amount more than 4 then...
Goto Pickup+17
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("CountToken",4,2) //... then just give...
TNT1 A 0 A_GiveInventory("Chaingun") //... then just pickup the Shotgun
Stop
TNT1 A 0 A_GiveInventory("clip",30) //... give 8 Shells instead, but if it number less of 4, then...^
Stop
}
}
Actor CustomPlasmarifle : CustomInventory replaces Plasmarifle //This Plasmarifle can be picked up only if you already have less than 5 weapons, except of Fist
{
States
{
Spawn:
PLAS A -1
Pickup:
TNT1 A 0 A_TakeInventory("CountToken") //Reset any cap tokens before checks ladder begins
TNT1 A 0 A_JumpIfInventory("ChainSaw",1,1) //Now we start to check weapon each having and if it presented, then...
Goto Pickup+3 //... otherwise lets do another check...
TNT1 A 0 A_GiveInventory("CountToken") //... then we increase "CountToken", otherwise...^
TNT1 A 0 A_JumpIfInventory("Pistol",1,1)
Goto Pickup+5
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Shotgun",1,1)
Goto Pickup+7
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Chaingun",1,1)
Goto Pickup+9
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("SuperShotgun",1,1)
Goto Pickup+11
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("RocketLauncher",1,1)
Goto Pickup+13
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("PlasmaRifle",1,1)
Goto Pickup+15
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("BFG9000",1,1) //... do another check until we check all arsenal, and if finaly if total "CountToken" amount more than 4 then...
Goto Pickup+17
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("CountToken",4,2) //... then just give...
TNT1 A 0 A_GiveInventory("Plasmarifle") //... then just pickup the Shotgun
Stop
TNT1 A 0 A_GiveInventory("Cell",25) //... give 8 Shells instead, but if it number less of 4, then...^
Stop
}
}
Actor CustomRocketlauncher : CustomInventory replaces Rocketlauncher //This Rocketlauncher can be picked up only if you already have less than 5 weapons, except of Fist
{
States
{
Spawn:
LAUN A -1
Pickup:
TNT1 A 0 A_TakeInventory("CountToken") //Reset any cap tokens before checks ladder begins
TNT1 A 0 A_JumpIfInventory("ChainSaw",1,1) //Now we start to check weapon each having and if it presented, then...
Goto Pickup+3 //... otherwise lets do another check...
TNT1 A 0 A_GiveInventory("CountToken") //... then we increase "CountToken", otherwise...^
TNT1 A 0 A_JumpIfInventory("Pistol",1,1)
Goto Pickup+5
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Shotgun",1,1)
Goto Pickup+7
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Chaingun",1,1)
Goto Pickup+9
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("SuperShotgun",1,1)
Goto Pickup+11
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("RocketLauncher",1,1)
Goto Pickup+13
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("PlasmaRifle",1,1)
Goto Pickup+15
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("BFG9000",1,1) //... do another check until we check all arsenal, and if finaly if total "CountToken" amount more than 4 then...
Goto Pickup+17
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("CountToken",4,2) //... then just give...
TNT1 A 0 A_GiveInventory("Rocketlauncher") //... then just pickup the Shotgun
Stop
TNT1 A 0 A_GiveInventory("Rocketammo",25) //... give 8 Shells instead, but if it number less of 4, then...^
Stop
}
}
Actor CustomBFG9000 : CustomInventory replaces BFG9000 //This BFG9000 can be picked up only if you already have less than 5 weapons, except of Fist
{
States
{
Spawn:
BFUG A -1
Pickup:
TNT1 A 0 A_TakeInventory("CountToken") //Reset any cap tokens before checks ladder begins
TNT1 A 0 A_JumpIfInventory("ChainSaw",1,1) //Now we start to check weapon each having and if it presented, then...
Goto Pickup+3 //... otherwise lets do another check...
TNT1 A 0 A_GiveInventory("CountToken") //... then we increase "CountToken", otherwise...^
TNT1 A 0 A_JumpIfInventory("Pistol",1,1)
Goto Pickup+5
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Shotgun",1,1)
Goto Pickup+7
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Chaingun",1,1)
Goto Pickup+9
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("SuperShotgun",1,1)
Goto Pickup+11
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("RocketLauncher",1,1)
Goto Pickup+13
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("PlasmaRifle",1,1)
Goto Pickup+15
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("BFG9000",1,1) //... do another check until we check all arsenal, and if finaly if total "CountToken" amount more than 4 then...
Goto Pickup+17
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("CountToken",4,2) //... then just give...
TNT1 A 0 A_GiveInventory("BFG9000") //... then just pickup the Shotgun
Stop
TNT1 A 0 A_GiveInventory("Cell",20) //... give 8 Shells instead, but if it number less of 4, then...^
Stop
}
}
Actor CustomChainsaw : CustomInventory replaces Chainsaw //This Chainsaw can be picked up only if you already have less than 5 weapons, except of Fist
{
States
{
Spawn:
CSAW A -1
Pickup:
TNT1 A 0 A_TakeInventory("CountToken") //Reset any cap tokens before checks ladder begins
TNT1 A 0 A_JumpIfInventory("ChainSaw",1,1) //Now we start to check weapon each having and if it presented, then...
Goto Pickup+3 //... otherwise lets do another check...
TNT1 A 0 A_GiveInventory("CountToken") //... then we increase "CountToken", otherwise...^
TNT1 A 0 A_JumpIfInventory("Pistol",1,1)
Goto Pickup+5
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Shotgun",1,1)
Goto Pickup+7
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("Chaingun",1,1)
Goto Pickup+9
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("SuperShotgun",1,1)
Goto Pickup+11
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("RocketLauncher",1,1)
Goto Pickup+13
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("PlasmaRifle",1,1)
Goto Pickup+15
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("BFG9000",1,1) //... do another check until we check all arsenal, and if finaly if total "CountToken" amount more than 4 then...
Goto Pickup+17
TNT1 A 0 A_GiveInventory("CountToken")
TNT1 A 0 A_JumpIfInventory("CountToken",4,2)
TNT1 A 0 A_GiveInventory("Chainsaw") //... then just pickup the Chainsaw
Stop
TNT1 A 0
Fail
}
}