44 lines
1.5 KiB
Lua
44 lines
1.5 KiB
Lua
|
local ToWayPosition = false
|
||
|
local Camera = false
|
||
|
local function setMotionState(stateFlag) -- 人物状态
|
||
|
local stateAddress = GetAddress(0x145011760,{0x50,0xE470}) + 0x0B
|
||
|
if stateAddress then
|
||
|
local stateData = SetAddressData(stateAddress,'byte',stateFlag)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
local function onTime(ctx)
|
||
|
local Data_Player = ctx.playerData
|
||
|
local Data_World = ctx.worldData
|
||
|
if Data_Player.Action.fsm.fsmID == 639 or Data_Player.Action.fsm.fsmID == 640 then
|
||
|
setMotionState(0x8A)
|
||
|
end
|
||
|
if Data_Player.Action.lmtID == 12707 or Data_Player.Action.lmtID == 12708 then
|
||
|
SetCameraData(true, Data_Player.Position.cntrposition.x, Data_Player.Position.cntrposition.y, Data_Player.Position.cntrposition.z)
|
||
|
Camera = true
|
||
|
elseif Camera then
|
||
|
Camera = false
|
||
|
SetCameraData(false,0,0,0)
|
||
|
end
|
||
|
|
||
|
if Data_Player.Action.lmtID == 12708 then
|
||
|
if not ToWayPosition then
|
||
|
ToWayPosition = true
|
||
|
if not (Data_World.Position.wayPosition.x == 0 and Data_World.Position.wayPosition.y == 0 and Data_World.Position.wayPosition.z == 0) then
|
||
|
Data_Player.Position.position = Data_World.Position.wayPosition
|
||
|
Data_Player.Position.reposition = Data_World.Position.wayPosition
|
||
|
end
|
||
|
end
|
||
|
elseif ToWayPosition then
|
||
|
ToWayPosition = false
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|
||
|
return {
|
||
|
version = 1,
|
||
|
name = "dragon_riding_jump",
|
||
|
onTime = onTime,
|
||
|
conditions = nil,
|
||
|
priority = 0,
|
||
|
}
|