Files
dsrc/sku.0/sys.server/compiled/game/script/e3demo/hanger_elevator.script
T

37 lines
948 B
Plaintext

trigger OnAttach()
{
setName( self, "an elevator terminal" );
return SCRIPT_CONTINUE;
}
trigger OnObjectMenuRequest( obj_id player, menu_info mi )
{
location myLoc = getLocation( player );
obj_id building = getTopMostContainer( player );
string currentCell = getCellName( myLoc.cell );
if ( currentCell.equals("elevator_e3_down" ))
{
playClientEffectObj(player, "clienteffect/elevator_rise.cef", player, null);
obj_id objCell = getCellId(building, "elevator_e3_up");
myLoc = new location();
myLoc.cell = objCell;
myLoc.x = 19.3f;
myLoc.y = 453.6f;
myLoc.z = 341.8f;
setLocation( player, myLoc );
}
else
{
playClientEffectObj(player, "clienteffect/elevator_descend.cef", player, null);
obj_id objCell = getCellId(building, "elevator_e3_down");
myLoc = new location();
myLoc.cell = objCell;
myLoc.x = -74.4f;
myLoc.y = 204.9f;
myLoc.z = 330.2f;
setLocation( player, myLoc );
}
return SCRIPT_CONTINUE;
}