From fec91f992d31a4dd4e880ccad48ee66b6815656f Mon Sep 17 00:00:00 2001 From: Reid Date: Thu, 5 Feb 2015 02:58:09 +0100 Subject: Add harbour NPC. --- npc/001-1/_import.txt | 1 + npc/001-1/artaxe.txt | 2 +- npc/001-1/harbours.txt | 24 ++++++++++++++++++++++++ npc/functions/harbours.txt | 39 +++++++++++++++++++++++++++++++++++++++ npc/scripts.conf | 1 + 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 npc/001-1/harbours.txt create mode 100644 npc/functions/harbours.txt (limited to 'npc') diff --git a/npc/001-1/_import.txt b/npc/001-1/_import.txt index bca9e92e..390f88ba 100644 --- a/npc/001-1/_import.txt +++ b/npc/001-1/_import.txt @@ -4,3 +4,4 @@ npc: npc/001-1/_warps.txt npc: npc/001-1/artaxe.txt npc: npc/001-1/cookiemaster.txt npc: npc/001-1/doors.txt +npc: npc/001-1/harbours.txt diff --git a/npc/001-1/artaxe.txt b/npc/001-1/artaxe.txt index 8a7cbae0..fad84bc1 100644 --- a/npc/001-1/artaxe.txt +++ b/npc/001-1/artaxe.txt @@ -5,7 +5,7 @@ // Description: // Helping NPC. -000-1,27,55,0 script Artaxe 109,{ +001-1,92,43,0 script Artaxe 109,{ mesn; mesq l("Do you feel too weak even if trying to hit the surrounding wildlife?"); next; diff --git a/npc/001-1/harbours.txt b/npc/001-1/harbours.txt new file mode 100644 index 00000000..1c2a4cec --- /dev/null +++ b/npc/001-1/harbours.txt @@ -0,0 +1,24 @@ +// Evol scripts. +// Authors: +// Reid +// Description: +// Harbour animated tiles. +// Animation: +// Length: 1680 +// Values: +// 2 Hook moving down. +// 4 Hook moving up. +// 6 Hook down. +// 8 Hook up. + +001-1,177,120,0 script #Harbour1 420,{ + + harbourClic; + +OnTimer1670: + harbourTimer; + +OnInit: + setnpcdistance 2; + end; +} diff --git a/npc/functions/harbours.txt b/npc/functions/harbours.txt new file mode 100644 index 00000000..eae24e24 --- /dev/null +++ b/npc/functions/harbours.txt @@ -0,0 +1,39 @@ +// Evol scripts. +// Authors: +// Reid +// Description: +// Harbour utility functions +// Animation: +// Length: 1680 +// Values: +// 2 Hook moving down. +// 4 Hook moving up. +// 6 Hook down. +// 8 Hook up. + +function script harbourClic { + if (getnpcdir () == 0) + { + setnpcdir 2; + + initnpctimer; + startnpctimer; + close; + } + + if (getnpcdir () == 6) + { + setnpcdir 4; + + initnpctimer; + startnpctimer; + close; + } +} + +function script harbourTimer { + stopnpctimer; + if (getnpcdir () == 2) setnpcdir 6; + if (getnpcdir () == 4) setnpcdir 0; + end; +} diff --git a/npc/scripts.conf b/npc/scripts.conf index 118226eb..0682cab0 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -9,6 +9,7 @@ npc: npc/functions/asleep.txt npc: npc/functions/clientversion.txt npc: npc/functions/doors.txt npc: npc/functions/hammocks.txt +npc: npc/functions/harbours.txt npc: npc/functions/inventoryplace.txt npc: npc/functions/goodbye.txt npc: npc/functions/sailordialogue.txt -- cgit v1.2.3-60-g2f50