viewing paste Unknown #19315 | 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
-   script  Faction_System  -1,{
    end;
 
OnInit:
 
bindatcmd ("factionstart","Faction_System::OnFactionStart");
bindatcmd ("factionend","Faction_System::OnFactionEnd");
 
OnMinute00:
    set .Faction,0;
    StartLoop:
    if(gettime(4)==$FactionEndDay[.Faction]&&gettime(3)==$FactionEndTime[.Faction]) { goto FactionActualEnd; end; }
    if(gettime(4)==$FactionStartDay[.Faction]&&gettime(3)>=$FactionStartTime[.Faction]&&(gettime(3)<$FactionEndTime[.Faction] || $FactionStartDay[.Faction]!=$FactionEndDay[.Faction])) { goto FactionActualStart; end; }
    set .Faction,.Faction+1;
    if(.Faction>7) { goto StartLoopEnd; }
    goto StartLoop;
    end;
 
FactionActualStart:
    if($FactionStatus==1) { end; }
    set $FactionStatus,1;
    donpcevent "CastleSpawn::OnCastleDESpawn";
    disablenpc "Kamui";
    fvfon "mocg_cas01";
    initnpctimer;
    if($FactionName!=0) { announce "The Faction War has begun! The Current Castle Owner is ["+factioninfo($FactionName,0)+"] Faction.",bc_all|bc_woe; } else { announce "Faction War has began! Which Faction will prove their worth?",bc_all|bc_woe; }
    if(getmapusers("mocg_cas01")>0) { mapwarp "mocg_cas01","prontera",155,182,0; }
    monster "mocg_cas01",142,291,"Faction Stone",15000,1,"Faction_System::OnFactionBreak";
    enablenpc "FactionWarp";
    //enablenpc "FactionInfo";
    end;
 
StartLoopEnd:
    set .Faction,0;
    EndLoop:
    if((gettime(4)==$FactionEndDay[.Faction])&&(gettime(3)==$FactionEndTime[.Faction])) { goto FactionActualEnd; end; }
    if($FactionEndDay[.Faction]==0&&$FactionStartTime[.Faction]==0&&$FactionEndTime[.Faction]==0) { end; }
    set .Faction,.Faction+1;
    if(.Faction>7) { end; } 
    goto EndLoop;
    end;
    
FactionActualEnd:
    if($FactionStatus==0) { end; }
    set $FactionStatus,0;
    stopnpctimer;
    if(getmapusers("mocg_cas01")>0) { mapwarp "mocg_cas01","prontera",155,182,0; }
    if($FactionName!=0) { announce "The Faction War has ended! The Faction Castle Owner is ["+factioninfo($FactionName,0)+"] Faction.",bc_all|bc_woe; } else { announce "Faction War has ended! No faction has proven themselves in the Faction Wat!",bc_all|bc_woe; }
    disablenpc "FactionWarp";
    killmonsterall "mocg_cas01";
    donpcevent "CastleSpawn::OnCastleSpawn";
    enablenpc "Kamui";
    fvfoff "mocg_cas01";
    end;
 
OnFactionBreak:
    if( killedrid == 15000 || getcharid(5) > 0 ){
    set $FactionName,getcharid(5);
    set $winner_faction_id,getcharid(5);
    mapannounce "mocg_cas01",""+strcharinfo(0)+" has broken the Faction Stone for the ["+factioninfo($FactionName,0)+"] Faction.",bc_map|bc_woe,"0x00CCFF",FW_NORMAL,12;
    maprespawnfactionid "mocg_cas01",$winner_faction_id,6;
    sleep2 10000;
    monster "mocg_cas01",142,291,"Faction Stone " +factioninfo(getcharid(5),0)+"",15000,1,"Faction_System::OnFactionBreak";
    } else { 
    dispbottom "Killed by a None Faction char"; 
    mapannounce "mocg_cas01",""+strcharinfo(0)+" has broken the Faction Stone for the without a Faction. Faction Stone will Respawn",bc_map|bc_woe,"0x00CCFF",FW_NORMAL,12;
    monster "mocg_cas01",142,291,"Faction Stone",15000,1,"Faction_System::OnFactionBreak";
    } 
end;
 
OnFactionStart:
    if (getgroupid() < 10) {end;}
    if($FactionStatus==1) { dispbottom "Faction War is already running."; end; }
    goto FactionActualStart;
    end;
 
OnFactionEnd:
    if (getgroupid() < 10) {end;}
    if($FactionStatus==0) { dispbottom "Faction War is currently not running."; end; }
    goto FactionActualEnd;
    end;
 
OnTimer900000:
    announce "Faction System: [Faction War] Runs since 15 minutes",0;
    end;
    
OnTimer1800000:
    announce "Faction System: [Faction War] Runs since 30 minutes",0;
    end;
 
OnTimer2700000:
    announce "Faction System: [Faction War] Runs since 45 minutes",0;
    end;
    
OnTimer3300000:
    announce "Faction System: [Faction War] Only 5 minutes till Faction War ends",0;
    end;
}
 
//==================================================================================
//--------|Faction War Hole|----------------------------------
//==================================================================================
 
mocg_cas01,141,183,1    script  WoEHole  -1,6,6,{
 
OnTouch:
    set Hp, 1;
    set Sp, 1;
    specialeffect2 668;
    sleep2(400);
    atcommand "@load";
 
}
 
//==================================================================================
//--------|Faction War Protection|----------------------------------
//==================================================================================
-   script  FactionProtection   -1,{
OnInit: 
end;
 
OnPCLoadMapEvent:
if(strcharinfo(3)=="mocg_cas01" && getcharid(5) == 0) { announce "You must be in a Faction to enter the Faction War!",bc_self; warp "SavePoint",0,0; end; }
end;
}
 
//==================================================================================
//--------|Faction War Castle Spawn|----------------------------------
//==================================================================================
-   script  CastleSpawn -1,{
OnInit: 
        monster "mocg_cas01",0,0,"Evil Druid",1117,10;
        monster "mocg_cas01",0,0,"Khalitzburg",1132,4;
        monster "mocg_cas01",0,0,"Abysmal Knight",1219,3;
        monster "mocg_cas01",0,0,"Executioner",1205,1;
        monster "mocg_cas01",0,0,"Penomena",1216,10;
        monster "mocg_cas01",0,0,"Alarm",1193,18;
        monster "mocg_cas01",0,0,"Clock",1269,9;
        monster "mocg_cas01",0,0,"Raydric Archer",1276,12;
        monster "mocg_cas01",0,0,"Wanderer",1208,3;
        monster "mocg_cas01",0,0,"Alice",1275,1;
        monster "mocg_cas01",0,0,"Bloody Knight",1268,2;
        monster "mocg_cas01",0,0,"Dark Lord",1272,2;
        monster "mocg_cas01",0,0,"Tower Keeper",1270,4;
end;
 
OnCastleSpawn:
        monster "mocg_cas01",0,0,"Evil Druid",1117,10;
        monster "mocg_cas01",0,0,"Khalitzburg",1132,4;
        monster "mocg_cas01",0,0,"Abysmal Knight",1219,3;
        monster "mocg_cas01",0,0,"Executioner",1205,1;
        monster "mocg_cas01",0,0,"Penomena",1216,10;
        monster "mocg_cas01",0,0,"Alarm",1193,18;
        monster "mocg_cas01",0,0,"Clock",1269,9;
        monster "mocg_cas01",0,0,"Raydric Archer",1276,12;
        monster "mocg_cas01",0,0,"Wanderer",1208,3;
        monster "mocg_cas01",0,0,"Alice",1275,1;
        monster "mocg_cas01",0,0,"Bloody Knight",1268,2;
        monster "mocg_cas01",0,0,"Dark Lord",1272,2;
        monster "mocg_cas01",0,0,"Tower Keeper",1270,4;
end;
 
OnCastleDESpawn:
        killmonsterall "mocg_cas01";    
end;
}
 
 
 
//==================================================================================
//--------|Faction War Warper|----------------------------------
//==================================================================================
prontera,172,201,0  script  FactionWarp 45,1,1,{
OnTouch:
    if ($FactionStatus == 1) {
        if (getcharid(5)==0) {
        mes "[Notice:]"; 
        mes " "; 
        mes "You must be in a Faction to enter the Faction War!"; 
        close; 
        } else { warp "moc_gld",195,200; }
    } 
else {
        mes "Currently No Faction War Running.";
        close;
    }
    end;
    
OnInit:
    disablenpc "FactionWarp";
    end;
}
 
//==================================================================================
//--------|Faction War Info|----------------------------------
//==================================================================================
prontera,169,201,0  script  FactionInfo 836,{
 
if ($FactionStatus == 1) {
        // Faction War
        set .@name$,"[Faction War]";
        mes .@name$;
        mes "INFO XXXXX";
        close;
        end;
        
    }  else {
        mes "Currently no Faction War is running.";
        close;
    }
    end;
    
OnInit:
    disablenpc "FactionInfo";
    end;
}
 
//==================================================================================
//--------| Warp To Faction Dungen NPC |--------------------------------------------
//==================================================================================
mocg_cas01,150,52,0 script  Kamui   1_M_01,{
    
    if ( getcharid(5) ==  $winner_faction_id) {
        mes "^3355FFThis is the Stronghold";
        mes "Teleport Service. Would";
        mes "you like to teleport to the";
        mes "Convenience Facility for";
        mes "guild members?^000000";
        switch(select("Go to Convenience Facility:Cancel")) {
        case 1:
            warp "mocg_cas01",321,65;
            end;
        case 2:
            close;
        }
    }
    end;
}
 
 
 
 
//==================================================================================
//--------|Map Flags|---------------------------------------------------------------
//==================================================================================
 
// -- Iset Mapflags
 
moc_gld mapflag nightenabled
moc_gld mapflag nobranch
mocg_cas01  mapflag nobranch
mocg_cas01  mapflag noicewall
mocg_cas01  mapflag nomemo
mocg_cas01  mapflag nosave  SavePoint
mocg_cas01  mapflag noteleport
mocg_cas01  mapflag nowarp
mocg_cas01  mapflag nowarpto
 
Viewed 785 times, submitted by Guest.