//  written by:
//      ______        ____________ ________ _______
//     / ____/\      /  __  __   //  __   //  _   /\
//    / /\___\___   /  /\/_/ /  //  /_/  //  //  / /
//   / /_/ /\/__/\ /  / /\_\/  //  __   //  //  / /
//  /_____/ /\__\//__/ /   /__//__/ /__//__//__/ /
//  \_____\/      \__\/    \__\\__\/\__\\__\\__\/
//
//  Advanced Scripter 
// 
text === BUY BOT: SMG ===
echo === BUY BOT: SMG ===
alias siground "exec buybots/smg"

buyoption
later 0.5 "part1;buyoption"
later 0.7 "part2;buyoption"
later 0.9 "part3;buyoption"

// part1: primary weapon
alias part1 "if hasno p90 if hasno ump45 if hasno mp5navy if hasno mac10 if hasno tmp buyprimary"
alias buyprimary   "if is ct buyprimaryCT else buyprimaryT"
alias buyprimaryCT "if money>= 2350 p90 else if money>= 1700 ump45 else if money>= 1500 mp5 else if money>= 1250 tmp   else echo need at least &r1250$&a for tmp"
alias buyprimaryT  "if money>= 2350 p90 else if money>= 1700 ump45 else if money>= 1500 mp5 else if money>= 1400 mac10 else echo need at least &r1400$&a for mac10"

// part 2: primary ammo, defuse + deagle (only if targeted weapon available)
alias part2 "ammo1;defuse;if money>= 650 if has glock18 buysecondary"
alias buysecondary "if has ump45 handgun;if has p90 handgun;if has mp5navy handgun;if has mac10 handgun;if has tmp handgun"
alias handgun "deagle"

// part 3: secondary ammo, grenades, vest
alias part3    "ammo2;buyextra;clmenu"
alias buyextra "if has ump45 grenvest;if has p90 grenvest;if has mp5navy grenvest;if has mac10 grenvest;if has tmp grenvest" 
alias grenvest "allgran; if armor< 50 fullvest"


