summaryrefslogblamecommitdiff
path: root/npc/023-2/mk.txt
blob: d383f53104f36d0a988daea5d6da1c84d1b5a401 (plain) (tree)
1
2
3
4
5
6
7
8
9
10





                            
                           


                                                                 



                           


















                                                       
                                                      
               
                                                      
               





                                                                                                                                          



















                                                                                                                                                          

 
























































































                                                                 
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Nivalis Liberation Day

// The Walking Monster King
023-2,121,35,0	script	The Monster King#NLib	NPC_MONSTERKING,{
    end;

OnTouch:
    percentheal -100, -100;
    end;

OnInit:
    .sex = G_MALE;
    .distance = 5;

OnHour00:
    if (!$NLIB_DAY) {
        disablenpc .name$;
        end;
    }
    switch ($NLIB_DAY) {
        case 1:
            movenpc(.name$, 121, 35, DIR_WEST); break;
        case 2:
            movenpc(.name$, 105, 37, DIR_NORTH); break;
        case 3:
            movenpc(.name$, 105, 51, DIR_SOUTH); break;
        case 4:
            movenpc(.name$, 102, 63, DIR_WEST); break;
        case 5:
            movenpc(.name$, 81, 59, DIR_NORTH); break;
        case 6:
            movenpc(.name$, 53, 53, DIR_SOUTH); break;
        case 7:
            movenpc(.name$, 36, 99, DIR_SOUTH); break;
        default:
            channelmes("#world", "A bug happened: Monster King # Nivalis Liberation Day - Value Out of Range."); disablenpc .name$; break;
    }

    end;

// Event Handler

OnCycle:
    .@pl=getareausers("023-2", 21, 109, 31, 114);
    .@pla=getmapusers("023-2");
    if (.@pl <= 0 && .@pla > 0)
        mapannounce "023-2", "##1WARNING: Players outside the Monster King room counts toward DEFEAT count!", 0;
    .victory_count+=.@pl;
    if (.@pl <= 0)
        .defeat_count+=1;
    end;

OnBegin:
    .defeat_count=0;
    .victory_count=0;
    announce "The fight against the Monster King ends in 15 minutes. If he is forced to flee, that'll result as victory.", bc_all|bc_npc;
    announce "Each cycle there are players fighting against him will result in victory points. The opposite will result in defeat points.", bc_all|bc_npc;
    announce "More players fighting will result in more victory points. This may affect drastically the result.", bc_all|bc_npc;
    end;
}


// Floor triggers
023-2,121,35,0	script	#NLIB_T01	NPC_HIDDEN,1,2,{

OnTouch:
    if ($NLIB_DAY == 1) {
        @QNL3=1;
        dispbottom l("I've found the Monster King.");
    }
    end;
}


023-2,110,36,0	script	#NLIB_T02	NPC_HIDDEN,2,2,{

OnTouch:
    if ($NLIB_DAY == 2) {
        @QNL3=1;
        dispbottom l("I've found the Monster King.");
    } else if ($NLIB_DAY < 2) {
        slide 114, 36;
        dispbottom l("I should not veer off too much the path.");
    }
    end;
}

023-2,105,50,0	script	#NLIB_T03	NPC_HIDDEN,2,2,{

OnTouch:
    if ($NLIB_DAY == 3) {
        @QNL3=1;
        dispbottom l("I've found the Monster King.");
    } else if ($NLIB_DAY < 3) {
        slide 104, 48;
        dispbottom l("I should not veer off too much the path.");
    }
    end;
}

023-2,104,62,0	script	#NLIB_T04	NPC_HIDDEN,0,0,{

OnTouch:
    if ($NLIB_DAY == 4) {
        @QNL3=1;
        dispbottom l("I've found the Monster King.");
    } else if ($NLIB_DAY < 4) {
        slide 104, 61;
        dispbottom l("I should not veer off too much the path.");
    }
    end;
}

023-2,86,59,0	script	#NLIB_T05	NPC_HIDDEN,2,5,{

OnTouch:
    if ($NLIB_DAY == 5) {
        @QNL3=1;
        dispbottom l("I've found the Monster King.");
    } else if ($NLIB_DAY < 5) {
        slide 91, 61;
        dispbottom l("I should not veer off too much the path.");
    }
    end;
}

023-2,53,49,0	script	#NLIB_T06	NPC_HIDDEN,0,5,{

OnTouch:
    if ($NLIB_DAY == 6) {
        @QNL3=1;
        dispbottom l("I've found the Monster King.");
    } else if ($NLIB_DAY < 6) {
        slide 55, 48;
        dispbottom l("I should not veer off too much the path.");
    }
    end;
}

023-2,35,90,0	script	#NLIB_T07	NPC_HIDDEN,0,2,{

OnTouch:
    if (gettime(2) < 25 || gettime(2) > 35) {
        slide 39, 89;
        dispbottom l("I should not go ahead... yet.");
    }
    end;
}