viewing paste Unknown #22235 | 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 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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307
// Capuche cleaning Base on the poring race by Zell_ff8, xianz, Neko
mania,99,88,3   script  Poring Race     882,{
 
if (getgmlevel()<99) {
        if( .access_Prace == 0 ) {
                mes "[^DC143C Poring Race Staff ^000000]";
                mes "Sorry, it seems that there is no^DC143C Poring Race^000000 is Scheduled right now.";
                close;
        }
                mes "[^DC143C Poring Race Staff ^000000]";
                mes "Do you want to participate on Poring Race?";
        if( select( "» Yes","» No" ) -1 ) {
                next;
                mes "[^DC143C Poring Race Staff ^000000]";
                mes "See you again next time!";
                close;
        }
        if( .access_Prace == 0 ) {
                next;
                mes "[^DC143C Poring Race Staff ^000000]";
                mes "...";
                mes "...";
                mes "Cheater!!~~";
                close;
        }
                close2;
                @prace_winner$ = "";
                warp "p_track01",52,41;
                end;
}else{
        mes "Hello, GM [^DC143C "+strcharinfo(0)+" ^000000] !";
        mes "What would you like to do?";
        next;
switch(select("» Set Prize[ ^E50000"+ getitemname($praceprize)+ "^000000 ] - [ ^DC143C" +$praceprizecount+"^000000 ]:» Warp in:» Start Race")){
        case 1:
                next;
                mes "[ ^3399FFDisguise Manager^000000 ]";
                mes "Please type in the new prize id.";
        input .@praceprizeid;
        if (getitemname(.@praceprizeid) == "null" || getitemname(.@praceprizeid) == "") {
                next;
                mes "[ ^3399FFDisguise Manager^000000 ]";
                mes "Error";
                mes "This item does not exist in the database...";
                close;
        }
                set $praceprize, .@praceprizeid;
                next;
                mes "[ ^3399FFDisguise Manager^000000 ]";
                mes "Please type in the amount.";
        input .@praceprizeamount;
        if (!.@praceprizeamount) set .@praceprizeamount,1 ;
                set $praceprizecount,.@praceprizeamount;
                next;
                mes "[ ^3399FFFast Type Manager^000000 ]";
                mes "Prize has been set to ^E50000 "+ getitemname($praceprize)+ "^000000 and the amount to ^E50000 " +$praceprizecount+"^000000";
                close;
        case 2:
                if( .access_Prace == 0 ) {
                mes "[^DC143C Poring Race Staff ^000000]";
                mes "Im sorry GM[^DC143C "+strcharinfo(0)+" ^000000], But there is no Poring Race scheduled right now.";
                close;
                }else{
                mes "See ya again GM.";
                next;
                warp "p_track01",61,42;
                close;
                }
        case 3:
                close2;
                goto OnRace;
        }
}
 
OnRace:
OnClock0000:
OnClock0400:
OnClock0800:
OnClock1200:
OnClock1600:
OnClock2000:
        set .access_Prace, 1;
        announce "Poring Race: Entrance is now open, Please proceed to mania 98 88 and talk to the NPC.",0,0xEE9A4D;
        sleep2 2000;
        announce "Poring Race: Race will start in 3 minutes.",0,0xEE9A4D;
        sleep2 2000;
        announce "Poring Race: Today's Jackpot is [ "+ $praceprizecount +" ] [ "+getitemname($praceprize)+"(s) ] !",0,0xEE9A4D;
        setnpctimer 180000,"Bidder#prace0";
        startnpctimer "Bidder#prace0";
        end;
 
OnPraceEnd:
        set .access_Prace, 0;
        announce "Poring Race is over!",0,0xEE9A4D;
        end;
 
OnInit:
        bindatcmd "prace",strnpcinfo(0)+"::OnRace",99,99; // bind @prace command
        end;
}
 
 
p_track01,58,41,3       script  Bidder#prace0   877,{
function checkevent;
        mes "[Bidder]";
        if( getstrlen( @prace_winner$ ) ) {
                mes "You have choose ^00bb00"+ @prace_winner$ +"^000000";
                close;
        }
        else if ( checkevent() || .start ) {
                mes "There is a race in progress...";
                close;
        }
        else if( !getvariableofnpc( .access_Prace,"Poring Race" ) ) {
                mes "There is no race.";
                close;
        }
        mes "Choose the poring you want to bet:";
        mes "It will cost "+ .zeny_req +" Zeny.";
 
        .@s = select( .menu_$ );
        if( .@s == 7 ) {
                next;
                mes "[Bidder]";
                mes "Goodbye.";
                close;
        }
        .@c$ = .monst_$[ .@s -1 ];
 
        if ( checkevent() ) {
                next;
                mes "[Bidder]";
                mes "...";
                mes "...";
                mes "Cheater!!~~";
                close;
        }
        else if( Zeny < .zeny_req ) {
                next;
                mes "[Bidder]";
                mes "You don't have enough Zeny.";
                close;
        }
        Zeny -= .zeny_req;
        @prace_winner$ = .@c$;
        .prace_bidders[ .prace_bets ] = getcharid(3);
        .prace_bets++;
 
        next;
        mes "[Bidder]";
        mes "I have "+ .prace_bets +" bets.";
        initnpctimer;
        npctalk "I got "+ strcharinfo(0) +" bet!";
        close;
