//===========================================================
// TRADER MAIN LIST ACS FILE
//
// Decides what weapons are in the trader
//===========================================================

#library "traderlist"

//=====================================================
// DO NOT DIRECTLY MODIFY THESE VARIABLES
//=====================================================
global int 30:availableWeapons;

// Display name
global str 31:traderDisplayName[];
// Actor name
global str 32:traderActorName[];
// Price
global int 33:traderPrice[];
// Buypic
global str 34:traderBuyPicture[];
// Description
global str 35:traderDescription[];
// Weapon type
global str 36:traderWeaponType[];
// Attachment name
global str 37:traderAttachName[];
// Discount actor
global str 38:traderDiscountActor[];
// Dual actor variant
global str 39:traderDualVariant[];
// Single actor variant
global str 40:traderSingleVariant[];
// Dual actor name
global str 41:traderDualName[];
// Whether or not this weapon has a dual variant
global int 42:traderIsDualies[];
// Is this weapon hidden?
global int 43:traderHidden[];

//=====================================================================
// v v v DO NOT CHANGE THESE FUNCTIONS v v v
//=====================================================================
// Initial trader add for a weapon
function void AddTraderWeapon(str dName)
{
	// Increase how many tracks we have
	availableWeapons ++;
	traderDisplayName[availableWeapons] = dName;
	traderSingleVariant[availableWeapons] = "None";
	traderDualVariant[availableWeapons] = "None";
	traderIsDualies[availableWeapons] = 0;
	traderHidden[availableWeapons] = 0;
	traderDualName[availableWeapons] = "DEFAULT";
	//Print(s:"(",d:availableWeapons,s:") Added weapon to the trader: \cK",s:dName);
}

// Set weapon actor
function void SetWeaponActor(str dActor)
{
	traderActorName[availableWeapons] = dActor;
	//Print(s:"(",d:availableWeapons,s:") Set weapon actor: \cD",s:dActor);
}

// Set weapon price
function void SetWeaponPrice(int dPrice)
{
	traderPrice[availableWeapons] = dPrice;
	//Print(s:"(",d:availableWeapons,s:") Set weapon price: \cD",d:dPrice);
}

// Set weapon buypic
function void SetWeaponBuypic(str dBuypic)
{
	traderBuyPicture[availableWeapons] = dBuypic;
	//Print(s:"(",d:availableWeapons,s:") Set weapon buypic: \cD",s:dBuypic);
}

// Set weapon description
function void SetWeaponDescription(str dDescription)
{
	traderDescription[availableWeapons] = dDescription;
	//Print(s:"(",d:availableWeapons,s:") Set weapon description: \cD",s:dDescription);
}

// Set weapon type
function void SetWeaponType(str dType)
{
	traderWeaponType[availableWeapons] = dType;
	//Print(s:"(",d:availableWeapons,s:") Set weapon type: \cD",s:dType);
}

// Set weapon attachment
function void SetWeaponAttach(str dAttach)
{
	traderAttachName[availableWeapons] = dAttach;
	//Print(s:"(",d:availableWeapons,s:") Set weapon attach type: \cD",s:dAttach);
}

// Set weapon discount actor
function void SetWeaponDiscounter(str dDiscount)
{
	traderDiscountActor[availableWeapons] = dDiscount;
	//Print(s:"(",d:availableWeapons,s:") Set weapon discounter: \cD",s:dDiscount);
}

// Set weapon dual variant
function void SetWeaponDualVar(str dDual)
{
	SetWeaponSingleVar(traderActorName[availableWeapons]);
	traderDualVariant[availableWeapons] = dDual;
	//Print(s:"(",d:availableWeapons,s:") Set weapon dual var: \cD",s:dDual);
}

// Set weapon dual variant
function void SetWeaponSingleVar(str dSingle)
{
	traderSingleVariant[availableWeapons] = dSingle;
	//Print(s:"(",d:availableWeapons,s:") Set weapon single var: \cD",s:dSingle);
}

// Set weapon dual name
function void SetWeaponDualName(str dDualN)
{
	traderDualName[availableWeapons] = dDualN;
	//Print(s:"(",d:availableWeapons,s:") Set weapon dual name: \cD",s:dDualN);
}

// Set weapon hidden
function void SetWeaponHidden(int dHidden)
{
	traderHidden[availableWeapons] = dHidden;
	//Print(s:"(",d:availableWeapons,s:") Set weapon actor: \cD",s:dHidden);
}

//=====================================================================
// ^ ^ ^ DO NOT CHANGE THESE FUNCTIONS ^ ^ ^
//=====================================================================

// Adds weapons to the trader
script 791 OPEN
{
	availableWeapons = -1;
	
	//---MP5 SUBMACHINE GUN----------------------------------------
	AddTraderWeapon("MP5 Submachine Gun");
	SetWeaponActor("MP5 Submachine Gun");
	SetWeaponPrice(800);
	SetWeaponBuypic("BUYPIC03");
	SetWeaponDescription("The Heckler & Koch MP5 is one of the\nmost widely used submachine guns in the\nworld, having been adopted by 40 nations and\nnumerous military, law enforcement, \nintelligence, and security organizations.");
	SetWeaponType("SMG");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Commando");
	
	//---PUMP SHOTGUN----------------------------------------------
	AddTraderWeapon("Pump Shotgun");
	SetWeaponActor("Pump Shotgun");
	SetWeaponPrice(1300);
	SetWeaponBuypic("BUYPIC04");
	SetWeaponDescription("A standard-issue pump shotgun, equipped\nwith a side holder for extra shells. It\nlooks like one wielded by a well-known\nbadass.");
	SetWeaponType("Shotgun");
	SetWeaponAttach("Dragon");
	SetWeaponDiscounter("Perk_Juggernaut");
	
	//---ZED'S LOBOTOMIZER-----------------------------------------
	AddTraderWeapon("Zed's Lobotomizer");
	SetWeaponActor("Zed's Lobotomizer");
	SetWeaponPrice(1800);
	SetWeaponBuypic("BUYPIC05");
	SetWeaponDescription("The Lobotomizer, perfect for the sniper who\ndreams of becoming a doctor.\n\n\cGPerfect for brain surgery.");
	SetWeaponType("Sniper");
	SetWeaponAttach("Thermal");
	SetWeaponDiscounter("Perk_Rifleman");
	
	//---PPSH-41---------------------------------------------------
	AddTraderWeapon("PPSH-41");
	SetWeaponActor("PPSH-41");
	SetWeaponPrice(600);
	SetWeaponBuypic("BUYPIC00");
	SetWeaponDescription("The PPSh-41 is a Soviet submachine gun designed \nby Georgi Shpagin as a cheap, simplified\nalternative to the PPD-40.");
	SetWeaponType("SMG");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Commando");
	
	//---STEN MK II------------------------------------------------
	AddTraderWeapon("Sten Mk. II");
	SetWeaponActor("Sten MK II");
	SetWeaponPrice(700);
	SetWeaponBuypic("BUYPIC01");
	SetWeaponDescription("The STEN was a family of British 9mm\nsubmachine guns used extensively by British\nand  Commonwealth forces throughout World \nWar II and the Korean War, the Mark II \nbeing the most common.");
	SetWeaponType("SMG");
	SetWeaponAttach("Silencer");
	SetWeaponDiscounter("Perk_Commando");
	
	//---SPLAYER SSG-----------------------------------------------
	AddTraderWeapon("Splayer SSG");
	SetWeaponActor("Splayer SSG");
	SetWeaponPrice(2000);
	SetWeaponBuypic("BUYPIC18");
	SetWeaponDescription("A double-barreled shotgun with a different\ndesign, pushing the barrels up rather than\nsimply breaking open. Looks like something that\nwould be good to combat imps from\na hellish realm.");
	SetWeaponType("Shotgun");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Juggernaut");
	
	//---AA12 SHOTGUN----------------------------------------------
	AddTraderWeapon("AA12 Shotgun");
	SetWeaponActor("AA12 Shotgun");
	SetWeaponPrice(2400);
	SetWeaponBuypic("BUYPIC06");
	SetWeaponDescription("One of the most well-known and powerful shotguns on the \nmarket today, the AA12 is great for clearing out rooms of \nhostile terrorists. Or zombies.");
	SetWeaponType("Shotgun");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Juggernaut");
	
	//---M16A4 RIFLE-----------------------------------------------
	AddTraderWeapon("M16A4 Rifle");
	SetWeaponActor("M16A4 Rifle");
	SetWeaponPrice(2400);
	SetWeaponBuypic("BUYPIC07");
	SetWeaponDescription("The M16A4 Rifle is one of the more powerful military assault\nrifles in existence. On top of this, it looks stylish. Great\nfor taking out single targets or several.");
	SetWeaponType("SMG");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Commando");
	
	//---M79 GRENADE LAUNCHER--------------------------------------
	AddTraderWeapon("M79 Grenade Launcher");
	SetWeaponActor("M79 Grenade Launcher");
	SetWeaponPrice(5600);
	SetWeaponBuypic("BUYPIC08");
	SetWeaponDescription("The M79 Grenade Launcher, or Thumper, is a classic single-shot\ngrenade launcher that has been around for ages. Not only\ndoes it look nice, but it packs a punch too.");
	SetWeaponType("Rocketlauncher");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Demo");
	
	//---C4 KIT----------------------------------------------------
	AddTraderWeapon("C4 Kit");
	SetWeaponActor("C4 Kit");
	SetWeaponPrice(2000);
	SetWeaponBuypic("BUYPIC09");
	SetWeaponDescription("C4 is always a fun thing to have around. The Demolitionist's C4\nkit is a great tool for making explosions from a distance,\nor setting traps. Throw, click, boom.");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Demo");
	
	//---M2 FLAMETHROWER-------------------------------------------
	AddTraderWeapon("M2 Flamethrower");
	SetWeaponActor("Flamethrower");
	SetWeaponPrice(3500);
	SetWeaponBuypic("BUYPIC10");
	SetWeaponDescription("Whether or not owning a flamethrower is legal, the time of\nzombie apocalypses calls for an obligatory M2 Flamethrower in\nyour arsenal. \n\n\cIStart a disco inferno.");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Pyro");
	
	//---MP40------------------------------------------------------
	AddTraderWeapon("Maschinenpistole 40");
	SetWeaponActor("MP40");
	SetWeaponPrice(1500);
	SetWeaponBuypic("BUYPIC11");
	SetWeaponDescription("The Maschinenpistole 40 is an SMG of German design, small yet\npowerful for its size. It is a common weapon amongst German\nforces and is also popular around the world.");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Commando");
	SetWeaponDualVar("DualMP40s");
	
	//---KATANA---------------------------------------------------
	AddTraderWeapon("Katana");
	SetWeaponActor("Katana");
	SetWeaponPrice(500);
	SetWeaponBuypic("BUYPIC11");
	SetWeaponDescription("Test");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Commando");
	
	//---KATANA---------------------------------------------------
	AddTraderWeapon("Chainsaw");
	SetWeaponActor("DWChainsaw");
	SetWeaponPrice(2000);
	SetWeaponBuypic("BUYPIC12");
	SetWeaponDescription("Vroom vroom, saw saw. Rip, tear. Chainsaws aren't exactly\nmeant to be used on organic flesh, but it works well against\nhungry zombies. Cut them to little gibby pieces!");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Commando");
	
	//---DUAL ORDER PISTOLS---------------------------------------
	AddTraderWeapon("Dual Order Pistols");
	SetWeaponActor("DualOrderPistols");
	SetWeaponPrice(1000);
	SetWeaponBuypic("BUYPIC14");
	SetWeaponDescription("Double the ammo, double the power. Double the speed. Double\neverything! Dual pistols also make you look like a cowboy badass. That's\ngreat, aside from you having to reload with one hand.");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Rifleman");
	SetWeaponSingleVar("Order Pistol");
	
	//---M1 GARAND------------------------------------------------
	AddTraderWeapon("M1 Garand");
	SetWeaponActor("M1Garand");
	SetWeaponPrice(2250);
	SetWeaponBuypic("BUYPIC15");
	SetWeaponDescription("Listen to that ping. The M1 Garand is a classic rifle, doing\neverything from close-range to long-range combat. Although it can only\nhold 8 rounds, the M1 continues to stand the test of time.");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Rifleman");
	
	//---MP7M MEDIC GUN-------------------------------------------
	AddTraderWeapon("H+K MP7");
	SetWeaponActor("MP7");
	SetWeaponPrice(2000);
	SetWeaponBuypic("BUYPIC16");
	SetWeaponDescription("Supposedly not fit for civilian use due to the fact that it\nfills anything you shoot at with holes. If you can afford magazines out\nthe ass, then the MP7 is a perfect weapon for you.");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Commando");
	
	//---SINGLE PISTOL (For upgrades)------------------------------
	AddTraderWeapon("Order Pistol");
	SetWeaponActor("Order Pistol");
	SetWeaponPrice(5);
	SetWeaponBuypic("BUYPIC14");
	SetWeaponDescription("");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Rifleman");
	SetWeaponHidden(1);
	
	//---SS-2 RAVAGER (M60)----------------------------------------
	AddTraderWeapon("SS-2 Ravager");
	SetWeaponActor("SS-2 Ravager");
	SetWeaponPrice(4000);
	SetWeaponBuypic("BUYPIC17");
	SetWeaponDescription("One of the most satisfying LMGs known to man, the SS-2\nRavager is your one-stop shop for spraying and praying needs. With a\nstandard capacity of 100 bullets, the SS2 is hell in a gun.");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Commando");
	
	//---RPG-7 ROCKET LAUNCHER-------------------------------------
	AddTraderWeapon("RPG-7");
	SetWeaponActor("RPG7");
	SetWeaponPrice(8000);
	SetWeaponBuypic("BUYPIC19");
	SetWeaponDescription("Become a dangerous threat to society today, get an\nRPG-7. It might have to reload after every shot, but the sheer power\nthat it has between each shot makes it more than worth it.");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Demo");
	
	//---CORPSE RAPER----------------------------------------------
	AddTraderWeapon("Corpse Raper");
	SetWeaponActor("RapeCannon");
	SetWeaponPrice(13000);
	SetWeaponBuypic("BUYPIC20");
	SetWeaponDescription("\cIKnow true power.\n\n\cKWield the Corpse Raper and smite all who oppose you. Destroy any\n\cKobstacle that dares to block your path. Blow it up, all of it.\n\n\cIBe a true demo.");
	SetWeaponType("None");
	SetWeaponAttach("None");
	SetWeaponDiscounter("Perk_Demo");
}