viewing paste Unknown #53404 | 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 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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
-   script  Geffen_Race#main    -1,{
 
OnGMStart:
    if(getgmlevel() < 99){ end; }
    if(( compare(.@atcmd_parameters$[0], "stop"))){ set .event_stop,1; doevent "Geffen_Race#main::OnTimeUp"; end; } 
    if(.event_start == 1){ dispbottom "Geffen Race is currently on-going."; }
    if ((compare(.@atcmd_parameters$[0], "start"))){ donpcevent "Geffen_Race#main::OnStart"; end; }
    
    
OnMinute45: //event starts every 45 minutes
    if(.event_start == 1) end; //if event is still running, event will not start
OnStart:
    set .winner,1;
    set .event_start,1;
    donpcevent "Geffen_Race#time::OnStart";
    end;
 
OnMonsterSummon:
    //First Floor Mobs
    monster "gef_tower",52,169,"Novice Hunter",1394,7,strnpcinfo(0)+"::OnMobKill"; //First Floor
    monster "gef_tower",66,168,"Novice Hunter",1394,5,strnpcinfo(0)+"::OnMobKill"; //First Floor
    monster "gef_tower",33,148,"Novice Hunter",1394,5,strnpcinfo(0)+"::OnMobKill"; //First Floor
 
    //Hydro
    monster "gef_tower",52,97,"Novice Hunter",1480,2,strnpcinfo(0)+"::OnMobKill"; //Second Floor
    monster "gef_tower",52,44,"Novice Hunter",1480,1,strnpcinfo(0)+"::OnMobKill"; //Third Floor
    monster "gef_tower",113,154,"Novice Hunter",1480,1,strnpcinfo(0)+"::OnMobKill"; //Fourth Floor
    monster "gef_tower",112,171,"Novice Hunter",1480,1,strnpcinfo(0)+"::OnMobKill"; //Fourth Floor
    monster "gef_tower",112,103,"Novice Hunter",1480,2,strnpcinfo(0)+"::OnMobKill"; //Fifth Floor
    monster "gef_tower",111,64,"Novice Hunter",1480,2,strnpcinfo(0)+"::OnMobKill"; //Sixth Floor
 
    //Valkyrie
    monster "gef_tower",52,97,"Novice Hunter",1864,2,strnpcinfo(0)+"::OnMobKill"; //Second Floor
    monster "gef_tower",52,44,"Novice Hunter",1864,2,strnpcinfo(0)+"::OnMobKill"; //Third Floor
    monster "gef_tower",113,154,"Novice Hunter",1864,1,strnpcinfo(0)+"::OnMobKill"; //Fourth Floor
    monster "gef_tower",112,171,"Novice Hunter",1864,1,strnpcinfo(0)+"::OnMobKill"; //Fourth Floor
    monster "gef_tower",112,122,"Novice Hunter",1864,2,strnpcinfo(0)+"::OnMobKill"; //Fifth Floor
    monster "gef_tower",111,73,"Novice Hunter",1864,2,strnpcinfo(0)+"::OnMobKill"; //Sixth Floor
 
    sleep 5000;
    enablenpc "Geffen Race Reward";
    end;
 
OnMobKill:
    end;
 
OnTimeUp:
    if(.event_start == 0){
        dispbottom "Geffen Tower Race have not started. No event to stop.";
        end;
    }
    if(.event_stop == 1){
        announce "Geffen Race has been cancelled.",0;
        stopnpctimer;
        set .event_stop, 0;
        set .winner,0;
        killmonster "geffen","All";
        removemapflag "gef_tower",mf_noitemconsumption;
        end;
    }
    set .winner,0;
    set .event_start,0;
    disablenpc "Geffen Race Reward";
    announce "Geffen Race has ended.",0;
    killmonster "gef_tower","All";
    removemapflag "gef_tower",mf_noitemconsumption;
    end;
 
OnEventReward:
    set .@winner$, getvariableofnpc(.winner$,"Geffen Race Reward");
    if(.winner == 1){
        set .winner,0;
        announce .@winner$+" won the Geffen Tower Race",0;
        set .@reward,rand(getarraysize(.reward));
        getitem .reward[.@reward],1;
        disablenpc "Geffen Race Reward";
        set .event_start,0;
        sleep 2000;
        announce "The Geffen Tower Race has ended!",0;
        warp "SavePoint",0,0;
        end;
    }
end;
 
 
OnInit:
    RegisterSchedule("*",06,59,"Geffen Tower");
    setarray .reward,671; //reward here
    .statRestriction = 100; // 100 stat and above
    //don't touch anything
    set .winner,0;
    set .event_start,0;
    bindatcmd "race",strnpcinfo(0)+"::OnGMStart";
    disablenpc "Geffen Race Reward";
    end;
}
 
prontera,146,186,3  script  Warper  67,{
    if ( BaseLevel > 10 || Class != 0 ) {
            mes "Only Lv 10 Novice can enter.";
            close2;
            }
    if (readparam(bStr) >= .statRestriction || readparam(bAgi) >= .statRestriction || readparam(bVit) >= .statRestriction || readparam(bInt) >= .statRestriction || readparam(bDex) >= .statRestriction || readparam(bLuk) >= .statRestriction) {
            mes "Only Stats 99 Below can enter.";
            mes "Make sure all your stats are below 100";
            close;
        }
        else {
            getinventorylist;
            if ( @inventorylist_amount ) {
                mes "You store all your items first.";
                close2;
                @inventorylist_amount = false;
                end;
            }
            sc_end SC_ALL;
            warp "quiz_01",42,369;
        }
    }
    end;
 
 
-   script  Geffen_Race#time    -1,{
 
OnStart:
    announce "Geffen Tower Race will begin in 5 minutes.",0;
    initnpctimer;
    end;
OnTimer1000:
    announce "Geffen Tower Race has begun!",0;
    sleep 2000;
    announce "Reach the top to claim the rewards!",0;
    sleep 2000;
    announce "Only novices can claim the prize, consumables have been disabled.",0;
    setmapflag "gef_tower",mf_noitemconsumption;
    mapwarp "gef_tower","geffen",119,100;
    donpcevent "Geffen_Race#main::OnMonsterSummon";
    end;
 
OnTimer7200000: //Time Limit (2 hours)
//OnTimer310000: 
    announce "Nobody has won the Geffen Tower Race",0;
    stopnpctimer;
    donpcevent "Geffen_Race#main::OnTimeUp";
    end;
}
 
gef_tower,109,22,4  script  Geffen Race Reward  123,{
    if(class != 0){
        mes "[ Rewarder ]";
        mes "You're not a novice!";
        close2;
        warp "SavePoint",0,0;
        end;
    }
    mes "[ Rewarder ]";
    mes "Congratulations!";
    set .winner$,strcharinfo(0);
    close2;
    doevent "Geffen_Race#main::OnEventReward";
    end;
    }
 
 
Viewed 676 times, submitted by Guest.