// Scripts file for changing colors based on your weapon
#include "zcommon.acs"
#library "wcolors"

#DEFINE MEGABUSTER 0
#DEFINE BUBBLELEAD 1
#DEFINE LEAFSHIELD 2
#DEFINE ATOMICFIRE 3
#DEFINE SHADOWBLADE 4
#DEFINE NAPALMBOMB 5
#DEFINE AIRSHOOTER 6
#DEFINE HYPERBOMB 7
#DEFINE MAGNETMISSILE 8
#DEFINE TOPSPIN 9
#DEFINE NEEDLECANNON 10
#DEFINE GEMINILASER 11
#DEFINE SEARCHSNAKE 12
#DEFINE TIMESTOPPER 13
#DEFINE SUPERARM 14
#DEFINE ICESLASHER 15
#DEFINE THUNDERBEAM 16
#DEFINE METALBLADE 17
#DEFINE HARDKNUCKLE 18
#DEFINE DRILLBOMB 19
#DEFINE BLIZZARDATTACK 20
#DEFINE FIRESTORM 21
#DEFINE QUICKBOOMERANG 22
#DEFINE CRASHBOMB 23
#DEFINE CHARGEKICK 24
#DEFINE ROLLINGCUTTER 25
#DEFINE SPARKSHOCK 26
#DEFINE RINGBOOMERANG 27
#DEFINE GYROATTACK 28
#DEFINE POWERSTONE 29
#DEFINE DUSTCRUSHER 30
#DEFINE PHARAOHSHOT 31
#DEFINE WATERWAVE 32
#DEFINE CRYSTALEYE 33
#DEFINE SKULLBARRIER 34
#DEFINE FLAMEBLAST 35
#DEFINE PROTOBUSTER 36
#DEFINE YAMATOSPEAR 37
#DEFINE DIVEMISSILE 38
#DEFINE PLANTBARRIER 39
#DEFINE SILVERTOMAHAWK 40
#DEFINE WINDSTORM 41
#DEFINE KNIGHTCRUSH 42
#DEFINE STARCRASH 43
#DEFINE RAINFLUSH 44
#DEFINE SAKUGARNE 45
#DEFINE BASSBUSTER 46
#DEFINE BALLADECRACKER 47
#DEFINE SCREWCRUSHER 48
#DEFINE FLASHSTOPPER 49
#DEFINE GRAVITYHOLD 50
#DEFINE CENTAURFLASH 51
#DEFINE MIRRORBUSTER 52

#DEFINE BALLADEREAL 53

#DEFINE ATOMICFIRECRG1 60
#DEFINE ATOMICFIRECRG2 61
#DEFINE ATOMICFIRECRG3 62

#DEFINE PROTOCHARGE1 63
#DEFINE PROTOCHARGE2 64

#DEFINE ENKERCHARGE1 65
#DEFINE ENKERCHARGE2 66

#DEFINE METALMANREAL 67

#DEFINE BOSSPAIN 68

#DEFINE FREEZECRACKER 54
#DEFINE NOISECRUSH 55
#DEFINE THUNDERBOLT 56
#DEFINE JUNKSHIELD 57
#DEFINE WILDCOIL 58
#DEFINE SCORCHWHEEL 59
#DEFINE SLASHCLAW 69
#DEFINE DANGERWRAP 70

#DEFINE NOISECRUSHCRG1 71
#DEFINE NOISECRUSHCRG2 72
#DEFINE NOISECRUSHCRG3 73

#DEFINE WILDCOILCRG1 74
#DEFINE WILDCOILCRG2 75
#DEFINE WILDCOILCRG3 76

#DEFINE SUPERADAPTOR 77
#DEFINE SUPERADAPTORCRG1 78
#DEFINE SUPERADAPTORCRG2 79
#DEFINE SUPERADAPTORCRG3 80


script 998 (int weap, int nosound)
{
if(nosound==0){LocalAmbientSound("menu/cursor",127);}
if(GetCvar("teamplay")==1){
if(PlayerTeam()==1){
Thing_SetTranslation(0, 48);}
terminate;}
if(GetCvar("teamlms")==1){
if(PlayerTeam()==1){
Thing_SetTranslation(0, 48);}
terminate;}
if(GetCvar("teampossession")==1){
if(PlayerTeam()==1){
Thing_SetTranslation(0, 48);}
terminate;}
if(GetCvar("ctf")==1){
if(PlayerTeam()==1){
Thing_SetTranslation(0, 48);}
terminate;}
if(GetCvar("oneflagctf")==1){
if(PlayerTeam()==1){
Thing_SetTranslation(0, 48);}
terminate;
}

Thing_SetTranslation(0, weap);
}

Script 993 OPEN
{
CreateTranslation (BUBBLELEAD, 192:192=4:4, 198:198=96:96);
CreateTranslation (LEAFSHIELD, 192:192=4:4, 198:198=114:114);
CreateTranslation (ATOMICFIRE, 192:192=217:217, 198:198=176:176);
CreateTranslation (ATOMICFIRECRG1, 192:192=217:217, 198:198=176:176, 0:2=196:196, 3:8=196:196, 243:247=196:196);
CreateTranslation (ATOMICFIRECRG2, 192:192=217:217, 198:198=194:194, 0:2=217:217, 3:8=217:217, 243:247=217:217);
CreateTranslation (ATOMICFIRECRG3, 192:192=217:217, 198:198=4:4, 0:2=4:4, 3:8=4:4, 243:247=4:4);
CreateTranslation (SHADOWBLADE, 192:192=250:250, 198:198=252:252);
CreateTranslation (NAPALMBOMB, 192:192=217:217, 198:198=201:201);
CreateTranslation (AIRSHOOTER, 192:192=4:4);
CreateTranslation (HYPERBOMB, 192:192=4:4, 198:198=112:112);
CreateTranslation (MAGNETMISSILE, 192:192=96:96, 198:198=176:176);
CreateTranslation (TOPSPIN, 192:192=210:210, 198:198=96:96);
CreateTranslation (NEEDLECANNON, 192:192=4:4, 198:198=218:218);
CreateTranslation (GEMINILASER, 192:192=4:4);
CreateTranslation (SEARCHSNAKE, 192:192=4:4, 198:198=114:114);
CreateTranslation (TIMESTOPPER, 192:192=250:250, 198:198=252:252);
CreateTranslation (SUPERARM, 192:192=4:4, 198:198=218:218);
CreateTranslation (ICESLASHER, 192:192=4:4);
CreateTranslation (THUNDERBEAM, 192:192=249:249, 198:198=96:96);
CreateTranslation (METALBLADE, 192:192=210:210, 198:198=164:164);
CreateTranslation (HARDKNUCKLE, 192:192=88:88, 198:198=200:200);
CreateTranslation (DRILLBOMB, 192:192=96:96, 198:198=176:176);
CreateTranslation (BLIZZARDATTACK, 192:192=4:4);
CreateTranslation (FIRESTORM, 192:192=217:217, 198:198=176:176);
CreateTranslation (QUICKBOOMERANG, 192:192=170:170, 198:198=173:173);
CreateTranslation (CRASHBOMB, 192:192=4:4, 198:198=172:172);
CreateTranslation (CHARGEKICK, 192:192=4:4, 198:198=172:172);
CreateTranslation (ROLLINGCUTTER, 192:192=4:4, 198:198=96:96);
CreateTranslation (SPARKSHOCK, 192:192=4:4, 198:198=172:172);
CreateTranslation (RINGBOOMERANG, 192:192=210:210, 198:198=164:164);
CreateTranslation (GYROATTACK, 192:192=4:4, 198:198=114:114);
CreateTranslation (POWERSTONE, 192:192=4:4, 198:198=167:167);
CreateTranslation (DUSTCRUSHER, 192:192=4:4, 198:198=96:96);
CreateTranslation (PHARAOHSHOT, 192:192=52:52, 198:198=172:172);
CreateTranslation (WATERWAVE, 192:192=4:4);
CreateTranslation (CRYSTALEYE, 192:192=4:4, 198:198=192:192);
CreateTranslation (SKULLBARRIER, 198:198=193:193);
CreateTranslation (FLAMEBLAST, 192:192=52:52, 198:198=172:172);
CreateTranslation (PROTOBUSTER, 192:192=87:87, 198:198=178:178);
CreateTranslation (PROTOCHARGE1, 192:192=87:87, 198:198=178:178, 0:2=253:253, 3:8=253:253, 243:247=253:253);
CreateTranslation (PROTOCHARGE2, 192:192=160:160, 198:198=148:148, 0:2=166:166, 3:8=204:166, 243:247=166:166);
CreateTranslation (YAMATOSPEAR, 192:192=4:4, 198:198=250:250);
CreateTranslation (DIVEMISSILE, 192:192=4:4);
CreateTranslation (PLANTBARRIER, 192:192=4:4, 198:198=173:173);
CreateTranslation (SILVERTOMAHAWK, 192:192=52:52, 198:198=218:218);
CreateTranslation (WINDSTORM, 192:192=4:4, 198:198=96:96);
CreateTranslation (KNIGHTCRUSH, 192:192=88:88, 198:198=200:200);
CreateTranslation (STARCRASH, 192:192=249:249, 198:198=218:218);
CreateTranslation (RAINFLUSH, 192:192=4:4, 198:198=112:112);
CreateTranslation (SAKUGARNE, 192:192=228:228, 198:198=121:121);
CreateTranslation (BASSBUSTER, 192:192=214:214, 198:198=99:99);
CreateTranslation (BALLADECRACKER, 192:192=231:231, 198:198=254:254);
CreateTranslation (SCREWCRUSHER, 192:192=16:16, 198:198=178:178);
CreateTranslation (FLASHSTOPPER, 192:192=4:4, 198:198=252:252);
CreateTranslation (GRAVITYHOLD, 192:192=4:4, 198:198=252:252);
CreateTranslation (CENTAURFLASH, 192:192=4:4, 198:198=114:114);
CreateTranslation (MIRRORBUSTER, 192:192=161:161, 198:198=199:199);
CreateTranslation (ENKERCHARGE1, 192:192=161:161, 198:198=199:199, 0:2=4:4, 3:8=4:4, 243:247=4:4);
CreateTranslation (ENKERCHARGE2, 192:192=161:161, 198:198=199:199, 0:2=196:204, 3:8=196:204, 243:247=204:204);
CreateTranslation (BALLADEREAL, 192:192=231:231, 198:198=254:254);
CreateTranslation (METALMANREAL, 192:192=231:231, 198:198=176:176);
CreateTranslation (FREEZECRACKER, 192:192=4:4);
CreateTranslation (NOISECRUSH, 192:192=197:197, 198:198=254:254);
CreateTranslation (NOISECRUSHCRG1, 192:192=197:197, 198:198=254:254, 0:2=112:112, 3:8=112:112, 243:247=112:112);
CreateTranslation (NOISECRUSHCRG2, 192:192=0:0, 198:198=197:197, 0:2=254:254, 3:8=254:254, 243:247=254:254);
CreateTranslation (NOISECRUSHCRG3, 192:192=254:254, 198:198=0:0, 0:2=197:197, 3:8=197:197, 243:247=197:197);
CreateTranslation (WILDCOIL, 192:192=112:112, 198:198=216:216);
CreateTranslation (WILDCOILCRG1, 192:192=112:112, 198:198=216:216, 0:2=172:172, 3:8=172:172, 243:247=172:172);
CreateTranslation (WILDCOILCRG2, 192:192=0:0, 198:198=112:112, 0:2=216:216, 3:8=216:216, 243:247=216:216);
CreateTranslation (WILDCOILCRG3, 192:192=216:216, 198:198=0:0, 0:2=112:112, 3:8=112:112, 243:247=112:112);
CreateTranslation (DANGERWRAP, 192:192=4:4, 198:198=64:64);
CreateTranslation (SCORCHWHEEL, 192:192=161:161, 198:198=220:220);
CreateTranslation (JUNKSHIELD, 192:192=196:196, 198:198=98:98);
CreateTranslation (SLASHCLAW, 192:192=162:162, 198:198=118:118);
CreateTranslation (THUNDERBOLT, 192:192=162:162, 198:198=199:199);
CreateTranslation (BOSSPAIN, 5:247=4:4,0:3=4:4);
CreateTranslation (SUPERADAPTOR, 192:192=4:4, 198:198=176:176);
CreateTranslation (SUPERADAPTORCRG1, 192:192=4:4, 198:198=176:176, 0:2=22:22, 3:8=22:22, 243:247=22:22);
CreateTranslation (SUPERADAPTORCRG2, 192:192=0:0, 198:198=176:176, 0:2=4:4, 3:8=4:4, 243:247=4:4);
CreateTranslation (SUPERADAPTORCRG3, 192:192=4:4, 198:198=0:0, 0:2=176:176, 3:8=176:176, 243:247=176:176);
}

