summaryrefslogblamecommitdiff
path: root/npc/000-0-0/sailors.txt
blob: cf9634a7a5727f741d9c015a1b73a834d1a1c75b (plain) (tree)
1
2
3
4
5
6
7
              
           
               
               
              
 
                                                  











                                 
                                     
                                      
              
                        
                
                                                                                                                       
         


                                                 
 
                     
                       


                                                                                                                    
                    
     
                  
                                
                             
 
































                                                                                                                                         
                                                                                         




















                                                                                                                                            
                               



                                                                                                                      
                                                                                                                                                                                 
















                                                                                                
                                                                                                                

                              
 














































                                                                                                                              
                                                                                                                                                                                         











                                                                                                                                             

                                                                                                
                                                           
                                          












                                                                                                  
         






                                                                                       
                                           
                 
 
       
                             

                             

                         
 
        

                                                      
               
                             
                     
                        
                                          

                                
                              


                

                                                             
       
                                                                         




                                                                                

                                                                                   
        
 




                  
                                                                 






                                   
// TMW2 Script
// Authors:
//    Jesusalva
// Description:
//    Tutorial

000-0-0,30,34,0	script	Elmo#sailors	NPC_ELMO,{
    .@q = getq(ShipQuests_Arpan);
    if (.@q == 0) goto L_Step0;
    if (.@q == 1) goto L_Step1;
    if (.@q == 2) goto L_Step2;
    if (.@q == 3) goto L_Step3;
    if (.@q == 4) goto L_Step4;
    if (.@q == 5) goto L_Step5;

    goto L_Ready;

// Tutorial not accepted
L_Step0:
    deltimer("Elmo#sailors::OnSlow");
    deltimer("Elmo#sailors::OnSlow2");
    setcamnpc;
    showavatar NPC_ELMO;
    mesn "Elmo";
    mesq l("Hey. You. You were in need of medical attention earlier. Do you remember how to walk, talk, attack, etc?");
    next;
    select
        l("Actually, a tutorial would be good!"),
        l("Yes, I do.");

    if (@menu == 2) {
        TUTORIAL=false;
        mesn l("Magic Arpan");
        mesq l("Yeye don't need to train here anymore! Let's head back to the ship before the sun sets, shall we?");
        next;
        goto L_Skip;
    }
    TUTORIAL=true;
    savepoint "000-0-0", 30, 37;
    setq ShipQuests_Arpan, 1;

// Tutorial accepted
L_Step1:
    showavatar NPC_MAGIC_ARPAN;
    mesn l("Magic Arpan");
    mesq l("Let's start with something simple, yeye.");
    next;
    mesn l("Magic Arpan");
    mesq l("You can move using @@ or, at your choice, by clicking where you want to go.", b(l("arrow keys")));
    next;
    setcamnpc "Chest#002-1";
    mesn l("Magic Arpan");
    mesq l("On mobile, the DPAD is at your left. Do you see the chest to my right?");
    next;
    setcamnpc;
    mesn l("Magic Arpan");
    mesq l("Go and talk to it.");
    close;

// Clothes taken
L_Step2:
    showavatar NPC_MAGIC_ARPAN;
    mesn l("Magic Arpan");
    mesq l("Yeye, very good, you took the clothes.");
    next;
L_Step2Skip:
    mesn l("Magic Arpan");
    mesq l("Equipping them is easy, you must open your inventory with @@ or clicking in @@, on the top right.", b(l("F3")), b(l("INV")));
    next;
    mesn l("Magic Arpan");
    mesq l("Most of it should be pretty intuitive, but be sure to press @@ on the bottom-left of inventory screen.", b(l("Equip")));
    next;
    mesn l("Magic Arpan");
    mesq l("Come talk to me once you manage to equip the shirt and the shorts!");
    mesc l("PS. Due a bug, they won't be displayed when you equip unless you relog."), 1;
    setq1 ShipQuests_Arpan, 3;
    close;

// Clothes Check
L_Step3:
    if (getequipid(equip_torso) < 0 || getequipid(equip_legs) < 0)
        goto L_Step2Skip;
    setcamnpc;
    showavatar NPC_ELMO;
    mesn "Elmo";
    mesq l("You learn fast, good job. These clothes aren't a mighty armor, but they'll help.");
    next;
    mesn "Elmo";
    mesq l("Let's jump straight to action, shall we? I'll spawn a mighty @@ to fight you!", getmonsterlink(Dummy));
    next;
    mesn "Elmo";
    mesq l("On a computer, you can press @@ to attack it. On mobile, that would be the big button with the number 1.", b(l("Ctrl")));
    next;
    mesn "Elmo";
    mesq l("Another way to attack it is clicking on it. Now, there are some things you must know before fighting this dangerous creature!");
    next;
    showavatar NPC_MAGIC_ARPAN;
    mesn l("Magic Arpan");
    mesq l("Yayaya, by pressing @@ or clicking in @@, you'll open your char status window!", b(l("F2")), b(l("STA")));
    next;
    mesn l("Magic Arpan");
    mesq l("You should allocate some attributes to it. You need @@, @@ and @@, on this order of importance.", b(l("Agility")), b(l("Dexterity")), b(l("Strength"))); // b(l("")),
    next;
    mesn l("Magic Arpan");
    mesq l("Once you allocate status points, you can fight it! Good luck, @@!", strcharinfo(0));
    mesc l("WARNING: NO EXPERIENCE WILL BE CARRIED OVER FROM THIS FIGHT."), 1;
    percentheal 100,100;

    // This is not really reliable, of course >.<
    .@mct=mobcount("000-0-0", "Elmo#sailors::OnStep4");
    .@x=38; .@y=43;
    .@x+=.@mct;
    freeloop(true);
    while (.@x > 43) {
        .@x-=5; .@y+=1;
    }
    freeloop(false);

    if (.@y <= 47)
        @mobTarget=monster("000-0-0", 43, 44, l("@@ Dummy", strcharinfo(0)), Dummy, 1, "Elmo#sailors::OnStep4");
    setq1 ShipQuests_Arpan, 4;
    close;

