2 bugs / farm and bandit
This commit is contained in:
@@ -62,13 +62,17 @@ async function autoBootcampLoop() {
|
||||
const isFavor = reward.power_id?.includes('favor');
|
||||
const stashable = reward.stashable;
|
||||
|
||||
if (isInstant && !isFavor) {
|
||||
const useReward = () => {
|
||||
uw.gpAjax.ajaxPost('frontend_bridge', 'execute', {
|
||||
model_url: `PlayerAttackSpot/${player_id}`,
|
||||
action_name: 'useReward',
|
||||
arguments: {}
|
||||
});
|
||||
await botLog(player_id, world_id, 'bootcamp', 'Διεκδίκηση αμοιβής ληστών...');
|
||||
botLog(player_id, world_id, 'bootcamp', `Reward used: ${reward.power_id}`);
|
||||
};
|
||||
|
||||
if (isInstant && !isFavor) {
|
||||
useReward();
|
||||
} else if (stashable) {
|
||||
uw.gpAjax.ajaxPost('frontend_bridge', 'execute', {
|
||||
model_url: `PlayerAttackSpot/${player_id}`,
|
||||
@@ -78,22 +82,10 @@ async function autoBootcampLoop() {
|
||||
success: () => {
|
||||
botLog(player_id, world_id, 'bootcamp', `Reward stashed: ${reward.power_id}`);
|
||||
},
|
||||
error: () => {
|
||||
uw.gpAjax.ajaxPost('frontend_bridge', 'execute', {
|
||||
model_url: `PlayerAttackSpot/${player_id}`,
|
||||
action_name: 'useReward',
|
||||
arguments: {}
|
||||
});
|
||||
botLog(player_id, world_id, 'bootcamp', 'Αποτυχία διεκδίκησης αμοιβής.');
|
||||
}
|
||||
error: useReward
|
||||
});
|
||||
} else {
|
||||
uw.gpAjax.ajaxPost('frontend_bridge', 'execute', {
|
||||
model_url: `PlayerAttackSpot/${player_id}`,
|
||||
action_name: 'useReward',
|
||||
arguments: {}
|
||||
});
|
||||
await botLog(player_id, world_id, 'bootcamp', `Reward used (fallback): ${reward.power_id}`);
|
||||
useReward();
|
||||
}
|
||||
await sleep(randInt(3000, 7000));
|
||||
return; // Wait for next cycle to attack
|
||||
|
||||
Reference in New Issue
Block a user