root/npc/sample/PCLoginEvent.txt

Revision 1, 1.6 kB (checked in by jinshiro, 17 years ago)
Line 
1// eAthena Special NPC
2
3// PCLoginEvent NPC (davidsiaw)
4//==============================================================================
5// How it works:
6// When a player logs in, the NPC will run as if he just clicked it. Which means
7// if the script is like this:
8//
9// [code]
10// prontera,0,0,0       script  OnPCLoginEvent  -1,{
11//      mes "lmao";
12//      close;
13// }
14// [/code]
15//
16// every player who logs in will receive a message 'lmao' in their face as soon
17// as they can see the map.
18//-----------------------------------------------------------------------------
19// Note:
20// 1) This NPC will only run if its name is 'PCLoginEvent'
21// 2) I made it invisible because you don't need to see it. Its an abstract NPC
22// 3) If you don't want it, simply delete it
23// 4) If you have more than one PCLoginEvent NPC, strange things will happen.
24// 5) You can put this script in ANY file.
25// 6) I put an end; there because that just makes it do nothing.
26// 7) Modify this script to your liking and give your players a surprise
27// 8) Remember: IT RUNS LIKE A NORMAL NPC. BUT THE ONLY WAY TO 'CLICK' IT IS BY
28//              LOGGING ON
29// 9) There are 2 ways to use this - check the examples below!
30
31//
32// The 1st type -- with 'event_script_type' set to 0
33//
34prontera,0,0,0  script  OnPCLoginEvent  -1,{
35        end;
36}
37
38//
39// The 2nd type -- with 'event_script_type' set to 1
40//
41prontera,155,175,0      script  An NPC  46,{
42        close;
43OnPCLoginEvent:
44        // this part will run
45        close;
46}
47
48prontera,156,176,0      script  Another NPC     46,{
49        close;
50OnPCLoginEvent:
51        // this part runs AS WELL
52        close;
53}
Note: See TracBrowser for help on using the browser.