49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
void main()
|
|
{
|
|
object oPC=GetEnteringObject();
|
|
object oDevice=GetObjectByTag("pc_control140204a");
|
|
|
|
// if item in control panel is red crystal
|
|
location lDest=GetLocation(GetObjectByTag("dest_pc140204a"));
|
|
if(GetTag(GetFirstItemInInventory(oDevice))=="pcitem110204a")
|
|
{
|
|
AssignCommand(oPC,ActionJumpToLocation(lDest));
|
|
return;
|
|
}
|
|
// if item in control panel is blue crystal
|
|
lDest=GetLocation(GetObjectByTag("dest_pc140204b"));
|
|
if(GetTag(GetFirstItemInInventory(oDevice))=="pcitem110204b")
|
|
{
|
|
AssignCommand(oPC,ActionJumpToLocation(lDest));
|
|
return;
|
|
}
|
|
|
|
// if item in control panel is green crystal
|
|
lDest=GetLocation(GetObjectByTag("dest_pc140204c"));
|
|
if(GetTag(GetFirstItemInInventory(oDevice))=="pcitem110204c")
|
|
{
|
|
AssignCommand(oPC,ActionJumpToLocation(lDest));
|
|
return;
|
|
}
|
|
|
|
// if item in control panel is yellow crystal
|
|
lDest=GetLocation(GetObjectByTag("dest_pc140204e"));
|
|
if(GetTag(GetFirstItemInInventory(oDevice))=="pcitem110204e")
|
|
{
|
|
AssignCommand(oPC,ActionJumpToLocation(lDest));
|
|
return;
|
|
}
|
|
|
|
// if item in control panel is the white crystal
|
|
lDest=GetLocation(GetObjectByTag("dest_pc140204d"));
|
|
if(GetTag(GetFirstItemInInventory(oDevice))=="pcitem110204d")
|
|
{
|
|
AssignCommand(oPC,ActionJumpToLocation(lDest));
|
|
return;
|
|
}
|
|
// otherwise
|
|
|
|
lDest=GetLocation(GetObjectByTag("wp_pc110204a"));
|
|
AssignCommand(oPC,ActionJumpToLocation(lDest));
|
|
}
|