diff --git a/bot_modules/04c_execute_bootcamp_trade.js b/bot_modules/04c_execute_bootcamp_trade.js index 1883f6b..42c94b7 100644 --- a/bot_modules/04c_execute_bootcamp_trade.js +++ b/bot_modules/04c_execute_bootcamp_trade.js @@ -73,6 +73,16 @@ async function autoBootcampLoop() { model_url: `PlayerAttackSpot/${player_id}`, action_name: 'stashReward', arguments: {} + }, 0, { + error: () => { + // If stash fails (e.g. inventory is full), fall back to using it immediately + uw.gpAjax.ajaxPost('frontend_bridge', 'execute', { + model_url: `PlayerAttackSpot/${player_id}`, + action_name: 'useReward', + arguments: {} + }); + botLog(player_id, 'bootcamp', `Reward used (inventory full fallback): ${reward.power_id}`); + } }); await botLog(player_id, 'bootcamp', `Reward stashed: ${reward.power_id}`); } else {