Added party to Gridania opening, fixed BattleActionx18 and made it so x18 is used for packets with more than 10 targets. Changed how death works. Added respawn time and roam modifiers. Added TryAggro functions and moved aggroing out of roaming and helpplayers. Fixed high cpu usage in zone's OnUpdate function. Fixed work value in player update

This commit is contained in:
yogurt 2017-12-08 00:58:39 -06:00
parent 520ae7a119
commit 1275c8b5da
61 changed files with 1226 additions and 223 deletions

View file

@ -10,55 +10,71 @@ function init()
return "/Director/Quest/QuestDirectorMan0g001";
end
--Should we be using this to spawn mobs and drop Simplecontent?
function onCreateContentArea(players, director, contentArea, contentGroup)
director:StartContentGroup();
end
function onEventStarted(player, actor, triggerName)
man0g0Quest = player:GetQuest("Man0g0");
player:SendMessage(0x20, "", "Starting");
startTutorialMode(player);
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrBtl001", nil, nil, nil);
player:EndEvent();
player:SendMessage(0x20, "", "Waiting for player active");
waitForSignal("playerActive");
player:SendMessage(0x20, "", "player active");
wait(1); --If this isn't here, the scripts bugs out. TODO: Find a better alternative.
kickEventContinue(player, actor, "noticeEvent", "noticeEvent");
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processTtrBtl002", nil, nil, nil);
player:SendMessage(0x20, "", "processTtrBtl002 called");
player:EndEvent();
waitForSignal("playerAttack");
closeTutorialWidget(player);
showTutorialSuccessWidget(player, 9055); --Open TutorialSuccessWidget for attacking enemy
wait(3);
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_TP);
waitForSignal("tpOver1000");
closeTutorialWidget(player);
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_WEAPONSKILLS);
--Combat portion of tutorial
if player:IsDiscipleOfWar() then
waitForSignal("weaponskillUsed"); --Should be wait for weaponskillUsed signal
waitForSignal("playerAttack");
closeTutorialWidget(player);
showTutorialSuccessWidget(player, 9055); --Open TutorialSuccessWidget for attacking enemy
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_TP);
waitForSignal("tpOver1000");
closeTutorialWidget(player);
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_WEAPONSKILLS);
waitForSignal("weaponskillUsed");
closeTutorialWidget(player);
showTutorialSuccessWidget(player, 9065); --Open TutorialSuccessWidget for weapon skill
elseif player:IsDiscipleOfMagic() then
waitForSignal("spellUsed")
openTutorialWidget(player, CONTROLLER_KEYBOARD, TUTORIAL_CASTING);
waitForSignal("spellUsed");
closeTutorialWidget(player);
elseif player:IsDiscipleOfHand() then
waitForSignal("abilityUsed")
waitForSignal("abilityUsed");
elseif player:IsDiscipleOfLand() then
waitForSignal("abilityUsed")
waitForSignal("abilityUsed");
end
closeTutorialWidget(player);
showTutorialSuccessWidget(player, 9065); --Open TutorialSuccessWidget for weapon skill
waitForSignal("mobkill"); --Should be wait for mobkill
--Currently this requires the player to pass all the other signals first, need a way for signals to work out of order
waitForSignal("mobkill");
waitForSignal("mobkill");
waitForSignal("mobkill");
worldMaster = GetWorldMaster();
wait(5);--Debug waits, get rid of these later
player:Disengage(0x0000);
wait(5);
man0g0Quest:NextPhase(10);
wait(5);
--This doesn't work
player:RemoveFromCurrentPartyAndCleanup();
player:SendDataPacket("attention", worldMaster, "", 51073, 2);
wait(7);
wait(5);
player:ChangeMusic(7);
player:ChangeState(0);
wait(5);
kickEventContinue(player, actor, "noticeEvent", "noticeEvent");
wait(5);
callClientFunction(player, "delegateEvent", player, man0g0Quest, "processEvent020_1", nil, nil, nil);
player:GetZone():ContentFinished();
player:EndEvent();
GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1);
wait(5);
player:GetZone():ContentFinished();
--player:EndEvent();
--GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1);
--[[
IF DoW:
OpenWidget (TP)
@ -69,13 +85,12 @@ function onEventStarted(player, actor, triggerName)
Success
CloseWidget
ELSE MAGIC:
OpenWidget (DEFEAT ENEMY)
OpenWidget (DEFEAT ENEMY)
]]
--man0g0Quest:NextPhase(10);
--player:EndEvent();
--GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1);
player:EndEvent();
wait(5);
GetWorldManager():DoZoneChange(player, 155, "PrivateAreaMasterPast", 1, 15, 175.38, -1.21, -1156.51, -2.1);
end