project-meteor-server/Data/scripts/commands/ChocoboRideCommand.lua
CuriousJorge 4fc5762d41 Teleport command touch-ups.
PopulaceCompanyWarp made to look more retail authentic.  Can't figure out how to make it not play the 'npc untargeted' sound though like retail.
Music command has second argument for transition type.  Added an overloaded function in Player.cs to support this.
Setappearance adjusted to work again on player targets.
DftWil updated to cover near everything.
Re-added shop-related luas that were removed for some reason.
2022-02-05 13:56:58 -05:00

51 lines
1.5 KiB
Lua

--[[
ChocoboRideCommand Script
Handles mounting and dismounting the Chocobo and Goobbue
--]]
require ("global")
function onEventStarted(player, actor, triggerName, isGoobbue)
if (player:GetState() == 0) then
worldMaster = GetWorldMaster();
if (isGoobbue ~= true) then
player:ChangeMusic(83, MUSIC_FADEIN);
player:SendGameMessage(player, worldMaster, 26001, 0x20);
player:SetMountState(1);
else
player:ChangeMusic(98, MUSIC_FADEIN);
player:SendGameMessage(player, worldMaster, 26019, 0x20);
player:SetMountState(2);
end
player:ChangeSpeed(0.0, 3.6, 9.0, 9.0);
player:ChangeState(15);
else
player:ChangeMusic(player:GetZone().bgmDay, MUSIC_FADEIN);
worldMaster = GetWorldMaster();
if (player.rentalExpireTime != 0) then
player:SendGameMessage(player, worldMaster, 26004, 0x20); --You dismount.
else
if (player:GetMountState() == 1) then
player:SendGameMessage(player, worldMaster, 26003, 0x20); --You dismount X.
else
player:SendGameMessage(player, worldMaster, 26021, 0x20); --You dismount your Gobbue.
end
end
player:SetMountState(0);
player:ChangeSpeed(0.0, 2.0, 5.0, 5.0)
player:ChangeState(0);
end
player:EndEvent();
end