1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-21 07:27:45 +00:00
kawari/resources/scripts/Global.lua
The Dax 80885f0eeb Port the nudge gm/debug command from Project Meteor Server.
It's a command that moves the user forward, backward, up, or down a specified amount of yalms.
It's quite helpful for exploration convenience, and doesn't replace setpos, rather, it's meant to complement it.
The set_position function was also extended to allow for lua code to specify the rotation/direction facing.
2025-06-18 12:55:18 -04:00

52 lines
1.6 KiB
Lua

function onBeginLogin(player)
-- send a welcome message
player:send_message("Welcome to Kawari!")
end
function split(input, separator)
if separator == nil then
separator = '%s'
end
local t = {}
for str in string.gmatch(input, '([^'..separator..']+)') do
table.insert(t, str)
end
return t
end
-- please keep these ids sorted!
-- Actions
registerAction(3, "actions/Sprint.lua")
registerAction(5, "actions/Teleport.lua")
registerAction(9, "actions/FastBlade.lua")
-- Items
registerAction(6221, "items/Fantasia.lua")
-- Events
registerEvent(721028, "tosort/UnendingJourney.lua")
registerEvent(721044, "tosort/CrystalBell.lua")
registerEvent(131079, "warp/WarpInnLimsaLominsa.lua")
registerEvent(131080, "warp/WarpInnGridania.lua")
registerEvent(131081, "warp/WarpInnUldah.lua")
registerEvent(131082, "common/GenericWarp.lua")
registerEvent(131083, "common/GenericWarp.lua")
registerEvent(131084, "common/GenericWarp.lua")
registerEvent(131092, "common/GenericWarp.lua")
registerEvent(131093, "common/GenericWarp.lua")
registerEvent(131094, "common/GenericWarp.lua")
registerEvent(720916, "custom/000/cmndefinnbed_00020.lua")
registerEvent(1245185, "opening/OpeningLimsaLominsa.lua")
registerEvent(1245186, "opening/OpeningGridania.lua")
registerEvent(1245187, "opening/OpeningUldah.lua")
-- TODO: Generic warps might be decided through ArrayEventHandler?
-- Commands
registerCommand("setpos", "commands/debug/SetPos.lua")
registerCommand("classjob", "commands/debug/ClassJob.lua")
registerCommand("setspeed", "commands/debug/SetSpeed.lua")
registerCommand("nudge", "commands/debug/Nudge.lua")