L_Step4:
    percentheal 100,100;
    mesn "Elmo";
    mesq l("Did something happen?");
    mesc l("This is a menu, click on the option and then on send. You can use arrow keys if you prefer.");
    mes "";
    select
        l(">.< \"The Dummy is a real killer!\""),
        l("T.T \"Someone else killed my Dummy!\""),
        l("'.' \"I forgot how to allocate status!\""),
        l("-.- \"I forgot how to fight!\""),
        l("^.^ \"Nothing is wrong, don't worry!\"");

    mes "";
    switch (@menu) {
        case 1:
            mesn "Elmo";
            mesq l("Well, you clearly don't have a weapon. So, let me explain some quick.");
            next;
            mesn "Elmo";
            mesq l("Don't be afraid of death. Of course, in most places, dying will reduce your Experience.");
            next;
            mesn "Elmo";
            mesq l("But you don't have any experience at the moment, so what do you have to lose?");
            next;
            mesn "Elmo";
            mesq l("Try killing it, and if it kills you, just come back from death to continue killing it.");
            mes l("What I want to say is: Kill non-stop!");
            next;
            mesc l("Actually, the Dummy don't fight back. Are you afraid?");
            break;
        case 2:
            .@mct=mobcount("000-0-0", "Elmo#sailors::OnStep4");
            if (.@mct) {
                mesn "Elmo";
                mesq l("It was just south of the island. Try walking around a bit?");
            } else {
                npctalk l("Hey, this Dummy is to @@ kill.", strcharinfo(0));
                monster "000-0-0", 43, 44, l("@@ Dummy", strcharinfo(0)), Dummy, 1, "Elmo#sailors::OnStep4";
            }
            break;
        case 3:
            showavatar NPC_MAGIC_ARPAN;
            mesn l("Magic Arpan");
            mesq l("Yayaya, by pressing @@ or clicking in @@, you'll open your char status window!", b(l("F2")), b(l("STA")));
            next;
            mesn l("Magic Arpan");
            mesq l("You should allocate some attributes to it. You need @@, @@ and @@, on this order of importance.", b(l("Agility")), b(l("Dexterity")), b(l("Strength"))); // b(l("")),
            break;
        case 4:
            mesn "Elmo";
            mesq l("On a computer, you can press @@ to attack it. On mobile, that would be the big button with the number 1.", b(l("Ctrl")));
            next;
            mesn "Elmo";
            mesq l("Another way to attack it is clicking on it.");
            break;
    }
    close;

OnStep4:
    if (getunittype(@mobTarget) != -1 && is_staff())
        dispbottom ("Hey hey, the monster seems to be alive. Mr. GM, do something about that!");
    dispbottom l("You free the world from an evil Dummy.");
    compareandsetq ShipQuests_Arpan, 4, 5;
    end;

L_Step5:
    showavatar NPC_MAGIC_ARPAN;
    mesn l("Magic Arpan");
    mesq l("Yayaya, good job! You can collect loot by pressing @@.", b("Z"));
    next;
    mesn l("Magic Arpan");
    mes l("I like to talk! If yeye likes too, you can press @@ to open chat box!", b(l("Enter")));
    mes l("On mobile, you would click on the @@ icon!", b(l("keyboard")));
    next;
    mesn l("Magic Arpan");
    mesq l("The @@ tab allows yeye to talk on Discord, too! Yayaya, fancy, uh?", b("#world"));
    next;
    mesn l("Magic Arpan");
    mesq l("Yeye can press @@ to sit, which will allow you to heal faster.", b("s"));
    next;
    showavatar NPC_ELMO;
    mesn "Elmo";
    mesq l("You're ready. Let's head back to the ship before the sun sets, shall we?");
    next;
    getitem PiouLegs, 3; // Tutorial Reward
    goto L_Ready;

L_Skip:
    setq ShipQuests_Arpan, 5;
    getitem CreasedShirt, 1;
    getitem CreasedShorts, 1;
    equip(CreasedShirt);
    equip(CreasedShorts);

L_Ready:
    //clearitem(); // The dummy don't drop anything :>
    resetlvl(2);
    restorecam;
    setq General_Narrator, 0;
    adddefaultskills;
    percentheal 100,100;
    addtimer(45000,"Magic Arpan::OnSlow");
    LOCATION$ = "Candor";
    warp "002-1@Candor", 53, 38;
    savepoint "000-1", 22, 22;
    closedialog;
    close;

// Prevent players from forgetting what they were meant to do
// But if they logout, this will never trigger
OnSlow:
    npctalk3 l("Hey @@! You haven't clicked on me yet!", strcharinfo(0));
    addtimer(30000,"Elmo#sailors::OnSlow2");
    end;

OnSlow2:
    npctalk3 l("@@, do you need help? Are you lost? Click me!", strcharinfo(0));
    dispbottom l("Click on Elmo or Magic Arpan to continue and begin the game...");
    addtimer(60000,"Elmo#sailors::OnSlow");
    end;

OnInit:
    .sex = G_MALE;
    end;
}

000-0-0,29,34,0	script	Magic Arpan#sailors	NPC_MAGIC_ARPAN,{
    doevent "Elmo#sailors::OnTalk";
    close;

OnInit:
    .sex = G_MALE;
    end;
}