summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-05-30 19:53:21 -0300
committerJesusaves <cpntb1@ymail.com>2018-05-30 19:53:21 -0300
commit359aa55cf8dc0e1484e0153b46e0f6beccf5d15c (patch)
treeb2f49ce430afdca113eb181c3991a1e347344311 /npc/functions
parentb732d581cebcc97f5a831cf3775525942acc7020 (diff)
downloadserverdata-359aa55cf8dc0e1484e0153b46e0f6beccf5d15c.tar.gz
serverdata-359aa55cf8dc0e1484e0153b46e0f6beccf5d15c.tar.bz2
serverdata-359aa55cf8dc0e1484e0153b46e0f6beccf5d15c.tar.xz
serverdata-359aa55cf8dc0e1484e0153b46e0f6beccf5d15c.zip
Delete various unused functions, and unify random talk in a single script file.
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/hello.txt23
-rw-r--r--npc/functions/legiontalk.txt66
-rw-r--r--npc/functions/main.txt4
-rw-r--r--npc/functions/mouboofunc.txt89
-rw-r--r--npc/functions/random-talk.txt174
-rw-r--r--npc/functions/sailordialogue.txt53
-rw-r--r--npc/functions/sailortalk.txt33
-rw-r--r--npc/functions/villagertalk.txt53
8 files changed, 177 insertions, 318 deletions
diff --git a/npc/functions/hello.txt b/npc/functions/hello.txt
deleted file mode 100644
index 9399b3b58..000000000
--- a/npc/functions/hello.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-// Evol functions.
-// Author:
-// Reid
-// Description:
-// Tell a random greeting sentence.
-
-function script hello {
-
- switch (rand(3))
- {
- case 0:
- npctalkonce(l("Heya!"));
- break;
- case 1:
- npctalkonce(l("Hi."));
- break;
- case 2:
- npctalkonce(l("Nice day to you."));
- break;
- }
-
- return;
-}
diff --git a/npc/functions/legiontalk.txt b/npc/functions/legiontalk.txt
deleted file mode 100644
index fbc35e1f7..000000000
--- a/npc/functions/legiontalk.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-// Evol functions.
-// Authors:
-// Akko Teru
-// Reid
-// Qwerty Dragon
-// Description:
-// Tell a random sentence suited to Aemil's Legion in Artis.
-
-function script legiontalk {
-
- switch (rand(15))
- {
- case 0:
- npctalkonce(l("Do I look like a tree? I feel like one."));
- //speech(
- // l("Do you feel too weak even to do damage to this areas wishy-washy wildlife?"),
- // l("Then concentrate your anger upon the trees hereabouts, you will gain experience whilst leveling your sword skill on them."),
- // l("Oh, and a fruit may even fall for you if you are lucky! But stay alert to pick up your drops."));
- //close;
- break;
- case 1:
- npctalkonce(l("I'm a little busy right now."));
- break;
- case 2:
- npctalkonce(l("Not in the mood to chat."));
- break;
- case 3:
- npctalkonce(l("My breath smells bad."));
- break;
- case 4:
- npctalkonce(l("Don't distract me, I have to stay alert."));
- break;
- case 5:
- npctalkonce(l("Give me some space."));
- break;
- case 6:
- npctalkonce(l("Can you please go away?"));
- break;
- case 7:
- npctalkonce(l("Can't talk right now, I'm on patrol duty."));
- break;
- case 8:
- npctalkonce(l("What're you looking at?!"));
- break;
- case 9:
- npctalkonce(l("I can't stay here and talk all day. I have a job to do."));
- break;
- case 10:
- npctalkonce(lg("Keep moving girl.", "Keep moving boy."));
- break;
- case 11:
- npctalkonce(lg("So you think you're tough? A warrior must also be loyal and patient."));
- break;
- case 12:
- emotion E_LOOKAWAY;
- break;
- case 13:
- npctalkonce(l("Practice! There are no secrets to becoming a warrior."));
- break;
- case 14:
- npctalkonce(l("There is no honor in fighting a weak opponent."));
- break;
- }
-
- return;
-}
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index f6ef53a44..097c21060 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -1,9 +1,11 @@
+// TMW2 Script
// Evol functions.
// Authors:
// 4144
// Travolta
+// Jesusalva
// Description:
-// Build in functions.
+// Built-in essential functions.
function script menuimage {
return getarg(0) + "|" + getarg(1);
diff --git a/npc/functions/mouboofunc.txt b/npc/functions/mouboofunc.txt
deleted file mode 100644
index 6129c083e..000000000
--- a/npc/functions/mouboofunc.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-// Evol functions.
-// Author:
-// Reid
-// Description:
-// Various scripts used in walking mouboo NPCs.
-
-function script moubootalk {
- switch (rand(4))
- {
- case 0:
- npctalkonce(l("Moooooo!"));
- break;
- case 1:
- npctalkonce(l("Moo!"));
- break;
- case 2:
- npctalkonce(l("Moooooooooooo!"));
- break;
- case 3:
- npctalkonce(l("Moooo!"));
- break;
- }
- return;
-}
-
-function script mouboocheckxy {
- setarray .nearnpc$[0], "Mouboo#Artis0",
- "Mouboo#Artis1",
- "Mouboo#Artis2",
- "Mouboo#Artis3",
- "Taree";
- for (.@size = 0; .@size < getarraysize(.nearnpc$); .@size++)
- {
- if (strcmp(.name$, .nearnpc$[.@size]) == 0)
- {
- continue;
- }
-
- .@npc_x = getvariableofnpc(.x, .nearnpc$[.@size]);
- .@npc_y = getvariableofnpc(.y, .nearnpc$[.@size]);
-
- if (.@npc_x == .x && .@npc_y == .y)
- {
- return 1;
- }
- }
-
- return 0;
-}
-
-function script moubootimer {
- if (mouboocheckxy() && !isunitwalking())
- {
- movetonextpoint;
- }
- else if (rand(0,6) == 5)
- {
- if (!isunitwalking())
- {
- movetonextpoint;
- }
- }
- initnpctimer;
- end;
-}
-
-function script mouboograph {
- initmovegraph "down_pos", 66, 79, 75, 86,
- "left_pos", 66, 79, 75, 86,
- "up_pos", 66, 79, 75, 86,
- "right_pos", 66, 79, 75, 86;
-
- setmovegraphcmd "down_pos", "left_pos", 1, "dir 2",
- "down_pos", "up_pos", 1, "dir 4",
- "down_pos", "right_pos", 1, "dir 6",
- "left_pos", "down_pos", 1, "dir 0",
- "left_pos", "up_pos", 1, "dir 4",
- "left_pos", "right_pos", 1, "dir 6",
- "up_pos", "down_pos", 1, "dir 0",
- "up_pos", "left_pos", 1, "dir 2",
- "up_pos", "right_pos", 1, "dir 6",
- "right_pos", "down_pos", 1, "dir 0",
- "right_pos", "left_pos", 1, "dir 2",
- "right_pos", "up_pos", 1, "dir 4";
-
- firstmove "wait 2", "down_pos";
- initnpctimer;
- end;
-}
diff --git a/npc/functions/random-talk.txt b/npc/functions/random-talk.txt
new file mode 100644
index 000000000..5ebb5a2fb
--- /dev/null
+++ b/npc/functions/random-talk.txt
@@ -0,0 +1,174 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Random dialog for various random NPCs.
+
+// Functions:
+// hello
+// moubootalk
+// villagertalk
+// sailortalk
+// legiontalk
+
+// Evol authors (some strings and code):
+// Reid
+// Akko Teru
+// Qwerty Dragon
+
+function script hello {
+
+ switch (rand(3)) {
+ case 0:
+ npctalkonce(l("Heya!"));
+ break;
+ case 1:
+ npctalkonce(l("Hi."));
+ break;
+ case 2:
+ npctalkonce(l("Nice day to you."));
+ break;
+ }
+
+ return;
+}
+
+function script moubootalk {
+ switch (rand(4)) {
+ case 0:
+ npctalkonce(l("Moooooo!"));
+ break;
+ case 1:
+ npctalkonce(l("Moo!"));
+ break;
+ case 2:
+ npctalkonce(l("Moooooooooooo!"));
+ break;
+ case 3:
+ npctalkonce(l("Moooo!"));
+ break;
+ }
+ return;
+}
+
+function script sailortalk {
+
+ .@rand = rand(8);
+ if (.@rand == 0) goodbye;
+ if (.@rand == 1) npctalkonce(l("Ah, this is boring."));
+ if (.@rand == 2) npctalkonce(l("Good to hear from you!"));
+ if (.@rand == 3) npctalkonce(l("So finally someone has came to visit me?"));
+ if (.@rand == 4) {
+ speech(
+ l("A sunny and hot day,"),
+ l("a quiet place,"),
+ l("a ground!"),
+ l("What else do you need?"));
+ close;
+ }
+ if (.@rand == 5) npctalkonce(l("A-hoy matey!"));
+ if (.@rand == 6) npctalkonce(l("Arr!"));
+ if (.@rand == 7) npctalkonce(l("Howdy?"));
+
+ // just to be sure
+ closedialog;
+ close;
+ end;
+}
+
+function script villagertalk {
+
+ function darn_or_smile {
+ .@darn = rand(42);
+
+ if (.@darn < 26) {
+ emotion E_JOY;
+ hello;
+ } else if (.@darn > 26) {
+ emotion E_LOOKAWAY;
+ goodbye;
+ } else {
+ npctalkonce(l("Stop it!"));
+ }
+ return;
+ }
+
+ switch (rand(4)) {
+ case 0:
+ darn_or_smile();
+ break;
+ case 1:
+ npctalkonce(l("It is a sunny day, don't you think?"));
+ break;
+ case 2:
+ npctalkonce(l("Go fly a kite."));
+ break;
+ case 3:
+ npctalkonce(l("I just want to live my life in peace."));
+ break;
+ default:
+ emotion E_HAPPY;
+ break;
+ }
+
+ return;
+}
+
+function script legiontalk {
+ switch (rand(15)) {
+ case 0:
+ npctalkonce(l("Do I look like a tree? I feel like one."));
+ //speech(
+ // l("Do you feel too weak even to do damage to this areas wishy-washy wildlife?"),
+ // l("Then concentrate your anger upon the trees hereabouts, you will gain experience whilst leveling your sword skill on them."),
+ // l("Oh, and a fruit may even fall for you if you are lucky! But stay alert to pick up your drops."));
+ //close;
+ break;
+ case 1:
+ npctalkonce(l("I'm a little busy right now."));
+ break;
+ case 2:
+ npctalkonce(l("Not in the mood to chat."));
+ break;
+ case 3:
+ npctalkonce(l("My breath smells bad."));
+ break;
+ case 4:
+ npctalkonce(l("Don't distract me, I have to stay alert."));
+ break;
+ case 5:
+ npctalkonce(l("Give me some space."));
+ break;
+ case 6:
+ npctalkonce(l("Can you please go away?"));
+ break;
+ case 7:
+ npctalkonce(l("Can't talk right now, I'm on patrol duty."));
+ break;
+ case 8:
+ npctalkonce(l("What're you looking at?!"));
+ break;
+ case 9:
+ npctalkonce(l("I can't stay here and talk all day. I have a job to do."));
+ break;
+ case 10:
+ npctalkonce(lg("Keep moving girl.", "Keep moving boy."));
+ break;
+ case 11:
+ npctalkonce(lg("So you think you're tough? A warrior must also be loyal and patient."));
+ break;
+ case 12:
+ emotion E_LOOKAWAY;
+ break;
+ case 13:
+ npctalkonce(l("Practice! There are no secrets to becoming a warrior."));
+ break;
+ case 14:
+ npctalkonce(l("There is no honor in fighting a weak opponent."));
+ break;
+ }
+
+ return;
+}
+
+
diff --git a/npc/functions/sailordialogue.txt b/npc/functions/sailordialogue.txt
deleted file mode 100644
index 281246f7f..000000000
--- a/npc/functions/sailordialogue.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-// Evol functions.
-// Authors:
-// Qwerty Dragon
-// Reid
-// Description:
-// Random sailor dialogues between two categories of NPCs.
-
-function script sailorfood {
- mesn;
-
- .@q = rand(0, 400) / 100;
- if (.@q == 0) goto L_RandomA;
- if (.@q == 1) goto L_RandomB;
- if (.@q > 1) goto L_RandomC;
-
-L_RandomA:
- mesq l("Hey.");
- next;
- mesq l("What did Gugli say about the box? Was it ok?");
- next;
-
- menu
- l("It's ok."), L_Fine,
- l("He needs more food."), -;
-
- mes "";
- mesn;
- mesq l("Oh really? I'll put more food in the next box then.");
-
- close;
-
-L_Fine:
- mes "";
- mesn;
- mesq l("It's alright! Just one more box and it'll be ok.");
-
- close;
-
-L_RandomB:
- mesq l("Thanks for the help!");
- next;
- mesq l("These boxes are way too heavy to be lifted by only one person, all the way onto the ship.");
-
- close;
-
-L_RandomC:
- mesq l("I think I'll be done soon, since I almost have a box full of @@s!", getitemlink(CrocClaw));
- next;
- mesq l("And you? How's it going on your side?");
- next;
-
- return;
-}
diff --git a/npc/functions/sailortalk.txt b/npc/functions/sailortalk.txt
deleted file mode 100644
index 87baf0386..000000000
--- a/npc/functions/sailortalk.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-// Evol functions.
-// Author:
-// Reid
-// Description:
-// Tell a random sentence.
-// Variables:
-// .@rand = Random number between the number of sentence choice.
-
-function script sailortalk {
-
- .@rand = rand(8);
- if (.@rand == 0) goodbye;
- if (.@rand == 1) npctalkonce(l("Ah, this is boring."));
- if (.@rand == 2) npctalkonce(l("Good to hear from you!"));
- if (.@rand == 3) npctalkonce(l("So finally someone has came to visit me?"));
- if (.@rand == 4)
- {
- speech(
- l("A sunny and hot day,"),
- l("a quiet place,"),
- l("a ground!"),
- l("What else do you need?"));
- close;
- }
- if (.@rand == 5) npctalkonce(l("A-hoy matey!"));
- if (.@rand == 6) npctalkonce(l("Arr!"));
- if (.@rand == 7) npctalkonce(l("Howdy?"));
-
- // just to be sure
- closedialog;
- close;
- end;
-}
diff --git a/npc/functions/villagertalk.txt b/npc/functions/villagertalk.txt
deleted file mode 100644
index 371a9f20b..000000000
--- a/npc/functions/villagertalk.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-// Evol functions.
-// Authors:
-// Akko Teru
-// Qwerty Dragon
-// Reid
-// Description:
-// Tell a random sentence. || There ought to be a law!
-
-function script villagertalk {
-
- function darn_or_smile
- {
- .@darn = rand(42);
-
- if (.@darn < 26)
- {
- emotion E_JOY;
- hello;
- }
- else if (.@darn > 26)
- {
- emotion E_LOOKAWAY;
- goodbye;
- }
- else
- {
- npctalkonce(l("Stop it!"));
- }
-
- return;
- }
-
- switch (rand(4))
- {
- case 0:
- darn_or_smile();
- break;
- case 1:
- npctalkonce(l("It is a sunny day, don't you think?"));
- break;
- case 2:
- npctalkonce(l("Go fly a kite."));
- break;
- case 3:
- npctalkonce(l("I just want to live my life in peace."));
- break;
- default:
- emotion E_HAPPY;
- break;
- }
-
- return;
-}