mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
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.
This commit is contained in:
@@ -6,6 +6,8 @@ Handles mounting and dismounting the Chocobo and Goobbue
|
||||
|
||||
--]]
|
||||
|
||||
require ("global")
|
||||
|
||||
function onEventStarted(player, actor, triggerName, isGoobbue)
|
||||
|
||||
if (player:GetState() == 0) then
|
||||
@@ -13,11 +15,11 @@ function onEventStarted(player, actor, triggerName, isGoobbue)
|
||||
worldMaster = GetWorldMaster();
|
||||
|
||||
if (isGoobbue ~= true) then
|
||||
player:ChangeMusic(83);
|
||||
player:ChangeMusic(83, MUSIC_FADEIN);
|
||||
player:SendGameMessage(player, worldMaster, 26001, 0x20);
|
||||
player:SetMountState(1);
|
||||
else
|
||||
player:ChangeMusic(98);
|
||||
player:ChangeMusic(98, MUSIC_FADEIN);
|
||||
player:SendGameMessage(player, worldMaster, 26019, 0x20);
|
||||
player:SetMountState(2);
|
||||
end
|
||||
@@ -25,7 +27,7 @@ function onEventStarted(player, actor, triggerName, isGoobbue)
|
||||
player:ChangeSpeed(0.0, 3.6, 9.0, 9.0);
|
||||
player:ChangeState(15);
|
||||
else
|
||||
player:ChangeMusic(player:GetZone().bgmDay);
|
||||
player:ChangeMusic(player:GetZone().bgmDay, MUSIC_FADEIN);
|
||||
|
||||
worldMaster = GetWorldMaster();
|
||||
|
||||
|
@@ -49,8 +49,7 @@ teleportMenuToAetheryte = {
|
||||
[5] = {
|
||||
[1] = 1280121,
|
||||
[2] = 1280122
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
zoneIdToRegionChoice =
|
||||
@@ -73,7 +72,7 @@ function onEventStarted(player, actor, eventType, eventName, isTeleport)
|
||||
local favoredLocation = {1280003, 1280005, 1280062};
|
||||
local currentRegion = zoneIdToRegionChoice[player:GetPos()[5]] or 0;
|
||||
local isCity = {[1280001] = true, [1280061] = true, [1280031] = true};
|
||||
local isRegion = true;
|
||||
local isFavoredDesination = false;
|
||||
local destination = 0;
|
||||
|
||||
|
||||
@@ -103,7 +102,7 @@ function onEventStarted(player, actor, eventType, eventName, isTeleport)
|
||||
elseif (regionChoice == 6) then -- Favored Destinations selected.
|
||||
-- Dummy info. Favored would be half price after factoring in same region cost or not.
|
||||
animaCost = {2, 3, 3, favoredLocation[1], favoredLocation[2], favoredLocation[3]};
|
||||
isRegion = false;
|
||||
isFavoredDesination = true;
|
||||
end
|
||||
|
||||
|
||||
@@ -126,12 +125,12 @@ function onEventStarted(player, actor, eventType, eventName, isTeleport)
|
||||
|
||||
player:PlayAnimation(0x4000FFA);
|
||||
|
||||
if (isRegion == true) then
|
||||
if (isFavoredDesination == true) then
|
||||
destination = aetheryteTeleportPositions[favoredLocation[aetheryteChoice]];
|
||||
player:SendGameMessage(worldMaster, 34101, 0x20, 2, favoredLocation[aetheryteChoice], animaCost[aetheryteChoice], currentAnima);
|
||||
else
|
||||
destination = aetheryteTeleportPositions[teleportMenuToAetheryte[regionChoice][aetheryteChoice]];
|
||||
player:SendGameMessage(worldMaster, 34101, 0x20, 2, teleportMenuToAetheryte[regionChoice][aetheryteChoice], animaCost[aetheryteChoice], currentAnima);
|
||||
else
|
||||
destination = aetheryteTeleportPositions[favoredLocation[aetheryteChoice]];
|
||||
player:SendGameMessage(worldMaster, 34101, 0x20, 2, favoredLocation[aetheryteChoice], animaCost[aetheryteChoice], currentAnima);
|
||||
end
|
||||
|
||||
confirmChoice = callClientFunction(player, "delegateCommand", actor, "eventConfirm", false, false, 1, 138824, false);
|
||||
|
@@ -1,14 +1,17 @@
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "s",
|
||||
parameters = "ss",
|
||||
description =
|
||||
[[
|
||||
Plays music <id> to player.
|
||||
!music <id>
|
||||
!music <id> <transition_type>
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, music)
|
||||
function onTrigger(player, argc, music, transition)
|
||||
music = tonumber(music) or 0;
|
||||
player:ChangeMusic(music);
|
||||
transition = tonumber(transition) or nil;
|
||||
player:SendMessage(0x20, "", tostring(argc).." "..tostring(music).." "..tostring(transition));
|
||||
player:ChangeMusic(music, transition);
|
||||
end;
|
@@ -15,10 +15,12 @@ function onTrigger(player, argc, appearanceId)
|
||||
local sender = "[setappearance] ";
|
||||
|
||||
app = tonumber(appearanceId) or 0;
|
||||
player:SendMessage(messageID, sender, string.format("appearance %u", app));
|
||||
--player:SendMessage(messageID, sender, string.format("appearance %u", app));
|
||||
|
||||
if player and player.target then
|
||||
player.target.ChangeNpcAppearance(app);
|
||||
targetActor = GetWorldManager():GetActorInWorld(player.currentTarget)
|
||||
|
||||
if targetActor then
|
||||
targetActor.ChangeNpcAppearance(app);
|
||||
player:SendMessage(messageID, sender, string.format("appearance %u", app));
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user