npc_test_duplicate.txt 731 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // This sample script tests:
  3. // * how npc-variables work with duplicated npcs
  4. // * how the trigger area is applied to duplicates
  5. //
  6. // Outcome (r11216 trunk):
  7. // * the variables are _shared_ between all duplicates
  8. // * 'OnInit' loads the middle poring last, for some reason
  9. // * duplicates always override the source npc's trigger area (even 0x0)
  10. //
  11. - script Test Script -1,1,1,{
  12. mes "Hi.";
  13. mes "My coords are "+ .map$ +", "+ .x +"/" +.y ;
  14. close;
  15. OnInit:
  16. getmapxy(.map$, .x, .y, 1);
  17. end;
  18. OnTouch:
  19. getmapxy(.map$, .x, .y, 1);
  20. emotion e_scissors;
  21. end;
  22. }
  23. prontera,150,175,4 duplicate(Test Script) Test1 909
  24. prontera,155,175,4 duplicate(Test Script) Test2 909,2,2
  25. prontera,160,175,4 duplicate(Test Script) Test3 909,3,3