// Quest Script: ManFst001_00039 // Quest Name: Coming to Gridania // Quest ID: 65575 // Start NPC: 1001148 // End NPC: 1001140 class ManFst001Def { ////////////////////////////////////////////////////////////////////// // default ctor def ManFst001Def() { // Basic quest information this.name = "Coming to Gridania"; this.id = 65575; // These are the quest vars / flags used in this quest // GetQuestUI8AL // 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 this.RewardExpFactor = 50; this.RewardGil = 103; // Entities found in the script data of the quest // some of these may be useful this.ACTOR0 = 1001148; this.ACTOR1 = 1001140; this.CUT_EVENT = 29; this.EOBJECT0 = 2001659; this.EOBJECT1 = 2001660; this.EOBJECT7 = 2616477; this.EVENT_ACTION_SEARCH = 1; this.HOWTO_QUEST_ACCEPT = 12; this.HOWTO_QUEST_ANNOUNCE = 2; this.HOWTO_REWARD = 11; this.HOWTO_TODO = 3; this.OPENING_EVENT_HANDLER = 1245186; this.SEQ_2_ACTOR1 = 2; } ////////////////////////////////////////////////////////////////////// // Available Scenes in this quest, not necessarly all are used def Scene00000( player ) { player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 0/*unk*/, fun( player, eventId, param1, param2, param3 ) { if( param2 == 1 ) // accept quest { player.setOpeningSequence( 2 ); ManFst001.Scene00001( player ); } }); } def Scene00001( player ) { player.eventPlay( this.id, 1, 0xF8482EFB/*flags*/, 0/*unk*/, 0/*unk*/, fun( player, eventId, param1, param2, param3 ) { ManFst001.Scene00002( player ); }); } def Scene00002( player ) { player.eventPlay( this.id, 2, NONE, 0, 0, fun( player, eventId, param1, param2, param3 ) { player.questUpdate( ManFst001.id, ManFst001.SEQ_FINISH );// add quest to player. // this is an external event, so we do need to start it here //player.eventStart( player.getId(), ManFst001.OPENING_EVENT_HANDLER, 7, 0, 0 ); // update the instance boundaries, call to the opening event player.eventPlay( ManFst001.OPENING_EVENT_HANDLER, 0x1E, 0x2001, 0, 0 ); }); } def Scene00004( player ) { player.eventPlay( this.id, 4, 0x2c02, 0, 0, fun( player, eventId, param1, param2, param3 ) { ManFst001.Scene00005( player ); }); } def Scene00005( player ) { player.eventPlay( this.id, 5, 0x20/*flags*/, 0/*unk*/, 0/*unk*/, fun( player, eventId, param1, param2, param3 ) { if( param2 == 1 ) // clicked finish button { player.gainExp( 50 ); player.addCurrency( 1, ManFst001.RewardGil ); player.questFinish( ManFst001.id ); } }); } def onTalk( eventId, player, actorId ) { var actor = mapActor( actorId ); if( actor == this.ACTOR0 ) { this.Scene00000( player ); } else if( actor == this.ACTOR1 ) { this.Scene00004( player ); } } }; GLOBAL ManFst001 = ManFst001Def();