2016-03-12 02:54:03 -05:00
|
|
|
--[[
|
|
|
|
|
|
|
|
ChocoboRideCommand Script
|
|
|
|
|
|
|
|
Handles mounting and dismounting the Chocobo and Goobbue
|
|
|
|
|
|
|
|
--]]
|
|
|
|
|
2016-03-20 21:19:40 -04:00
|
|
|
function onEventStarted(player, actor, triggerName, isGoobbue)
|
2016-03-12 02:54:03 -05:00
|
|
|
|
2016-06-15 03:41:23 +01:00
|
|
|
if (player:GetState() == 0) then
|
2016-03-12 02:54:03 -05:00
|
|
|
|
2016-06-15 03:41:23 +01:00
|
|
|
worldMaster = GetWorldMaster();
|
2016-03-12 02:54:03 -05:00
|
|
|
|
|
|
|
if (isGoobbue ~= true) then
|
2016-06-16 03:01:10 +01:00
|
|
|
player:ChangeMusic(83);
|
2016-06-15 03:41:23 +01:00
|
|
|
player:SendGameMessage(player, worldMaster, 26001, 0x20);
|
|
|
|
player:SetMountState(1);
|
2016-03-12 02:54:03 -05:00
|
|
|
else
|
2016-06-16 03:01:10 +01:00
|
|
|
player:ChangeMusic(98);
|
2016-06-15 03:41:23 +01:00
|
|
|
player:SendGameMessage(player, worldMaster, 26019, 0x20);
|
|
|
|
player:SetMountState(2);
|
2016-03-12 02:54:03 -05:00
|
|
|
end
|
|
|
|
|
2017-01-03 19:02:35 -05:00
|
|
|
player:ChangeSpeed(0.0, 5.0, 10.0, 10.0);
|
2016-06-16 03:01:10 +01:00
|
|
|
player:ChangeState(15);
|
2016-03-12 02:54:03 -05:00
|
|
|
else
|
2016-06-16 03:01:10 +01:00
|
|
|
player:ChangeMusic(player:GetZone().bgmDay);
|
2016-03-12 02:54:03 -05:00
|
|
|
|
2016-06-15 03:41:23 +01:00
|
|
|
worldMaster = GetWorldMaster();
|
2016-03-12 02:54:03 -05:00
|
|
|
|
2016-06-15 03:41:23 +01:00
|
|
|
if (player:GetMountState() == 1) then
|
|
|
|
player:SendGameMessage(player, worldMaster, 26003, 0x20);
|
2016-03-12 02:54:03 -05:00
|
|
|
else
|
2016-06-15 03:41:23 +01:00
|
|
|
player:SendGameMessage(player, worldMaster, 26021, 0x20);
|
2016-03-12 02:54:03 -05:00
|
|
|
end
|
|
|
|
|
2016-06-15 03:41:23 +01:00
|
|
|
player:SetMountState(0);
|
2017-01-03 19:02:35 -05:00
|
|
|
player:ChangeSpeed(0.0, 2.0, 5.0, 5.0)
|
2016-06-16 03:01:10 +01:00
|
|
|
player:ChangeState(0);
|
2016-03-12 02:54:03 -05:00
|
|
|
end
|
|
|
|
|
2016-06-19 18:52:34 -04:00
|
|
|
player:EndEvent();
|
2016-03-12 02:54:03 -05:00
|
|
|
|
|
|
|
end
|