mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
Merge branch 'master' of https://bitbucket.org/Ioncannon/ffxiv-classic-server into lua_commands
# Conflicts: # FFXIVClassic Common Class Lib/packages.config # FFXIVClassic Lobby Server/Program.cs # FFXIVClassic Map Server/CommandProcessor.cs # FFXIVClassic Map Server/Program.cs # FFXIVClassic Map Server/actors/Actor.cs
This commit is contained in:
commit
37d91480f9
24 changed files with 185 additions and 138 deletions
|
@ -13,9 +13,9 @@ function onEventUpdate(player, npc, eventStep, menuOptionSelected)
|
|||
player:EndEvent();
|
||||
return;
|
||||
elseif (menuOptionSelected == 2) then
|
||||
player:quitGame();
|
||||
player:QuitGame();
|
||||
elseif (menuOptionSelected == 3) then
|
||||
player:logout();
|
||||
player:Logout();
|
||||
elseif (menuOptionSelected == 4) then
|
||||
player:SendMessage(33, "", "Heck the bed");
|
||||
end
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
|
||||
saySheetId = 1;
|
||||
|
||||
if (npc:GetActorClassId() == 1000157) then
|
||||
saySheetId = 9;
|
||||
elseif (npc:GetActorClassId() == 1000158) then
|
||||
saySheetId = 24;
|
||||
elseif (npc:GetActorClassId() == 1000162) then
|
||||
saySheetId = 18;
|
||||
elseif (npc:GetActorClassId() == 1000164) then
|
||||
saySheetId = 16;
|
||||
elseif (npc:GetActorClassId() == 1000459) then
|
||||
saySheetId = 21;
|
||||
elseif (npc:GetActorClassId() == 1000460) then
|
||||
saySheetId = 13;
|
||||
elseif (npc:GetActorClassId() == 1000461) then
|
||||
saySheetId = 15;
|
||||
elseif (npc:GetActorClassId() == 1000462) then
|
||||
saySheetId = 11;
|
||||
elseif (npc:GetActorClassId() == 1000464) then
|
||||
saySheetId = 10;
|
||||
elseif (npc:GetActorClassId() == 1000466) then
|
||||
saySheetId = 17;
|
||||
elseif (npc:GetActorClassId() == 1000631) then
|
||||
saySheetId = 8;
|
||||
elseif (npc:GetActorClassId() == 1000632) then
|
||||
saySheetId = 7;
|
||||
elseif (npc:GetActorClassId() == 1000633) then
|
||||
saySheetId = 12;
|
||||
elseif (npc:GetActorClassId() == 1000634) then
|
||||
saySheetId = 23;
|
||||
elseif (npc:GetActorClassId() == 1000635) then
|
||||
saySheetId = 20;
|
||||
elseif (npc:GetActorClassId() == 1000636) then
|
||||
saySheetId = 22;
|
||||
elseif (npc:GetActorClassId() == 1000637) then
|
||||
saySheetId = 14;
|
||||
elseif (npc:GetActorClassId() == 1001461) then
|
||||
saySheetId = 19;
|
||||
end
|
||||
|
||||
player:RunEventFunction("welcomeTalk", nil, saySheetId, player);
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc, step, menuOptionSelected)
|
||||
|
||||
--player:RunEventFunction("cashbackTalkCommand", 22004, 22004, 22004, 22004, 22004, 22004, 22004, 22004, 22004, 22004, 22004); --Refund Abilities???
|
||||
--player:RunEventFunction("cashbackTalk", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); --Refund items???
|
||||
|
||||
if (menuOptionSelected == 4) then
|
||||
player:EndEvent();
|
||||
else
|
||||
player:RunEventFunction("selectMode", nil, npc:GetActorClassId(), false, 1000001); --Step 2, state your business
|
||||
end
|
||||
|
||||
end
|
|
@ -9,15 +9,15 @@ Switches between active and passive mode states
|
|||
function onEventStarted(player, command, triggerName)
|
||||
|
||||
if (player:GetState() == 0) then
|
||||
player:changeState(2);
|
||||
player:ChangeState(2);
|
||||
elseif (player:GetState() == 2) then
|
||||
player:changeState(0);
|
||||
player:ChangeState(0);
|
||||
end
|
||||
|
||||
player:EndCommand();
|
||||
|
||||
--For Opening Tutorial
|
||||
if (player:hasQuest("Man0l0") or player:hasQuest("Man0g0") or player:hasQuest("Man0u0")) then
|
||||
if (player:HasQuest("Man0l0") or player:HasQuest("Man0g0") or player:HasQuest("Man0u0")) then
|
||||
player:GetDirector():OnCommand(command);
|
||||
|
||||
end
|
||||
|
|
|
@ -13,21 +13,21 @@ function onEventStarted(player, actor, triggerName, isGoobbue)
|
|||
worldMaster = GetWorldMaster();
|
||||
|
||||
if (isGoobbue ~= true) then
|
||||
player:changeMusic(83);
|
||||
player:ChangeMusic(83);
|
||||
player:SendChocoboAppearance();
|
||||
player:SendGameMessage(player, worldMaster, 26001, 0x20);
|
||||
player:SetMountState(1);
|
||||
else
|
||||
player:changeMusic(98);
|
||||
player:ChangeMusic(98);
|
||||
player:SendGoobbueAppearance();
|
||||
player:SendGameMessage(player, worldMaster, 26019, 0x20);
|
||||
player:SetMountState(2);
|
||||
end
|
||||
|
||||
player:changeSpeed(0.0, 5.0, 10.0);
|
||||
player:changeState(15);
|
||||
player:ChangeSpeed(0.0, 5.0, 10.0);
|
||||
player:ChangeState(15);
|
||||
else
|
||||
player:changeMusic(player:GetZone().bgmDay);
|
||||
player:ChangeMusic(player:GetZone().bgmDay);
|
||||
|
||||
worldMaster = GetWorldMaster();
|
||||
|
||||
|
@ -38,8 +38,8 @@ function onEventStarted(player, actor, triggerName, isGoobbue)
|
|||
end
|
||||
|
||||
player:SetMountState(0);
|
||||
player:changeSpeed(0.0, 2.0, 5.0)
|
||||
player:changeState(0);
|
||||
player:ChangeSpeed(0.0, 2.0, 5.0)
|
||||
player:ChangeState(0);
|
||||
end
|
||||
|
||||
player:EndCommand();
|
||||
|
|
|
@ -8,12 +8,12 @@ function onEventStarted(player, actor, triggerName, emoteId)
|
|||
|
||||
if (player:GetState() == 0) then
|
||||
if (emoteId == 0x2712) then
|
||||
player:changeState(11);
|
||||
player:ChangeState(11);
|
||||
else
|
||||
player:changeState(13);
|
||||
player:ChangeState(13);
|
||||
end
|
||||
else
|
||||
player:changeState(0);
|
||||
player:ChangeState(0);
|
||||
end
|
||||
|
||||
player:EndCommand();
|
||||
|
|
|
@ -12,7 +12,7 @@ emoteTable = {
|
|||
function onEventStarted(player, actor, triggerName, emoteId)
|
||||
|
||||
if (player:GetState() == 0) then
|
||||
player:doEmote(emoteId);
|
||||
player:DoEmote(emoteId);
|
||||
end
|
||||
|
||||
player:EndCommand();
|
||||
|
|
|
@ -137,7 +137,7 @@ function equipItem(player, equipSlot, item)
|
|||
|
||||
if (classId ~= nil) then
|
||||
player:SendGameMessage(player, worldMaster, 30103, 0x20, 0, 0, player, classId);
|
||||
player:prepareClassChange(classId);
|
||||
player:PrepareClassChange(classId);
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -161,23 +161,23 @@ function equipItem(player, equipSlot, item)
|
|||
|
||||
--Graphic Slot was set, otherwise it's a special case
|
||||
if (graphicSlot ~= nil) then
|
||||
player:graphicChange(graphicSlot, item);
|
||||
if (graphicSlot == GRAPHICSLOT_MAINHAND) then player:graphicChange(GRAPHICSLOT_OFFHAND, nil); end
|
||||
player:GraphicChange(graphicSlot, item);
|
||||
if (graphicSlot == GRAPHICSLOT_MAINHAND) then player:GraphicChange(GRAPHICSLOT_OFFHAND, nil); end
|
||||
elseif (gItem:IsNailWeapon()) then
|
||||
player:graphicChange(GRAPHICSLOT_MAINHAND, item);
|
||||
player:graphicChange(GRAPHICSLOT_OFFHAND, item);
|
||||
player:GraphicChange(GRAPHICSLOT_MAINHAND, item);
|
||||
player:GraphicChange(GRAPHICSLOT_OFFHAND, item);
|
||||
elseif (gItem:IsBowWeapon()) then
|
||||
player:graphicChange(GRAPHICSLOT_MAINHAND, item);
|
||||
--player:graphicChange(GRAPHICSLOT_OFFHAND, item);
|
||||
player:GraphicChange(GRAPHICSLOT_MAINHAND, item);
|
||||
--player:GraphicChange(GRAPHICSLOT_OFFHAND, item);
|
||||
elseif (equipSlot == EQUIPSLOT_EARS) then
|
||||
player:graphicChange(GRAPHICSLOT_R_EAR, item);
|
||||
player:graphicChange(GRAPHICSLOT_L_EAR, item);
|
||||
player:GraphicChange(GRAPHICSLOT_R_EAR, item);
|
||||
player:GraphicChange(GRAPHICSLOT_L_EAR, item);
|
||||
end
|
||||
|
||||
--Load gearset for new class and begin class change
|
||||
if (classId ~= nil) then
|
||||
loadGearset(player, classId);
|
||||
player:doClassChange(classId);
|
||||
player:DoClassChange(classId);
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -194,20 +194,20 @@ function unequipItem(player, equipSlot, item)
|
|||
|
||||
if (equipSlot == EQUIPSLOT_BODY) then --Show Undershirt
|
||||
item = player:GetEquipment():GetItemAtSlot(EQUIPSLOT_UNDERSHIRT);
|
||||
player:graphicChange(GRAPHICSLOT_BODY, item);
|
||||
player:GraphicChange(GRAPHICSLOT_BODY, item);
|
||||
elseif (equipSlot == EQUIPSLOT_LEGS) then --Show Undergarment
|
||||
item = player:GetEquipment():GetItemAtSlot(EQUIPSLOT_UNDERGARMENT);
|
||||
player:graphicChange(GRAPHICSLOT_LEGS, item);
|
||||
elseif (equipSlot == EQUIPSLOT_HANDS) then player:graphicChange(15, 0, 1, 0, 0);
|
||||
elseif (equipSlot == EQUIPSLOT_FEET) then player:graphicChange(16, 0, 1, 0, 0);
|
||||
player:GraphicChange(GRAPHICSLOT_LEGS, item);
|
||||
elseif (equipSlot == EQUIPSLOT_HANDS) then player:GraphicChange(15, 0, 1, 0, 0);
|
||||
elseif (equipSlot == EQUIPSLOT_FEET) then player:GraphicChange(16, 0, 1, 0, 0);
|
||||
else
|
||||
if (equipSlot == EQUIPSLOT_MAINHAND) then player:graphicChange(GRAPHICSLOT_MAINHAND, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_OFFHAND) then player:graphicChange(GRAPHICSLOT_OFFHAND, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_HEAD) then player:graphicChange(GRAPHICSLOT_HEAD, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_WAIST) then player:graphicChange(GRAPHICSLOT_WAIST, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_EARS) then player:graphicChange(GRAPHICSLOT_L_EAR, nil); player:graphicChange(GRAPHICSLOT_R_EAR, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_RFINGER) then player:graphicChange(GRAPHICSLOT_RFINGER, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_LFINGER) then player:graphicChange(GRAPHICSLOT_LFINGER, nil);
|
||||
if (equipSlot == EQUIPSLOT_MAINHAND) then player:GraphicChange(GRAPHICSLOT_MAINHAND, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_OFFHAND) then player:GraphicChange(GRAPHICSLOT_OFFHAND, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_HEAD) then player:GraphicChange(GRAPHICSLOT_HEAD, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_WAIST) then player:GraphicChange(GRAPHICSLOT_WAIST, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_EARS) then player:GraphicChange(GRAPHICSLOT_L_EAR, nil); player:GraphicChange(GRAPHICSLOT_R_EAR, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_RFINGER) then player:GraphicChange(GRAPHICSLOT_RFINGER, nil);
|
||||
elseif (equipSlot == EQUIPSLOT_LFINGER) then player:GraphicChange(GRAPHICSLOT_LFINGER, nil);
|
||||
end
|
||||
end
|
||||
return true;
|
||||
|
|
|
@ -10,6 +10,6 @@ The param "itemDBIds" has the vars: item1 and item2.
|
|||
--]]
|
||||
|
||||
function onEventStarted(player, actor, triggerName, invActionInfo, param1, param2, param3, param4, param5, param6, param7, param8, itemDBIds)
|
||||
player:GetInventory(0x00):removeItem(invActionInfo.slot);
|
||||
player:GetInventory(0x00):RemoveItem(invActionInfo.slot);
|
||||
player:EndCommand();
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ Countdown: 1
|
|||
function onEventStarted(player, command)
|
||||
--player:SetCurrentMenuId(0);
|
||||
--player:RunEventFunction("delegateCommand", command, "eventConfirm");
|
||||
player:logout();
|
||||
player:Logout();
|
||||
end
|
||||
|
||||
function onEventUpdate(player, command, triggerName, step, arg1, arg2)
|
||||
|
@ -28,10 +28,10 @@ function onEventUpdate(player, command, triggerName, step, arg1, arg2)
|
|||
--Menu Dialog
|
||||
if (currentMenuId == 0) then
|
||||
if (arg1 == 1) then --Exit
|
||||
player:quitGame();
|
||||
player:QuitGame();
|
||||
player:EndCommand();
|
||||
elseif (arg1 == 2) then --Character Screen
|
||||
player:logout();
|
||||
player:Logout();
|
||||
player:EndCommand();
|
||||
--player:SetCurrentMenuId(1);
|
||||
--player:RunEventFunction("delegateCommand", command, "eventCountDown");
|
||||
|
@ -42,7 +42,7 @@ function onEventUpdate(player, command, triggerName, step, arg1, arg2)
|
|||
elseif (currentMenuId == 1) then
|
||||
|
||||
if (arg2 == 1) then --Logout Complete
|
||||
player:logout();
|
||||
player:Logout();
|
||||
player:EndCommand();
|
||||
elseif (arg2 == 2) then --Cancel Pressed
|
||||
player:EndCommand();
|
||||
|
|
|
@ -6,18 +6,18 @@ function onBeginLogin(player)
|
|||
if (player:GetPlayTime(false) == 0) then
|
||||
initialTown = player:GetInitialTown();
|
||||
|
||||
if (initialTown == 1 and player:hasQuest(110001) == false) then
|
||||
if (initialTown == 1 and player:HasQuest(110001) == false) then
|
||||
player:AddQuest(110001);
|
||||
elseif (initialTown == 2 and player:hasQuest(110005) == false) then
|
||||
elseif (initialTown == 2 and player:HasQuest(110005) == false) then
|
||||
player:AddQuest(110005);
|
||||
elseif (initialTown == 3 and player:hasQuest(110009) == false) then
|
||||
elseif (initialTown == 3 and player:HasQuest(110009) == false) then
|
||||
player:AddQuest(110009);
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--For Opening. Set Director and reset position incase d/c
|
||||
if (player:hasQuest(110001) == true) then
|
||||
if (player:HasQuest(110001) == true) then
|
||||
--player:SetDirector("openingDirector", false);
|
||||
player.positionX = 0.016;
|
||||
player.positionY = 10.35;
|
||||
|
@ -26,7 +26,7 @@ function onBeginLogin(player)
|
|||
player.rotation = 0.025;
|
||||
player:GetQuest(110001):ClearQuestData();
|
||||
player:GetQuest(110001):ClearQuestFlags();
|
||||
elseif (player:hasQuest(110005) == true) then
|
||||
elseif (player:HasQuest(110005) == true) then
|
||||
player:SetDirector("openingDirector", false);
|
||||
player.positionX = 369.5434;
|
||||
player.positionY = 4.21;
|
||||
|
@ -34,7 +34,7 @@ function onBeginLogin(player)
|
|||
player.rotation = -1.26721;
|
||||
player:GetQuest(110005):ClearQuestData();
|
||||
player:GetQuest(110005):ClearQuestFlags();
|
||||
elseif (player:hasQuest(110009) == true) then
|
||||
elseif (player:HasQuest(110009) == true) then
|
||||
player:SetDirector("openingDirector", false);
|
||||
player.positionX = 5.364327;
|
||||
player.positionY = 196.0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue