Cleaned up the new scripting code. Added a helper function to do the yielding automatically. Modified all the scripts to use the new system and added a few new ones.

This commit is contained in:
Filip Maj 2016-06-19 18:52:34 -04:00
parent 51bbf4ae2e
commit 8743042950
28 changed files with 316 additions and 167 deletions

View File

@ -247,11 +247,10 @@ namespace FFXIVClassic_Map_Server
Actor ownerActor = Server.GetStaticActors(eventStart.scriptOwnerActorID); Actor ownerActor = Server.GetStaticActors(eventStart.scriptOwnerActorID);
if (ownerActor != null)
{ player.GetActor().currentEventOwner = eventStart.scriptOwnerActorID;
player.GetActor().currentEventOwner = eventStart.scriptOwnerActorID; player.GetActor().currentEventName = eventStart.triggerName;
player.GetActor().currentEventName = eventStart.triggerName;
}
if (ownerActor == null) if (ownerActor == null)
{ {

View File

@ -1131,7 +1131,19 @@ namespace FFXIVClassic_Map_Server.Actors
if (owner is Npc) if (owner is Npc)
{ {
currentEventRunning = ((Npc)owner).GetEventStartCoroutine(this); currentEventRunning = ((Npc)owner).GetEventStartCoroutine(this);
currentEventRunning.Resume(objects.ToArray());
if (currentEventRunning != null)
{
try
{
currentEventRunning.Resume(objects.ToArray());
}
catch (ScriptRuntimeException e)
{
Program.Log.Error("[LUA] {0}", e.Message);
EndEvent();
}
}
} }
else else
{ {

View File

@ -1,11 +1,10 @@
require ("global")
function init(npc) function init(npc)
return false, false, 0, 0; return false, false, 0, 0;
end end
function onEventStarted(player, npc, triggerName) function onEventStarted(player, npc, triggerName)
player:RunEventFunction("bookTalk"); player:callClientFunction(player, "bookTalk");
player:EndEvent();
end end
function onEventUpdate(player, npc, step, menuOptionSelected)
player:EndEvent();
end

View File

@ -1,25 +1,21 @@
require ("global")
function init(npc) function init(npc)
return false, false, 0, 0; return false, false, 0, 0;
end end
function onEventStarted(player, npc, triggerName) function onEventStarted(player, npc, triggerName)
player:RunEventFunction("askLogout", player);
end
function onEventUpdate(player, npc, eventStep, menuOptionSelected) choice = callClientFunction(player, "askLogout", player);
if (menuOptionSelected == 1) then if (choice == 2) then
player:EndEvent();
return;
elseif (menuOptionSelected == 2) then
player:QuitGame(); player:QuitGame();
elseif (menuOptionSelected == 3) then elseif (choice == 3) then
player:Logout(); player:Logout();
elseif (menuOptionSelected == 4) then elseif (choice == 4) then
player:SendMessage(33, "", "Heck the bed"); player:SendMessage(33, "", "Heck the bed");
end end
player:EndEvent(); player:EndEvent();
end end

View File

@ -1,3 +1,4 @@
require ("global")
function init(npc) function init(npc)
return false, false, 0, 0; return false, false, 0, 0;
@ -5,15 +6,11 @@ end
function onEventStarted(player, npc, triggerName) function onEventStarted(player, npc, triggerName)
defaultFst = GetStaticActor("DftFst"); defaultFst = GetStaticActor("DftFst");
player:RunEventFunction("delegateEvent", player, defaultFst, "defaultTalkWithInn_ExitDoor", nil, nil, nil); choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_ExitDoor", nil, nil, nil);
end
if (choice == 1) then
function onEventUpdate(player, npc, resultId, isExitYes)
if (isExitYes ~= nil and isExitYes == 1) then
GetWorldManager():DoZoneChange(player, 1); GetWorldManager():DoZoneChange(player, 1);
else
player:EndEvent();
end end
player:EndEvent();
end end

View File

@ -1,9 +1,3 @@
function init(npc) function init(npc)
return false, false, 0, 0; return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
end
function onEventUpdate(player, npc)
end end

View File

@ -16,23 +16,80 @@ eventTalkChangeOne(skipQuestion)
talkOfferMaxOver() talkOfferMaxOver()
askRetryRegionalleve(guildLeveId, leveAllowances); askRetryRegionalleve(guildLeveId, leveAllowances);
Menu Ids:
--]] --]]
require ("global")
function init(npc) function init(npc)
return false, false, 0, 0; return false, false, 0, 0;
end end
function onEventStarted(player, npc) function onEventStarted(player, npc)
player:RunEventFunction("eventTalkType", 0x30, true, 0x02CE, 0x356, 0x367, true, 0, nil, 0x29, 0,0,0);
::MENU_LOOP::
menuChoice = callClientFunction(player, "eventTalkType", 0x30, true, 0x02CE, 0x356, 0x367, true, 0, nil, 0x29, 0,0,0);
--Battlecraft
if (menuChoice == 1) then
resultGLPack = callClientFunction(player, "eventTalkPack", 201, 207);
if (resultGLPack == nil) then
goto MENU_LOOP;
else
::CARDS_LOOP::
cards = {0x30C3, 0x30C4, 0x30C1, 0x30C5, 0x30C6, 0x30C7, 0x30C8, 0x30C9};
chosenGLCard = callClientFunction(player, "eventTalkCard", cards[1], cards[2], cards[3], cards[4], cards[5], cards[6], cards[7], cards[8]);
if (chosenGLCard == -1) then
goto MENU_LOOP;
else
wasAccepted = callClientFunction(player, "eventTalkDetail", cards[chosenGLCard], 0, 0xF4242, 0xD, 0xF4242, 0, 0, true, 0);
if (wasAccepted == true) then
end
goto CARDS_LOOP;
end
end
--FieldCraft Miner
elseif (menuChoice == 0x15) then
--FieldCraft Botanist
elseif (menuChoice == 0x16) then
--FieldCraft Fisher
elseif (menuChoice == 0x17) then
--FieldCraft Quit
elseif (menuChoice == 0x18) then
--Faction Broken Blade
elseif (menuChoice == 0x29) then
--Faction Shields
elseif (menuChoice == 0x2A) then
--Faction Horn and Hand
elseif (menuChoice == 0x2B) then
--Leve Evaluation
elseif (menuChoice == 5) then
--Tutorial
elseif (menuChoice == 6) then
--End of Info
elseif (menuChoice == 7) then
--Quit
elseif (menuChoice == 8) then
end
--
--
--
player:EndEvent();
end end
function onEventUpdate(player, npc, step, menuOptionSelected) function onEventUpdate(player, npc, step, menuOptionSelected)
--player:RunEventFunction("eventTalkType", 0x32, true, 0x02CE, 0x356, 0x367, false, 2, nil, 0x29, 0,0,0); --player:RunEventFunction("eventTalkType", 0x32, true, 0x02CE, 0x356, 0x367, false, 2, nil, 0x29, 0,0,0);
player:RunEventFunction("eventTalkPack", 201, 207); player:RunEventFunction("eventTalkPack", 201, 207);
--player:RunEventFunction("eventTalkCard", 0x30C3, 0x30C4, 0x30C1, 0x30C5, 0x30C6, 0x30C7, 0x30C8, 0x30C9); --player:RunEventFunction("eventTalkCard", 0x30C3, 0x30C4, 0x30C1, 0x30C5, 0x30C6, 0x30C7, 0x30C8, 0x30C9);
--player:RunEventFunction("eventTalkDetail", 0x30C4, 2, 0xF4242, 0xD, 0xF4242, 0, 0xFF, true, 11); --
--player:RunEventFunction("eventGLChangeDetail", 0xDEAD, 0x30C4, 0xFF, 0xF4242, 0xD, 0xF4242, 0, 2, true); --player:RunEventFunction("eventGLChangeDetail", 0xDEAD, 0x30C4, 0xFF, 0xF4242, 0xD, 0xF4242, 0, 2, true);
player:EndEvent();
end end

