1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-05-12 14:47:46 +00:00

"Implement" the Unending Journey

Apparently there's a scene that's super easy to use, that omniously says
"You cannot consult The Unending Journey at this time". That's cool,
though.
This commit is contained in:
Joshua Goins 2025-05-06 22:37:02 -04:00
parent 515ec59d92
commit ed44de8956
4 changed files with 12 additions and 84 deletions

View file

@ -79,7 +79,6 @@ This feature is still a work-in-progress, and not all data is imported yet.
These special debug commands start with `!` and are custom to Kawari.
* `!setpos <x> <y> <z>`: Teleport to the specified location
* `!spawnplayer`: Spawn another player for debugging, not known to work at the moment
* `!spawnnpc`: Spawn a NPC for debugging
* `!spawnmonster`: Spawn a monster for debugging
* `!playscene <id>`: Plays an event. Only some events are supported for now:

View file

@ -26,6 +26,7 @@ registerAction(9, "actions/FastBlade.lua")
registerAction(6221, "items/Fantasia.lua")
-- Events
registerEvent(721028, "tosort/UnendingJourney.lua")
registerEvent(131079, "warp/WarpInnLimsaLominsa.lua")
registerEvent(131080, "warp/WarpInnGridania.lua")
registerEvent(131081, "warp/WarpInnUldah.lua")
@ -45,3 +46,4 @@ registerEvent(1245187, "opening/OpeningUldah.lua")
-- Commands
registerCommand("setpos", "commands/debug/SetPos.lua")
registerCommand("classjob", "commands/debug/ClassJob.lua")
registerCommand("setspeed", "commands/debug/SetSpeed.lua")

View file

@ -0,0 +1,10 @@
-- TODO: actually implement this menu
function onTalk(target, player)
-- you cannot consult, which is good because we don't know how to implement this anyway
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
end
function onReturn(scene, results, player)
player:finish_event(EVENT_ID)
end

View file

@ -54,89 +54,6 @@ impl ChatHandler {
let parts: Vec<&str> = chat_message.message.split(' ').collect();
match parts[0] {
"!spawnplayer" => {
let config = get_config();
// send player spawn
{
let ipc = ServerZoneIpcSegment {
unk1: 20,
unk2: 0,
op_code: ServerZoneIpcType::PlayerSpawn,
option: 0,
timestamp: timestamp_secs(),
data: ServerZoneIpcData::PlayerSpawn(PlayerSpawn {
account_id: 1000000,
content_id: 1000000,
current_world_id: config.world.world_id,
home_world_id: config.world.world_id,
common: CommonSpawn {
class_job: 35,
name: "Test Actor".to_string(),
hp_curr: 250,
hp_max: 250,
mp_curr: 10000,
mp_max: 10000,
level: 5,
object_kind: ObjectKind::Player(PlayerSubKind::Player),
spawn_index: connection.get_free_spawn_index(),
look: CUSTOMIZE_DATA,
display_flags: DisplayFlag::INVISIBLE
| DisplayFlag::HIDE_HEAD
| DisplayFlag::UNK,
models: [
0, // head
89, // body
89, // hands
89, // legs
89, // feet
0, // ears
0, // neck
0, // wrists
0, // left finger
0, // right finger
],
pos: connection.player_data.position,
..Default::default()
},
..Default::default()
}),
};
connection
.send_segment(PacketSegment {
source_actor: 0x106ad804,
target_actor: connection.player_data.actor_id,
segment_type: SegmentType::Ipc,
data: SegmentData::Ipc { data: ipc },
})
.await;
}
// zone in
{
let ipc = ServerZoneIpcSegment {
op_code: ServerZoneIpcType::ActorControl,
timestamp: timestamp_secs(),
data: ServerZoneIpcData::ActorControl(ActorControl {
category: ActorControlCategory::ZoneIn {
warp_finish_anim: 0x0,
raise_anim: 0x0,
},
}),
..Default::default()
};
connection
.send_segment(PacketSegment {
source_actor: 0x106ad804,
target_actor: connection.player_data.actor_id,
segment_type: SegmentType::Ipc,
data: SegmentData::Ipc { data: ipc },
})
.await;
}
}
"!spawnnpc" => {
let ipc = ServerZoneIpcSegment {
op_code: ServerZoneIpcType::NpcSpawn,