6 Commits
v0.1 ... master

Author SHA1 Message Date
Filip Maj
38dd05c848 README.md edited online with Bitbucket 2022-11-18 16:32:13 +00:00
Filip Maj
4762811347 Fixed global.lua be screwed up by merge. 2017-08-30 19:43:20 -04:00
Filip Maj
7e4fc52b9e Some extra documentation for the Parley script. 2017-08-26 17:04:36 -04:00
Filip Maj
e5a9658b5a Added Parley code to experiment with. 2017-08-26 16:59:15 -04:00
Filip Maj
ce2d22d984 Added sellprice assignment to ItemData.cs. Forgot it! 2017-08-26 14:24:39 -04:00
Filip Maj
52da0a671f Updated method names of "RemoveItem" as Lua hates overloads. 2017-08-26 14:21:54 -04:00
7 changed files with 84 additions and 6 deletions

View File

@@ -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;

View File

@@ -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++)
{

View File

@@ -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");

View File

@@ -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
========

View File

@@ -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

View 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

View File

@@ -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(...));