diff --git a/src/script/BJ_Casino_Bot_Lobby.ts b/src/script/BJ_Casino_Bot_Lobby.ts index 6e65324..8fe1b4c 100644 --- a/src/script/BJ_Casino_Bot_Lobby.ts +++ b/src/script/BJ_Casino_Bot_Lobby.ts @@ -82,7 +82,7 @@ export class BJ_Casino_Bot_Lobby { } await this._loadJSON(slot); this.IsSlotIn.value = true; - let table: number = 1; + let table: number = 0; let req: SeatListRequest = new SeatListRequest(hall, slot); await req.SendAsync(true); let resp: INetResponse = req.Result; @@ -91,19 +91,25 @@ export class BJ_Casino_Bot_Lobby { return; } let data: any = resp.Data; + let alternate: number = 0; for (let i: number = 0; i < data.length; i++) { const element: any = data[i]; + const freegameNotGetCount: number = +element[2][0]; if (element[0].length > 0) { let aid: string = element[0][0]; if (+aid === +this._bj_Casino_Bot.UserData.AID) { - table = i + 1; - break; + alternate = i + 1; } - } else { + } else if (freegameNotGetCount === 0) { table = i + 1; break; + } else if (alternate === 0) { + alternate = i + 1; } } + if (table === 0) { + table = alternate; + } let resp_slotIn: any = await this._slotIn(hall, slot, table); if (!resp_slotIn.IsValid) { this.IsSlotIn.value = false; @@ -154,7 +160,7 @@ export class BJ_Casino_Bot_Lobby { await req.SendAsync(true); let resp: INetResponse = req.Result; if (resp.IsValid) { - this._bj_Casino_Bot.AddLog(`進機台成功 slot: ${slot}, hall: ${this.LobbyCongig[1][hall - 1]}, table: ${uid}`); + this._bj_Casino_Bot.AddLog(`進機台成功 slot: ${slot}, 廳館: ${this.LobbyCongig[1][hall - 1]}, 桌號: ${uid}`); } else { switch (resp.Status) { case 11: diff --git a/進度表.txt b/進度表.txt index 0868971..b57d68a 100644 --- a/進度表.txt +++ b/進度表.txt @@ -1,5 +1,4 @@ -1. 自動入桌選擇沒人玩的 -2. 沒錢變顏色 -3. 自動帶入帳號登入 -4. 自動設定全部行為 -5. 多個模板 \ No newline at end of file +1. 沒錢變顏色 +2. 自動帶入帳號登入 +3. 自動設定全部行為 +4. 多個模板 \ No newline at end of file