summaryrefslogtreecommitdiff
path: root/doc/sample/PCLoginEvent.txt
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-03-31 18:57:22 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-03-31 18:57:22 +0000
commit6f88f2409f1853ae205573257865462540f935fc (patch)
tree30598fa37157d159bce0f8712a8b2b38047e2eab /doc/sample/PCLoginEvent.txt
parentd35717644b58c55b50098b3b0a08cf8002d39cca (diff)
downloadhercules-6f88f2409f1853ae205573257865462540f935fc.tar.gz
hercules-6f88f2409f1853ae205573257865462540f935fc.tar.bz2
hercules-6f88f2409f1853ae205573257865462540f935fc.tar.xz
hercules-6f88f2409f1853ae205573257865462540f935fc.zip
Moved /npc/sample/ to /doc/sample. These are examples, not actual npcs.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14277 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'doc/sample/PCLoginEvent.txt')
-rw-r--r--doc/sample/PCLoginEvent.txt53
1 files changed, 53 insertions, 0 deletions
diff --git a/doc/sample/PCLoginEvent.txt b/doc/sample/PCLoginEvent.txt
new file mode 100644
index 000000000..b7020b719
--- /dev/null
+++ b/doc/sample/PCLoginEvent.txt
@@ -0,0 +1,53 @@
+// eAthena Special NPC
+
+// PCLoginEvent NPC (davidsiaw)
+//==============================================================================
+// How it works:
+// When a player logs in, the NPC will run as if he just clicked it. Which means
+// if the script is like this:
+//
+// [code]
+// prontera,0,0,0 script OnPCLoginEvent -1,{
+// mes "lmao";
+// close;
+// }
+// [/code]
+//
+// every player who logs in will receive a message 'lmao' in their face as soon
+// as they can see the map.
+//-----------------------------------------------------------------------------
+// Note:
+// 1) This NPC will only run if its name is 'PCLoginEvent'
+// 2) I made it invisible because you don't need to see it. Its an abstract NPC
+// 3) If you don't want it, simply delete it
+// 4) If you have more than one PCLoginEvent NPC, strange things will happen.
+// 5) You can put this script in ANY file.
+// 6) I put an end; there because that just makes it do nothing.
+// 7) Modify this script to your liking and give your players a surprise
+// 8) Remember: IT RUNS LIKE A NORMAL NPC. BUT THE ONLY WAY TO 'CLICK' IT IS BY
+// LOGGING ON
+// 9) There are 2 ways to use this - check the examples below!
+
+//
+// The 1st type -- with 'event_script_type' set to 0
+//
+prontera,0,0,0 script OnPCLoginEvent -1,{
+ end;
+}
+
+//
+// The 2nd type -- with 'event_script_type' set to 1
+//
+prontera,155,175,0 script An NPC 46,{
+ close;
+OnPCLoginEvent:
+ // this part will run
+ close;
+}
+
+prontera,156,176,0 script Another NPC 46,{
+ close;
+OnPCLoginEvent:
+ // this part runs AS WELL
+ close;
+} \ No newline at end of file