More fixings and improvements.

This commit is contained in:
Filip Maj 2017-03-14 18:33:33 -04:00
parent 718bc28c57
commit b81141a158
5 changed files with 64 additions and 23 deletions

View file

@ -1,3 +1,5 @@
require ("global")
--[[
ActivateCommand Script
@ -10,15 +12,12 @@ function onEventStarted(player, command, triggerName)
if (player:GetState() == 0) then
player:ChangeState(2);
sendSignal("playerActive");
elseif (player:GetState() == 2) then
player:ChangeState(0);
sendSignal("playerPassive");
end
player:endEvent();
--For Opening Tutorial
--if (player:HasQuest("Man0l0") or player:HasQuest("Man0g0") or player:HasQuest("Man0u0")) then
--player:GetDirector("Quest/QuestDirectorMan0l001"):OnCommandEvent(player, command);
--end
end

View file

@ -19,10 +19,28 @@ end
function onEventStarted(player, actor, triggerName)
man0l0Quest = player:GetQuest("Man0l0");
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processTtrBtl001", nil, nil, nil);
player:EndEvent();
waitForSignal("playerActive");
kickEventContinue(player, actor, "noticeEvent", "noticeEvent");
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processTtrBtl002", nil, nil, nil);
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processEvent000_2", nil, nil, nil);
player:EndEvent();
wait(4);
player:SendRequestedInfo(5); --Close TutorialWidget
player:SendRequestedInfo(2, nil, nil, 9055, 9055, 9055); --Open TutorialSuccessWidget for attacking enemy
wait(4);
player:SendRequestedInfo(4, nil, nil, nil, 12); --Open TP TutorialWidget
wait(4); --Should be wait for TP signal
player:SendRequestedInfo(5); --Close TutorialWidget
player:SendRequestedInfo(4, nil, nil, nil, 13); --Open WS TutorialWidget
wait(4); --Should be wait for weaponskillUsed signal
player:SendRequestedInfo(5); --Close TutorialWidget
player:SendRequestedInfo(2, nil, nil, 9065, 9065, 9065); --Open TutorialSuccessWidget for weapon skill
wait(4); --Should be wait for mobkill
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processEvent000_2", nil, nil, nil);
player:ChangeMusic(7);
callClientFunction(player, "delegateEvent", player, man0l0Quest, "processEvent000_3", nil, nil, nil);

View file

@ -53,14 +53,19 @@ INVENTORY_EQUIPMENT_OTHERPLAYER = 0x00F9; --Max 0x23
--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("_WAIT_EVENT");
result = coroutine.yield("_WAIT_EVENT", player);
return result;
end
function wait(seconds)
return coroutine.yield(_WAIT_TIME, seconds);
return coroutine.yield("_WAIT_TIME", seconds);
end
function waitForSignal(signal)