summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/Changelog.txt1
-rw-r--r--npc/other/Global_Functions.txt26
-rw-r--r--npc/sample/npc_live_dialogues.txt51
3 files changed, 56 insertions, 22 deletions
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
index cc5819552..d28f7e37e 100644
--- a/npc/Changelog.txt
+++ b/npc/Changelog.txt
@@ -27,6 +27,7 @@ KarLaeda
Date Added
======
2007/03/20
+ * Added npc/sample/npc_live_dialogues.txt how to use Global_Functions.txt [Lupus]
* Removed duplicate Noyee npc (skipped in r9943 ?)
2007/03/17
* Fixed a missing curly brace and removed some more .gat-s [ultramage]
diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
index c63a58f5b..8e7817d31 100644
--- a/npc/other/Global_Functions.txt
+++ b/npc/other/Global_Functions.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Lupus, kobra_k88
//===== Current Version: =====================================
-//= 2.08
+//= 2.09
//===== Compatible With: =====================================
//= eAthena 1.0
//===== Description: =========================================
@@ -29,8 +29,8 @@
//= 2.05 Book of Devil -> MISC_QUEST|256, clear other Niflheim garbage vars [Lupus]
//= +more garbage clean
//= 2.06 Pass to Bio-Lab -> MISC_QUEST|512 [Lupus]
-//= 2.07 Added TK_Q variable clear [Lupus]
-//- 2.08 Added NINJ_Q variable clear [Lupus]
+//= 2.07 Added TK_Q variable clear. 2.08 Added NINJ_Q variable clear [Lupus]
+//= 2.09 Cleared F_ClearGarbage [Lupus]
//============================================================
@@ -80,24 +80,6 @@ function script F_ClearJobVar {
function script F_ClearGarbage {
// Clear outdated global VARS
- //DTS Vote System
- if($dtsglobalelig) set $dtsglobalelig,0;
- if($dts&(1<<6)) set $dts,$dts&~(1<<6);
- //Cube Room
- if(hzdun) {
- set MISC_QUEST,MISC_QUEST|512;
- set num1,0; set num2,0; set num3,0; set num4,0; set num5,0;
- set num6,0; set num7,0; set num8,0; set num9,0;
- set hzdun,0; set cubekey,0; set piciburn,0;
- }
- //Airship
- if($lengths){
- cleararray $textstringsa$[0],"",getarraysize($textstringsa$);
- cleararray $textstringsb$[0],"",getarraysize($textstringsb$);
- cleararray $textstringsc$[0],"",getarraysize($textstringsc$);
- cleararray $compstring$[0],"",getarraysize($compstring$);
- cleararray $lengths[0],0,getarraysize($lengths);
- }
//Shinkskas Quest garbage
if(Shinokas_Quest > 7){
set ein_scientist,0;
@@ -221,7 +203,7 @@ function script F_RandMes {
// *** Function "F_Sex"
//////////////////////////////////////////////////////////////////////////////////
//returns 1st string if female, 2nd string otherwise
-// Example: mes callfunc("F_Sex","What a beautiful lady!","What a handsom man!");
+// Example: mes callfunc("F_Sex","What a beautiful lady!","What a handsome man!");
function script F_SexMes {
return getarg(Sex);
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