diff --git a/scripts/chai/opening/OpeningGridania.chai b/scripts/chai/opening/OpeningGridania.chai index fbaf1005..207cf8fe 100644 --- a/scripts/chai/opening/OpeningGridania.chai +++ b/scripts/chai/opening/OpeningGridania.chai @@ -34,7 +34,7 @@ class OpeningGridaniaDef def Scene00000( player ) { - player.eventPlay( this.id, 0, 0x2001, 0, 1, + player.eventPlay( this.id, 0, 0x04AC05, 0, 1, fun( player, eventId, param1, param2, param3 ) { player.setOpeningSequence( 1 ); diff --git a/scripts/chai/opening/OpeningLimsa.chai b/scripts/chai/opening/OpeningLimsa.chai index ebae5446..f7ab44c7 100644 --- a/scripts/chai/opening/OpeningLimsa.chai +++ b/scripts/chai/opening/OpeningLimsa.chai @@ -72,7 +72,6 @@ class OpeningLimsaLominsaDef player.eventPlay( this.id, 40, 1, 2, 1, fun( player, eventId, param1, param2, param3 ) { - player.eventFinish( eventId, UNLOCK ); if( player.getOpeningSequence() == 2 ) { // update the instance boundaries diff --git a/scripts/chai/opening/OpeningUldah.chai b/scripts/chai/opening/OpeningUldah.chai index 6c19e6c4..829bab1b 100644 --- a/scripts/chai/opening/OpeningUldah.chai +++ b/scripts/chai/opening/OpeningUldah.chai @@ -35,7 +35,7 @@ class OpeningUldahDef def Scene00000( player ) { - player.eventPlay( this.id, 0, 0x2001, 0, 1, + player.eventPlay( this.id, 0, 0x04AC05, 0, 1, fun( player, eventId, param1, param2, param3 ) { player.setOpeningSequence( 1 ); diff --git a/scripts/chai/quest/ManFst003.chai b/scripts/chai/quest/ManFst003.chai index 8d592cff..403d18d3 100644 --- a/scripts/chai/quest/ManFst003.chai +++ b/scripts/chai/quest/ManFst003.chai @@ -9,11 +9,11 @@ // Start NPC: 1001140 // End NPC: 1000100 -class ManFst003Def +class ManFst003Def { def ManFst003Def() { - // Basic quest information + // Basic quest information this.name = "Close to Home"; this.id = 65659; @@ -24,13 +24,13 @@ class ManFst003Def // GetQuestUI8BL // GetQuestUI8CH - // Steps in this quest ( 0 is before accepting, + // Steps in this quest ( 0 is before accepting, // 1 is first, 255 means ready for turning it in this.SEQ_0 = 0; this.SEQ_1 = 1; this.SEQ_FINISH = 255; - // Quest rewards + // Quest rewards this.RewardExpFactor = 100; this.RewardGil = 107; @@ -74,7 +74,6 @@ class ManFst003Def def checkQuestCompletion( player, varIdx ) { - print( varIdx ); if (varIdx == 3) { player.questMessage(this.id, 1, 0, 0, 0 ); @@ -118,8 +117,8 @@ class ManFst003Def player.eventPlay( this.id, 1, 0x0EFB/*flags*/, 0/*unk*/, 0/*unk*/, fun( player, eventId, param1, param2, param3 ) { - player.setQuestUI8AL( ManFst004.id, 1 ); - ManFst003.checkQuestCompletion( player, 1 ); + player.setQuestUI8AL( ManFst003.id, 1 ); + ManFst003.checkQuestCompletion( player, 0 ); }); } @@ -128,7 +127,7 @@ class ManFst003Def player.eventPlay( this.id, 2, 0, 0, 0, fun( player, eventId, param1, param2, param3 ) { - player.setQuestUI8BH( ManFst004.id, 1 ); + player.setQuestUI8BH( ManFst003.id, 1 ); ManFst003.checkQuestCompletion( player, 3 ); }); } @@ -207,8 +206,8 @@ class ManFst003Def player.eventPlay( this.id, 100, 0x0EFB, 0, 0, fun( player, eventId, param1, param2, param3 ) { - player.setQuestUI8CH( ManFst004.id, 0 ); // remove key item, since we have just traded it - player.setQuestUI8BL( ManFst004.id, 1 ); + player.setQuestUI8CH( ManFst003.id, 0 ); // remove key item, since we have just traded it + player.setQuestUI8BL( ManFst003.id, 1 ); ManFst003.checkQuestCompletion(player, 2 ); }); } @@ -237,7 +236,6 @@ class ManFst003Def }, fun( player, eventId, additional ) {}, eventId ); - player.unlock(); } else if( actor == this.ACTOR2 ) { @@ -257,4 +255,3 @@ class ManFst003Def }; GLOBAL ManFst003 = ManFst003Def(); - diff --git a/scripts/chai/quest/ManSea001.chai b/scripts/chai/quest/ManSea001.chai index c3af3b76..8c060bf2 100644 --- a/scripts/chai/quest/ManSea001.chai +++ b/scripts/chai/quest/ManSea001.chai @@ -51,11 +51,12 @@ class ManSea001Def // Available Scenes in this quest, not necessarly all are used def Scene00000( player ) { - player.eventPlay( this.id, 0, HIDE_HOTBAR, 0/*unk*/, 0/*unk*/, + player.eventPlay( this.id, 0, 0x2000, 0, 0, fun( player, eventId, param1, param2, param3 ) { if( param2 == 1 ) { + player.setOpeningSequence( 2 ); ManSea001.Scene00001( player ); } }); @@ -63,7 +64,7 @@ class ManSea001Def def Scene00001( player ) { - player.eventPlay( this.id, 1, HIDE_HOTBAR, 0/*unk*/, 0/*unk*/, + player.eventPlay( this.id, 1, 0xF8482EFB, 0, 0, fun( player, eventId, param1, param2, param3 ) { ManSea001.Scene00002( player ); @@ -81,13 +82,13 @@ class ManSea001Def def Scene00003( player ) { - player.eventPlay( this.id, 3, NONE, 0/*unk*/, 0/*unk*/, + player.eventPlay( this.id, 3, NONE, 0, 0, fun( player, eventId, param1, param2, param3 ) { player.questUpdate( ManSea001.id, 0x01 ); // add quest to player. // update the instance boundaries, call to the opening event - //player.eventPlay( ManSea001.OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR, 1, 0); + player.eventPlay( ManSea001.OPENING_EVENT_HANDLER, 0x1E, 0x2001, 1, 0); }); } @@ -107,7 +108,7 @@ class ManSea001Def def Scene00006( player ) { - player.eventPlay( this.id, 6, NONE, 0/*unk*/, 0/*unk*/, + player.eventPlay( this.id, 6, 0x20, 0/*unk*/, 0/*unk*/, fun( player, eventId, param1, param2, param3 ) { if( param2 == 1 ) @@ -141,7 +142,7 @@ class ManSea001Def def Scene00011( player ) { - player.eventPlay( this.id, 11, NONE, 0, 0, + player.eventPlay( this.id, 11, 0x2c02, 0, 0, fun( player, eventId, param1, param2, param3 ) { ManSea001.Scene00012( player ); @@ -150,7 +151,7 @@ class ManSea001Def def Scene00012( player ) { - player.eventPlay( this.id, 12, NONE, 0, 0, + player.eventPlay( this.id, 12, 0x20, 0, 0, fun( player, eventId, param1, param2, param3 ) { if( param2 == 1 ) diff --git a/scripts/chai/quest/ManWil001.chai b/scripts/chai/quest/ManWil001.chai index 1799e45a..da55f8c1 100644 --- a/scripts/chai/quest/ManWil001.chai +++ b/scripts/chai/quest/ManWil001.chai @@ -9,25 +9,25 @@ // Start NPC: 1003987 // End NPC: 1003988 -class ManWil001Def +class ManWil001Def { ////////////////////////////////////////////////////////////////////// // default ctor def ManWil001Def() { - // Basic quest information + // Basic quest information this.name = "Coming to Ul'dah"; this.id = 66130; // Quest vars / flags used // GetQuestUI8AL - // Steps in this quest ( 0 is before accepting, + // Steps in this quest ( 0 is before accepting, // 1 is first, 255 means ready for turning it in this.SEQ_0 = 0; this.SEQ_FINISH = 255; - // Quest rewards + // Quest rewards this.RewardExpFactor = 50; this.RewardGil = 103; @@ -49,11 +49,12 @@ class ManWil001Def // Available Scenes in this quest, not necessarly all are used def Scene00000( player ) { - player.eventPlay( this.id, 0, 0, 0, 0, + player.eventPlay( this.id, 0, 0x2000, 0, 0, fun( player, eventId, param1, param2, param3 ) { if( param2 == 1 ) // accept quest { + player.setOpeningSequence( 2 ); ManWil001.Scene00001( player ); } }); @@ -61,7 +62,7 @@ class ManWil001Def def Scene00001( player ) { - player.eventPlay( this.id, 1, 0, 0, 0, + player.eventPlay( this.id, 1, 0xF8482EFB, 0, 0, fun( player, eventId, param1, param2, param3 ) { ManWil001.Scene00002( player ); @@ -70,11 +71,11 @@ class ManWil001Def def Scene00002( player ) { - player.eventPlay( this.id, 2, 0, 0, 0, + player.eventPlay( this.id, 2, NONE, 0, 0, fun( player, eventId, param1, param2, param3 ) { - player.questUpdate( ManWil001.id, ManWil001Obj.SEQ_FINISH );// add quest to player. - player.eventPlay( ManWil001.OPENING_EVENT_HANDLER, 0x1E, 0x2001, 0, 0 ); + player.questUpdate( ManWil001.id, ManWil001.SEQ_FINISH );// add quest to player. + player.eventPlay( ManWil001.OPENING_EVENT_HANDLER, 0x1E, 0x2001, 0, 0 ); }); } @@ -85,7 +86,7 @@ class ManWil001Def def Scene00004( player ) { - player.eventPlay( this.id, 4, 0, 0, 0, + player.eventPlay( this.id, 4, 0x2c02, 0, 0, fun( player, eventId, param1, param2, param3 ) { ManWil001.Scene00005( player ); @@ -94,7 +95,7 @@ class ManWil001Def def Scene00005( player ) { - player.eventPlay( this.id, 5, 0/*flags*/, 0/*unk*/, 0/*unk*/, + player.eventPlay( this.id, 5, 0x20/*flags*/, 0/*unk*/, 0/*unk*/, fun( player, eventId, param1, param2, param3 ) { if( param2 == 1 ) // clicked finish button