This repository was archived by the owner on Apr 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 533
Expand file tree
/
Copy path_6q2.lua
More file actions
101 lines (91 loc) · 4.42 KB
/
Copy path_6q2.lua
File metadata and controls
101 lines (91 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
-----------------------------------
-- Area: Heaven's Tower
-- NPC: Vestal Chamber (chamber of the Star Sibyl)
-- !pos 0.1 -49 37 242
-----------------------------------
require("scripts/globals/titles");
require("scripts/globals/keyitems");
require("scripts/globals/missions");
local ID = require("scripts/zones/Heavens_Tower/IDs");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
local CurrentMission = player:getCurrentMission(WINDURST);
local MissionStatus = player:getVar("MissionStatus");
if (CurrentMission == dsp.mission.id.windurst.A_NEW_JOURNEY and player:hasKeyItem(dsp.ki.STAR_CRESTED_SUMMONS) and MissionStatus == 0) then
player:startEvent(153);
elseif (player:hasKeyItem(dsp.ki.MESSAGE_TO_JEUNO_WINDURST)) then
player:startEvent(166);
elseif (player:getRank() == 5 and CurrentMission == dsp.mission.id.windurst.NONE and player:hasCompletedMission(WINDURST,dsp.mission.id.windurst.THE_FINAL_SEAL) == false) then
player:startEvent(190);
elseif (player:hasKeyItem(dsp.ki.BURNT_SEAL)) then
player:startEvent(192);
elseif (CurrentMission == dsp.mission.id.windurst.THE_SHADOW_AWAITS and MissionStatus == 0) then
player:startEvent(214);
elseif (CurrentMission == dsp.mission.id.windurst.THE_SHADOW_AWAITS and player:hasKeyItem(dsp.ki.SHADOW_FRAGMENT)) then
player:startEvent(216);
elseif (CurrentMission == dsp.mission.id.windurst.SAINTLY_INVITATION and MissionStatus == 0) then
player:startEvent(310);
elseif (CurrentMission == dsp.mission.id.windurst.SAINTLY_INVITATION and MissionStatus == 3) then
player:startEvent(312);
elseif (CurrentMission == dsp.mission.id.windurst.DOLL_OF_THE_DEAD and MissionStatus == 2) then
player:startEvent(362);
elseif (CurrentMission == dsp.mission.id.windurst.MOON_READING and MissionStatus == 0) then
player:startEvent(384);
elseif (CurrentMission == dsp.mission.id.windurst.MOON_READING and MissionStatus == 1 and player:hasKeyItem(dsp.ki.ANCIENT_VERSE_OF_ROMAEVE) and player:hasKeyItem(dsp.ki.ANCIENT_VERSE_OF_ALTEPA) and player:hasKeyItem(dsp.ki.ANCIENT_VERSE_OF_UGGALEPIH)) then
player:startEvent(385);
elseif (CurrentMission == dsp.mission.id.windurst.MOON_READING and MissionStatus == 3) then
player:startEvent(386);
elseif (CurrentMission == dsp.mission.id.windurst.MOON_READING and MissionStatus == 4) then
if (player:getFreeSlotsCount() == 0) then
player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED,183);
else
player:startEvent(407);
end
else
player:startEvent(154);
end
return 1;
end;
function onEventUpdate(player,csid,option)
end;
function onEventFinish(player,csid,option)
if (csid == 153) then
player:setVar("MissionStatus",1);
player:delKeyItem(dsp.ki.STAR_CRESTED_SUMMONS);
player:addKeyItem(dsp.ki.LETTER_TO_THE_AMBASSADOR);
player:messageSpecial(ID.text.KEYITEM_OBTAINED,dsp.ki.LETTER_TO_THE_AMBASSADOR);
elseif (csid == 166 or csid == 190) then
if (option == 0) then
player:addMission(WINDURST,dsp.mission.id.windurst.THE_FINAL_SEAL);
player:addKeyItem(dsp.ki.NEW_FEIYIN_SEAL);
player:messageSpecial(ID.text.KEYITEM_OBTAINED,dsp.ki.NEW_FEIYIN_SEAL);
player:setVar("MissionStatus",10);
end
player:delKeyItem(dsp.ki.MESSAGE_TO_JEUNO_WINDURST);
elseif (csid == 214) then
player:setVar("MissionStatus",2);
player:delKeyItem(dsp.ki.STAR_CRESTED_SUMMONS);
player:addTitle(dsp.title.STARORDAINED_WARRIOR);
elseif (csid == 310) then
player:setVar("MissionStatus",1);
player:addTitle(dsp.title.HERO_ON_BEHALF_OF_WINDURST);
player:addKeyItem(dsp.ki.HOLY_ONES_INVITATION);
player:messageSpecial(ID.text.KEYITEM_OBTAINED,dsp.ki.HOLY_ONES_INVITATION);
elseif (csid == 312) then
finishMissionTimeline(player,3,csid,option);
elseif (csid == 192 or csid == 216) then
finishMissionTimeline(player,1,csid,option);
elseif (csid == 362) then
player:setVar("MissionStatus",3);
elseif (csid == 384) then
player:setVar("MissionStatus",1);
elseif (csid == 385) then
player:setVar("MissionStatus",2);
elseif (csid == 386) then
player:setVar("MissionStatus",4);
elseif (csid == 407) then
player:setPos(0,-16.750,130,64,239);
end
end;