Code: Select all
Actor BlueMana : CustomInventory replaces Mana1
{
Radius 8
Height 8
+FLOATBOB
Inventory.Icon "MAN1I0"
Inventory.PickupMessage "$TXT_MANA_1"
Tag "$AMMO_MANA1"
States
{
Spawn:
MAN1 ABCDEFGHI 4 Bright
Loop
Pickup:
TNT1 A 0
{
If(CountInv("Bakpak"))
{
If(CountInv("Nato") == 500 && CountInv("RifleAmmo") == 300 && CountInv("Shells") == 100) { Return ResolveState("PickupStop"); }
// Nato
Else
{
If(CountInv("Nato") < 500) { A_GiveInventory("Nato", 50); }
Else { A_SpawnItemEx("HexenNatoSpawner",0,0,0,0,0,0,0,SXF_SETTARGET); }
// RifleAmmo
If(CountInv("RifleAmmo") <= 270) { A_GiveInventory("RifleAmmo", 30); }
Else If(CountInv("RifleAmmo") <= 285) { A_SpawnItemEx("HexenRifleAmmoSpawner",0,0,0,0,0,0,0,SXF_SETTARGET); }
Else
{
A_SpawnItemEx("HexenRifleAmmoSpawner",0,0,0,0,0,0,0,SXF_SETTARGET);
A_SpawnItemEx("HexenRifleAmmoSpawner",0,5,0,0,0,0,0,SXF_SETTARGET);
}
// Shells
If(CountInv("Shells") <= 92) { A_GiveInventory("Shells", 8); }
Else If(CountInv("Shells") <= 96) { A_SpawnItemEx("HexenShellsSpawner",0,0,0,0,0,0,0,SXF_SETTARGET); }
Else
{
A_SpawnItemEx("HexenShellsSpawner",0,0,0,0,0,0,0,SXF_SETTARGET);
A_SpawnItemEx("HexenShellsSpawner",0,5,0,0,0,0,0,SXF_SETTARGET);
}
Return ResolveState("PickupFinish");
}
}
Else
{
If(CountInv("Nato") == 250 && CountInv("RifleAmmo") == 150 && CountInv("Shells") == 50) { Return ResolveState("PickupStop"); }
// Nato
Else
{
If(CountInv("Nato") < 250) { A_GiveInventory ("Nato", 50); }
Else { A_SpawnItemEx("HexenNatoSpawner",0,0,0,0,0,0,0,SXF_SETTARGET); }
// RifleAmmo
If(CountInv("RifleAmmo") <= 120) { A_GiveInventory("RifleAmmo", 30); }
Else If(CountInv("RifleAmmo") <= 135) { A_SpawnItemEx("HexenRifleAmmoSpawner",0,0,0,0,0,0,0,SXF_SETTARGET); }
Else
{
A_SpawnItemEx("HexenRifleAmmoSpawner",0,0,0,0,0,0,0,SXF_SETTARGET);
A_SpawnItemEx("HexenRifleAmmoSpawner",0,5,0,0,0,0,0,SXF_SETTARGET);
}
// Shells
If(CountInv("Shells") <= 42) { A_GiveInventory("Shells", 8); }
Else If(CountInv("Shells") <= 46) { A_SpawnItemEx("HexenShellsSpawner",0,0,0,0,0,0,0,SXF_SETTARGET); }
Else
{
A_SpawnItemEx("HexenShellsSpawner",0,0,0,0,0,0,0,SXF_SETTARGET);
A_SpawnItemEx("HexenShellsSpawner",0,5,0,0,0,0,0,SXF_SETTARGET);
}
Return ResolveState("PickupFinish");
}
}
}
PickupStop:
TNT1 A 0
Fail
PickupFinish:
TNT1 A 0 { Return True; }
Stop
}
}
Actor GreenMana : CustomInventory replaces Mana2
{
Radius 8
Height 8
+FLOATBOB
Inventory.Icon "MAN2G0"
Inventory.PickupMessage "$TXT_MANA_2"
Tag "$AMMO_MANA2"
States
{
Spawn:
MAN2 ABCDEFGHIJKLMNOP 4 Bright
Loop
Pickup:
TNT1 A 0
{
If(CountInv("Bakpak"))
{
If(CountInv("Cells") == 600 && CountInv("RocketAmmo") == 100) { Return ResolveState("PickupStop"); }
// Cells
Else
{
If(CountInv("Cells") < 560) { A_GiveInventory("Cells", 40); }
Else If(CountInv("Cells") < 580) { A_SpawnItemEx("HexenCellsSpawner",0,0,0,0,0,0,0,SXF_SETTARGET); }
Else
{
A_SpawnItemEx("HexenCellsSpawner",0,0,0,0,0,0,0,SXF_SETTARGET);
A_SpawnItemEx("HexenCellsSpawner",0,5,0,0,0,0,0,SXF_SETTARGET);
}
// RocketAmmo
If(CountInv("RocketAmmo") <= 98) { A_GiveInventory("RocketAmmo", 2); }
Else If(CountInv("RocketAmmo") <= 99) { A_SpawnItemEx("HexenRocketAmmoSpawner",0,0,0,0,0,0,0,SXF_SETTARGET); }
Else
{
A_SpawnItemEx("HexenRocketAmmoSpawner",0,0,0,0,0,0,0,SXF_SETTARGET);
A_SpawnItemEx("HexenRocketAmmoSpawner",0,5,0,0,0,0,0,SXF_SETTARGET);
}
Return ResolveState("PickupFinish");
}
}
Else
{
If(CountInv("Cells") == 300 && CountInv("RocketAmmo") == 50) { Return ResolveState("PickupStop"); }
// Cells
Else
{
If(CountInv("Cells") < 360) { A_GiveInventory("Cells", 40); }
Else If(CountInv("Cells") < 380) { A_SpawnItemEx("HexenCellsSpawner",0,0,0,0,0,0,0,SXF_SETTARGET); }
Else
{
A_SpawnItemEx("HexenCellsSpawner",0,0,0,0,0,0,0,SXF_SETTARGET);
A_SpawnItemEx("HexenCellsSpawner",0,5,0,0,0,0,0,SXF_SETTARGET);
}
// RocketAmmo
If(CountInv("RocketAmmo") <= 48) { A_GiveInventory("RocketAmmo", 2); }
Else If(CountInv("RocketAmmo") <= 49) { A_SpawnItemEx("HexenRocketAmmoSpawner",0,0,0,0,0,0,0,SXF_SETTARGET); }
Else
{
A_SpawnItemEx("HexenRocketAmmoSpawner",0,0,0,0,0,0,0,SXF_SETTARGET);
A_SpawnItemEx("HexenRocketAmmoSpawner",0,5,0,0,0,0,0,SXF_SETTARGET);
}
Return ResolveState("PickupFinish");
}
}
}
PickupStop:
TNT1 A 0
Fail
PickupFinish:
TNT1 A 0 { Return True; }
Stop
}
}
Actor MixedMana : CustomInventory replaces Mana3
{
Radius 8
Height 8
+FLOATBOB
Inventory.PickupMessage "$TXT_MANA_BOTH"
States
{
Spawn:
MAN3 ABCDEFGHIJKLMNOP 4 Bright
Loop
Pickup:
TNT1 A 0 A_GiveInventory("BlueMana", 1)
TNT1 A 0 A_GiveInventory("GreenMana", 1)
Stop
}
}
// Boost Mana Artifact Krater of Might ------------------------------------
Actor ArtiBoostMana2 : CustomInventory replaces ArtiBoostMana
{
+FLOATBOB
+COUNTITEM
+INVENTORY.INVBAR
+INVENTORY.FANCYPICKUPSOUND
Inventory.PickupFlash "PickupFlash"
Inventory.DefMaxAmount
Inventory.Icon "ARTIBMAN"
Inventory.PickupSound "misc/p_pkup"
Inventory.PickupMessage "$TXT_ARTIBOOSTMANA"
Tag "$TAG_ARTIBOOSTMANA"
States
{
Spawn:
BMAN A -1
Stop
Use:
TNT1 A 0 A_GiveInventory("RifleAmmo", 300)
TNT1 A 0 A_GiveInventory("Shells", 100)
TNT1 A 0 A_GiveInventory("Nato", 500)
TNT1 A 0 A_GiveInventory("RocketAmmo", 100)
TNT1 A 0 A_GiveInventory("Cells", 100)
Stop
}
}