viewing paste topic/11141-k koe_char_0.2.txt | 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
-       script  KoE     FAKE_NPC,{
OnInit:
        disablenpc "The King#KoE";
        disablenpc "Exit#KoE";
        bindatcmd "koe", strnpcinfo(0)+"::OnCommand", 99,100;
        end;
 
OnCommand:
        if ( compare( .@atcmd_parameters$, "on" ) ) goto L_start;
        if ( compare( .@atcmd_parameters$, "off" ) ) goto L_end;
        dispbottom "type - '@koe on' to start the event";
        dispbottom "type - '@koe off' to end the event";
        end;
 
OnClock2000: // everyday 8pm starts
L_start:
        if ( .start ) end;
        pvpon "ordeal_1-1";
//      setmapflag "ordeal_1-1", mf_pvp_noparty;
        announce "The King of Emperium Hill has begun!", bc_all;
        .start = true;
        enablenpc "The King#KoE";
        disablenpc "Exit#KoE";
        $koeaid = 0;
        monster "ordeal_1-1", 149,149, "--ja--", EMPELIUM, 1, "KoE::OnEmpDead";
        goto L_setwall;
 
OnClock2030: // everyday 8:30pm ends
L_end:
        pvpoff "ordeal_1-1";
        announce "The King of Emperium Hill is over!", bc_all;
        .start = false;
        enablenpc "Exit#KoE";
        disablenpc "The King#KoE";
        if ( .wall ) {
                delwall "KoEWallNorth";
                delwall "KoEWallEast";
                delwall "KoEWallSouth";
                delwall "KoEWallWest";
        }
        .wall = 0;
        killmonster "ordeal_1-1", "KoE::OnEmpDead";
        killmonster "ordeal_1-1", "KoE::OnWallDown";
        end;
 
L_setwall:
        .wall = 4;
        .@wall[DIR_NORTH] = monster( "ordeal_1-1", 149,159, "--ja--", BARRICADE_, 1, "KoE::OnWallDown" );
        .@wall[DIR_EAST] = monster( "ordeal_1-1", 159,150, "--ja--", BARRICADE_, 1, "KoE::OnWallDown" );
        .@wall[DIR_SOUTH] = monster( "ordeal_1-1", 150,140, "--ja--", BARRICADE_, 1, "KoE::OnWallDown" );
        .@wall[DIR_WEST] = monster( "ordeal_1-1", 140,149, "--ja--", BARRICADE_, 1, "KoE::OnWallDown" );
//      for ( .@i = 0; .@i < 8; .@i += 2 ) {
//              setunitdata .@wall[.@i], UDT_HP, 5;
//              setunitdata .@wall[.@i], UDT_MAXHP, 5;
//      }
        setwall "ordeal_1-1", 141,144, 12, DIR_NORTH, 0, "KoEWallWest";
        setwall "ordeal_1-1", 144,158, 12, DIR_EAST, 0, "KoEWallNorth";
        setwall "ordeal_1-1", 158,155, 12, DIR_SOUTH, 0, "KoEWallEast";
        setwall "ordeal_1-1", 144,141, 13, DIR_EAST, 0, "KoEWallSouth";
        end;
OnWallDown:
        --.wall;
        if ( .wall ) end;
        delwall "KoEWallWest";
        delwall "KoEWallNorth";
        delwall "KoEWallEast";
        delwall "KoEWallSouth";
        end;
 
OnEmpDead:
        $koeaid = getcharid(3);
        announce "The current King of Emperium Hill is ["+ strcharinfo(PC_NAME) +"].", bc_all;
        killmonsterall "ordeal_1-1";
        .@count = getunits( BL_PC, .@aid, false, "ordeal_1-1" );
        for ( .@i = 0; .@i < .@count; ++.@i ) {
                if ( .@aid[.@i] != $koeaid ) {
                        attachrid .@aid[.@i];
                        warp "Save", 0,0;
                }
        }
        sleep 500;
        if ( .start )
                monster "ordeal_1-1", 149,149, "--ja--", EMPELIUM, 1, "KoE::OnEmpDead";
        goto L_setwall;
}
 
// KoE Entrance
prontera,155,191,4      script  The King#KoE    1_M_MERCHANT,{
    mes "[The King]";
    mes "Hello.";
    mes "Would you like to participate in the ^FF0000King of Emperium Hill Tournament^000000?";
        if ( select ( "Yes", "No" ) == 2 ) close;
    switch( rand(1,8) ){
        case 1: warp "ordeal_1-1", 149, 273; end;
        case 2: warp "ordeal_1-1", 245, 245; end;
        case 3: warp "ordeal_1-1", 273, 149; end;
        case 4: warp "ordeal_1-1", 245, 51; end;
        case 5: warp "ordeal_1-1", 149, 25; end;
        case 6: warp "ordeal_1-1", 53, 53; end;
        case 7: warp "ordeal_1-1", 25, 149; end;
        case 8: warp "ordeal_1-1", 53, 245; end;
        }
}
 
// KoE Exit
ordeal_1-1,150,150,5    script  Exit#KoE        1_M_BARD,{
        mes "[Exit]";
        mes "See ya.";
        close2;
        warp "Save",0,0;
        if ( getcharid(3) == $koeaid )
                getitem TCG_Card, 5; // configure prize here
        end;
}
 
ordeal_1-1      mapflag nobranch
ordeal_1-1      mapflag nomemo
ordeal_1-1      mapflag nopenalty
ordeal_1-1      mapflag noreturn
ordeal_1-1      mapflag nosave  SavePoint
ordeal_1-1      mapflag noteleport
ordeal_1-1      mapflag nowarp
ordeal_1-1      mapflag nowarpto
ordeal_1-1      mapflag pvp_noparty
ordeal_1-1      mapflag pvp_noguild
 
// ../npc/warps/pvp.txt
ordeal_1-1,100,150,0    warp    ord11-1 1,1,ordeal_1-1,128,150
ordeal_1-1,123,150,0    warp    ord11-2 1,1,ordeal_1-1,95,150
ordeal_1-1,114,183,0    warp    ord11-3 1,1,ordeal_1-1,135,163
ordeal_1-1,130,168,0    warp    ord11-4 1,1,ordeal_1-1,109,188
ordeal_1-1,115,115,0    warp    ord11-5 1,1,ordeal_1-1,136,136
ordeal_1-1,131,131,0    warp    ord11-6 1,1,ordeal_1-1,110,110
ordeal_1-1,148,176,0    warp    ord11-7 1,1,ordeal_1-1,149,204
ordeal_1-1,149,199,0    warp    ord11-8 1,1,ordeal_1-1,148,171
ordeal_1-1,149,99,0     warp    ord11-9 1,1,ordeal_1-1,151,129
ordeal_1-1,151,124,0    warp    ord11-10        1,1,ordeal_1-1,151,94
ordeal_1-1,168,168,0    warp    ord11-11        1,1,ordeal_1-1,189,189
ordeal_1-1,184,184,0    warp    ord11-12        1,1,ordeal_1-1,163,163
ordeal_1-1,169,131,0    warp    ord11-13        1,1,ordeal_1-1,188,111
ordeal_1-1,183,116,0    warp    ord11-14        1,1,ordeal_1-1,164,136
ordeal_1-1,176,150,0    warp    ord11-15        1,1,ordeal_1-1,204,150
ordeal_1-1,199,150,0    warp    ord11-16        1,1,ordeal_1-1,171,150
Viewed 180 times, submitted by AnnieRuru.