summaryrefslogblamecommitdiff
path: root/npc/test/npc1.txt
blob: 2c0dc8b4f4c37af650feb27c74f1993b10137612 (plain) (tree)
1
2
3
4
5
6





                







                                                   
                                         











                                                                                          
 
        
                                                                                                    
     



                     

                    

                                               
                                                                          

                       
                                                  

                          
                                                  

                          
                                         

                          



                                            

                          
             
                  
 
               


                          






                                          
               










                                            
               

                      
               

                      
     
 


          
              
 
          



                




                     



                                



                                                      
 
// Evol scripts.
// Authors:
//    4144
// Description:
//    test npc1

test,10,10,0	script	npc1#door	32767,0,1,{
OnTouch:
    warp "test", 20, 20;
    close;
OnUnTouch:
    doevent "npc1::OnUnTouch";
}

test,10,10,0	script	npc1	800,3,3,{
    function areatest
    {
        mesn;
        mes "getareausers(\"test\", 7, 7, 13, 13): " + getareausers("test", 7, 7, 13, 13);
        mes "getareausers(7, 7, 13, 13): " + getareausers(7, 7, 13, 13);
        mes "getareausers(\"test\"): " + getareausers("test");
        mes "getareausers(): " + getareausers();
        mes "getareausers(\"test\", 1): " + getareausers("test", 1);
        mes "getareausers(1): " + getareausers(1);
        next;
        return;
    }

L_Start:
    switch (select("show area:map:change sex:change npc direction:quest test:add cart:remove cart"))
    {
        case 1:
            areatest;
            break;
        case 2:
            while(1)
            {
            .@mask = getmapmask("test");
            mes "current mask: " + str(.@mask);
            switch (select("show sand:show grass:show fog:hide fog:back"))
            {
                case 1:
                    addremovemapmask "test", 4, 8;
                    break;
                case 2:
                    addremovemapmask "test", 8, 4;
                    break;
                case 3:
                    addmapmask "test", 2;
                    break;
                case 4:
                    removemapmask "test", 2;
                    break;
                case 5:
                    goto L_Start;
                    break;
            }
            }
            break;

        case 3:
            changecharsex;
            break;
        case 4:
            for (.@f = 0; .@f < 9; .@f ++)
            {
                mes "" + .@f;
                setnpcdir .@f;
                next;
            }
            break;
        case 5:
            mes "current";
            .@val0 = getq(ShipQuests_Gugli);
            mes "val=" + .@val0;
            setq ShipQuests_Gugli, 10;
            next;
            mes "test 10";
            next;
            .@val = getq(ShipQuests_Gugli);
            mes "val=" + .@val;
            setq ShipQuests_Gugli, .@val0;
            next;
        case 6:
            setcart 1;
            break;
        case 7:
            setcart 0;
            break;
    }

    close;

OnTouch:
    doorTouch;

OnUnTouch:
    doorUnTouch;

OnTimer340:
    doorTimer;

OnInit:
    setnpcsex G_MALE;
    setnpcdistance 5;
    end;

OnWhisperGlobal:
    mes "cmd: " + @whispervar0$;
    close;

OnSkillInvoke:
    skillInvoke[@skillId] = skillInvoke[@skillId] + 1;
    close;
}