summaryrefslogblamecommitdiff
path: root/npc/000-1/exit.txt
blob: 565e1cf38a7513d9ad8cfa12a5b7bb3957cafdde (plain) (tree)
1
2
3
4
5
6
7
8
9
10





                                                            
                                                             


             





                                                                          
                                                              
                                                 
                    
                                                                              



                                                                                             
                                                   
                                        
                                
                         
        


 
// TMW2 scripts.
// Author:
//    Jesusalva
// Description:
//    Special Soul Menhir which only allows leaving the map.

000-1,22,22,0	script	Emergency Exit	NPC_SOUL_CURSED,2,2,{
OnTouch:
OnTalk:
OnTalkNearby:
    // At any time, if you can't leave Nard ship, you must go to nard ship
    if (getq(ShipQuests_Julia) < 3) {
        warp "002-1", 53, 38;
        end;
    }

    // Switch LOCATION$ and warp to nearest town's Soul Menhir
    .@lx=array_find($@LOCMASTER_LOC$, LOCATION$);
    if (.@lx >= 0) {
        warp $@LOCMASTER_MAP$[.@lx], $@LOCMASTER_X[.@lx], $@LOCMASTER_Y[.@lx];
        end;
    }

    //if (getsavepoint(0) != "000-1") warp getsavepoint(0), getsavepoint(1), getsavepoint(2);
    if (getsavepoint(0) != "000-1") teleporthome();
    if (getsavepoint(0) != "000-1") end;
    //savepoint "002-1", 53, 38;
    warp "002-1", 53, 38;
    end;

}