summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2016-01-17 05:27:47 +0100
committerReid <reidyaro@gmail.com>2016-01-17 05:27:47 +0100
commit5ab0ca6d135d4a35cb8789930dc3473690618c6d (patch)
tree2422ccc531aeb45b49f31a564265610ba93e5837 /npc
parent4af98faa108884ef0ad77146f23a6cfd745e8f7a (diff)
downloadserverdata-5ab0ca6d135d4a35cb8789930dc3473690618c6d.tar.gz
serverdata-5ab0ca6d135d4a35cb8789930dc3473690618c6d.tar.bz2
serverdata-5ab0ca6d135d4a35cb8789930dc3473690618c6d.tar.xz
serverdata-5ab0ca6d135d4a35cb8789930dc3473690618c6d.zip
Add dialogues on OnTouch event on Merlin's script.
Diffstat (limited to 'npc')
-rw-r--r--npc/001-1/merlin.txt40
1 files changed, 37 insertions, 3 deletions
diff --git a/npc/001-1/merlin.txt b/npc/001-1/merlin.txt
index 0223e3ce..4ff7e88c 100644
--- a/npc/001-1/merlin.txt
+++ b/npc/001-1/merlin.txt
@@ -4,11 +4,45 @@
// Description:
// Fishmonger NPC
-001-1,72,128,0 script Merlin NPC_MERLIN,{
+001-1,72,128,0 script Merlin NPC_MERLIN,2,2,{
- speech
- l("Fish is good for the brain!");
+ function randomDialogue {
+ closedialog;
+ .@r = rand (6);
+ if (.@r == 0)
+ {
+ npctalk3 l("Fish, come and see my fish!");
+ }
+ else if (.@r == 1)
+ {
+ npctalk3 l("They are fresh, they are good!");
+ }
+ else if (.@r == 2)
+ {
+ npctalk3 l("Fresh from the sea and cheap!");
+ }
+ else if (.@r == 3)
+ {
+ npctalk3 l("Come, come and see!");
+ }
+ else if (.@r == 4)
+ {
+ npctalk3 l("They are fresh!");
+ }
+ else
+ {
+ npctalk3 l("Fish is good for the brain!");
+ }
+ close;
+ }
+
+OnTouch:
+ if (Repeat_NPC_lock <= gettimetick(2))
+ {
+ Repeat_NPC_lock = gettimetick(2) + 1;
+ randomDialogue;
+ }
close;
OnInit: