summaryrefslogblamecommitdiff
path: root/world/map/npc/042-1/hasan.txt
blob: 734e0df01109d33dca2678e11020dceac20d877e (plain) (tree)
1
2
3
4
5
6
7
8
9

                                    




                                                                        
 
                                        
 




                                  

                                                                   
               


                                                                       


               

        
                                       
 



                                  
                
 
       
                             

                                                                                                        
                        
                       
                        
                     
                        
                     
                                                                   
                          
 
                                            
                           












                                                                                         
                           






                                                                                    
                         
                               

                                       
        

                                                                                                          
 
             
                  



                                                  

        


                                                                              
              
         
                                                                                               
                               
                 
 
        
                  
                                                        
        

                                                         

              
                          
                    

                               
                           
                                        
                                     
                                                 
                                                                                 
          

        

                                
                                                          




                                                              
                                                                      

                                             

                               
         
                                                                                      
        
                                      
                                                     

              





                                                                                                                     
                 
 




                                  
          
                  





                                                                                               
                 
 

                                                                                                                             
                 
 

                                                                                 
        
 
        
          
 
        
                        
            

                
                                          

        
 

                    
 
         
                                                                                          



                 
                                                                                                                                                                                                      
                        
                  
 
            
                                          
                     
                                             



                                      

                  
 
                
                                          
                           



                               
                                               
                 
 
          
                                                                                                                                                    
                 
 


                                                                                             
 





                                                                 
        
 
// This file is part of the Tutorial
// Authors: Jenalya, alastrim
// Hasan should be threatening someone else you come to help
// Going to throw someone off a cliff
// npctalk 2 NPCs Hasan talks about giving someone a short trip to Docks
// They respond by asking play for help
// Hasan tells them to but out of it.

042-1.gat,104,49,0|script|Scared Man|160
{
    setarray @npc_loc, 104, 49, 4;
    callfunc "PCtoNPCRange";
    if (@npc_check)
        goto L_End;
    if (@tutorial >= 13)
        goto L_TutDone;
    message strcharinfo(0), "He looks too afraid to say anything.";
    goto L_End;

L_TutDone:
    message strcharinfo(0), "Thanks. Kaan's been much nicer to me now";
    goto L_End;

L_End:
    end;
}
042-1.gat,102,49,0|script|Hasan|189,2,2
{
    setarray @npc_loc, 102, 49, 4;
    callfunc "PCtoNPCRange";
    if (@npc_check)
        goto L_Close;
    goto L_Main;

L_Main:
    callfunc "TutorialState";
    if ((getcharid(3) == $@ScorpionFighter) || ($@ScorpionFighter && $@ScorpionFighter != getcharid(3)))
        goto L_Afraid;
    if (@tutorial == 14)
        goto L_TutDone;
    if (@tutorial == 13)
        goto L_Thank;
    if (@tutorial == 12)
        goto L_Trick;
    if ((@tutorial == 9) || (@tutorial == 10) || (@tutorial == 11))
        goto L_FightAgain;

    mes "You over hear some people nearby.";
    mes "[Unfriendly Guy]";
    mes "\"I told you if you didn't get the money, I'd give you flying lessons, Haha!\"";
    next;
    mes "[Scared Man]";
    mes "\"But the only person I need protection from is you.\"";
    next;
    mes "[Unfriendly Guy]";
    mes "\"Thats why the price is so high.\"";
    next;
    mes "\"Because I'm the toughest person in all of Tulimshar\"";
    next;
    mes "[Scared Man]";
    mes "\"No, your just a mean bully. Wait till I tell the gaurds about this!\"";
    next;
    mes "[Unfriendly Guy]";
    mes "\"You do that and the next flying lesson will be from the beach cliffs.\"";
    next;
    mes "[Scared Man]";
    mes "\"No, please don't. *sob*\"";
    next;
    mes "Sounds like this person is in trouble.\"";
    next;
    set @tutorial_tmp, 9;
    callfunc "SetTutorialMask";
    mes "[Unfriendly Guy]";
    mes "\"What are you looking at?\"";
    menu
        "What ever you call maggot slime scrapped off a boat after a walk through the sewers.\"", L_Fight,
        "Who me? I saw nothing, just passing by.", L_Close;

L_FightAgain:
    mes "[Hasan]";
    mes "\"Have you come back for a thrashing?\"";
    menu
        "No.", L_Close,
        "Yes.", L_Fight;

L_Fight:
    mes "[Hasan]";
    mes "\"Do you really think you can beat me?\"";
    mes "He pulls out a nasty looking dagger and stabs it in your direction.";
    set Hp, 1;
    next;
    mes "That hurt! You begin to think searching for a different solution might be healthier.";
    mes "Maybe Kaan can help?";
    goto L_Close;

L_Trick:
    mes "[Hasan]";
    mes "\"Have you come back for another thrashing?\"";
    menu
        "No.",L_Close,
        "Yes, yours! (Scratch your head.)",L_ScratchHead;

L_ScratchHead:
    if ($@ScorpionFighter)
        goto L_Wait;
    set @tutorial_tmp, 14;
    callfunc "SetTutorialMask";
    set $@ScorpionTimer, 0;
    set $@ScorpionFighter, getcharid(3);
    set $@ScorpDeath, PC_DIE_COUNTER;
    cmdothernpc "#ScorpionTrigger", "HasanSpawn";
    mes "While you're scratching your head, you see Kaan approaching the fence.";
    close;

L_Thank:
    mes "[Hasan]";
    mes "\"You - you saved me!";
    mes "I was mean to people, but you still saved me!\"";
    next;
    mes "\"Hey, you're a really cool person.";
    mes "I mean, the way you finished that ghastly scorpion!";
    mes "Amazing!\"";
    next;
    mes "\"Let me tell you something, I will no longer bully people.";
    mes "And you can have my Sharp Knife.\"";
    getitem "SharpKnife", 1;
    set @tutorial_tmp, 14;
    callfunc "SetTutorialMask";
    next;
    mes "\"You want to go to the bazaar, right? Shall I tell you how to get there?\"";
    menu
        "Sure, thanks.",L_HasanThanks,
        "I'll try to find the way myself.",L_Explore;

L_HasanThanks:
    mes "[Hasan]";
    mes "\"Ok, when you leave here follow the road past the docks until you reach the old city gates.\"";
    next;
    mes "\"Pass through them and at the crossway, just go west and then south until you reach some other gateway.\"";
    next;
    mes "\"Behind it there is the bazaar of Tulimshar.\"";
    goto L_Close;

L_Explore:
    mes "[Hasan]";
    mes "\"Alright. Take care!\"";
    goto L_Close;

L_TutDone:
    mes "[Hasan]";
    mes "\"You didn't see anything. I tell you what I'll be nicer if you don't tell anyone?\"";
    menu
        "As long as you learned your lesson.", L_TutCont;

L_TutCont:
    mes "\"I have, I promise not to bully people anymore. It's not fun being scared.\"";
    goto L_Close;

L_Wait:
    mes "There is a scorpion near Hasan already. I think Kaan is helping someone else... Maybe I should try the plan later.";
    goto L_Close;

L_Afraid:
    message strcharinfo(0), "Hasan: \"" + strcharinfo(0) + "! Please help me!\"";
    end;

L_Close:
    close;

OnTouch:
    if (@tutorial >= 13)
        end;
    goto L_Main;
}
042-1.gat,0,0,0|script|#ScorpionTrigger|35
{
    end;

OnCommandHasanSpawn:
    goto L_Summon;

L_Summon:
    monster "042-1.gat",102,49,"WeakScorpion",1046,1, "#ScorpionTrigger::OnScorpionDeath";
    initnpctimer;
    end;

L_SummonAgain:
    message strcharinfo(0), "Kaan is mad at you for your interference! He walks over to the edge of the fence and throws a rock on top of your head, then lets another scorpion run just near Hasan!";
    percentheal -100, 0;
    goto L_Summon;

OnTimer5000:
    if (attachrid($@ScorpionFighter) == 0)
        goto L_Clean;
    set $@ScorpionTimer, $@ScorpionTimer + 5;
    if ($@ScorpionTimer >= 300)
        goto L_TimeOut;
    if (PC_DIE_COUNTER > $@ScorpDeath)
        goto L_MessageDeath;
    setnpctimer 0;
    end;

OnScorpionDeath:
    if (getcharid(3) != $@ScorpionFighter)
        goto L_SummonAgain;
    if (@tutorial != 12)
        goto L_Clean;
    set @tutorial_tmp, 13;
    callfunc "SetTutorialMask";
    message strcharinfo(0), "You saved Hasan.";
    goto L_Clean;

L_TimeOut:
    message strcharinfo(0), "Hasan, with his eyes almost closed, trembling with fear, runs toward the scorpion and stabs it with all his strength!";
    goto L_Clean;

L_MessageDeath:
    message strcharinfo(0), "Ouch... I should be more careful when fighting these monsters.";
    goto L_Clean;

L_Clean:
    killmonster "042-1.gat", "#ScorpionTrigger::OnScorpionDeath";
    set $@ScorpionFighter, 0;
    set $@ScorpionTimer, 0;
    set $@ScorpDeath, 0;
    stopnpctimer;
    end;
}