#include "common.h"

EvtScript N(EVS_AnimatePalmLeaves) = {
    Set(LVarA, LVar0)
    Label(0)
    Call(RotateGroup, LVarA, 2, 0, 0, 1)
    Wait(5)
    Call(RotateGroup, LVarA, 1, 0, 0, 1)
    Wait(5)
    Call(RotateGroup, LVarA, -2, 0, 0, 1)
    Wait(5)
    Call(RotateGroup, LVarA, 1, 0, 0, 1)
    Wait(5)
    Call(RandInt, 30, LVar0)
    Add(LVar0, 30)
    Wait(LVar0)
    Goto(0)
    Return
    End
};

EvtScript N(EVS_AnimateWave) = {
    Set(LVarA, LVar0)
    Loop(0)
        Call(TranslateModel, LVarA, 1, 0, 0)
        Wait(2)
        Call(TranslateModel, LVarA, 1, 0, 0)
        Wait(1)
        Call(TranslateModel, LVarA, 1, Float(-0.5), 0)
        Wait(1)
        Call(TranslateModel, LVarA, 1, -1, 0)
        Wait(1)
        Call(TranslateModel, LVarA, Float(1.5), -1, 0)
        Wait(1)
        Call(TranslateModel, LVarA, 2, -1, 0)
        Wait(2)
        Call(TranslateModel, LVarA, 2, -1, 0)
        Wait(2)
        Call(TranslateModel, LVarA, 2, -1, 0)
        Wait(1)
        Call(TranslateModel, LVarA, Float(2.5), Float(-1.5), 0)
        Wait(1)
        Call(TranslateModel, LVarA, 3, -2, 0)
        Wait(2)
        Call(TranslateModel, LVarA, 3, -2, 0)
        Wait(1)
        Call(TranslateModel, LVarA, 3, Float(-2.5), 0)
        Wait(1)
        Call(TranslateModel, LVarA, 3, -3, 0)
        Wait(2)
        Call(TranslateModel, LVarA, 3, -3, 0)
        Wait(2)
        Call(TranslateModel, LVarA, 3, -3, 0)
        Wait(1)
        Call(TranslateModel, LVarA, 3, Float(-2.5), 0)
        Wait(1)
        Call(TranslateModel, LVarA, 3, -2, 0)
        Wait(1)
        Call(TranslateModel, LVarA, Float(2.5), -2, 0)
        Wait(1)
        Call(TranslateModel, LVarA, 2, -2, 0)
        Wait(1)
        Call(TranslateModel, LVarA, 2, Float(-1.5), 0)
        Wait(1)
        Call(TranslateModel, LVarA, 2, -1, 0)
        Wait(1)
        Call(TranslateModel, LVarA, Float(1.5), Float(-0.5), 0)
        Wait(1)
        Call(TranslateModel, LVarA, 1, 0, 0)
        Wait(1)
        Call(TranslateModel, LVarA, 1, Float(0.5), 0)
        Wait(1)
        Call(TranslateModel, LVarA, 1, 1, 0)
        Wait(1)
        Call(TranslateModel, LVarA, Float(0.5), 1, 0)
        Wait(1)
        Call(TranslateModel, LVarA, 0, 1, 0)
        Wait(1)
        Call(TranslateModel, LVarA, Float(-0.5), 1, 0)
        Wait(1)
        Call(TranslateModel, LVarA, -1, 1, 0)
        Wait(2)
        Call(TranslateModel, LVarA, -1, 1, 0)
        Wait(1)
        Call(TranslateModel, LVarA, -1, Float(0.5), 0)
        Wait(1)
        Call(TranslateModel, LVarA, -1, 0, 0)
        Wait(2)
        Call(TranslateModel, LVarA, -1, 0, 0)
        Wait(1)
        Call(TranslateModel, LVarA, Float(-0.5), 0, 0)
        Wait(1)
        Call(TranslateModel, LVarA, 0, 0, 0)
        Wait(2)
    EndLoop
    Return
    End
};