Script 992 (int amount)
{
if(CheckWeapon("BubbleLeadWep")==1){GiveInventory("BubbleAmmo",amount);}
if(CheckWeapon("ShadowBladeWep")==1){GiveInventory("ShadowAmmo",amount);}
if(CheckWeapon("NapalmBombWep")==1){GiveInventory("NapalmAmmo",amount);}
if(CheckWeapon("AtomicFireWep")==1){GiveInventory("AtomicAmmo",amount+2);}
if(CheckWeapon("LeafShieldWep")==1){GiveInventory("LeafAmmo",amount);}
if(CheckWeapon("AirShooterWep")==1){GiveInventory("AirAmmo",amount);}
if(CheckWeapon("HyperBombWep")==1){GiveInventory("BombAmmo",amount+2);}
if(CheckWeapon("MagnetMissileWep")==1){GiveInventory("MagnetAmmo",amount);}
if(CheckWeapon("TopSpinWep")==1){GiveInventory("TopAmmo",amount);}
if(CheckWeapon("NeedleCannonWep")==1){GiveInventory("NeedleAmmo",amount);}
if(CheckWeapon("GeminiLaserWep")==1){GiveInventory("GeminiAmmo",amount);}
if(CheckWeapon("SearchSnakeWep")==1){GiveInventory("SnakeAmmo",amount);}
if(CheckWeapon("TimeStopperWep")==1){}
if(CheckWeapon("SuperArmWep")==1){GiveInventory("SuperArmAmmo",amount);}
if(CheckWeapon("IceSlasherWep")==1){GiveInventory("IceAmmo",amount);}
if(CheckWeapon("ThunderBeamWep")==1){GiveInventory("ThunderBeamAmmo",amount);}
if(CheckWeapon("MetalBladeWep")==1){GiveInventory("MetalBladeAmmo",amount);}
if(CheckWeapon("HardKnuckleWep")==1){GiveInventory("HardKnuckleAmmo",amount);}
if(CheckWeapon("DrillBombWep")==1){GiveInventory("DrillBombAmmo",amount);}
if(CheckWeapon("BlizzardAttackWep")==1){GiveInventory("BlizzardAttackAmmo",amount);}
if(CheckWeapon("FireStormWep")==1){GiveInventory("FireStormAmmo",amount);}
if(CheckWeapon("QuickBoomerangWep")==1){GiveInventory("QuickBoomerangAmmo",amount+4);}
if(CheckWeapon("CrashBombWep")==1){GiveInventory("CrashBombAmmo",amount+4);}
if(CheckWeapon("ChargeKickWep")==1){GiveInventory("ChargeKickAmmo",amount);}
if(CheckWeapon("RollingCutterWep")==1){GiveInventory("RollingCutterAmmo",amount);}
if(CheckWeapon("SparkShockWep")==1){GiveInventory("SparkShockAmmo",amount);}
if(CheckWeapon("RingBoomerangWep")==1){GiveInventory("RingBoomerangAmmo",amount);}
if(CheckWeapon("GyroAttackWep")==1){GiveInventory("GyroAttackAmmo",amount);}
if(CheckWeapon("PowerStoneWep")==1){GiveInventory("PowerStoneAmmo",amount);}
if(CheckWeapon("DustCrusherWep")==1){GiveInventory("DustCrusherAmmo",amount);}
if(CheckWeapon("PharaohShotWep")==1){GiveInventory("PharaohShotAmmo",amount);}
if(CheckWeapon("WaterWaveWep")==1){GiveInventory("WaterWaveAmmo",amount);}
if(CheckWeapon("CrystalEyeWep")==1){GiveInventory("CrystalEyeAmmo",amount);}
if(CheckWeapon("SkullBarrierWep")==1){GiveInventory("SkullBarrierAmmo",amount);}
if(CheckWeapon("FlameBlastWep")==1){GiveInventory("FlameBlastAmmo",amount);}
if(CheckWeapon("YamatoSpearWep")==1){GiveInventory("YamatoSpearAmmo",amount);}
if(CheckWeapon("DiveMissileWep")==1){GiveInventory("DiveMissileAmmo",amount);}
if(CheckWeapon("PlantBarrierWep")==1){GiveInventory("PlantBarrierAmmo",amount);}
if(CheckWeapon("SilverTomahawkWep")==1){GiveInventory("SilverTomahawkAmmo",amount);}
if(CheckWeapon("WindStormWep")==1){GiveInventory("WindStormAmmo",amount);}
if(CheckWeapon("KnightCrushWep")==1){GiveInventory("KnightCrushAmmo",amount);}
if(CheckWeapon("StarCrashWep")==1){GiveInventory("StarCrashAmmo",amount);}
if(CheckWeapon("RainFlushWep")==1){GiveInventory("RainFlushAmmo",amount);}
if(CheckWeapon("SakugarneWep")==1){GiveInventory("SakugarneAmmo",amount);}
if(CheckWeapon("BalladeCrackerWep")==1){GiveInventory("BalladeCrackerAmmo",amount);}
if(CheckWeapon("ScrewCrusherWep")==1){GiveInventory("ScrewCrusherAmmo",amount);}
if(CheckWeapon("FlashStopperWep")==1){GiveInventory("FlashStopperAmmo",amount);}
if(CheckWeapon("GravityHoldWep")==1){GiveInventory("GravityHoldAmmo",amount);}
if(CheckWeapon("CentaurFlashWep")==1){GiveInventory("CentaurFlashAmmo",amount);}
if(CheckWeapon("MirrorBusterWep")==1){GiveInventory("MirrorBusterAmmo",amount);}
if(CheckWeapon("FreezeCrackerWep")==1){GiveInventory("FreezeCrackerAmmo",amount);}
if(CheckWeapon("NoiseCrushWep")==1){GiveInventory("NoiseCrushAmmo",amount);}
if(CheckWeapon("WildCoilWep")==1){GiveInventory("WildCoilAmmo",amount);}
if(CheckWeapon("DangerWrapWep")==1){GiveInventory("DangerWrapAmmo",amount);}
if(CheckWeapon("ScorchWheelWep")==1){GiveInventory("ScorchWheelAmmo",amount);}
if(CheckWeapon("JunkShieldWep")==1){GiveInventory("JunkShieldAmmo",amount);}
if(CheckWeapon("SlashClawWep")==1){GiveInventory("SlashClawAmmo",amount);}
if(CheckWeapon("ThunderBoltWep")==1){GiveInventory("ThunderBoltAmmo",amount);}
}