33 lines
1009 B
Plaintext
33 lines
1009 B
Plaintext
|
#include "di_include"
|
||
|
void main()
|
||
|
{
|
||
|
|
||
|
string sSoundString = GetLocalString(GetObjectByTag("di_puz02"), "soundstring");
|
||
|
sSoundString = GetStringLeft(sSoundString, 6);
|
||
|
string sSolution = GetLocalString(GetObjectByTag("di_puz02"), "solution");
|
||
|
if(sSoundString == sSolution && sSoundString != "")
|
||
|
{
|
||
|
PlaySound("as_cv_flute1");
|
||
|
object oDoor = GetObjectByTag("di_puz2door");
|
||
|
ExecuteScript("di_dooropener", oDoor);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
PlaySound("gui_cannotequip");
|
||
|
}
|
||
|
int x;
|
||
|
for(x=1; x<=6; x++)
|
||
|
{
|
||
|
object oPlate = GetObjectByTag("di_pz2C0" + IntToString(x));
|
||
|
ExecuteScript("di_plateoff", oPlate);
|
||
|
SetLocalInt(oPlate, "Activated", FALSE);
|
||
|
}
|
||
|
|
||
|
|
||
|
SetLocalString(GetObjectByTag("di_puz02"), "seedstring", "");
|
||
|
SetLocalString(GetObjectByTag("di_puz02"), "solution", "");
|
||
|
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
||
|
DelayCommand(2.0, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||
|
}
|
||
|
|