viewing paste topic/4608- sendmail sample | 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
-   script  Mail Test   -1,{
OnInit:
    bindatcmd "test", strnpcinfo(0)+"::Ontest";
    end;
Ontest:
    .@cid = getcharid(0);
    .@sender$ = "AnnieRuru";
    .@title$ = .@atcmd_command$ +" "+ .@atcmd_parameters$;
    .@msg$ = "testing 1...2...3...";
    .@zeny = 999;
    .@itemid = 1201;
    .@amount = 1;
    .@refine = 5;
    .@attribute = 0;
    .@card0 = 4001;
    .@card1 = 4002;
    .@card2 = 4003;
    .@card3 = 4004;
    switch ( atoi( .@atcmd_parameters$ ) ) {
    case 1:
        sendmail .@cid, .@sender$, .@title$, .@msg$;
        break;
    case 2:
        sendmail .@cid, .@sender$, .@title$, .@msg$, .@zeny;
        break;
    case 3:
        sendmail .@cid, .@sender$, .@title$, .@msg$, .@zeny, .@itemid;
        break;
    case 4:
        sendmail .@cid, .@sender$, .@title$, .@msg$, .@zeny, .@itemid, .@amount, .@refine, .@attribute, .@card0, .@card1, .@card2, .@card3;
        break;
    case 5:
        sendmail .@cid, .@sender$, .@title$, .@msg$, .@zeny, "Rod", .@amount, .@refine, .@attribute, .@card0, .@card1, .@card2, .@card3;
        break;
    default:
    }
    end;
}
Viewed 1311 times, submitted by AnnieRuru.