viewing paste Simple Healer - Yanji | Athena

Posted on the | Last edited on
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56
crystilia,70,78,3   script  Healer  66,{
 
L_heal:
setarray .delay[0],3;
if ( delay > gettimetick(2) ) {
    message strcharinfo(0) + "", "You must wait " + ( delay - gettimetick(2) ) + " seconds to heal again.";
    end;
} else {
    specialeffect2 37; sc_start SC_INCREASEAGI,240000,10;
    specialeffect2 42; sc_start SC_BLESSING,240000,10;
    set delay, gettimetick(2) + .delay[.x];
    end;
} end;
 
L_npcmenu: x:
    mes "What can I help you with?";
    if ( select ( "Edit delay (Current- ^ff0000" + .delay[.x] + "^000000):Cancel" ) == 2 ) { goto L_EXIT; }
    else { x2:
        mes "Please input the delay you'd like, or input^123456 13579 ^000000to use the ^cd0000default^000000 delay of ^cd77003^000000 seconds.";
        input .@a;
        if ( .@a == 13579 ) {
            mes "Are you sure you want to use the default delay?";
            menu "Yes",-,"Back",x2,"Main Menu",x,"Cancel",L_EXIT;
            next;
            mes "Default delay set.";
            set .x, 0;
            close;
        }
        mes "Are you sure you want to set the delay to ^ff0000" + .@a + "^000000?";
        menu "Yes",-,"Back",x2,"Main Menu",x,"Exit",L_EXIT;
        next;
        mes "Delay set to ^cd0000" + .@a + "^000000.";
        set .x, 1;
        set .delay[.x], .@a;
        close;
    }
 
L_EXIT:
    mes "Have a nice day then, " + strcharinfo(0) + ".";
    close;
 
OnWhisperGlobal:
if ( getgmlevel() < 50 ) end;
    if ( compare ( @whispervar0$, "!menu" ) ) goto L_npcmenu;
    if ( compare ( @whispervar0$, "!heal" ) ) goto L_heal1;
    if ( compare ( @whispervar0$, "!delay" ) ) {
        if ( @whispervar1$ == "default" ) {
            set .x, 0;
        } if ( @whispervar1$ != "default" ) {
            set .@delay, @whispervar1$;
            set .delay[1], .@delay;
            set .x, 1;
        } dispbottom "Delay set to " + .delay[.x] + ".";
    }
end;
}
Viewed 875 times, submitted by Yanji.