1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-24 05:37:46 +00:00

Forgot script.

This commit is contained in:
Filip Maj 2018-04-10 01:07:38 -04:00
parent 1d3dd99414
commit 7abfbd5953

View file

@ -10,6 +10,12 @@ eventTalkStepMakeupDone() - Confirm when creating LS
eventTalkStepModifyDone() - Confirm when modding LS
eventTalkStepBreakDone() - Confirm when deleting LS
Text IDs:
25121 - That [@SWITCH($E8(1),linkshell,company)] name is already being used.
25122 - That [@SWITCH($E8(1),linkshell,company)] name cannot be used.
25123 - The [@SWITCH($E8(1),linkshell,company)] [@STRING($EA(2))] has been [@SWITCH($E8(1),created,founded)].
--]]
require ("global")
@ -18,41 +24,46 @@ function init(npc)
return false, false, 0, 0;
end
function createLinkshell(name, crest)
function createLinkshell(player, name, crest)
GetWorldManager():RequestWorldLinkshellCreate(player, name, crest);
return waitForSignal("ls_result");
end
function modifyLinkshell(player, name, crest)
end
function modifyLinkshell(name, crest)
end
function disbandLinkshell(name, crest)
function disbandLinkshell(player, name, crest)
end
function onEventStarted(player, npc, triggerName)
hasNoActiveLS = false;
local hasNoActiveLS = false;
callClientFunction(player, "eventTalkStep1", hasNoActiveLS);
command, lsName, crestId = callClientFunction(player, "eventTalkStep2", hasNoActiveLS);
local command, lsName, crestId = callClientFunction(player, "eventTalkStep2", hasNoActiveLS);
--Create
if (result == 3) then
player:SendMessage(0x20, "", "" .. tostring(lsName));
player:SendMessage(0x20, "", "" .. tostring(crestId));
player:SendMessage(0x20, "", "" .. tostring(command));
createLinkshell(lsName, crestId);
if (command == 3) then
local result = createLinkshell(player, lsName, crestId);
if (result == 0) then
callClientFunction(player, "eventTalkStepMakeupDone");
elseif (result == 1) then
player:SendGameMessage(player, GetWorldMaster(), 25121, 0x20); --LS already exists
callClientFunction(player, "eventTalkStepBreakDone");
elseif (result == 2) then
player:SendGameMessage(player, GetWorldMaster(), 25122, 0x20); --Cannot use this name (reserved/banned)
callClientFunction(player, "eventTalkStepBreakDone");
elseif (result == 3) then
end
--Modify
elseif (result == 4) then
modifyLinkshell(lsName, crestId);
elseif (command == 4) then
modifyLinkshell(player, lsName, crestId);
callClientFunction(player, "eventTalkStepModifyDone");
--Disband
elseif (result == 5) then
disbandLinkshell(lsName, crestId);
elseif (command == 5) then
disbandLinkshell(player, lsName, crestId);
callClientFunction(player, "eventTalkStepBreakDone");
end