Any ideas?
scn AATPLGlassItemSCRIPTfloat xPosfloat yPosfloat zPosfloat xPosOldfloat yPosOldfloat zPosOldfloat xDifffloat yDifffloat zDiffshort doOnceshort movingFastXshort movingFastYshort movingFastZref glassRefref myRefbegin GameMode if GetDisabled return endif if doOnce == 0 set doOnce to 1 set xPos to GetPos x set yPos to GetPos y set zPos to GetPos z set xPosOld to xPos set yPosOld to yPos set zPosOld to zPos set myRef to GetSelf endif set xPos to GetPos x set yPos to GetPos y set zPos to GetPos z if IsControlPressed 28 == 0 set xDiff to xPos - xPosOld set yDiff to yPos - yPosOld set zDiff to zPos - zPosOld if xDiff < 0 set xDiff to 0 - xDiff endif if yDiff < 0 set yDiff to 0 - yDiff endif if zDiff < 0 set zDiff to 0 - zDiff endif if movingFastX if xDiff < 1 set glassRef to PlaceAtMe AATPLStatueNoctGlassBroken1 1 glassRef.SetAngle X 50 glassRef.SetAngle Y 45 glassRef.SetAngle Z 143 set glassRef to PlaceAtMe AATPLStatueNoctGlassBroken2 1 0 30 glassRef.SetAngle X 120 glassRef.SetAngle Y 14 glassRef.SetAngle Z -153 Disable endif elseif movingFastY if yDiff < 1 set glassRef to PlaceAtMe AATPLStatueNoctGlassBroken1 1 glassRef.SetAngle X 50 glassRef.SetAngle Y 45 glassRef.SetAngle Z 143 set glassRef to PlaceAtMe AATPLStatueNoctGlassBroken2 1 0 30 glassRef.SetAngle X 120 glassRef.SetAngle Y 14 glassRef.SetAngle Z -153 Disable endif elseif movingFastZ if zDiff < 1 set glassRef to PlaceAtMe AATPLStatueNoctGlassBroken1 1 glassRef.SetAngle X 50 glassRef.SetAngle Y 45 glassRef.SetAngle Z 143 set glassRef to PlaceAtMe AATPLStatueNoctGlassBroken2 1 0 30 glassRef.SetAngle X 120 glassRef.SetAngle Y 14 glassRef.SetAngle Z -153 Disable endif endif if xDiff > 3 set movingFastX to 1 else set movingFastX to 0 endif if yDiff > 3 set movingFastY to 1 else set movingFastY to 0 endif if zDiff > 3 set movingFastZ to 1 else set movingFastZ to 0 endif else set movingFastX to 0 set movingFastY to 0 set movingFastZ to 0 endif set xPosOld to xPos set yPosOld to yPos set zPosOld to zPosend
scn AATPLGlassStatueSCRIPTfloat xPosfloat yPosfloat zPosfloat xPosOldfloat yPosOldfloat zPosOldfloat xDifffloat yDifffloat zDifffloat fastSpeedfloat slowSpeedshort doOncefloat movingFastTimerref glassRefref myRefbegin OnAdd set doOnce to 1 set xPos to GetPos x set yPos to GetPos y set zPos to GetPos z set xPosOld to xPos set yPosOld to yPos set zPosOld to zPos set myRef to GetSelfendbegin OnDrop set doOnce to 1 set xPos to GetPos x set yPos to GetPos y set zPos to GetPos z set xPosOld to xPos set yPosOld to yPos set zPosOld to zPos set myRef to GetSelfendbegin GameMode if GetDisabled return endif if doOnce == 0 set doOnce to 1 set xPos to GetPos x set yPos to GetPos y set zPos to GetPos z set xPosOld to xPos set yPosOld to yPos set zPosOld to zPos set myRef to GetSelf endif set movingFastTimer to movingFastTimer - GetSecondsPassed set xPos to GetPos x set yPos to GetPos y set zPos to GetPos z if IsControlPressed 28 == 0 set xDiff to xPos - xPosOld set yDiff to yPos - yPosOld set zDiff to zPos - zPosOld if xDiff < 0 set xDiff to 0 - xDiff endif if yDiff < 0 set yDiff to 0 - yDiff endif if zDiff < 0 set zDiff to 0 - zDiff endif set slowSpeed to 1 * GetSecondsPassed if myRef.GetSoundPlaying "CGlass*" 50 if movingFastTimer > 0 set glassRef to PlaceAtMe AATPLGlassStatueBrokenTop 1 glassRef.SetAngle X 50 glassRef.SetAngle Y 45 glassRef.SetAngle Z 143 set glassRef to PlaceAtMe AATPLGlassStatueBrokenBottom 1 0 30 glassRef.SetAngle X 120 glassRef.SetAngle Y 14 glassRef.SetAngle Z -153 Disable endif endif set fastSpeed to 50 * GetSecondsPassed if xDiff > fastSpeed set movingFastTimer to 0.1 endif if yDiff > fastSpeed set movingFastTimer to 0.1 endif if zDiff > fastSpeed set movingFastTimer to 0.1 endif endif set xPosOld to xPos set yPosOld to yPos set zPosOld to zPosend