mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
40 lines
938 B
Plaintext
40 lines
938 B
Plaintext
include library.utils;
|
|
|
|
trigger OnSpeaking(string text)
|
|
{
|
|
if (text.equals("up"))
|
|
{
|
|
playClientEffectObj(self, "clienteffect/elevator_rise.cef", self, null);
|
|
if (elevatorMove (self, 1) == 0)
|
|
{
|
|
sendSystemMessage (self, "You are already on the highest floor", null);
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
else if ( text.equals("down"))
|
|
{
|
|
playClientEffectObj(self, "clienteffect/elevator_descend.cef", self, null);
|
|
if (elevatorMove (self, -1) == 0)
|
|
{
|
|
sendSystemMessage (self, "You are already on the lowest floor", null);
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
else if ( text.equals("out"))
|
|
{
|
|
obj_id building = getTopMostContainer(self);
|
|
if ( isIdValid(building) && building != self )
|
|
{
|
|
location outLoc = getBuildingEjectLocation(building);
|
|
utils.warpPlayer( self, outLoc );
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|