summaryrefslogblamecommitdiff
path: root/npc/003-4/sorfina.txt
blob: 3a5d10f2847b7dc8ca19d0d4a5f1d26cefd24669 (plain) (tree)
1
2
3
4
5
6





                                







                                          

                                            



                                                         




                                                





                                                                     
                      

         
                                                                                                            
                      


                                                                         
                      

         
                                          
                                                                                       
                                     




                                       
                                                             











                                                                                                                                        
                                                          








                                                                         

                          
                                                                                                           
 


                                                                                      
 



                                                                                             
 



                                                                                    
 

          
 



                                                             
 



                                                       













                                                                
// TMW2 Script.
// Author:
//    Saulc
//    Jesusalva
// Description:
//    Sorfina is Hasan's mother.
//
//  GETQ1 Variable Value;
//  0 - Never stolen by Hasan
//  1 - Already stolen by Hasan
//  2 - Dausen pointed player to Sorfina
//  3 - Sorfina unlocked Mahoud's Basement
//  4 - Player killed Murderer Scorpion
//  5 - Quest is complete

003-4,39,33,0	script	Sorfina	NPC_FEMALE,{
    if (getq(TulimsharQuest_Hasan) == 2) goto L_Trouble;
    if (getq(TulimsharQuest_Hasan) == 3) goto L_Basement;
    if (getq(TulimsharQuest_Hasan) == 4) goto L_Finished;
    // Status 5 returns to default message
    //if (getq(TulimsharQuest_Hasan) == 5) goto 
    mesn;
    mesq l("Hello, darling!");
    close;

L_Trouble:
    mesn strcharinfo(0);
    mesq l("Your son, Hasan, has stolen me!");
    next;
    mesn;
    mesq l("Oh, he has been a little rascal since his father died.");
    mesc l("*cries*");
    next;
    mesn;
    mesq l("You see, after a monster attack... My husband went to the desert, to check how things were...");
    mesc l("*cries*");
    next;
    mesn;
    mesq l("He never touched the Soul Menhir... He died... For real...");
    mesc l("*cries*");
    next;
    mesn;
    mesc l("Sorfina recomposes herself.");
    mesq l("There is a rare kind of scorpion, the Murderer Scorpion. Very dangerous.");
    setq TulimsharQuest_Hasan, 3, -1;
    next;
    goto L_Basement;

L_Basement:
    if (BaseLevel < 13) goto L_TooWeak;
    if (getq3(TulimsharQuest_Hasan) > santime()) goto L_Wait;
    mesn;
    mesq l("There's one on the basement of this house. If you kill it, Hasan will think on you as a hero and won't steal you anymore.");
    next;
    menu
        l("I will kill one."), L_OpenDoors,
        l("Maybe later."), L_Close;

L_OpenDoors:
    .@ID=getcharid(0);
    .@MAP_NAME$="hasn@"+str(.@ID); // Max 4 chars for map name
    .@INSTID = instance_create("003-4-1@a"+(.@ID), getcharid(3), IOT_CHAR);
    .@instanceMapName$ = instance_attachmap("003-4-1", .@INSTID, 0, .@MAP_NAME$);
    setq TulimsharQuest_Hasan, 3, .@INSTID, santime()+300;

    // Debug
    if (.@instanceMapName$ == "") debugmes "Error: Map 003-4-1 X failed";
    debugmes "Created map: "+ str(.@instanceMapName$);

    // You have 5 minutes to complete the quest.
    instance_set_timeout(300, 300, .@INSTID);
    instance_init(.@INSTID);

    .@x=34;//rand(29, 45);
    .@y=33;//rand(29, 41);
    monster(.@MAP_NAME$, .@x, .@y, l("Murderer Scorpion"), MurdererScorpion, 1, "Sorfina::OnKillMurderer");

    mesn;
    mesq l("Just go to the basement, past this door. Good luck, @@!", strcharinfo(0));
    close;

L_Wait:
    mesn;
    mesq l("Good luck killing it! And don't forget to touch the Soul Menhir before you go!");
    close;

L_TooWeak:
    mesn;
    mesq l("You are too weak to kill one and impress him, so please, bear my son.");
    close;

L_Close:
    close;

L_Finished:
    mesn;
    mesq l("Please, show Hasan the claw. Just talk to him.");
    close;

OnKillMurderer:
    setq TulimsharQuest_Hasan, 4;
    dispbottom l("I will take a claw and show Hasan.");
    end;

OnInit:
    .@npcId = getnpcid(0, .name$);
    setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
    setunitdata(.@npcId, UDT_HEADMIDDLE, ValentineDress); //TODO
    setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers);
    setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots
    setunitdata(.@npcId, UDT_HAIRSTYLE, 16);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 4);

    .sex = G_FEMALE;
    .distance = 5;
    end;
}