View File

@ -1,28 +1,56 @@
--[[
PopulaceLinkshellManager Script
Functions:
eventTalkStep1(noLinkshellActive) - Says intro. If noLinkshellActive = true, say newbie stuff.
eventTalkStep2(noLinkshellActive) - Shows menu, if noLinkshellActive = true, only give ability to make linkshell.
eventTalkStepMakeupDone() - Confirm when creating LS
eventTalkStepModifyDone() - Confirm when modding LS
eventTalkStepBreakDone() - Confirm when deleting LS
--]]
require ("global")
function init(npc) function init(npc)
return false, false, 0, 0; return false, false, 0, 0;
end end
function onEventStarted(player, npc) function createLinkshell(name, crest)
isNew = false;
player:RunEventFunction("eventTalkStep1", isNew);
end end
function onEventUpdate(player, npc, step, menuOptionSelected, lsName, lsCrest) function modifyLinkshell(name, crest)
if (menuOptionSelected == nil) then
player:EndEvent();
return;
end
isNew = false;
if (menuOptionSelected == 1) then
player:RunEventFunction("eventTalkStep2", isNew);
elseif (menuOptionSelected == 10) then
player:EndEvent();
return;
elseif (menuOptionSelected == 3) then
--createLinkshell
player:RunEventFunction("eventTalkStepMakeupDone", isNew);
end
end
function disbandLinkshell(name, crest)
end
function onEventStarted(player, npc, triggerName)
hasNoActiveLS = false;
callClientFunction(player, "eventTalkStep1", hasNoActiveLS);
command, lsName, crestId = callClientFunction(player, "eventTalkStep2", hasNoActiveLS);
--Create
if (result == 3) then
createLinkshell(lsName, crestId);
callClientFunction(player, "eventTalkStepMakeupDone");
--Modify
elseif (result == 1) then
modifyLinkshell(lsName, crestId);
callClientFunction(player, "eventTalkStepModifyDone");
--Disband
elseif (result == 5) then
disbandLinkshell(lsName, crestId);
callClientFunction(player, "eventTalkStepBreakDone");
end
player:endEvent();
end end

