1
0
mirror of synced 2024-12-04 19:17:58 +01:00

Merge pull request #1 from doomertheboomer/master

add hardcoded car profile, works in terminal but wont work in the drive cab????
This commit is contained in:
Rin 2022-07-14 07:41:28 +01:00 committed by GitHub
commit 5c970fc962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,13 +21,91 @@ export default class GameModule extends Module {
r.send(Buffer.from(end));
})
//banapass loading
app.post('/method/load_user', (req, res) => {
//terminal specific
app.post('/method/load_terminal_information', (req, res) => {
let msg = {
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
prizeReceivable: false,
transferNotice: {
needToSeeTransferred: false
},
announceFeature: false,
freeScratched: true
}
let resp = wm.wm.protobuf.LoadDriveInformationResponse.encode(msg);
let end = resp.finish();
let r = res
.header('Server', 'v388 wangan')
.header('Content-Type', 'application/x-protobuf; revision=8053')
.header('Content-Length', end.length.toString())
.status(200);
r.send(Buffer.from(end));
})
//banapass loading
app.post('/method/load_user', (req, res) => {
//everything after this should be replaced with values from a database, but thats above my pay grade :P
let msg = {
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
accessCode: "12345678901234567890",
banapassportAmId: 0,
mbid: 0,
userId: 0,
numOfOwnedCars: 1,
spappState: 0,
transferState: 0,
cars: [
{
carId: 8,
userId: 0,
regionId: 0,
name: "a",
manufacturer: 0,
model: 0,
visualModel: 8,
defaultColor: 0,
customColor: 0,
wheel: 0,
wheelColor: 0,
aero: 0,
bonnet: 0,
wing: 0,
mirror: 0,
neon: 0,
trunk: 0,
plate: 0,
plateColor: 0,
plateNumber: 0,
tunePower: 17,
tuneHandling: 17,
title: "Beli Kabel LAN",
level: 0,
windowSticker: false,
rivalMarker: 0,
lastPlayedAt: 0,
aura: 0,
auraMotif: 0,
ghostLevel: 0,
country: "JPN",
searchCode: "a",
},
],
carStates: [
{
hasOpponentGhost: false,
toBeDeleted: false,
eventJoined: false,
transferred: true,
driveLastPlayedAt: 0,
},
],
unusedCarTickets: [
{
category: wm.wm.protobuf.ItemCategory.CAT_CAR_TICKET,
itemId: 0,
},
],
}
let resp = wm.wm.protobuf.LoadUserResponse.encode(msg);
let end = resp.finish();
@ -42,6 +120,10 @@ export default class GameModule extends Module {
app.post('/method/load_drive_information', (req, res) => {
let msg = {
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
transferNotice: {
needToSeeTransferred: false,
},
}
let resp = wm.wm.protobuf.LoadDriveInformationResponse.encode(msg);
let end = resp.finish();
@ -53,6 +135,132 @@ export default class GameModule extends Module {
r.send(Buffer.from(end));
})
app.post('/method/load_car', (req, res) => {
let msg = {
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
//everything after this should be replaced with values from a database, but thats above my pay grade :P
car: {
carId: 8,
userId: 0,
regionId: 0,
name: "a",
manufacturer: 0,
model: 0,
visualModel: 8,
defaultColor: 0,
customColor: 0,
wheel: 0,
wheelColor: 0,
aero: 0,
bonnet: 0,
wing: 0,
mirror: 0,
neon: 0,
trunk: 0,
plate: 0,
plateColor: 0,
plateNumber: 0,
tunePower: 17,
tuneHandling: 17,
title: "Beli Kabel LAN",
level: 0,
windowSticker: false,
rivalMarker: 0,
lastPlayedAt: 0,
aura: 0,
auraMotif: 0,
ghostLevel: 0,
country: "JPN",
searchCode: "a",
},
tuningPoint: 34,
odometer: 0,
playCount: 10,
earnedCustomColor: false,
setting:
{
view: false,
transmission: false,
retire: true,
meter: 1,
navigationMap: true,
volume: 1,
bgm: 0,
nameplate: 0,
nameplateColor: 0,
terminalBackground: 0,
},
vsPlayCount: 69699696,
vsBurstCount: 69696969,
vsStarCount: 696969,
vsStarCountMax: 6969696,
vsCoolOrWild: 0,
vsSmoothOrRough: 0,
vsTripleStarMedals: 69699696,
vsDoubleStarMedals: 0,
vsSingleStarMedals: 0,
vsPlainMedals: 0,
rgPlayCount: 696996,
rgWinCount: 69696969,
rgTrophy: 453453,
rgPreviousVersionPlayCount: 0,
rgScore: 0,
rgStamp: 12345,
rgAcquireAllCrowns: true,
dressupLevel: 63,
dressupPoint: 0,
stPlayCount: 0,
stClearBits: 0,
stClearDivCount: 0,
stClearCount: 0,
stLoseBits: 0,
stConsecutiveWins: 699999,
stConsecutiveWinsMax: 420,
stCompleted_100Episodes: false,
auraMotifAutoChange: false,
screenshotCount: 0,
transferred: true,
}
let resp = wm.wm.protobuf.LoadCarResponse.encode(msg);
let end = resp.finish();
let r = res
.header('Server', 'v388 wangan')
.header('Content-Type', 'application/x-protobuf; revision=8053')
.header('Content-Length', end.length.toString())
.status(200);
r.send(Buffer.from(end));
})
app.post('/method/load_stamp_target', (req, res) => {
let msg = {
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
}
let resp = wm.wm.protobuf.LoadStampTargetResponse.encode(msg);
let end = resp.finish();
let r = res
.header('Server', 'v388 wangan')
.header('Content-Type', 'application/x-protobuf; revision=8053')
.header('Content-Length', end.length.toString())
.status(200);
r.send(Buffer.from(end));
})
app.post('/method/save_scratch_sheet', (req, res) => {
let msg = {
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
currentSheet: 0,
numOfScratched: 0,
}
let resp = wm.wm.protobuf.SaveScratchSheetResponse.encode(msg);
let end = resp.finish();
let r = res
.header('Server', 'v388 wangan')
.header('Content-Type', 'application/x-protobuf; revision=8053')
.header('Content-Length', end.length.toString())
.status(200);
r.send(Buffer.from(end));
})
app.post('/method/create_car', (req, res) => {
let msg = {
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
@ -166,4 +374,4 @@ export default class GameModule extends Module {
r.send(Buffer.from(end));
})
}
}
}