viewing paste Unknown #16035 | Text

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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
-    script    MassController    -1,{
OnWhisperGlobal:
if (getgroupid() >= 5 ){
    if(@whispervar0$ == "mass on") {
        set $mass, 1;
        end;
    } else if (@whispervar0$ == "mass off") {
        set $mass, 0;
        end;
    } else { end; }
 
/*
Day 1: Dec 11, 2013 6PM to Dec 12, 2013 10AM
Day 2: Dec 12, 2013 6PM to Dec 13, 2013 10AM
Day 3: Dec 13, 2013 6PM to Dec 14, 2013 10AM
Day 4: Dec 14, 2013 6PM to Dec 15, 2013 10AM
Day 5: Dec 15, 2013 6PM to Dec 16, 2013 10AM
Day 6: Dec 16, 2013 6PM to Dec 17, 2013 10AM
Day 7: Dec 17, 2013 6PM to Dec 18, 2013 10AM
Day 8: Dec 18, 2013 6PM to Dec 19, 2013 10AM
Day 9: Dec 19, 2013 6PM to Dec 20, 2013 10AM
Day 10: Dec 20, 2013 6PM to Dec 21, 2013 10AM
Day 11: Dec 21, 2013 6PM to Dec 22, 2013 10AM
Day 12: Dec 22, 2013 6PM to Dec 23, 2013 10AM
Day 13: Dec 23, 2013 6PM to Dec 24, 2013 10AM
Day 14: Dec 24, 2013 6PM to Dec 25, 2013 10AM
*/
// if not 12?11? ~ 12?25?
// means has not 12?11? (6PM) OR is already 12?25? (10AM)
// end
 
onInit:
if ((gettime(6)==12) && (gettime(5) >= 11) && gettime(5) <=25) {
    //enable mass
    onClock1800:
    set $mass,1;
    //disable mass
    onClock1000:
    set $mass,0;
    if (!(gettime(5) == 11)) query_sql("delete from `global_reg_value` where str = \"#masstoday\";");
    }
    end;
}
 
prontera,160,181,5    script    Ingacio    909,{
 
// giving the prize (on 12?25? 12.00 PM)
if (gettime(5) == 25) {
    if(gettime(3) > 10) {
        if(gettime(3) > 12) {
            if (!(#christmas_prize_taken)) {
                if (#massjoined == 14) {
                    mes "Merry Christmas!";
                    mes "As you joined the daily masses since 2 weeks ago,";
                    mes "Here's a little gift for you!";
                    getitem 501,1;
                    set #christmas_prize_taken, 1;
                    next;
                    }
                }
            }
        mes "Merry Christmas!";
        mes "Have a wonderful Christmas day!";
        emotion e_ok,0;
        close;
        }
    }
   
if (!((gettime(6)==12) && (gettime(5) >= 11) && gettime(5) <=25)) {
    mes "Welcome to Prontera Church.";
    mes "Please maintain quietness.";
    mes "Thank you.";
    close;
    }
 
if ($mass == 0) {
    mes "There are currently no mass right now.";
    mes "Please come back again later at ^FF00006 PM^000000";
    close;
    }
 
if (#masstoday == 1) {
    mes "Thank you for attending today's mass";
    mes "May God bless you";
    emotion e_ok,0;
    close;
    }
 
// here's the mass script. IDK what you want to do.
 
 
//mass end. record his attendance
set #masstoday, 1;
set #massjoined, #massjoined + 1;
}
Viewed 281 times, submitted by unknown.