figured out seibatu type and found pd for typ 4

This commit is contained in:
stratic-dev
2024-07-01 02:13:58 +01:00
parent 0f38c4b85d
commit 163444950c
7 changed files with 173 additions and 52 deletions

View File

@@ -17,12 +17,12 @@
"UploadQuality":100 "UploadQuality":100
}, },
"DeleteOnSaveCorruption": false, "DeleteOnSaveCorruption": false,
"ClientMode": "ZZ", "ClientMode": "G9.1",
"QuestCacheExpiry": 300, "QuestCacheExpiry": 300,
"CommandPrefix": "!", "CommandPrefix": "!",
"AutoCreateAccount": true, "AutoCreateAccount": true,
"DefaultCourses": [1, 23, 24], "DefaultCourses": [1, 23, 24],
"EarthStatus": 0, "EarthStatus": 21,
"EarthID": 0, "EarthID": 0,
"EarthMonsters": [0, 0, 0, 0], "EarthMonsters": [0, 0, 0, 0],
"SaveDumps": { "SaveDumps": {
@@ -32,18 +32,18 @@
}, },
"DebugOptions": { "DebugOptions": {
"CleanDB": false, "CleanDB": false,
"MaxLauncherHR": false, "MaxLauncherHR": true,
"LogInboundMessages": false, "LogInboundMessages": true,
"LogOutboundMessages": false, "LogOutboundMessages": true,
"LogMessageData": false, "LogMessageData": true,
"MaxHexdumpLength": 256, "MaxHexdumpLength": 99999999999,
"DivaOverride": 0, "DivaOverride": 0,
"FestaOverride": -1, "FestaOverride": -1,
"TournamentOverride": 0, "TournamentOverride": 0,
"DisableTokenCheck": false, "DisableTokenCheck": false,
"QuestTools": false, "QuestTools": true,
"AutoQuestBackport": true, "AutoQuestBackport": true,
"ProxyPort": 0, "ProxyPort": 8090,
"CapLink": { "CapLink": {
"Values": [51728, 20000, 51729, 1, 20000], "Values": [51728, 20000, 51729, 1, 20000],
"Key": "", "Key": "",
@@ -188,7 +188,7 @@
"Host": "localhost", "Host": "localhost",
"Port": 5432, "Port": 5432,
"User": "postgres", "User": "postgres",
"Password": "", "Password": "password",
"Database": "erupe" "Database": "erupe"
}, },
"Sign": { "Sign": {

View File

@@ -2,6 +2,7 @@ package mhfpacket
import ( import (
"errors" "errors"
"fmt"
"erupe-ce/common/byteframe" "erupe-ce/common/byteframe"
"erupe-ce/network" "erupe-ce/network"
@@ -28,6 +29,8 @@ func (m *MsgMhfGetPaperData) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clien
m.Type = bf.ReadUint32() m.Type = bf.ReadUint32()
m.Unk1 = bf.ReadUint32() m.Unk1 = bf.ReadUint32()
m.Unk2 = bf.ReadUint32() m.Unk2 = bf.ReadUint32()
fmt.Printf("MsgMhfGetPaperData: Type:[%d] Unk1:[%d] Unk2:[%d] \n\n", m.Type, m.Unk1, m.Unk2)
return nil return nil
} }

View File

@@ -2,6 +2,7 @@ package mhfpacket
import ( import (
"errors" "errors"
"fmt"
"erupe-ce/common/byteframe" "erupe-ce/common/byteframe"
"erupe-ce/network" "erupe-ce/network"
@@ -39,6 +40,11 @@ func (m *MsgMhfPresentBox) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientC
for i := uint32(0); i < m.Unk2; i++ { for i := uint32(0); i < m.Unk2; i++ {
m.Unk7 = append(m.Unk7, bf.ReadUint32()) m.Unk7 = append(m.Unk7, bf.ReadUint32())
} }
fmt.Printf("MsgMhfPresentBox: Unk0:[%d] Unk1:[%d] Unk2:[%d] Unk3:[%d] Unk4:[%d] Unk5:[%d] Unk6:[%d] \n\n", m.Unk0, m.Unk1, m.Unk2, m.Unk3, m.Unk4, m.Unk5, m.Unk6)
for _, mdata := range m.Unk7 {
fmt.Printf("MsgMhfPresentBox: Unk7: [%d] \n", mdata)
}
return nil return nil
} }

View File

@@ -1123,8 +1123,8 @@ func handleMsgMhfGetEarthValue(s *Session, p mhfpacket.MHFPacket) {
case 1: case 1:
earthValues = []EarthValues{ earthValues = []EarthValues{
// {Block, DureSlays, Unk, Unk, Unk, Unk} // {Block, DureSlays, Unk, Unk, Unk, Unk}
{[]uint32{1, 312, 0, 0, 0, 0}}, {[]uint32{1, 100, 0, 0, 0, 0}},
{[]uint32{2, 99, 0, 0, 0, 0}}, {[]uint32{2, 100, 0, 0, 0, 0}},
} }
case 2: case 2:
earthValues = []EarthValues{ earthValues = []EarthValues{

View File

@@ -1020,7 +1020,18 @@ func handleMsgMhfGetPaperData(s *Session, p mhfpacket.MHFPacket) {
switch pkt.Unk2 { switch pkt.Unk2 {
case 4: case 4:
//Triggers on Tower Menu Load and on Tower Quest Load //Triggers on Tower Menu Load and on Tower Quest Load
paperData = []PaperData{} paperData = []PaperData{
//Seen Monsters (id,on off, 0, 0, 0, 0, 0)
//Value is based on 2001 for monsters
{1011, 1, 0, 0, 0, 0, 0},
{1011, 2, 0, 0, 0, 0, 0},
//Seen Items (id,on off, 0, 0, 0, 0, 0)
//Value is based in 6001 for items
{1012, 1, 0, 0, 0, 0, 0},
{1012, 2, 0, 0, 0, 0, 0},
}
case 5: case 5:
//On load into MezePorta //On load into MezePorta
paperData = []PaperData{ paperData = []PaperData{
@@ -1057,7 +1068,7 @@ func handleMsgMhfGetPaperData(s *Session, p mhfpacket.MHFPacket) {
{1104, 2, 10, 9999, 40, 0, 0}, {1104, 2, 10, 9999, 40, 0, 0},
{1105, 1, 10, 500, 0, 0, 0}, {1105, 1, 10, 500, 0, 0, 0},
{1105, 2, 10, 500, 0, 0, 0}, {1105, 2, 10, 500, 0, 0, 0},
// setServerBoss {ID, Block, Monster, Unk, Unk, Index?, Points} // setServerBoss {ID, Block, Monster, Unk, Unk, Index, Points}
{2001, 1, mhfmon.Gravios, 58, 0, 6, 700}, {2001, 1, mhfmon.Gravios, 58, 0, 6, 700},
{2001, 1, mhfmon.Gypceros, 58, 0, 3, 200}, {2001, 1, mhfmon.Gypceros, 58, 0, 3, 200},
{2001, 1, mhfmon.Basarios, 58, 0, 7, 250}, {2001, 1, mhfmon.Basarios, 58, 0, 7, 250},

View File

@@ -16,12 +16,12 @@ func handleMsgMhfGetBreakSeibatuLevelReward(s *Session, p mhfpacket.MHFPacket) {
} }
type WeeklySeibatuRankingReward struct { type WeeklySeibatuRankingReward struct {
Unk0 int32 //Place Start Index0 int32 //Place Start
Unk1 int32 //Place Finish Index1 int32 //Place Finish
Unk2 uint32 // UNK Index2 uint32 // UNK
Unk3 int32 //Type Type int32 //Type //7201 Value //7202 ??? Points //7203 ??? Points Blue
Unk4 int32 //ID ID int32 //ID
Unk5 int32 // Value Value int32 // Value
} }
func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket) { func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket) {
@@ -70,34 +70,117 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
switch pkt.ID { switch pkt.ID {
//243400 = Route 0 //243400 = Route 0
//243401 = Route 1 //243401 = Route 1
//Tower 260001 260003 //I have a sneaky suspicion that the above massive array is feeding into this somehow....
case 240031: case 240031:
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{ weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
{0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}} {1, 1, 1, 7201, 12068, 1}}
case 240041: case 240041:
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{ weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
{0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}} {0, 0, 1, 7201, 12068, 1}}
case 240042: case 240042:
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{ weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
{0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}} {0, 0, 2, 7201, 12068, 1}}
case 240051: case 240051:
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{ weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
{0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}} {0, 0, 1, 7201, 12068, 1}}
case 240052: case 240052:
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{ weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
{0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}} {1, 1, 1, 7201, 12068, 1},
}
//Tower 260001 260003
case 260001: case 260001:
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{ weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
{0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}}
//Can only have 10 in each dist (It disapears otherwise)
//{unk,unk,dist,seiabtuType,ItemID,Value}
{0, 0, 1, 7201, 12068, 1},
{0, 0, 1, 7201, 12069, 1},
{0, 0, 1, 7201, 12070, 1},
{0, 0, 1, 7201, 12071, 1},
{0, 0, 1, 7201, 12072, 1},
{0, 0, 1, 7201, 12073, 1},
{0, 0, 1, 7201, 12074, 1},
{0, 0, 1, 7201, 12075, 1},
{0, 0, 1, 7201, 12076, 1},
{0, 0, 1, 7201, 12077, 1},
{0, 0, 2, 7201, 12068, 1},
{0, 0, 2, 7201, 12069, 1},
{0, 0, 2, 7201, 12070, 1},
{0, 0, 2, 7201, 12071, 1},
{0, 0, 2, 7201, 12072, 1},
{0, 0, 2, 7201, 12073, 1},
{0, 0, 2, 7201, 12074, 1},
{0, 0, 2, 7201, 12075, 1},
{0, 0, 2, 7201, 12076, 1},
{0, 0, 2, 7201, 12077, 1},
// Left in because i think its funny the planned 4 and we got 2
{0, 0, 3, 7201, 12068, 1},
{0, 0, 3, 7201, 12069, 1},
{0, 0, 3, 7201, 12070, 1},
{0, 0, 3, 7201, 12071, 1},
{0, 0, 3, 7201, 12072, 1},
{0, 0, 3, 7201, 12073, 1},
{0, 0, 3, 7201, 12074, 1},
{0, 0, 3, 7201, 12075, 1},
{0, 0, 3, 7201, 12076, 1},
{0, 0, 3, 7201, 12077, 1},
{0, 0, 4, 7201, 12068, 1},
{0, 0, 4, 7201, 12069, 1},
{0, 0, 4, 7201, 12070, 1},
{0, 0, 4, 7201, 12071, 1},
{0, 0, 4, 7201, 12072, 1},
{0, 0, 4, 7201, 12073, 1},
{0, 0, 4, 7201, 12074, 1},
{0, 0, 4, 7201, 12075, 1},
{0, 0, 4, 7201, 12076, 1},
{0, 0, 4, 7201, 12077, 1},
}
case 260003: case 260003:
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{ weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
{0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}} //Adjust Floors done in database to make blue ?? Possible value here for dist
//{Floor,unk,unk,seiabtuType,ItemID,Value}
{1, 0, 0, 7201, 12068, 1},
{2, 0, 0, 7201, 12069, 3},
{2, 0, 0, 7201, 12070, 1},
{4, 0, 0, 7201, 12071, 3},
{5, 0, 0, 7201, 12072, 6},
{6, 0, 0, 7201, 12073, 1},
{7, 0, 0, 7201, 12068, 1},
{8, 0, 0, 7201, 12069, 1},
{9, 0, 0, 7201, 12070, 2},
{10, 0, 0, 7201, 12071, 1},
{10, 0, 0, 7201, 12072, 1},
{10, 0, 0, 7201, 12073, 6},
{11, 0, 0, 7201, 12072, 1},
{12, 0, 0, 7201, 12073, 1},
{13, 0, 0, 7201, 12068, 6},
{14, 0, 0, 7201, 12069, 6},
{15, 0, 0, 7201, 12070, 1},
{16, 0, 0, 7201, 12071, 1},
{16, 0, 0, 7201, 12072, 2},
{18, 0, 0, 7201, 12073, 1},
}
default: //Covers all Pallone Requests... for now default: //Covers all Pallone Requests... for now
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{ weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
// To do figure out values 3-5 its some sort of item structure // To do figure out values 3-5 its some sort of item structure
{1, 0, 7, 7, 7, 10000}, {1, 1, 0, 0, 0, 30}, {1, 1, 0, 0, 0, 18}, {1, 1, 0, 0, 0, 18}, //1st //1st
{2, 3, 0, 0, 0, 6000}, {2, 3, 0, 0, 0, 15}, {2, 3, 0, 0, 0, 9}, {2, 3, 0, 0, 0, 9}, //2nd - 3rd {1, 0, 0, 7202, 10, 10000},
{4, 10, 0, 0, 0, 5500}, {4, 10, 0, 0, 0, 12}, {4, 10, 0, 0, 0, 9}, //4th -10th {1, 1, 0, 7201, 10, 30},
{1, 1, 0, 7201, 10, 18},
{1, 1, 0, 7201, 10, 18},
//2nd - 3rd
{2, 3, 0, 7202, 10, 6000},
{2, 3, 0, 7201, 10, 15},
{2, 3, 0, 7201, 10, 9},
{2, 3, 0, 7201, 10, 9},
//4th -10th
{4, 10, 0, 7202, 10, 5500},
{4, 10, 0, 7201, 10, 12},
{4, 10, 0, 7201, 10, 9},
} }
} }
@@ -105,12 +188,12 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
} }
for _, seibatuData := range weeklySeibatuRankingRewards { for _, seibatuData := range weeklySeibatuRankingRewards {
bf := byteframe.NewByteFrame() bf := byteframe.NewByteFrame()
bf.WriteInt32(seibatuData.Unk0) bf.WriteInt32(seibatuData.Index0)
bf.WriteInt32(seibatuData.Unk1) bf.WriteInt32(seibatuData.Index1)
bf.WriteUint32(seibatuData.Unk2) bf.WriteUint32(seibatuData.Index2)
bf.WriteInt32(seibatuData.Unk3) bf.WriteInt32(seibatuData.Type)
bf.WriteInt32(seibatuData.Unk4) bf.WriteInt32(seibatuData.ID)
bf.WriteInt32(seibatuData.Unk5) bf.WriteInt32(seibatuData.Value)
data = append(data, bf) data = append(data, bf)
} }
doAckEarthSucceed(s, pkt.AckHandle, data) doAckEarthSucceed(s, pkt.AckHandle, data)

View File

@@ -398,28 +398,46 @@ type PresentBox struct {
Unk5 int32 Unk5 int32
Unk6 int32 Unk6 int32
Unk7 int32 Unk7 int32
Unk8 int32 Unk8 int32 //SeiabtuType
Unk9 int32 Unk9 int32 //Item
Unk10 int32 Unk10 int32 //Amount
} }
func handleMsgMhfPresentBox(s *Session, p mhfpacket.MHFPacket) { func handleMsgMhfPresentBox(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfPresentBox) pkt := p.(*mhfpacket.MsgMhfPresentBox)
var data []*byteframe.ByteFrame var data []*byteframe.ByteFrame
//PresentCommunicator
// possible the same types for seibatu work here.
// Special Values 7201+
// ON Request for PALLONE!
//3301 3302 3303
// ON Request for TOWER!
//260003 260001
presents := []PresentBox{{7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}} presents := []PresentBox{{7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}}
for _, present := range presents { for index, _ := range presents {
bf := byteframe.NewByteFrame() bf := byteframe.NewByteFrame()
bf.WriteUint32(present.Unk0) bf.WriteUint32(0)
bf.WriteInt32(present.Unk1) bf.WriteInt32(0)
bf.WriteInt32(present.Unk2) bf.WriteInt32(0) //compPresent__Q2_6Palone19PresentCommunicatorSFPC20RESPONSE_PRESENT_BOXT1 // v15 = v7[2]; if ( v15 > v14 )return 1; if ( v15 < v14 ) return 0; OR
bf.WriteInt32(present.Unk3) // v12 = *(_DWORD *)(v9 + 8);
bf.WriteInt32(present.Unk4) // v13 = v7[2];
bf.WriteInt32(present.Unk5) // if ( v13 <= v12 )
bf.WriteInt32(present.Unk6) // {
bf.WriteInt32(present.Unk7) // if ( v13 < v12 )
bf.WriteInt32(present.Unk8) // return 0;
bf.WriteInt32(present.Unk9) // return *(_DWORD *)(v9 + 20) < v7[5];
bf.WriteInt32(present.Unk10) // }
// return 1;
// }
bf.WriteInt32(0) //compPresent__Q2_6Palone19PresentCommunicatorSFPC20RESPONSE_PRESENT_BOXT1 // v17 = v7[3]; if ( v17 > v16 )return 1; if ( v17 < v16 ) return 0;
bf.WriteInt32(0)
bf.WriteInt32(0) //Link to [2]
bf.WriteInt32(0)
bf.WriteInt32(0)
bf.WriteInt32(7201) // is_over_present_box__Q2_6Palone19PresentCommunicatorSFPC20RESPONSE_PRESENT_BOX v1 = a1[8]; if ( v1 >= 7201 )
bf.WriteInt32(7)
bf.WriteInt32(int32(index)) //placed index here because its value of item to stop go having a moan
data = append(data, bf) data = append(data, bf)
} }