View File

@ -0,0 +1,77 @@
--[[
PopulaceRetainerManager Script
Functions:
eventTalkStep1(true) - Intro tutorial if no retainer
newEventTalkStep1(sayIntro) - Seems to be a post-Tanaka version of the intro????
eventTalkStep2() - Choose retainer yourself (go to race select) or let npc do it
eventTaklSelectCutSeane(cutsceneName, actorClassId1, actorClassId2, actorClassId3, actorClassId4, actorClassId5) - Starts the advance cutscene to choose a retainer. 5 retainer actorClassId's are given.
eventTalkStep4(actorClassId) - Opens up the retainer naming dialog
eventTalkStepFinalAnswer(actorClassId) - Confirm Dialog
eventTalkStepError(errorCode) - Error dialog, 1: No Extra Retainers, 2: Server Busy.
eventTalkStepFinish()
--]]
require ("global")
function init(npc)
return false, false, 0, 0;
end
function onEventStarted(player, npc, triggerName)
introChoice = callClientFunction(player, "newEventTalkStep1", false);
if (introChoice == 1) then
raceChoice = callClientFunction(player, "eventTalkStep2");
while (true) do
if (retainerChoice == 0) then
raceChoice = callClientFunction(player, "eventTalkStep22");
end
if (raceChoice == 0) then
--Choose random actorId
elseif (raceChoice > 0) then
--Choose 5 random but correct actor ids
retainerChoice = callClientFunction(player, "eventTaklSelectCutSeane", "rtn0g010", 0x2DCB1A, 0x2DCB1A, 0x2DCB1A, 0x2DCB1A, 0x2DCB1A);
if (retainerChoice == -1) then
player:EndEvent();
return;
elseif (retainerChoice > 0) then
--Retainer chosen, choose name
retainerName = callClientFunction(player, "eventTalkStep4", 0x2DCB1A);
if (retainerName ~= "") then
confirmChoice = callClientFunction(player, "eventTalkStepFinalAnswer", 0x2DCB1A);
if (confirmChoice == 1) then
callClientFunction(player, "eventTalkStepFinish");
player:EndEvent();
return;
elseif (confirmChoice == 3) then
raceChoice = 0;
else
player:EndEvent();
return;
end
end
end
else
break;
end
end
end
player:EndEvent();
end

View File

