mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-24 13:47:46 +00:00
98 lines
2.6 KiB
ChaiScript
98 lines
2.6 KiB
ChaiScript
// Opening Script: OpeningUldah
|
|
// Quest Name: OpeningUldah
|
|
// Quest ID: 1245187
|
|
|
|
class OpeningUldahDef
|
|
{
|
|
|
|
def OpeningUldahDef()
|
|
{
|
|
this.id = 1245187;
|
|
this.name = "OpeningUldah";
|
|
|
|
this.ERANGE_HOWTO_ANN_AND_QUEST = 4101650;
|
|
this.ERANGE_HOWTO_QUEST_REWARD = 4102883;
|
|
this.ERANGE_SEQ_1_CLOSED_1 = 4101587;
|
|
this.POS_SEQ_1_CLOSED_RETURN_1 = 4101691;
|
|
this.ERANGE_ALWAYS_CLOSED_1 = 4101537;
|
|
this.POS_ALWAYS_CLOSED_RETURN_1 = 4101685;
|
|
this.ENPC_ALWAYS_CLOSED_1 = 4101796;
|
|
this.ERANGE_ALWAYS_CLOSED_2 = 4101525;
|
|
this.POS_ALWAYS_CLOSED_RETURN_2 = 4101680;
|
|
this.ENPC_ALWAYS_CLOSED_2 = 4101789;
|
|
this.ERANGE_ALWAYS_CLOSED_3 = 4101535;
|
|
this.POS_ALWAYS_CLOSED_RETURN_3 = 4101681;
|
|
this.ENPC_ALWAYS_CLOSED_3 = 4101787;
|
|
this.BGM_MUSIC_ZONE_WIL_TWN = 1035;
|
|
this.NCUT_WIL_1 = 186;
|
|
this.NCUT_WIL_2 = 139;
|
|
this.NCUT_WIL_3 = 187;
|
|
this.ENPC_QUEST_OFFER = 3969639;
|
|
this.NCUT_LIGHT_ALL = 2;
|
|
this.NCUT_LIGHT_WIL_1 = 147;
|
|
this.NCUT_LIGHT_WIL_2 = 145;
|
|
}
|
|
|
|
def Scene00000( player )
|
|
{
|
|
player.eventPlay( this.id, 0, 0x2001, 0, 1,
|
|
fun( player, eventId, param1, param2, param3 )
|
|
{
|
|
player.setOpeningSequence( 1 );
|
|
OpeningUldah.Scene00001( player );
|
|
} );
|
|
}
|
|
|
|
def Scene00001( player )
|
|
{
|
|
player.eventPlay( this.id, 1, 0x2001, 1, 0x32 );
|
|
}
|
|
|
|
def Scene00020( player )
|
|
{
|
|
player.eventPlay( this.id, 20, 0x2001, 0, 1 );
|
|
}
|
|
|
|
def Scene00030( player )
|
|
{
|
|
player.eventPlay( this.id, 30, 0x2001, 0, 0 );
|
|
}
|
|
|
|
def Scene00040( player )
|
|
{
|
|
player.eventPlay( this.id, 40, 1, 2, 1,
|
|
fun( player, eventId, param1, param2, param3 )
|
|
{
|
|
if( player.getOpeningSequence() == 2 )
|
|
{
|
|
// update the instance boundaries
|
|
OpeningUldah.Scene00030( player );
|
|
}
|
|
} );
|
|
}
|
|
|
|
////////////////////////////// EVENT HANDLERS //////////////////////////////////
|
|
|
|
def onEnterTerritory( eventId, player, param1, param2)
|
|
{
|
|
if( player.getOpeningSequence() == 0 )
|
|
{
|
|
this.Scene00000( player );
|
|
}
|
|
else
|
|
{
|
|
this.Scene00040( player );
|
|
}
|
|
}
|
|
|
|
def onOutsideRange( eventId, player, param1, x, y, z)
|
|
{
|
|
if( this.ERANGE_SEQ_1_CLOSED_1 == param1 )
|
|
{
|
|
this.Scene00020( player );
|
|
}
|
|
}
|
|
|
|
};
|
|
|
|
GLOBAL OpeningUldah = OpeningUldahDef();
|