diff --git a/data/scripts/commands/DummyCommand.lua b/data/scripts/commands/DummyCommand.lua new file mode 100644 index 00000000..ca26f9ce --- /dev/null +++ b/data/scripts/commands/DummyCommand.lua @@ -0,0 +1,56 @@ +--[[ + +HarvestJudge + +Operates the harvesting system for mining, logging, and fishing. + +Functions: + +loadTextData(commandActor): Loads all gamesheets needed and instantiates a HarvestJudge. +targetCancel(commandActor): Cancels the player's target. +turnToTarget(commandActor, harvestType, direction): Turns to a direction (name's a lie, angle must be computed lol) +openInputWidget(commandActor, harvestType, nodeGrade): Inits the widget system (call first). +orderInputWidget(commandActor, nodeHP [max 100], ?, harvestType): Updates the node HP. +textInputWidget(commandActor, harvestType, ?, textId, ?, ?, ?): Sets the result text after a minigame is performed. +askInputWidget(commandActor, harvestType, inputPageNumber, showTutorial, showFishWait, showFishWaitAndJig, updateFishHP, showRareCatalystEffect): Gets user input after opening a ask widget. +closeInputWidget(commandActor, harvestType): Closes the widget system (call last). +rangeInputWidget(harvestType, inputPageNumber, goodMin, goodMax, bool): Unknown, currently crashing... + +Notes: + +HarvestType Ids: + +20002: Mine +20003: Log +20004: Fish + +--]] + +require ("global") + +function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg4, checkedActorId) + + harvestJudge = GetStaticActor("HarvestJudge"); + callClientFunction(player, "delegateCommand", harvestJudge, "loadTextData", commandactor); + callClientFunction(player, "delegateCommand", harvestJudge, "targetCancel", commandactor); + callClientFunction(player, "delegateCommand", harvestJudge, "turnToTarget", commandactor, 0x55F2, 2); + + player:ChangeState(50); + + callClientFunction(player, "delegateCommand", harvestJudge, "openInputWidget", commandactor, 0x55F2, 2); + callClientFunction(player, "delegateCommand", harvestJudge, "orderInputWidget", commandactor, 3, false, 0x55f2); + callClientFunction(player, "delegateCommand", harvestJudge, "textInputWidget", commandactor, 0x55f2, harvestJudge, nil, nil, nil, nil, 0); + callClientFunction(player, "delegateCommand", harvestJudge, "askInputWidget", commandactor, 0x55f2, 1, 0, false, false, nil, false); + + callClientFunction(player, "delegateCommand", harvestJudge, "textInputWidget", commandactor, 0x55f2, harvestJudge, 60, nil, nil, nil, 0); + callClientFunction(player, "delegateCommand", harvestJudge, "askInputWidget", commandactor, 0x55f2, 2, 0, false, false, nil, false); + + callClientFunction(player, "delegateCommand", harvestJudge, "textInputWidget", commandactor, 0x55f2, harvestJudge, 46,0, 0, 0, 0); + callClientFunction(player, "delegateCommand", harvestJudge, "askInputWidget", commandactor, 0x55f2, 2, 0, false, false, nil, false); + + + player:ChangeState(0); + + player:EndEvent(); + +end diff --git a/data/scripts/commands/LinkshellAppointCommand.lua b/data/scripts/commands/LinkshellAppointCommand.lua new file mode 100644 index 00000000..5d497c30 --- /dev/null +++ b/data/scripts/commands/LinkshellAppointCommand.lua @@ -0,0 +1,12 @@ +--[[ + +LinkshellAppointCommand Script + +--]] + +function onEventStarted(player, actor, triggerName, linkshellName, memberName, rank) + + GetWorldManager():RequestWorldLinkshellRankChange(player, linkshellName, memberName, rank); + player:EndEvent(); + +end \ No newline at end of file diff --git a/data/scripts/commands/LinkshellInviteCancelCommand.lua b/data/scripts/commands/LinkshellInviteCancelCommand.lua new file mode 100644 index 00000000..8888224b --- /dev/null +++ b/data/scripts/commands/LinkshellInviteCancelCommand.lua @@ -0,0 +1,14 @@ +--[[ + +LinkshellInviteCancelCommand Script + +Handles what happens when you cancel an invite to a linkshell + +--]] + +function onEventStarted(player, actor, triggerName, arg1, arg2, arg3, arg4, actorId) + + GetWorldManager():RequestWorldLinkshellCancelInvite(player); + player:EndEvent(); + +end \ No newline at end of file diff --git a/data/scripts/commands/LinkshellInviteCommand.lua b/data/scripts/commands/LinkshellInviteCommand.lua new file mode 100644 index 00000000..de8853bd --- /dev/null +++ b/data/scripts/commands/LinkshellInviteCommand.lua @@ -0,0 +1,14 @@ +--[[ + +LinkshellInviteCommand Script + +Handles what happens when you invite a player to a linkshell + +--]] + +function onEventStarted(player, actor, triggerName, linkshellName, arg1, arg2, arg3, actorId) + + GetWorldManager():RequestWorldLinkshellInviteMember(player, linkshellName, actorId); + player:EndEvent(); + +end \ No newline at end of file diff --git a/data/scripts/commands/LinkshellResignCommand.lua b/data/scripts/commands/LinkshellResignCommand.lua new file mode 100644 index 00000000..68da82b7 --- /dev/null +++ b/data/scripts/commands/LinkshellResignCommand.lua @@ -0,0 +1,12 @@ +--[[ + +LinkshellLeaveCommand Script + +--]] + +function onEventStarted(player, actor, triggerName, linkshellName) + + GetWorldManager():RequestWorldLinkshellLeave(player, linkshellName); + player:EndEvent(); + +end \ No newline at end of file