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

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


// part1: primary weapon
alias part1 "if hasno ak47  if hasno sg552   if hasno m4a1 if hasno aug buyprimary"
alias buyprimary   "if is ct buyprimaryCT else buyprimaryT"
alias buyprimaryCT "if money>= 3500 aug   else if money>= 3100 m4a1 else echo need at least &r3100$&a for m4"
alias buyprimaryT  "if money>= 3500 sg552 else if money>= 2500 ak47 else echo need at least &r2500$&a for ak""

// part 2: primary ammo, defuse + deagle (only if targeted weapon available)
alias part2 "ammo1;defuse;if money>= 650 if hasno deagle buysecondary"
alias buysecondary "if has m4a1 deagle; if has ak47 deagle; if has sg552 deagle; if has aug deagle"

// part 3: secondary ammo, grenades, vest
alias part3     "ammo2;if has m4a1 gren+vest;if has ak47 gren+vest; if has sg552 gren+vest; if has aug gren+vest; clmenu"
alias gren+vest "allgran; if armor< 50 fullvest;clmenu"