OnTimer60000:
        npctalk "I got "+ .prace_bets +" bets. Anyone else?";
        end;
OnTimer80000:
        npctalk "The race will start soon. Last chance.";
        end;
OnTimer90000:
        stopnpctimer;
        .start = 1;
        mapannounce "p_track01","Porings, on your marks...",1,0xEE9A4D;
        sleep 2500;
        for( .@i = 3; .@i > 0; .@i-- ) {
                mapannounce "p_track01","..."+ .@i +"...",1,0xEE9A4D;
                sleep 1000;
        }
        donpcevent strnpcinfo(0) +"::OnStartRace";
        sleep 1000;
        mapannounce "p_track01","Gooo!!!",1,0xEE9A4D;
        end;
OnTimer120000:
        mapwarp "p_track01","mania",96,88;
        donpcevent "Poring Race::OnPraceEnd";
        .prace_winner$ = "";
        .start = .prace_bets = 0;
        donpcevent strnpcinfo(0) +"::OnReturnRace";
        end;
 
OnStartRace:
        callsub L_label, "OnRace";
OnStopRace:
        callsub L_label, "OnStop";
OnReturnRace:
        callsub L_label, "OnReturn";
L_label:
        donpcevent "Metaling#prace3::"+ getarg(0);
        donpcevent "Poring#prace1::"+ getarg(0);
        donpcevent "Poporing#prace6::"+ getarg(0);
        donpcevent "Angeling#prace2::"+ getarg(0);
        donpcevent "Santa Poring#prace5::"+ getarg(0);
        donpcevent "Deviling#prace4::"+ getarg(0);
        if( getarg(0) == "OnStop" && .prace_winner$ != "" )
                callsub L_WinRace;
        end;
L_WinRace:
        mapannounce "p_track01", "The winner is "+ .prace_winner$,1,0xEE9A4D;
        donpcevent strnpcinfo(0) +"::OnChequeo";
        sleep 3000;
        donpcevent strnpcinfo(0) +"::OnReturnRace";
        sleep 10000;
        mapwarp "p_track01","mania",98,88;
        donpcevent "Poring Race::OnPraceEnd";
        .prace_winner$ = "";
        .start = .prace_bets = 0;
        end;
