summaryrefslogtreecommitdiff
path: root/npc/001-1
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-08-20 12:25:41 -0400
committergumi <mekolat@users.noreply.github.com>2017-08-22 11:45:09 -0400
commit2c87bb38c881639bed963e7933a1e9d9c2e8e6a3 (patch)
treed9e26c7592316293f333a7384c6f9a92b2afe8bd /npc/001-1
parente9c90337a6057b66faad6759ff418e8a5f162cfe (diff)
downloadserverdata-2c87bb38c881639bed963e7933a1e9d9c2e8e6a3.tar.gz
serverdata-2c87bb38c881639bed963e7933a1e9d9c2e8e6a3.tar.bz2
serverdata-2c87bb38c881639bed963e7933a1e9d9c2e8e6a3.tar.xz
serverdata-2c87bb38c881639bed963e7933a1e9d9c2e8e6a3.zip
fix the npc talk lock mechanism, make some other npcs use it
Diffstat (limited to 'npc/001-1')
-rw-r--r--npc/001-1/juscare.txt10
-rw-r--r--npc/001-1/lucas.txt10
-rw-r--r--npc/001-1/merlin.txt43
-rw-r--r--npc/001-1/mouboo.txt8
4 files changed, 14 insertions, 57 deletions
diff --git a/npc/001-1/juscare.txt b/npc/001-1/juscare.txt
index 694668af..393186fa 100644
--- a/npc/001-1/juscare.txt
+++ b/npc/001-1/juscare.txt
@@ -22,14 +22,6 @@
close;
}
- function randomTalk {
- if (Repeat_NPC_lock <= gettimetick(2))
- {
- Repeat_NPC_lock = gettimetick(2) + 2;
- villagertalk;
- }
- }
-
npc_pausemove;
@Juscar_old_dir = -1;
if (shouldTurn())
@@ -39,7 +31,7 @@
npc_turntoxy(.@cx, .@cy);
}
- randomTalk;
+ villagertalk();
localClose;
diff --git a/npc/001-1/lucas.txt b/npc/001-1/lucas.txt
index 2104b5b5..4058d72e 100644
--- a/npc/001-1/lucas.txt
+++ b/npc/001-1/lucas.txt
@@ -6,15 +6,7 @@
001-1,59,44,0 script Lucas#001-1 NPC_LUCAS,{
- function randomTalk {
- if (Repeat_NPC_lock <= gettimetick(2))
- {
- Repeat_NPC_lock = gettimetick(2) + 2;
- villagertalk;
- }
- }
-
- randomTalk;
+ villagertalk();
closedialog;
close;
diff --git a/npc/001-1/merlin.txt b/npc/001-1/merlin.txt
index d970f537..0d9a8b30 100644
--- a/npc/001-1/merlin.txt
+++ b/npc/001-1/merlin.txt
@@ -6,44 +6,17 @@
001-1,73,128,0 script Merlin NPC_MERLIN,2,2,{
- 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))
+ switch(rand(6))
{
- Repeat_NPC_lock = gettimetick(2) + 1;
- randomDialogue;
+ case 0: npctalkonce(l("Fish, come and see my fish!")); break;
+ case 0: npctalkonce(l("They are fresh, they are good!")); break;
+ case 0: npctalkonce(l("Fresh from the sea and cheap!")); break;
+ case 0: npctalkonce(l("Come, come and see!")); break;
+ case 0: npctalkonce(l("They are fresh!")); break;
+ default: npctalkonce(l("Fish is good for the brain!"));
}
- close;
+ end;
OnInit:
.sex = G_MALE;
diff --git a/npc/001-1/mouboo.txt b/npc/001-1/mouboo.txt
index be0294e1..bee13d1e 100644
--- a/npc/001-1/mouboo.txt
+++ b/npc/001-1/mouboo.txt
@@ -6,7 +6,7 @@
001-1,67,79,4 script Mouboo#Artis0 NPC_MOUBOO,{
- mouboochecklock;
+ moubootalk();
close;
OnTimer2000:
@@ -21,7 +21,7 @@ OnInit:
001-1,67,80,4 script Mouboo#Artis1 NPC_MOUBOO,{
- mouboochecklock;
+ moubootalk();
close;
OnTimer2000:
@@ -36,7 +36,7 @@ OnInit:
001-1,67,81,4 script Mouboo#Artis2 NPC_MOUBOO,{
- mouboochecklock;
+ moubootalk();
close;
OnTimer2000:
@@ -51,7 +51,7 @@ OnInit:
001-1,67,82,4 script Mouboo#Artis3 NPC_MOUBOO,{
- mouboochecklock;
+ moubootalk();
close;
OnTimer2000: