mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
38dd05c848 | ||
|
4762811347 | ||
|
7e4fc52b9e | ||
|
e5a9658b5a | ||
|
ce2d22d984 | ||
|
52da0a671f |
@@ -272,7 +272,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
|
||||
owner.QueuePacket(InventoryEndChangePacket.BuildPacket(owner.actorId));
|
||||
}
|
||||
|
||||
public void RemoveItem(ulong itemDBId)
|
||||
public void RemoveItemByUniqueId(ulong itemDBId)
|
||||
{
|
||||
ushort slot = 0;
|
||||
InventoryItem toDelete = null;
|
||||
@@ -314,7 +314,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.player
|
||||
|
||||
}
|
||||
|
||||
public void RemoveItem(ushort slot)
|
||||
public void RemoveItemAtSlot(ushort slot)
|
||||
{
|
||||
if (slot >= list.Count)
|
||||
return;
|
||||
|
@@ -233,6 +233,8 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
charaWork.eventSave.bazaarTax = 5;
|
||||
charaWork.battleSave.potencial = 6.6f;
|
||||
|
||||
charaWork.battleSave.negotiationFlag[0] = true;
|
||||
|
||||
charaWork.commandCategory[0] = 1;
|
||||
charaWork.commandCategory[1] = 1;
|
||||
charaWork.commandCategory[32] = 1;
|
||||
@@ -400,6 +402,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
//Commands
|
||||
propPacketUtil.AddProperty("charaWork.commandBorder");
|
||||
|
||||
propPacketUtil.AddProperty("charaWork.battleSave.negotiationFlag[0]");
|
||||
|
||||
for (int i = 0; i < charaWork.command.Length; i++)
|
||||
{
|
||||
|
@@ -50,6 +50,8 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
||||
isExclusive = reader.GetBoolean("isExclusive");
|
||||
|
||||
durability = reader.GetInt32("durability");
|
||||
sellPrice = reader.GetInt32("sellPrice");
|
||||
|
||||
icon = reader.GetInt32("icon");
|
||||
kind = reader.GetInt32("kind");
|
||||
rarity = reader.GetInt32("rarity");
|
||||
|
@@ -7,7 +7,7 @@ If you wish to discuss and help please join the Discord server.
|
||||
|
||||
**Discord Server Invite**
|
||||
|
||||
https://discord.gg/0ynLxiEl0zWhpKOW
|
||||
https://discord.gg/fBmGkSZbaD
|
||||
|
||||
Pull Requests
|
||||
========
|
||||
|
@@ -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):RemoveItemAtSlot(invActionInfo.slot);
|
||||
player:EndEvent();
|
||||
end
|
||||
|
56
data/scripts/commands/NegotiationCommand.lua
Normal file
56
data/scripts/commands/NegotiationCommand.lua
Normal file
@@ -0,0 +1,56 @@
|
||||
--[[
|
||||
|
||||
NegotiationCommand Script
|
||||
|
||||
Functions:
|
||||
|
||||
openListWidget(player, originId, 10 bools to show/hide) - Shows a list of things to Parley for based on a sequential list from xtx_negotiationTable.
|
||||
openAskWidget(player, title, difficulty, desiredItemId, requiredItemId) - Opens the widget asking if the player will Parley.
|
||||
openNegotiationWidget(player, title, itemId, maxTurns, time, ability1, ability2, ability3, ability4, ability5) - Inits the widget system (call first).
|
||||
inputNegotiationWidget(player, ?, abort, resumeTimer) - Begins player input.
|
||||
closeNegotiationWidget(player) - Closes the Parley widget.
|
||||
negotiationEmote(player, animId) - Plays an animation
|
||||
|
||||
updateNegotiationWidget(player, gridIndex, key, itemIconId, pointValue, ?, ?) - Updates the Parley UI depending on the first argument:
|
||||
|
||||
< 12: Places Item
|
||||
13: Plays SFX + ???
|
||||
14: Sets the Negotiation Gauge (max, value)
|
||||
15: Sets the Achievement Gauge (max, value)
|
||||
|
||||
16: Additional Item 1 (bool)
|
||||
17: Additional Item 2(bool)
|
||||
18: Additional Item 3(bool)
|
||||
|
||||
19: Set the last chosen items (index[1-6], iconId)
|
||||
|
||||
20:
|
||||
21:
|
||||
|
||||
22: Clear Timer
|
||||
23: Play player move SFX
|
||||
24: Play opponent move SFX
|
||||
25: Play times up SFX and close ability widget
|
||||
26:
|
||||
27:
|
||||
28: Pauses the Timer
|
||||
29: Resumes the Timer
|
||||
|
||||
--]]
|
||||
|
||||
require ("global")
|
||||
|
||||
function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg4, arg5)
|
||||
|
||||
negotiationJudge = GetStaticActor("NegotiationJudge");
|
||||
|
||||
callClientFunction(player, "delegateCommand", negotiationJudge, "negotiationEmote", player, 403087360);
|
||||
--callClientFunction(player, "delegateCommand", negotiationJudge, "openAskWidget", player, 1302, 5, 1000019, 1000019);
|
||||
--callClientFunction(player, "delegateCommand", negotiationJudge, "openListWidget", player, 3711, true, true, true, true, false, false, false, false, false, false);
|
||||
callClientFunction(player, "delegateCommand", negotiationJudge, "openNegotiationWidget", player, 1302, 1000019, 15, 20, 0, 0, 0, 0, 0);
|
||||
callClientFunction(player, "delegateCommand", negotiationJudge, "updateNegotiationWidget", player, 2, 2007, 60662, 5, false, false);
|
||||
callClientFunction(player, "delegateCommand", negotiationJudge, "inputNegotiationWidget", player, 1, false, true);
|
||||
callClientFunction(player, "delegateCommand", negotiationJudge, "closeNegotiationWidget", player);
|
||||
|
||||
player:EndEvent();
|
||||
end
|
@@ -71,12 +71,29 @@ CHOCOBO_ULDAH4 = 0x40;
|
||||
|
||||
--UTILS
|
||||
|
||||
function kickEventContinue(player, actor, trigger, ...)
|
||||
player:kickEvent(actor, trigger, ...);
|
||||
return coroutine.yield("_WAIT_EVENT", player);
|
||||
end
|
||||
|
||||
function callClientFunction(player, functionName, ...)
|
||||
player:RunEventFunction(functionName, ...);
|
||||
result = coroutine.yield();
|
||||
player:RunEventFunction(functionName, ...);
|
||||
result = coroutine.yield("_WAIT_EVENT", player);
|
||||
return result;
|
||||
end
|
||||
|
||||
function wait(seconds)
|
||||
return coroutine.yield("_WAIT_TIME", seconds);
|
||||
end
|
||||
|
||||
function waitForSignal(signal)
|
||||
return coroutine.yield("_WAIT_SIGNAL", signal);
|
||||
end
|
||||
|
||||
function sendSignal(signal)
|
||||
GetLuaInstance():OnSignal(signal);
|
||||
end
|
||||
|
||||
function printf(s, ...)
|
||||
if ... then
|
||||
print(s:format(...));
|
||||
|
Reference in New Issue
Block a user