viewing paste Unknown #13655 | 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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
-       script  blessme -1,{
//=========================SETTING============================
OnInit:
        set .bless_need, 523; //Require item to start Blessing. Default 523 (Holy Water) 0 to disable.
        set .bless_needs,0; //Item require setting, 0 = only need it in inventory 1 = consumed everytime Blessing started.
        set .bless_item,607; //Item for double exp earning. Consumed 1 item/10 seconds, 360/hour, 8640/day
        set .bless_map$,"prontera"; //Map require for Blessing
        set .bless_mname$, "Prontera City"; //Map name that will be told to player
        set .bless_adj,2; //Normal class will earn exp/2 while advance class not
        set .bless_rate,1; //Blessing exp rate
        set .server_rate,getbattleflag("base_exp_rate")/100; //Your server exp rate. Needed to for dispbottom part.
        end;
//============================================================
       
OnWhisperGlobal:
        if (@blessing == 1)end;
        if (BaseLevel < 20) {
                dispbottom "You have to reach level 20 for Blessing.";
                end;
                }
        if (.bless_need != 0 && countitem(.bless_need) <= 0){
                dispbottom "You need "+getitemname(.bless_need)+" before start Blessing.";     
                end;
                }
        getmapxy(@mapb$, @xb, @yb, 0 );
        if (@mapb$ != .bless_map$) {
                dispbottom "You can only do Blessing in "+.bless_mname$+".";
                end;
        }
        if (.bless_needs == 1 && .bless_need != 0){delitem .bless_need,1;}
        set @blessing,1;
        set @bexp,BaseLevel*5;
        dispbottom "Blessing started.";
        set @bless_boost,.bless_adj;
                if (Class > 4000){
                                set @bless_boost,@bless_boost/2;
                }
        addtimer 10000, "blessme::OnBlessed";
               
       
OnBlessed:
                if (@blessing != 1) {
                        end;
                }
                       
                getmapxy(@mapb$, @xb, @yb, 0 );
                if (@mapb$ != .bless_map$) {
                                dispbottom "Blessing is stopped because you are not in "+.bless_mname$+".";
                                set @blessing,0;
                                end;
                }
                set @bexp,BaseLevel/@bless_boost*.bless_rate;
                if (countitem(.bless_item)) {
                                set @bexp,@bexp*2;
                                delitem .bless_item,1;}
            getexp @bexp,@bexp;
                specialeffect2 14;
                dispbottom "Gained "+@bexp*.server_rate+" Exp and J-Exp from Blessing.";
                deltimer "blessme::OnBlessed";
                addtimer 10000,"blessme::OnBlessed";
}
Viewed 587 times, submitted by Pneuma.