1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-23 05:07:47 +00:00

Added scripts needed.

This commit is contained in:
Filip Maj 2017-01-09 00:17:46 -05:00
parent 771b5b6d81
commit bc72147622
5 changed files with 108 additions and 0 deletions

View file

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

View file

@ -0,0 +1,12 @@
--[[
LinkshellAppointCommand Script
--]]
function onEventStarted(player, actor, triggerName, linkshellName, memberName, rank)
GetWorldManager():RequestWorldLinkshellRankChange(player, linkshellName, memberName, rank);
player:EndEvent();
end

View file

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

View file

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

View file

@ -0,0 +1,12 @@
--[[
LinkshellLeaveCommand Script
--]]
function onEventStarted(player, actor, triggerName, linkshellName)
GetWorldManager():RequestWorldLinkshellLeave(player, linkshellName);
player:EndEvent();
end