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






                                                                                


                                                                             
 
 
                                                            
                                      

                                        
                                           
                                                                                  


         
                                        


                                                                                                    




                                                                   
                              
                                                                                            
             
                                                 



                 
                                                                 
                           



                
                                        






                                                  
                                                           
                                                                   
                 

                                                                       


        
                                                                                   

                                                                             
            






                                                 
             




                                                 

        
                                                                         
             


                
                                      



                                                 

                 
                              



                                                          

                                                                




                   

                   
 
                              

                                                                                         
                              
                                                                                                








                                       
                   
              
                                                        
                                  


                                                                                             
 
                              

                                                                                   
                              

                                                                                                         
                           
                                                                         



                                                                                                                                    

                   
                                                 


                                   
 


                                                                                                            
                                
                                                         
                              



                                             




                   
                                                  

        
// TMW2 Scripts
// Author:
//   Jesusalva
// Description:
//   Celestia Yeti King's quest. Designed so if you're with 4 players, all 4 can
//   summon the Yeti King, helping you while doing the quest by themselves.

// Notes:
//      $@GM_OVERRIDE
//          Only possible with @set command, overrides the co-op requeriment.


003-1-1,94,21,0	script	#DahYetiKing	NPC_SUMMONING_CIRC,{
    .@q=getq(HurnscaldQuest_Celestia);
    if (.@q > 1 && .@q < 99)
        setq HurnscaldQuest_Celestia, 1;
    if (.@q == 1 && !.inUse) goto L_Summon;
    if (!.@q) dispbottom l("I do not know how to trigger this summoning circle.");
    end;

L_Summon:
    if (countitem(EverburnPowder) < 1) {
        dispbottom l("I need to pour the @@ to summon the Yeti King.", getitemlink(EverburnPowder));
        end;
    }
    if (getareausers("003-1-1", 5) < 2 && !$@GM_OVERRIDE) {
        dispbottom l("I cannot be alone to summon the Yeti King.");
        end;

    }
    delitem EverburnPowder, 1;
    dispbottom l("Emoc otem itey gnik!"); // come to me yeti king, spelled backwards. Sorry.
    .inUse=1;
    addtimer(9000, "#DahYetiKing::OnSummonTalk");
    initnpctimer;
    end;

L_Die:
    npctalk3 l("You're playing with fire. Or ice. Or whatever.");
    percentheal(-80, -100);
    closedialog;
    close;

OnTimer1000:
    setnpcdisplay .name$, NPC_YETI_KING;
    end;

OnTimer2000:
    npctalk("Whom dares to disturb my slumber?!");
    end;

OnTimer5000:
    if (getareausers("003-1-1", 5) < 2 && !$@GM_OVERRIDE) {
        npctalk("A lone adventurer? Pft. I'm back to my slumber!");
        .inUse=2;
    } else {
        npctalk("You're courageous to summon me, I'll give you that.");
    }
    end;

// Now we check if time ran out (standard inUse) because cowardice, or if you tried
// to do the quest alone. And this is a Co-Op quest with free player numbers.
// Therefore, we must return the Yeti King to his summon circle.
OnTimer8000:
    if (.inUse == 2) {
        setnpcdisplay .name$, NPC_SUMMONING_CIRC;
        .inUse=0;
        stopnpctimer;
    }
    end;

OnTimer60000:
    if (.inUse == 1) {
        setnpcdisplay .name$, NPC_SUMMONING_CIRC;
        .inUse=0;
        stopnpctimer;
    }
    end;

// You can only talk to him with SummonTalk. Only one player will summon.
OnSummonTalk:
    if (!.inUse)
        end;

    .@q=getq(HurnscaldQuest_Celestia);
    // If you had to return, erase quest progress
    if (.@q > 1 && .@q < 99)
        setq HurnscaldQuest_Celestia, 1;

    if (.@q != 1)
        end;
    mesn l("Dah Yeti King!!");
    mesq l("Why do you summon me? Speak.");
    mes "";
    select
        l("I'm sorry, these words just came to my mind."),
        l("I did not summon you, I'm just a passer-by. Sorry."),
        rif(.@q == 1, l("Celestia asks for your help."));

    mes "";

    if (@menu == 1)
        goto L_Die;
    if (@menu == 2)
        close;

    mesn l("Dah Yeti King!!");
    mesq l("Yeah yeah yeah, you're not the first one to come talking about that to me.");
    next;
    mesn l("Dah Yeti King!!");
    mesq l("My answer is still a no, and it won't change. Don't test my patience any further.");
    next;
    select
        l("You'll come with me!"),
        l("I can prove you my worth!"),
        l("Sorry! Sorry!");

    mes "";
    if (@menu == 1)
        goto L_Die;
    if (@menu == 3)
        close;
    if (BaseLevel < 35 && !countitem(MirrorLakeArmor)) {
        mesn l("Dah Yeti King!!");
        mesq l("You? Have you ever looked in the mirror? You're not even level 35. Begone.");
        close;
    }

    mesn l("Dah Yeti King!!");
    mesq l("Well, then I'll give you a task. We may meet again in Soren Village.");
    next;
    mesn l("Dah Yeti King!!");
    mesq l("I'll warp you to the Cave Of Trials. Pass all trials, and meet me on Soren's House. Hahah!");
    setq HurnscaldQuest_Celestia, 2;
    @YetiKing_Challenger=1;
    areatimer "003-1-1", 93, 20, 97, 25, 15000, "#DahYetiKing::OnWarper";
    npctalk l("Listen to me! Whoever wants to follow foolish @@ on their suicide quest, stay here for 15 seconds!", strcharinfo(0));
    close;

OnWarper:
    if (ispcdead())
        end;
    // If you had to return, erase quest progress
    if (.@q > 2 && .@q < 99) {
            @YetiKing_Challenger=0;
    }

    mesc l("Warp to the Cave Of Trials?");
    mesc l("There is no EXP penalty, but you cannot go back without either completing the cave, or dying.");
    mesc l("If you die, you'll need to start over everything again!");
    if (askyesno() == ASK_YES) {
        setq HurnscaldQuest_Celestia, 2; // This is a fix
        warp "001-6", 27, 180;
    }
    setnpcdisplay .name$, NPC_SUMMONING_CIRC;
    .inUse=0;
    closedialog;
    close;

OnInit:
    .sex = G_OTHER;
    .distance = 1;
    .inUse=0; // Prevent multiple summons and etc.
    end;
}