OnChequeo:
        for( .@i = 0 ; .@i < getarraysize( .prace_bidders ); .@i++ ) {
                if( attachrid( .prace_bidders[.@i] ) && getstrlen( @prace_winner$ ) ) {
                        dispbottom "The winner is "+ .prace_winner$ +" and you have bet for "+ @prace_winner$ +".";
                        if( @prace_winner$ == .prace_winner$ ) {
                                dispbottom "You have won!";
                                mapannounce "p_track01"," Congratulations! "+ strcharinfo(0) +" has won!",1,0xEE9A4D;
                                getitem $praceprize,.praceprizeamount;
                                emotion 21,1;
                        }
                        else {
                                dispbottom "You have lost.";
                                emotion 28,1;
                        }
                        @prace_winner$ = "";
                }
        }
        deletearray .prace_bidders;
        end;
OnInit:
        .zeny_req = 300000000;
//      .item_gained = 671;
//      .item_num_gain = 5;
        setarray .monst_$,"Poring","Angeling","Metaling","Deviling","Santa Poring","Poporing","None";
        .menu_$ = implode( .monst_$, ":" );
        end;
 
function checkevent {
        getmapxy .@mapname$, .@x1, .@y, 1, "Poring#prace1";
        getmapxy .@mapname$, .@x2, .@y, 1, "Angeling#prace2";
        getmapxy .@mapname$, .@x3, .@y, 1, "Metaling#prace3";
        getmapxy .@mapname$, .@x4, .@y, 1, "Deviling#prace4";
        getmapxy .@mapname$, .@x5, .@y, 1, "Santa Poring#prace5";
        getmapxy .@mapname$, .@x6, .@y, 1, "Poporing#prace6";
        .@t = ( .@x1 + .@x2 + .@x3 + .@x4 + .@x5 + .@x6 ) != 58 * 6;
        return .@t;
}
}
//-----------------------------------
// Racer NPC's
//-----------------------------------
 
-       script  pori_race       -1,{
OnRace:
        initnpctimer;
        end;
OnStop:
        stopnpctimer;
        end;
OnReturn:
        sleep 1000;
        while( strnpcinfo(1) != .monst$[ .@i ] ) .@i++;
        movenpc strnpcinfo(3), 58, .walk_t[.@i];
        end;
OnTimer1100:
        getmapxy .@mapname$,.@x,.@y,1, strnpcinfo(3);
        if( rand(100) < .prace_random )
                npcwalkto .@x-1, .@y;
        .@r = rand( .prace_random2 );
        if ( .@x -1 == 29 ) {
                while( strnpcinfo(1) != .monst$[ .@i ] ) .@i++;
                set getvariableofnpc( .prace_winner$, "Bidder#prace0" ), .monst$[ .@i ];
                emotion 29;
                donpcevent "Bidder#prace0::OnStopRace";
                end;
        }
        stopnpctimer;
        setnpctimer .@r;
        startnpctimer;
        end;
OnInit:
        deletearray .walk_t;
        deletearray .monst$;
        setarray .walk_t, 38, 36, 34, 32, 30, 28;
        setarray .monst$, "Poring", "Angeling", "Metaling", "Deviling", "Santa Poring", "Poporing";
        .prace_random = 70;
        .prace_random2 = 600;
        end;
}
 
p_track01,58,38,2       duplicate(pori_race)    Poring#prace1   1002
p_track01,58,36,2       duplicate(pori_race)    Angeling#prace2 1096
p_track01,58,34,2       duplicate(pori_race)    Metaling#prace3 1613
p_track01,58,32,2       duplicate(pori_race)    Deviling#prace4 1582
p_track01,58,30,2       duplicate(pori_race)    Santa Poring#prace5     1062
p_track01,58,28,2       duplicate(pori_race)    Poporing#prace6 1031
 
//p_track01,78,42,0     warp    p_track002      1,3,royale,142,170
 
p_track01       mapflag nobranch
p_track01       mapflag noicewall
p_track01       mapflag nomemo
p_track01       mapflag noreturn
p_track01       mapflag noteleport
p_track01       mapflag nowarpto
p_track01       mapflag nowarp
p_track01       mapflag pvp     off
p_track01       mapflag nosave
 
Viewed 592 times, submitted by unknown.