@ -1,3 +1,5 @@
require ("global")
function init(npc) function init(npc)
return false, false, 0, 0; return false, false, 0, 0;
end end
@ -44,12 +46,10 @@ function onEventStarted(player, npc)
saySheetId = 19; saySheetId = 19;
end end
player:RunEventFunction("welcomeTalk", nil, saySheetId, player); callClientFunction(player, "welcomeTalk", nil, saySheetId, player);
coroutine.yield();
while (true) do while (true) do
player:RunEventFunction("selectMode", nil, npc:GetActorClassId(), false, 1000001); --Step 2, state your business choice = callClientFunction(player, "selectMode", nil, npc:GetActorClassId(), false, 1000001); --Step 2, state your business
choice = coroutine.yield();
if (choice == 3) then if (choice == 3) then
@ -60,17 +60,4 @@ function onEventStarted(player, npc)
end end
end
function onEventUpdate(player, npc, step, menuOptionSelected)
--player:RunEventFunction("cashbackTalkCommand", 22004, 22004, 22004, 22004, 22004, 22004, 22004, 22004, 22004, 22004, 22004); --Refund Abilities???
--player:RunEventFunction("cashbackTalk", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); --Refund items???
if (menuOptionSelected == 4) then
player:EndEvent();
else
player:RunEventFunction("selectMode", nil, npc:GetActorClassId(), false, 1000001); --Step 2, state your business
end
end end

View File

@ -29,11 +29,7 @@ finishTalkTurn() - Done at the end.
--]] --]]
function callClientFunction(player, functionName, ...) require ("global")
player:RunEventFunction(functionName, ...);
result = coroutine.yield();
return result;
end
function init(npc) function init(npc)
return false, false, 0, 0; return false, false, 0, 0;

View File

@ -14,7 +14,7 @@ function onEventStarted(player, command, triggerName)
player:ChangeState(0); player:ChangeState(0);
end end
player:EndCommand(); player:endEvent();
--For Opening Tutorial --For Opening Tutorial
if (player:HasQuest("Man0l0") or player:HasQuest("Man0g0") or player:HasQuest("Man0u0")) then if (player:HasQuest("Man0l0") or player:HasQuest("Man0g0") or player:HasQuest("Man0u0")) then

View File

@ -16,7 +16,7 @@ function onEventStarted(player, actor, triggerName)
player:SendGameMessage(worldMaster, 32503, 0x20); player:SendGameMessage(worldMaster, 32503, 0x20);
end end
player:EndCommand(); player:EndEvent();
end end

View File

@ -8,16 +8,16 @@ operateUI(pointsAvailable, pointsLimit, str, vit, dex, int, min, pie)
--]] --]]
require ("global")
function onEventStarted(player, actor, triggerName) function onEventStarted(player, actor, triggerName)
--local points = player:GetAttributePoints(); --local points = player:GetAttributePoints();
--player:RunEventFunction("delegateCommand", actor, "operateUI", points.available, points.limit, points.inSTR, points.inVIT, points.inDEX, points.inINT, points.inMIN, points.inPIT); --player:RunEventFunction("delegateCommand", actor, "operateUI", points.available, points.limit, points.inSTR, points.inVIT, points.inDEX, points.inINT, points.inMIN, points.inPIT);
player:RunEventFunction("delegateCommand", actor, "operateUI", 10, 10, 10, 10, 10, 10, 10, 10); result = callClientFunction(player, "delegateCommand", actor, "operateUI", 100, 100, 10, 10, 10, 10, 10, 10);
end
function onEventUpdate(player, actor, step, arg1)
--Submit
player:EndCommand(); --Do Save
if (result == true) then
end
player:endEvent();
end end

View File

@ -14,6 +14,6 @@ function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg
player:examinePlayer(actor); player:examinePlayer(actor);
end end
player:EndCommand(); player:EndEvent();
end end

View File

@ -42,6 +42,6 @@ function onEventStarted(player, actor, triggerName, isGoobbue)
player:ChangeState(0); player:ChangeState(0);
end end
player:EndCommand(); player:EndEvent();
end end

View File

@ -15,7 +15,7 @@ function onEventStarted(player, actor, triggerName, maxNumber)
worldMaster = GetWorldMaster(); worldMaster = GetWorldMaster();
player:SendGameMessage(player, worldMaster, 25342, 0x20, result, maxNumber); player:SendGameMessage(player, worldMaster, 25342, 0x20, result, maxNumber);
player:EndCommand(); player:EndEvent();
end end

