summaryrefslogtreecommitdiff
path: root/npc/sample
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-20 06:48:26 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-20 06:48:26 +0000
commit434a50ef97915ae4b4a5c0fe1393c8b264d69082 (patch)
tree2a94469e9c294c3069a79aae676955dd9e862a24 /npc/sample
parent43db1f2c9eb1d648961d49a5fa28416565e333dc (diff)
downloadhercules-434a50ef97915ae4b4a5c0fe1393c8b264d69082.tar.gz
hercules-434a50ef97915ae4b4a5c0fe1393c8b264d69082.tar.bz2
hercules-434a50ef97915ae4b4a5c0fe1393c8b264d69082.tar.xz
hercules-434a50ef97915ae4b4a5c0fe1393c8b264d69082.zip
Added npc/sample/npc_live_dialogues.txt how to use Global_Functions.txt
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10035 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/sample')
-rw-r--r--npc/sample/npc_live_dialogues.txt51
1 files changed, 51 insertions, 0 deletions
diff --git a/npc/sample/npc_live_dialogues.txt b/npc/sample/npc_live_dialogues.txt
new file mode 100644
index 000000000..9bc608aa4
--- /dev/null
+++ b/npc/sample/npc_live_dialogues.txt
@@ -0,0 +1,51 @@
+//by Lupus.
+// *** Usage of Global_Functions.txt (you can translate Global_Functions.txt function messages)
+// Here's a polite wolf NPC ^_- Luppy
+// learn how to make your NPC more alive.
+// PS don't use it as a normal NPC in your server. It's exploitable 8)
+
+prontera,167,177,5 script Luppy 1107,{
+ mes "[Luppy]";
+
+ //say random greeting from Global_Functions.txt
+ mes callfunc("F_Hi");
+
+ //say a compliment according to player's gender
+ //1st string is for FEMALE, 2nd for MALE
+ mes callfunc("F_Sex","What a beautiful lady!","What a handsome man!");
+
+ //add some random greeting and goodbye into the menu
+ menu callfunc("F_Hi"),-, callfunc("F_Bye"),M_BYE;
+
+ mes "[Luppy]";
+ //give a random prize from set list of items
+ if(@gotstuff){
+ //again, say stuff according to player's gender
+ mes "I like "+callfunc("F_Sex","smiling ladies!","bloody pirates!");
+
+ //show one of 3 emotion from the list (we added ,1 to show emotion over PLAYER's head)
+ emotion callfunc("F_RandMes",3,e_scissors,e_kis,e_pat),1;
+ close;
+ }
+
+ //we set a temp var to give present just once. Player can get more by RE-entering the server
+ set @gotstuff,1;
+
+ //get item Id from the list of presents: Apple, Mastela Fruit, Yggdrasil Seed or Orange Juice
+ set @itemIDfromList, callfunc("F_RandMes",4,512,522,608,620);
+
+ //again, say stuff according to player's gender
+ mes "Hey, "+callfunc("F_Sex","sister!","brother!")+" I have "+getitemname(@itemIDfromList)+" for you!";
+
+ //get the item from the list
+ getitem @itemIDfromList,1;
+ close;
+
+M_BYE:
+ mes "[Luppy]";
+ //add some random goodbye from Global_Functions.txt
+ mes callfunc("F_Bye");
+ close;
+}
+
+//Please, be more creative. Or else this li'l wolfy would eat you up! \ No newline at end of file