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




                    
                                   

                                                      

                             
         











                                                                                                




                                                                     
                                                                                                                                           




                                         
         
                                                                                                                                              

         

                                                                                                                                          


                   
                                           
                                             
                   
                 
                                                                                                              

                                                                                                                                                     
                                                                                    









                                                                                                      
                                     


                           

             
                                                                                                                                  


                                                                                                
                                                                                                                                         
                                                                                                                                           






                                                                                                                                        


                                                                                                                           
                                                                                                                                       



                                   
                                              

         

          
      
           
                                       
                                       


                                                                  





                                                                                                                           
                             
                              
     

                 
         
                                                                                           
         


                             
             
                                                                                                                                                   

                                                                                                          

                                
                                                                                                                                      

                                                     
     
 
            
           



                                                                                                                                     





                                                                                                                        



                                  


                                

                                                        
                                  
         





                                                           


          






























                                                                                                                                  


                
                                                             






                                       



             

                                                 

        
         

             
                                           
        

           

                                              

        











                                             

 
// TMW2/LoF scripts.
// Authors:
//    TMW-LoF Team
//    Jesusalva
// Description:
//    Take care of hardcore players

018-2-1,22,29,0	script	Colonel DUSTMAN	NPC_CRUSADER,{
    .@cod=getq(LoFQuest_COD);
    .@hh=getq(LoFQuest_HH);
    mesn;
    mesq l("Hello adventurer. Are you interested in the Heroes Hold, or in the Call Of Dusty?");
    next;
    select
        l("Heroes Hold"),
        l("Call Of Dusty"),
        l("Neither, sorry");
    if (@menu == 3)
        close;
    else if (@menu == 2)
        goto L_COD;

    mes "";
    if (BaseLevel < 40) {
        mesn;
        mesq l("Well, my men went down and still haven't returned.");
        next;
        mesn;
        mesq l("I'm worried with them. Anyway, I think only heroes are allowed inside, and you are a few levels short of being a Hero...");
        next;
        mesn;
        mesq l("Take care, adventurer!");
        close;
    }
    mesn;
    mesq l("This whole region is called the Heroes Hold. It's designed for hard core, bragging-rights-hunters, high level, supreme players.");
    next;
    mesn;
    mesq l("This is the main hall. Below this stairs, you'll find the Heroes Hold Main Dungeon. It's a cave in a... uhm. Water.");
    mesq l("I thought it was meant to be lava, this being in the Land Of Fire and all, but seems like someone must bug Saulc to fix it.");
    if (.@hh > 0) {
        next;
        mesn;
        mesq l("Hm, good luck out there.");
        if (getq2(LoFQuest_HH) & HH_MASTER) {
            mes "";
            mesn;
            mesq l("I see you finished the Master Dungeon and didn't found my men. I'll think on something.");
            mesq l("Unfortunately, the main reward of this quest is still a ##1Work In Progress##0.");
            mesq l("However, I can restart the Heroes Hold, if you want. You'll get a reward, but will need to start from scratch. Should I do it?");
            inventoryplace SilverGift, 1, MercBoxA, 5, CasinoCoins, 3, HeroCoin, 60;
            next;
            if (askyesno() == ASK_YES) {
                mes "";
                mesn;
                mesc l("@@ hits himself in the head and forgot you ever went after his men.", .name$);
                //setq2 LoFQuest_HH, HH_MASTER;
                setq LoFQuest_HH, 0, 0;
                getitem SilverGift, 1;
                getitem MercBoxA, 5;
                getitem CasinoCoins, 3;
                getitem HeroCoin, 60;
            }
        }
    } else if (.@hh == 0) {
        next;
        mesn;
        mesq l("So, let's return to the business at hand. My men went down and haven't returned. That was long ago, by the way.");
        mesq l("I can send you to at least five from the seven cave levels this dungeon have.");
        next;
        mesn;
        mesq l("Do you want to try to find them? Just search the first five floors: Novice, Intermediary, Advanced, Expert and Master.");
        mesq l("The Supreme and Ultimate floors are just a WIP bonus. So if you don't find them on the five and report back, that'll do.");
        next;
        mesc l("Accept quest?");
        if (askyesno() == ASK_YES) {
            mes "";
            mesn;
            mesq l("Wonderful! You must finish Novice, Intermediary, Advanced and Expert levels before I unlock Master level for you.");
            mesq l("I don't really understand how the dungeon works. I promise you a reward when you finish the task.");
            next;
            mesc l("You need to choose a Heroes Hold Group. This currently makes absolutely no difference whatsoever."), 1;
            mesc l("However, each group may be expanded later. You can reset group by clearing the Master Floor.", 1);
            mesc l("PS. The group names still aren't set. You're free to pinch in suggestions at LoF Discord (Legacy #discussion) :>");
            next;
            select
                l("The Loyalists"),
                l("The Wildlife");
            setq LoFQuest_HH, 1, 0, (@menu-1);
        }
    }
    close;

L_COD:
    mes "";
    // First time you're hearing about?
    if (BaseLevel >= 50 && .@cod < 1) {
        mesn;
        mesq l("Hey, do you know the ##BCall Of Dusty##b event?");
        next;
        if (#RARE_POINTS || countitem(TimeFlask)) {
            mesn;
            mesq l("Also, you seem like you are from around LoF. Why don't you take a free @@?", getitemlink(BottledDust));
            next;
            getitem BottledDust, 1;
        }
        setq LoFQuest_COD, 1;
        goto L_InformationCOD;
    }

    // Begin here
    mesn;
    mesq l("Just @@ ago, thieves stole Pihro & Pyndragon weapons.", FuzzyTime(1542570030));
    next;

    // Handle initial message
    if (BaseLevel >= 50) {
        mesn;
        mesq l("Pyndragon said he'll craft a @@ to whoever reduces them to dust. Interested?", getitemlink(Dustynator)); // BottledDust, Dustynator
        mesc l("Note: Dustynator is a high level weapon. You might not have enough level to use it yet.");
        next;
    } else if (BaseLevel < 50) {
        mesn;
        mesq l("It was a real problem, threatening them to go out of business. I think they are trying to recover the lost weapons.");
        mesc l("Attain level 50 to try this quest.");
        close;
    }

L_SkipIntro:
    mes "";
    // Is the event currently active? Or is it exchange time?
    if (.state == 0) {
        mesn;
        mesq l("The event starts hourly, when the minute clock hits zero. I'll tell everyone on this room when it starts and ends.");
        mesc l("Do you want to exchange some of your @@ @@ for items?", countitem(BottledDust), getitemid(BottledDust));
        mes "";
        if (askyesno() == ASK_YES) {
        openshop;
        closedialog;
        }
        close;
    }

    // Do you want to participate?
    if (askyesno() == ASK_YES) {
        mes "";
        mesn;
        mesq l("Do you need a refresher of the rules?");
        if (askyesno() == ASK_YES) {
            goto L_InformationCOD;
        }
        closeclientdialog;
        @COD_CHECKPOINT=0;
        warp "001-10", rand(163,171), rand(119,124);
        addtimer(90000,"#COD_BossRoomCheck::OnTimeDefeat");
        dispbottom l("Good luck!");
        close;
    }
    close;

// Information about COD
L_InformationCOD:
    mes "";
    mesn;
    mesc l("Call Of Dusty is a timed event quest. It begins hourly, when the minute clock marks zero.");
    mesc l("When the boss is defeated, or the minute clock marks fifteen, event ends.");
    next;
    mesn;
    mesc l("This is a @@, meaning only the victor party will receive the great prize.", b(l("Party Quest")));
    mesc l("You will get @@ which can then be exchanged for items once CoD event quest ends.");
    next;
    mesn;
    mesc l("You need be at minimum level 50 to participate. It is PVP, so watch out!");
    mesc l("The first stage is on the desert canyons. You must give a full circle on the canyon in 90 seconds.");
    mesc l("The second stage is in the first cave to northwest you can find.");
    // The full circle have about 268 tiles in distance. You have the needed time to do 2.2 circles in the most efficient fashion.
    // This means you have a time worth of 590 tiles, at 150ms, granting you 90 seconds to do this quest. (everything rounded up)
    next;
    mesn;
    mesc l("Once inside the BOSS Cave, you get a five minutes time limit to slay the boss with your party.");
    mesc l("@@. PK, however, is allowed!", b(l("Only the party from the MVP will get the reward.")));
    next;
    mesc l("The MVP is the player who did more damage to the boss.");
    mesc l("The title is transferred when the MVP is killed (either in PVP or by the boss), or when time runs out.");
    next;
    mesn;
    mesc l("The boss can blind players. Blind will reduce hit rate and evasion in 25%.");
    mesc l("Form the strongest party and win! Remember that if you don't kill the boss, you'll never win!");
    next;
    goto L_SkipIntro;

OnInit:
    .sex=G_MALE;
    .distance=5;
    .state=0; // 0- Closed, 1- Open TODO begin at right state

	tradertype(NST_CUSTOM);

	// CoD Exchange Booth Selection
	sellitem Dustynator,3000;
	sellitem StrangeCoin,10;
	sellitem HeroCoin,1;
    end;

OnMinute00:
    .state=1;
    donpcevent("#COD_BossManager::OnEventStart");
    npctalk l("Call Of Dusty: Event Start!");
    end;

OnCoDEnd:
OnMinute15:
    .state=0;
    npctalk l("Call Of Dusty: Event End!");
    end;

OnMinute30:
    .state=0; // fail-safe
    donpcevent("#COD_BossManager::OnCleanUp");
    end;

// CoD Exchange Booth Prices
OnCountFunds:
	setcurrency(countitem(BottledDust));
	end;

OnPayFunds:
	if( countitem(BottledDust) < @price )
		end;
	delitem BottledDust,@price;
	purchaseok();
	end;

}