View File

@ -16,7 +16,7 @@ function onEventStarted(player, actor, triggerName, emoteId)
player:ChangeState(0); player:ChangeState(0);
end end
player:EndCommand(); player:EndEvent();
end end

View File

@ -15,7 +15,7 @@ function onEventStarted(player, actor, triggerName, emoteId)
player:DoEmote(emoteId); player:DoEmote(emoteId);
end end
player:EndCommand(); player:EndEvent();
end end

View File

@ -69,7 +69,7 @@ function onEventStarted(player, actor, triggerName, invActionInfo, param1, param
end end
end end
player:EndCommand(); player:EndEvent();
end end
function loadGearset(player, classId) function loadGearset(player, classId)

View File

@ -11,5 +11,5 @@ The param "itemDBIds" has the vars: item1 and item2.
function onEventStarted(player, actor, triggerName, invActionInfo, param1, param2, param3, param4, param5, param6, param7, param8, itemDBIds) function onEventStarted(player, actor, triggerName, invActionInfo, param1, param2, param3, param4, param5, param6, param7, param8, itemDBIds)
player:GetInventory(0x00):RemoveItem(invActionInfo.slot); player:GetInventory(0x00):RemoveItem(invActionInfo.slot);
player:EndCommand(); player:EndEvent();
end end

View File

@ -8,46 +8,20 @@ eventConfirm()
eventCountDown() eventCountDown()
eventLogoutFade() eventLogoutFade()
Menu Ids:
Menu: 0
Countdown: 1
--]] --]]
function onEventStarted(player, command) require ("global")
--player:SetCurrentMenuId(0);
--player:RunEventFunction("delegateCommand", command, "eventConfirm");
player:Logout();
end
function onEventUpdate(player, command, triggerName, step, arg1, arg2) function onEventStarted(player, command, triggerName)
currentMenuId = player:GetCurrentMenuId(); choice = callClientFunction(player, "delegateCommand", command, "eventConfirm");
--Menu Dialog if (choice == 1) then
if (currentMenuId == 0) then player:QuitGame();
if (arg1 == 1) then --Exit elseif (choice == 2) then
player:QuitGame(); player:Logout();
player:EndCommand();
elseif (arg1 == 2) then --Character Screen
player:Logout();
player:EndCommand();
--player:SetCurrentMenuId(1);
--player:RunEventFunction("delegateCommand", command, "eventCountDown");
elseif (arg1 == 3) then --Cancel
player:EndCommand();
end
--Countdown Dialog
elseif (currentMenuId == 1) then
if (arg2 == 1) then --Logout Complete
player:Logout();
player:EndCommand();
elseif (arg2 == 2) then --Cancel Pressed
player:EndCommand();
end
end end
end player:EndEvent();
end

View File

@ -14,6 +14,6 @@ function onEventStarted(player, actor, triggerName, name, arg1, arg2, arg3, acto
GetWorldManager():CreateInvitePartyGroup(player, actorId); GetWorldManager():CreateInvitePartyGroup(player, actorId);
end end
player:EndCommand(); player:EndEvent();
end end

View File

@ -8,22 +8,42 @@ eventRegion(numAnima)
eventAetheryte(region, animaCost1, animaCost2, animaCost3, animaCost4, animaCost5, animaCost6) eventAetheryte(region, animaCost1, animaCost2, animaCost3, animaCost4, animaCost5, animaCost6)
eventConfirm(isReturn, isInBattle, cityReturnNum, 138821, forceAskReturnOnly) eventConfirm(isReturn, isInBattle, cityReturnNum, 138821, forceAskReturnOnly)
Menu Ids:
Region Menu: 0
Aetheryte Menu: 1
Confirm Menu: 2
--]] --]]
require ("global")
function doTeleport(region, aetheryte)
end
function onEventStarted(player, actor, triggerName, isTeleport) function onEventStarted(player, actor, triggerName, isTeleport)
if (isTeleport == 0) then if (isTeleport == 0) then
player:SetCurrentMenuId(0); while (true) do
player:RunEventFunction("delegateCommand", actor, "eventRegion", 100); regionChoice = callClientFunction(player, "delegateCommand", actor, "eventRegion", 100);
if (regionChoice == nil) then break end
while (true) do
aetheryteChoice = callClientFunction(player, "delegateCommand", actor, "eventAetheryte", regionChoice, 2, 2, 2, 4, 4, 4);
if (aetheryteChoice == nil) then break end
confirmChoice = callClientFunction(player, "delegateCommand", actor, "eventConfirm", false, false, 1, 138824, false);
if (confirmChoice == 1) then
doTeleport(regionChoice, aetheryteChoice);
end
player:endEvent();
return;
end
end
else else
player:SetCurrentMenuId(2); callClientFunction(player, "delegateCommand", actor, "eventConfirm", true, false, 1, 0x138824, false);
player:RunEventFunction("delegateCommand", actor, "eventConfirm", true, false, 1, 0x138824, false); end
end
player:endEvent();
end end
function onEventUpdate(player, actor, step, arg1) function onEventUpdate(player, actor, step, arg1)
@ -48,4 +68,4 @@ function onEventUpdate(player, actor, step, arg1)
player:EndCommand(); player:EndCommand();
end end
end end

