|
|
@@ -37,12 +37,13 @@ window.onInterceptedData = function (data) {
|
|
|
}
|
|
|
if (data.url.includes('https://utas.mob.v5.prd.futc-ext.gcp.ea.com/ut/game/fc26/trade/') && data.url.includes('/bid')) {
|
|
|
const result4 = JSON.parse(data.responseBody)
|
|
|
- if (window.logBox) window.logBox.add(`买入物品:${result4.auctionInfo[0].tradeId}`)
|
|
|
+ if (window.logBox) window.logBox.add(`新库存物品:${result4.auctionInfo[0].tradeId}`)
|
|
|
window.userSt[result4.auctionInfo[0].itemData.id] = result4.auctionInfo[0].itemData
|
|
|
}
|
|
|
};
|
|
|
|
|
|
|
|
|
+
|
|
|
let owoLoadList = []
|
|
|
function loadCSS (url) {
|
|
|
if (owoLoadList.includes(url)) {
|
|
|
@@ -222,9 +223,9 @@ function owoSocket(typeStr, options) {
|
|
|
|
|
|
function searchItem(itemInfo, callBack) {
|
|
|
// 查找ID
|
|
|
- window.logBox.add(`查找卡片:${itemInfo.assetId}`)
|
|
|
- // window.logBox.add(`开始购买:${JSON.stringify(playerInfo)}`)
|
|
|
- fetch(`https://utas.mob.v4.prd.futc-ext.gcp.ea.com/ut/game/fc26/transfermarket?num=21&start=0&type=player&maskedDefId=${itemInfo.assetId}&maxb=${itemInfo.buyNowPrice}`, {
|
|
|
+
|
|
|
+ window.logBox.add(`开始购买:${JSON.stringify(playerInfo)}`)
|
|
|
+ fetch(`https://utas.mob.v5.prd.futc-ext.gcp.ea.com/ut/game/fc26/transfermarket?num=21&start=0&type=player&maskedDefId=${itemInfo.assetId}&minb=${itemInfo.buyNowPrice}&maxb=${itemInfo.buyNowPrice + 50}`, {
|
|
|
"headers": {
|
|
|
"accept": "*/*",
|
|
|
"accept-language": "zh-CN",
|
|
|
@@ -240,11 +241,12 @@ function searchItem(itemInfo, callBack) {
|
|
|
result.auctionInfo.forEach(element => {
|
|
|
resp += `[${element.itemData.id}]`
|
|
|
if(element.itemData.id == itemInfo.id) {
|
|
|
+ window.logBox.add(`获取到商品ID:${element.tradeId}`)
|
|
|
callBack(element.tradeId)
|
|
|
return
|
|
|
}
|
|
|
});
|
|
|
- window.logBox.add(resp)
|
|
|
+ // window.logBox.add(resp)
|
|
|
})
|
|
|
.catch((error) => console.error(error));
|
|
|
|
|
|
@@ -259,8 +261,9 @@ wsOptions.messageCallBack = (meg) => {
|
|
|
console.log(meg);
|
|
|
window.logBox.add(JSON.stringify(meg))
|
|
|
if (window.running) {
|
|
|
+ window.logBox.add(`购买:${meg.value.assetId} 价格-${meg.value.buyNowPrice}`)
|
|
|
searchItem(meg.value, (tradeId) => {
|
|
|
- window.logBox.add(`下单购买:${tradeId}`)
|
|
|
+ window.logBox.add(`成功:${meg.value.assetId} 价格-${meg.value.buyNowPrice}`)
|
|
|
fetch(`https://utas.mob.v5.prd.futc-ext.gcp.ea.com/ut/game/fc26/trade/${tradeId}/bid`, {
|
|
|
"headers": {
|
|
|
"accept": "*/*",
|
|
|
@@ -276,7 +279,6 @@ wsOptions.messageCallBack = (meg) => {
|
|
|
}).then((response) => response.text())
|
|
|
.then((result) => {
|
|
|
if (result.includes('auctionInfo')) {
|
|
|
- window.logBox.add(`${meg.value.id}购买成功!`)
|
|
|
return
|
|
|
}
|
|
|
window.logBox.add(result)
|
|
|
@@ -284,6 +286,8 @@ wsOptions.messageCallBack = (meg) => {
|
|
|
.catch((error) => console.error(error));
|
|
|
})
|
|
|
|
|
|
+ } else {
|
|
|
+ window.logBox.add('当前未开启自动下单!')
|
|
|
}
|
|
|
}
|
|
|
window.owoSocket = new owoSocket('eaGame', wsOptions)
|