示例
示例脚本
这里是一个龙骑跳是示例脚本
function run ()
local PlayrAction = Game_Player_GetPlayerActionId()
local x,y,z = Game_Player_GetPlayerNavigationCoordinate()
local TP = Lua_Variable_ReadIntVariable('DragonRidingJump_tp');
if PlayrAction == 12708 and TP == 0 then
TP = 1
Game_Player_SetPlayerCoordinate(x,y,z)
end
if PlayrAction == 1 then
TP = 0
end
Lua_Variable_SaveIntVariable('DragonRidingJump_tp',TP)
end
如果是用于LuaScriptNetWork的网络模板,则需要修改为
local module = {}
function module.run ()
local PlayrAction = Game_Player_GetPlayerActionId()
local x,y,z = Game_Player_GetPlayerNavigationCoordinate()
local TP = Lua_Variable_ReadIntVariable('DragonRidingJump_tp');
if PlayrAction == 12708 and TP == 0 then
TP = 1
Game_Player_SetPlayerCoordinate(x,y,z)
end
if PlayrAction == 1 then
TP = 0
end
Lua_Variable_SaveIntVariable('DragonRidingJump_tp',TP)
end
return module
最后更新于