[add] 自動入桌選擇沒人玩的(fs=0)

This commit is contained in:
建喵 2022-06-05 20:30:00 +08:00
parent 412da42efd
commit bdd124b229
2 changed files with 15 additions and 10 deletions

View File

@ -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<JSON> = req.Result;
@ -91,18 +91,24 @@ 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) {
alternate = i + 1;
}
} else if (freegameNotGetCount === 0) {
table = i + 1;
break;
} else if (alternate === 0) {
alternate = i + 1;
}
} else {
table = i + 1;
break;
}
if (table === 0) {
table = alternate;
}
let resp_slotIn: any = await this._slotIn(hall, slot, table);
if (!resp_slotIn.IsValid) {
@ -154,7 +160,7 @@ export class BJ_Casino_Bot_Lobby {
await req.SendAsync(true);
let resp: INetResponse<JSON> = 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:

View File

@ -1,5 +1,4 @@
1. 自動入桌選擇沒人玩的
2. 沒錢變顏色
3. 自動帶入帳號登入
4. 自動設定全部行為
5. 多個模板
1. 沒錢變顏色
2. 自動帶入帳號登入
3. 自動設定全部行為
4. 多個模板