summaryrefslogblamecommitdiff
path: root/npc/018-6-0/main.txt
blob: 2d30b3f48945a53b32b41c82ebb1e0b27ccf9f49 (plain) (tree)
1
2
3
4
5
6
7
8






                                
                                                                        




                                        







                                                                                                        
     

                                      

        
 
       

                      


                                        


                             
                                                                        

















                                                                









                                                                        

                                                          















                                                                









                                                                


                                                            






















                                                                        


                                                            











                                                     
 
// TMW2 Scripts
// Author:
//    Jesusalva
// Description:
//    Controls Forgotten Chamber

/////////////////////////////
018-6-0,90,67,0	script	#ToForgottenShrine	NPC_SUMMONING_CIRC,0,0,{
    dispbottom l("It looks dangerous.");
    end;

OnTouch:
    .@q=getq(LoFQuest_Barbara);
    .@q2=getq2(LoFQuest_Barbara);
    .@q3=getq3(LoFQuest_Barbara);
    if (.@q < 2 || .@q3 != 5)
        Exception("ERROR, YOU SHOULD NOT BEEN SEEING THIS. 018-6-1.TFC.INVALID", RB_DEFAULT|RB_ISFATAL);
    // Make the speech
    if (.@q == 2) {
        setq1 LoFQuest_Barbara, 3;
        setq3 LoFQuest_Barbara, 0;
    }
    // Execute the warp
    warp BarbaraInstCheck(3), 31, 151;
    end;


OnInit:
    disablenpc .name$;
    end;
OnInstanceInit:
    disablenpc instance_npcname(.name$);
    end;
}

/////////////////////////////
018-6-0,90,90,0	script	#FromEleniumMines	NPC_SUMMONING_CIRC,0,0,{
    dispbottom l("It should bring me back.");
    end;

OnTouch:
    .@q=getq(LoFQuest_Barbara);
    if (.@q < 10) {
        warp BarbaraInstCheck(1), 83, 28;
        //warp BarbaraInstCheck(0), 90+any(-1, 1), 90+any(-1,1);
    } else {
        warp "018-6-1", 83, 28;
    }
    end;
}





/////////////////////////////
018-6-0,90,113,0	script	#ToSouthHall	NPC_SUMMONING_CIRC,0,0,{
    dispbottom l("It looks dangerous.");
    end;

OnTouch:
    .@q=getq(LoFQuest_Barbara);
    .@q2=getq2(LoFQuest_Barbara);
    .@q3=getq3(LoFQuest_Barbara);
    if (.@q == 2 && .@q3 >= 3) {
        enablenpc instance_npcname("#FromWestHall", .@q2);
        enablenpc instance_npcname("#FromEastHall", .@q2);
        warp BarbaraInstCheck(2), 90, 32;
        //warp BarbaraInstCheck(0), 90+any(-1, 1), 90+any(-1,1);
    } else {
        dispbottom l("I already visited this warp.");
    }
    end;


OnInit:
    disablenpc .name$;
    end;
OnInstanceInit:
    disablenpc instance_npcname(.name$);
    end;
}

/////////////////////////////
018-6-0,67,90,0	script	#ToWestHall	NPC_SUMMONING_CIRC,0,0,{
    dispbottom l("It looks dangerous.");
    end;

OnTouch:
    .@q=getq(LoFQuest_Barbara);
    .@q2=getq2(LoFQuest_Barbara);
    .@q3=getq3(LoFQuest_Barbara);
    if (.@q == 2 && !(.@q3 & 1)) {
        // Mark the quest in progress as WEST HALL, and warp
        setq3 LoFQuest_Barbara, .@q3|64;
        enablenpc instance_npcname("#FromSouthHall", .@q2);
        warp BarbaraInstCheck(2), 70, 150;
    } else {
        dispbottom l("I already visited this warp.");
    }
    end;


OnInit:
    disablenpc .name$;
    end;
}


/////////////////////////////
018-6-0,113,90,0	script	#ToEastHall	NPC_SUMMONING_CIRC,0,0,{
    dispbottom l("It looks dangerous.");
    end;

OnTouch:
    .@q=getq(LoFQuest_Barbara);
    .@q2=getq2(LoFQuest_Barbara);
    .@q3=getq3(LoFQuest_Barbara);
    if (.@q == 2 && !(.@q3 & 2)) {
        // Mark the quest in progress as EAST HALL, and warp
        setq3 LoFQuest_Barbara, .@q3|128;
        enablenpc instance_npcname("#FromSouthHall", .@q2);
        warp BarbaraInstCheck(2), 103, 156;
    } else {
        dispbottom l("I already visited this warp.");
    }
    end;


OnInit:
    disablenpc .name$;
    end;
}