viewing paste e511dcf5940cee7a6e43744543a5ca96bc2 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
prontera,155,175,5  script  test_if_else    1_F_MARIA,{
    freeloop true;
    .@starttime = gettimetick(0);
    for ( .@j = 0; .@j < 10000; ++.@j ) {
        .@i = rand(1,10);
        if (.@i == 1) itemskill AL_TELEPORT,1;
        else if (.@i == 2) itemskill AL_TELEPORT,3;
        else if (.@i == 3) percentheal 50,0;
        else if (.@i == 4) percentheal 0,50;
        else if (.@i == 5) percentheal 50,50;
        else if (.@i == 6) getitem Apple,1;
        else if (.@i == 7) itemskill ALL_REVERSEORCISH,1;
        else if (.@i == 8) specialeffect2 EF_MAPPILLAR2;
        else if (.@i == 9) specialeffect2 EF_ANGEL2;
        else specialeffect2 EF_COIN;
    }
    .@endtime = gettimetick(0);
    debugmes ( .@endtime - .@starttime ) +" mili-sec";
    end;
}
 
prontera,158,175,5  script  test_switch 1_F_MARIA,{
    freeloop true;
    .@starttime = gettimetick(0);
    for ( .@j = 0; .@j < 10000; ++.@j ) {
        switch(rand(1,10)) {
        case 1: itemskill AL_TELEPORT,1; break;
        case 2: itemskill AL_TELEPORT,3; break;
        case 3: percentheal 50,0; break;
        case 4: percentheal 0,50; break;
        case 5: percentheal 50,50; break;
        case 6: getitem Apple,1; break;
        case 7: itemskill ALL_REVERSEORCISH,1; break;
        case 8: specialeffect2 EF_MAPPILLAR2; break;
        case 9: specialeffect2 EF_ANGEL2; break;
        default: specialeffect2 EF_COIN;
        }
    }
    .@endtime = gettimetick(0);
    debugmes ( .@endtime - .@starttime ) +" mili-sec";
    end;
}
Viewed 1468 times, submitted by AnnieRuru.