viewing paste Unknown #15838 | 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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
// == Rfyl with Trap's 
// == Èäåÿ Shader
// == Ðåàëèçàöèÿ Ocelote
// == Ïîäïðàâèë Incubus
// == Modified and added other traps - Norm Hmuryj(Melbou)
 
-   script  Rfyl_With_Trap_Start    -1,{
OnClock1525:
        disablenpc "Âûõîä#Trap";
        
        announce "[Run for your Life] : Event will start after 3 minutes. Registration takes place in Prontera.",bc_all;
        set $rfyl_trap, 1;
        killmonster "quiz_02","All";
        sleep 60000;
        announce "[Run for your Life] : While the traps are set, I'll tell you the rules of Event.",bc_all;
        sleep 3000;
        for(set .a,0; .a <= getarraysize($RulesRfylTrap$); set .a,.a + 1)
        {
                announce "[Run for your Life] : "+$RulesRfylTrap$[.a]+"",bc_all;
        }
        sleep 57000;
        announce "[Run for your Life] : Starting after 1 minute. All those who have registered - get ready.",bc_all;
        sleep 60000
        if(getarraysize($RfylTrapPlayers$) < 3)
        {
                announce "[Run for your Life] : Event over as does not enroll a sufficient number of players.",bc_all;
                deletearray $RfylTrapPlayers$[0], getarraysize($RfylTrapPlayers$);
                set $rfyl_trap, 0;
                end;
        }
        for(set .i,0; .i <= getarraysize($RfylTrapPlayers$); set .i,.i + 1)
        {
                if($RfylTrapPlayers$[.i] != "")
                {
                                nude;
                        warpchar "quiz_02",300,250,getcharid(0,$RfylTrapPlayers$[.i]);
                }
        }
        
        set $rfyl_trap, 2;
        sleep 10000;
        monster "quiz_02",300,250,"Run for your Life",1636,1,"Monster_Rfyl_Trap::OnKillMonster";
        
        initnpctimer;
        end;
        
        OnTimer3000:
        announce getarraysize($RfylTrapPlayers$)+"",bc_all;
        if(getmapusers("quiz_02") > 1 && getarraysize($RfylTrapPlayers$) > 1)
        {
                mapannounce "quiz_02","[Run for your Life] : At the event, there are "+getmapusers("quiz_02")+" players!",bc_map;
                initnpctimer;
                end;
        }
        else if(getmapusers("quiz_02") < 2 && getarraysize($RfylTrapPlayers$) < 2)
        {
                announce "[Run for your Life] : We have a winner!",bc_all;
                mapannounce "quiz_02","[Run for your Life] : To exit of Event and pick up the prize, go to the NPC 'Âûõîä' in the center of location",bc_map;
                enablenpc "Âûõîä#Trap";
                deletearray $RfylTrapPlayers$[0], getarraysize($RfylTrapPlayers$);
        }
        stopnpctimer;
        end;
        
        
        OnPCDieEvent:
        OnPCLogoutEvent:
        
        getmapxy $Rfyl_Trap$,$X,$Y,0;
        
        if($Rfyl_Trap$ == "quiz_02")
        {
                for(set .rf,0; .rf <= getarraysize($RfylTrapPlayers$); set .rf, .rf + 1)
                {   
                        if(strcharinfo(0) ==  $RfylTrapPlayers$[.rf])
                        {
                                deletearray $RfylTrapPlayers$[.rf], 1;
                                atcommand "@alive "+strcharinfo(0);
                                warp "SavePoint",0,0;
                        }
                }
                if(getmapusers("quiz_02") < 2 && getarraysize($RfylTrapPlayers$) < 2)
                {
                    set $rfyl_trap,0;
                    killmonster "quiz_02","All";
                    stopnpctimer;
                    announce "[Run for your Life] : Have a winner!",bc_all;
                    mapannounce "quiz_02","[Run for your Life] : To exit of Event and pick up the prize, go to the NPC 'Âûõîä' in the center of location",bc_map;
                    enablenpc "Âûõîä#Trap";
                    deletearray $RfylTrapPlayers$[0], getarraysize($RfylTrapPlayers$);
                }
        }
        end;
        
        OnInit:
        setarray $RulesRfylTrap$[0], "You go to the location with a monster, "" Who will survive - won "," On location there are ladders with different statuses";
        end;
}
 
        -   script  Monster_Rfyl_Trap   -1,{
        OnKillMonster:
        if($rfyl_trap == 2)
            monster "quiz_02",300,250,"Run for your Life",1636,1,"Monster_Rfyl_Trap::OnKillMonster";
        end;
        }
        
        // -- Âûõîä :
        quiz_02,300,250,6   script  Âûõîä#Trap 924,{
        getitem 7227,1;
        warp "SavePoint",0,0;
        end;
        }
 
        // -- Ðåãèñòðàòîð :
        prontera,141,164,6  script  Rfyl Trap Mode  923,{
        if($rfyl_trap != 1)
        {
            mes "Event registration is not available.";
            close;
        }
        
        if(checkriding() > 0) 
        {
                mes "Remove the Peco! (:";
                close;
        }
        for(set .i,0; .i < getarraysize($RfylTrapPlayers$); set .i,.i+1)
            if(strcharinfo(0) == $RfylTrapPlayers$[.i])
                end;
        set $RfylTrapPlayers$[getarraysize($RfylTrapPlayers$)], strcharinfo(0);
        announce strcharinfo(0)+" - "+getarraysize($RfylTrapPlayers$),bc_all;
        dispbottom "Are you registered, wait for the start.";
        end;
        }
        
        
        
        // -- Òðàï :
        quiz_02,304,236,6   script  Trap_Rfyl_S#01::Rfyl_Trap   -1,1,1,{
        OnTouch:
        switch(rand(1,10)) {
        case 1:
        case 9:
                sc_start SC_CONFUSION,8000,0;
                end;
        case 2:
                sc_start SC_STONE,4000,0;
                end;
        case 4:
                sc_start SC_SLEEP,4000,0;
                end;
        case 6:
                sc_start SC_FREEZE,4000,0;
                end;
        case 8:
                sc_start SC_STUN,4000,0;
                end;
        case 10:
                sc_start SC_CURSE,80000,0;
                end;
        }
        end;
        }
        
        
        // -- Äóáëèêàòû :
        quiz_02,294,259,1   duplicate(Rfyl_Trap)    Trap_Rfyl_S#02  -1,1,1
        quiz_02,308,260,1   duplicate(Rfyl_Trap)    Trap_Rfyl_S#03  -1,1,1
        quiz_02,297,252,1   duplicate(Rfyl_Trap)    Trap_Rfyl_S#04  -1,1,1
        quiz_02,308,248,1   duplicate(Rfyl_Trap)    Trap_Rfyl_S#05  -1,1,1
        quiz_02,299,243,1   duplicate(Rfyl_Trap)    Trap_Rfyl_S#06  -1,1,1
        quiz_02,317,239,1   duplicate(Rfyl_Trap)    Trap_Rfyl_S#07  -1,1,1
        quiz_02,316,252,1   duplicate(Rfyl_Trap)    Trap_Rfyl_S#08  -1,1,1
        quiz_02,293,240,1   duplicate(Rfyl_Trap)    Trap_Rfyl_S#10  -1,1,1
        quiz_02,304,253,1   duplicate(Rfyl_Trap)    Trap_Rfyl_S#09  -1,1,1
        
//quiz_02   mapflag resident
quiz_02 mapflag noskill
quiz_02 mapflag nocommand
quiz_02 mapflag nosave
quiz_02 mapflag restricted  5 // Do not forget to add a potion that can not eat, speed and potiony Butterfly Wing in db/item_noequip.txt
        
Viewed 609 times, submitted by Guest.