mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-22 12:47:45 +00:00
57 lines
No EOL
1.8 KiB
ChaiScript
57 lines
No EOL
1.8 KiB
ChaiScript
//Aethernet - Aetheryte
|
|
|
|
class AethernetDef
|
|
{
|
|
|
|
def AethernetDef()
|
|
{
|
|
this.AetheryteBaseId = 0x50000;
|
|
this.AETHERYTE_MENU_AETHERNET = 1;
|
|
this.AETHERYTE_MENU_HOUSING = 2;
|
|
this.AETHERYTE_MENU_HOME_POINT = 3;
|
|
this.AETHERYTE_MENU_FAVORITE_POINT = 4;
|
|
this.AETHERYTE_MENU_FAVORITE_POINT_SECURITY_TOKEN = 5;
|
|
}
|
|
|
|
def onTalk( eventId, player, actorId )
|
|
{
|
|
var actor = mapActor( actorId );
|
|
|
|
if( player.isAetheryteRegistered( eventId & 0xFFFF ) )
|
|
{
|
|
player.eventPlay( eventId, 2, NONE,
|
|
fun ( player, eventId, param1, param2, param3 )
|
|
{
|
|
var aetherId = eventId & 0xFFFF;
|
|
|
|
if ( param1 == 256 ) // aethernet
|
|
{
|
|
//player.setTeleporting( true );
|
|
player.teleport( param2, 2 );
|
|
}
|
|
} );
|
|
}
|
|
else
|
|
{
|
|
var ACTION_ATTUNE = 0x13;
|
|
player.eventActionStart( eventId,
|
|
ACTION_ATTUNE,
|
|
// callback function for finished casting
|
|
fun ( player, eventId, additional )
|
|
{
|
|
|
|
var aetherId = eventId & 0xFFFF;
|
|
player.aetheryteRegister( aetherId );
|
|
player.eventPlay( eventId, 3, 0, 0, 0);
|
|
|
|
},
|
|
// callback for interrupted action.
|
|
fun ( player, eventId, additional ){},
|
|
0);
|
|
player.unlock();
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
GLOBAL Aethernet = AethernetDef(); |