/* *
DESTINY AMMO Purchase
by xenologer
use:
buy heavy ammo from Xur
sell heavy ammo to Faction Vendor
as Destiny only allows single item purchase at a time (no mass quantity purchase)
buying and selling ammo is time consuming
this script automates the process
DPAD DOWN to auto buy
DPAD UP to auto sell
simply place your Cursor over the Heavy Ammo Icon then activate DPAD
moving the cursor or touching DPAD again will abort operations
*/
int enable;
int mode;
main {
if(event_press(PS4_UP)){
enable=!enable;
mode=1;
combo_stop(fast);
combo_stop(slow);
}
if(event_press(PS4_DOWN)){
enable=!enable;
mode=0;
combo_stop(fast);
combo_stop(slow);
}
//abort if move stick
if(abs(get_val(PS4_LX))>10 || abs(get_val(PS4_LY))>10){
enable=0;
combo_stop(fast);
combo_stop(slow);
}
if(enable){
if(mode)combo_run(fast);
else combo_run(slow);
}else
reset_leds();
}
combo slow{
set_val(PS4_CROSS,100);
LED(0,1,0,0);
wait(2200);
set_val(PS4_CROSS,0);
wait(100);
}
combo fast{
set_val(PS4_CROSS,100);
LED(0,1,0,0);
wait(50);
set_val(PS4_CROSS,0);
wait(50);
}
//blue,red,green,purple
function LED(a, b, c, d){
set_led(0, a);
set_led(1, b);
set_led(2, c);
set_led(3, d);
}