mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-23 13:17:45 +00:00
75 lines
No EOL
1.7 KiB
ChaiScript
75 lines
No EOL
1.7 KiB
ChaiScript
|
|
class CmnDefLinkShellDef
|
|
{
|
|
|
|
def CmnDefLinkShellDef()
|
|
{
|
|
this.ACTION_CREATE = 2;
|
|
this.ACTION_RENAME = 3;
|
|
this.ACTION_REMOVE = 4;
|
|
this.id = 0xB0006;
|
|
}
|
|
|
|
def Scene00001( player )
|
|
{
|
|
player.eventPlay( this.id, 1, 0, 0, 0,
|
|
fun( player, eventId, param1, param2, param3 )
|
|
{
|
|
switch( param2 )
|
|
{
|
|
case( CmnDefLinkShell.ACTION_CREATE )
|
|
{
|
|
CmnDefLinkShell.Scene00002( player );
|
|
break;
|
|
}
|
|
case( CmnDefLinkShell.ACTION_RENAME )
|
|
{
|
|
CmnDefLinkShell.Scene00003( player );
|
|
break;
|
|
}
|
|
case( CmnDefLinkShell.ACTION_REMOVE )
|
|
{
|
|
CmnDefLinkShell.Scene00004( player );
|
|
break;
|
|
}
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
def Scene00002( player ) // Create Linkshell
|
|
{
|
|
player.eventPlay( this.id, 2, 0, 0, 0,
|
|
fun( player, eventId, param1, param2, param3 )
|
|
{
|
|
|
|
});
|
|
}
|
|
|
|
def Scene00003( player ) // Rename Linkshell
|
|
{
|
|
player.eventPlay( this.id, 3, 0, 0, 0,
|
|
fun( player, eventId, param1, param2, param3 )
|
|
{
|
|
|
|
});
|
|
}
|
|
|
|
def Scene00004( player ) // Delete Linkshell
|
|
{
|
|
player.eventPlay( this.id, 4, 0, 0, 0,
|
|
fun( player, eventId, param1, param2, param3 )
|
|
{
|
|
|
|
});
|
|
}
|
|
|
|
def onTalk( eventId, player, actorId )
|
|
{
|
|
this.Scene00001( player );
|
|
}
|
|
|
|
|
|
};
|
|
|
|
global CmnDefLinkShell = CmnDefLinkShellDef(); |