View File

@ -12,4 +12,12 @@ ACTORSTATE_ACTIVE = 2;
ACTORSTATE_DEAD2 = 3; ACTORSTATE_DEAD2 = 3;
ACTORSTATE_SITTING_ONOBJ = 11; ACTORSTATE_SITTING_ONOBJ = 11;
ACTORSTATE_SITTING_ONFLOOR = 13; ACTORSTATE_SITTING_ONFLOOR = 13;
ACTORSTATE_MOUNTED = 15; ACTORSTATE_MOUNTED = 15;
--UTILS
function callClientFunction(player, functionName, ...)
player:RunEventFunction(functionName, ...);
result = coroutine.yield();
return result;
end

View File

@ -1,13 +1,13 @@
require ("global")
function onEventStarted(player, npc) function onEventStarted(player, npc)
defaultFst = GetStaticActor("DftFst"); defaultFst = GetStaticActor("DftFst");
player:RunEventFunction("delegateEvent", player, defaultFst, "defaultTalkWithInn_Desk", nil, nil, nil); choice = callClientFunction(player, "delegateEvent", player, defaultFst, "defaultTalkWithInn_Desk", nil, nil, nil);
end if (choice == 1) then
function onEventUpdate(player, npc, blah, menuSelect)
if (menuSelect == 1) then
GetWorldManager():DoZoneChange(player, 13); GetWorldManager():DoZoneChange(player, 13);
elseif (choice == 2) then
--Do Set Homepoint
end end
player:EndEvent(); player:EndEvent();

View File

@ -1,15 +1,14 @@
require ("global")
function onEventStarted(player, npc) function onEventStarted(player, npc)
defaultSea = GetStaticActor("DftSea"); defaultSea = GetStaticActor("DftSea");
player:RunEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithInn_Desk", nil, nil, nil); choice = callClientFunction(player, "delegateEvent", player, defaultSea, "defaultTalkWithInn_Desk", nil, nil, nil);
end if (choice == 1) then
GetWorldManager():DoZoneChange(player, 13);
function onEventUpdate(player, npc, blah, menuSelect) elseif (choice == 2) then
--Do Set Homepoint
if (menuSelect == 1) then
GetWorldManager():DoZoneChange(player, 12);
end end
player:EndEvent(); player:EndEvent();
end end

View File

@ -1,10 +1,16 @@
require("global")
function onEventStarted(player, npc) function onEventStarted(player, npc)
defaultWil = GetStaticActor("DftWil"); defaultWil = GetStaticActor("DftWil");
player:RunEventFunction("delegateEvent", player, defaultWil, "defaultTalkWithMomodi_001", nil, nil, nil); tutorialU1 = GetStaticActor("Trl0u1");
--callClientFunction(player, "delegateEvent", player, defaultWil, "defaultTalkWithMomodi_001", nil, nil, nil);
callClientFunction(player, "switchEvent", defaultWil, tutorialU1, nil, nil, 1, 1, 0x3F1);
player:endEvent();
end end
function onEventUpdate(player, npc, blah, menuSelect) function onEventUpdate(player, npc, blah, menuSelect)
player:EndEvent();
end end