summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2016-12-03 12:47:55 -0500
committergumi <mekolat@users.noreply.github.com>2016-12-13 14:41:54 -0500
commitecc2bfea7c05281bf40a6a08e353e5918d375f35 (patch)
tree352aa3cbfa0eade2fc7a3cfcdd262001ec7bb0d3
parentb4935b2f81ff9e8903dd89228ff97fc03b584c73 (diff)
downloadserverdata-ecc2bfea7c05281bf40a6a08e353e5918d375f35.tar.gz
serverdata-ecc2bfea7c05281bf40a6a08e353e5918d375f35.tar.bz2
serverdata-ecc2bfea7c05281bf40a6a08e353e5918d375f35.tar.xz
serverdata-ecc2bfea7c05281bf40a6a08e353e5918d375f35.zip
put the game rules in a function, make notes call that function, add `@rules` command
add `The Book of Laws`, give it whenever the player does not have it
-rw-r--r--db/re/item_db.conf14
-rw-r--r--npc/000-2-0/julia.txt15
-rw-r--r--npc/000-2-0/note.txt35
-rw-r--r--npc/001-2-21/note.txt35
-rw-r--r--npc/001-2-28/note.txt16
-rw-r--r--npc/001-2-4/_import.txt1
-rw-r--r--npc/001-2-4/books.txt15
-rw-r--r--npc/001-2-4/robin.txt50
-rw-r--r--npc/001-2-5/books.txt2
-rw-r--r--npc/functions/game-rules.txt59
-rw-r--r--npc/functions/main.txt5
-rw-r--r--npc/functions/openbook.txt10
-rw-r--r--npc/scripts.conf1
13 files changed, 152 insertions, 106 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index a040fe03..9c535e6d 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -1226,6 +1226,20 @@ item_db: (
">
},
{
+ Id: 537
+ AegisName: "BookOfLaws"
+ Name: "The Book of Laws"
+ Type: "IT_USABLE"
+ Buy: 0
+ Sell: 0
+ Weight: 10
+ KeepAfterUse: true
+ Refine: false
+ Script: <"
+ doevent "@rules::OnUseBook";
+ ">
+},
+{
Id: 700
AegisName: "SmallTentacles"
Name: "Small Tentacles"
diff --git a/npc/000-2-0/julia.txt b/npc/000-2-0/julia.txt
index 5ef73a5c..fd69beff 100644
--- a/npc/000-2-0/julia.txt
+++ b/npc/000-2-0/julia.txt
@@ -166,21 +166,18 @@
mesq l("Here they are.");
next;
- narrator 0x4,
- l("There is a paper with some rules written on it."),
- l("1. ##BDo not bot##b, this means you are not allowed to perform any AFK (away from keyboard) activity, apart from standing idle."),
- l("2. ##BDo not use offensive/rude language##b in the chats or in your character(s) name(s)."),
- l("3. ##BDo not spam/flood other players.##b This includes chat spam and spam by trade requests."),
- l("4. ##BSpeak only English in public areas.##b You can speak whatever language you want through whispers or whenever everyone in the area can speak said language."),
- l("5. ##BDo not beg others##b for money, items or favours of any kind. If you want to ask for something, do it politely and only once. Try not to annoy other players."),
- l("6. ##BFollow the [@@http://wiki.evolonline.org/rules/esc|ESC@@]##b (Evol Social Convention)."),
- l("7. ##BDo not multibox.##b You are not allowed to engage in combat while controlling more than one character at a time.");
+ narrator 4,
+ l("There is a paper with some rules written on it.");
+
+ GameRules 8 | 4;
mesn;
mesq l("Oh, and I almost forgot! Do not give the password of your room to anybody! I am the only one who has the other key and I won't ask for yours so keep it secret and try not to use the same password for any other room in the future.");
next;
mesq l("If you want to read this page again, there is a copy up on the left wall.");
next;
+ mesq l("You can also read The Book of Laws at any time to see the rules.");
+ next;
mesq l("I think I'm done with that now. Do you have any questions?");
next;
diff --git a/npc/000-2-0/note.txt b/npc/000-2-0/note.txt
index 2e6a9a8e..4152fbd0 100644
--- a/npc/000-2-0/note.txt
+++ b/npc/000-2-0/note.txt
@@ -3,34 +3,21 @@
// Qwerty Dragon
// Reid
// WildX
+// gumi
// Description:
// A small note presenting the 6 main rules of Evol Online.
000-2-0,29,25,0 script Note NPC_PAPER_NOTE,{
- mesn "Narrator";
- mes col(l("There is a paper with some rules written on it."), 9);
- next;
- mesq col(l("1. ##BDo not bot##b, this means you are not allowed to perform any AFK (away from keyboard) activity, apart from standing idle."), 9);
- next;
- mesq col(l("2. ##BDo not use offensive/rude language##b in the chats or in your character(s) name(s)."), 9);
- next;
- mesq col(l("3. ##BDo not spam/flood other players.##b This includes chat spam and spam by trade requests."), 9);
- next;
- mesq col(l("4. ##BSpeak only English in public areas.##b You can speak whatever language you want through whispers or whenever everyone in the area can speak said language."), 9);
- next;
- mesq col(l("5. ##BDo not beg others##b for money, items or favours of any kind. If you want to ask for something, do it politely and only once. Try not to annoy other players."), 9);
- next;
- mesq col(l("6. ##BFollow the [@@http://wiki.evolonline.org/rules/esc|ESC@@]##b (Evol Social Convention)."), 9);
- next;
- mesq col(l("7. ##BDo not multibox.##b You are not allowed to engage in combat while controlling more than one character at a time."), 9);
- next;
- mes col(l("Following these lines are some other writings on this paper."), 9);
- next;
- mesq col(l("Do not give the password of your room to anybody! Keep it secret and try not to use the same one in any other room in the future. - Julia"), 9);
- next;
- mesq col(l("Does anyone know a good place to hang out in Esperia? - M. Arpan"), 9);
- next;
- mes col(l("Other things are written but are not legible anymore."), 9);
+ narrator 4,
+ l("There is a paper with some rules written on it.");
+
+ GameRules 8 | 4;
+
+ narrator 8,
+ l("Following these lines are some other writings on this paper."),
+ l("Do not give the password of your room to anybody! Keep it secret and try not to use the same one in any other room in the future. - Julia"),
+ l("Does anyone know a good place to hang out in Esperia? - M. Arpan"),
+ l("Other things are written but are not legible anymore.");
close;
diff --git a/npc/001-2-21/note.txt b/npc/001-2-21/note.txt
index aaa2159c..ad5aa62e 100644
--- a/npc/001-2-21/note.txt
+++ b/npc/001-2-21/note.txt
@@ -3,34 +3,21 @@
// Qwerty Dragon
// Reid
// WildX
+// gumi
// Description:
// A small note presenting the 6 main rules of Evol Online.
001-2-21,29,25,0 script Note#Artis NPC_PAPER_NOTE,{
- mesn "Narrator";
- mes col(l("There is a paper with some rules written on it."), 9);
- next;
- mesq col(l("1. ##BDo not bot##b, this means you are not allowed to perform any AFK (away from keyboard) activity, apart from standing idle."), 9);
- next;
- mesq col(l("2. ##BDo not use offensive/rude language##b in the chats or in your character(s) name(s)."), 9);
- next;
- mesq col(l("3. ##BDo not spam/flood other players.##b This includes chat spam and spam by trade requests."), 9);
- next;
- mesq col(l("4. ##BSpeak only English in public areas.##b You can speak whatever language you want through whispers or whenever everyone in the area can speak said language."), 9);
- next;
- mesq col(l("5. ##BDo not beg others##b for money, items or favours of any kind. If you want to ask for something, do it politely and only once. Try not to annoy other players."), 9);
- next;
- mesq col(l("6. ##BFollow the [@@http://wiki.evolonline.org/rules/esc|ESC@@]##b (Evol Social Convention)."), 9);
- next;
- mesq col(l("7. ##BDo not multibox.##b You are not allowed to engage in combat while controlling more than one character at a time."), 9);
- next;
- mes col(l("Following these lines are some other writings on this paper."), 9);
- next;
- mesq col(l("Do not give the password of your room to anybody! Keep it secret and try not to use the same one in any other room in the future. - Julia"), 9);
- next;
- mesq col(l("Does anyone know a good place to hang out in Esperia? - M. Arpan"), 9);
- next;
- mes col(l("Other things are written but are not legible anymore."), 9);
+ narrator 4,
+ l("There is a paper with some rules written on it.");
+
+ GameRules 8 | 4;
+
+ narrator 8,
+ l("Following these lines are some other writings on this paper."),
+ l("Do not give the password of your room to anybody! Keep it secret and try not to use the same one in any other room in the future. - Julia"),
+ l("Does anyone know a good place to hang out in Esperia? - M. Arpan"),
+ l("Other things are written but are not legible anymore.");
close;
diff --git a/npc/001-2-28/note.txt b/npc/001-2-28/note.txt
index 66329a46..2ed051d7 100644
--- a/npc/001-2-28/note.txt
+++ b/npc/001-2-28/note.txt
@@ -3,19 +3,17 @@
// Qwerty Dragon
// Reid
// WildX
+// gumi
// Description:
// A small note presenting the 7 main rules of Evol Online.
001-2-28,36,28,0 script Note#001-2-28 NPC_PAPER_NOTE,{
- narrator
- l("There is a paper with some rules written on it."),
- l("1. ##BDo not bot##b, this means you are not allowed to perform any AFK (away from keyboard) activity, apart from standing idle."),
- l("2. ##BDo not use offensive/rude language##b in the chats or in your character(s) name(s)."),
- l("3. ##BDo not spam/flood other players.##b This includes chat spam and spam by trade requests."),
- l("4. ##BSpeak only English in public areas.##b You can speak whatever language you want through whispers or whenever everyone in the area can speak said language."),
- l("5. ##BDo not beg others##b for money, items or favours of any kind. If you want to ask for something, do it politely and only once. Try not to annoy other players."),
- l("6. ##BFollow the [@@http://wiki.evolonline.org/rules/esc|ESC@@]##b (Evol Social Convention)."),
- l("7. ##BDo not multibox.##b You are not allowed to engage in combat while controlling more than one character at a time."),
+ narrator 4,
+ l("There is a paper with some rules written on it.");
+
+ GameRules 8 | 4;
+
+ narrator 8,
l("Following these lines are some other writings on this paper."),
l("Do not give the password of your room to anybody! Keep it secret and try not to use the same one in any other room in the future. - Jenna");
diff --git a/npc/001-2-4/_import.txt b/npc/001-2-4/_import.txt
index 14bf4c53..70c629cc 100644
--- a/npc/001-2-4/_import.txt
+++ b/npc/001-2-4/_import.txt
@@ -1,6 +1,7 @@
// Map 001-2-4: Library
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/001-2-4/_warps.txt",
+"npc/001-2-4/books.txt",
"npc/001-2-4/mapflags.txt",
"npc/001-2-4/robin.txt",
"npc/001-2-4/terry.txt",
diff --git a/npc/001-2-4/books.txt b/npc/001-2-4/books.txt
new file mode 100644
index 00000000..068bfe2a
--- /dev/null
+++ b/npc/001-2-4/books.txt
@@ -0,0 +1,15 @@
+// Evol scripts.
+// Authors:
+// gumi
+// Description:
+// moar books
+
+001-2-4,28,29,0 script #001-2-4-Book1 NPC_NO_SPRITE,{
+
+ doevent "@rules::OnShelfUse";
+ close;
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 1;
+}
diff --git a/npc/001-2-4/robin.txt b/npc/001-2-4/robin.txt
index 8e085d45..6e1bed60 100644
--- a/npc/001-2-4/robin.txt
+++ b/npc/001-2-4/robin.txt
@@ -25,50 +25,34 @@
return;
}
- function mythologise_people
- {
- npctalkonce l("In Artis they really do mythologise people when they die.");
-
- return;
- }
-
- function no_matter_what
- {
- npctalkonce l("No matter what people tell you, words and ideas can change the world.");
-
- return;
- }
-
- function outside_inside
- {
- npctalkonce l("What counts in a book is like so many things, not what is on the outside, but what is on the inside.");
- return;
- }
-
- function kaizei_manuscripts
- {
- npctalkonce l("An explorer left behind some incomplete manuscripts about the people and dangers in the land of Kaizei.");
-
- return;
- }
-
- switch (rand(5))
+ switch (rand(6))
{
case 0:
- no_matter_what();
+ npctalkonce l("No matter what people tell you, words and ideas can change the world.");
break;
case 1:
- mythologise_people();
+ npctalkonce l("In Artis they really do mythologize people when they die.");
break;
case 2:
- outside_inside();
+ npctalkonce l("What counts in a book is like so many things, not what is on the outside, but what is on the inside.");
break;
case 3:
- kaizei_manuscripts();
+ npctalkonce l("An explorer left behind some incomplete manuscripts about the people and dangers in the land of Kaizei.");
break;
case 4:
- need_help();
+ speech 4,
+ l("Ow-oh!"),
+ l("Introduce yourself instead of poking me around. I almost fell from the lader, savage...");
+
+ setcamnpc "#001-2-4-Book1";
+
+ speech 8,
+ l("Go have a look at that shelf to my right, would you?"),
+ l("You clearly need to be more public-spirited.");
+ break;
+ default:
+ need_help;
break;
}
diff --git a/npc/001-2-5/books.txt b/npc/001-2-5/books.txt
index a06c36e7..bb2db7b3 100644
--- a/npc/001-2-5/books.txt
+++ b/npc/001-2-5/books.txt
@@ -13,7 +13,7 @@
l("You can select a specific person with the [N] key, and then, press the [T] key when you are surrounded by more than one person."),
l("You can also simply talk to any citizen around you by clicking on them."),
l("Nevertheless, you can talk with another adventurer by pressing the [Enter] key and then type what you want to say!"),
- l("If you want to say something to a specific player, you can type \"\\query Playername\" or \"\\whisper Playername message\", this will create a new tab on your chat window.");
+ l("If you want to say something to a specific player, you can type \"/query Playername\" or \"/whisper Playername message\", this will create a new tab on your chat window.");
}
OnShelfUse:
diff --git a/npc/functions/game-rules.txt b/npc/functions/game-rules.txt
new file mode 100644
index 00000000..6775ee7d
--- /dev/null
+++ b/npc/functions/game-rules.txt
@@ -0,0 +1,59 @@
+// Evol scripts.
+// Authors:
+// Qwerty Dragon
+// Reid
+// WildX
+// gumi
+// Description:
+// 7 main rules of Evol Online.
+
+function script GameRules {
+ if (checkweight(BookOfLaws, 1) == true && countitem(BookOfLaws) < 1)
+ getitem BookOfLaws, 1; // give the book if the player lost it
+
+ narrator getarg(0, 0),
+ l("1. ##BDo not bot##b, this means you are not allowed to perform any AFK (away from keyboard) activity, apart from standing idle."),
+ l("2. ##BDo not use offensive/rude language##b in the chats or in your character(s) name(s)."),
+ l("3. ##BDo not spam/flood other players.##b This includes chat spam and spam by trade requests."),
+ l("4. ##BSpeak only English in public areas.##b You can speak whatever language you want through whispers or whenever everyone in the area can speak said language."),
+ l("5. ##BDo not beg others##b for money, items or favours of any kind. If you want to ask for something, do it politely and only once. Try not to annoy other players."),
+ l("6. ##BFollow the [@@http://wiki.evolonline.org/rules/esc|ESC@@]##b (Evol Social Convention)."),
+ l("7. ##BDo not multibox.##b You are not allowed to engage in combat while controlling more than one character at a time.");
+ return;
+}
+
+
+- script @rules 32767,{
+ end;
+
+ function read_book {
+ narrator 5 | 1,
+ l("This book outlines the laws of every city and holding in Gasaron"),
+ l("The first page contains the universal rules that have been agreed upon throughout the land.");
+
+ GameRules 8 | 4;
+
+ narrator 8,
+ l("The next page begins to list the complex trading laws of the City of Esperia"),
+ l("All this seems unimportant to you right now.");
+ close;
+ }
+
+OnCall:
+ GameRules;
+ close;
+
+OnUseBook:
+ if (openbook(.book_name$))
+ read_book;
+ bye;
+
+OnShelfUse:
+ if (openbookshelf(.book_name$))
+ read_book;
+ bye;
+
+OnInit:
+ .book_name$ = "The Book of Laws";
+ bindatcmd "rules", "@rules::OnCall", 0, 2, 0;
+}
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index b71fb339..7a2ea64d 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -89,6 +89,7 @@ function script strip {
// 0x1 -- blank line at beginning
// 0x2 -- blank line at the end
// 0x4 -- use last "next;"
+// 0x8 -- don't use first "mesn;"
function script narrator {
.@start = 0;
.@argc = getargcount();
@@ -103,7 +104,9 @@ function script narrator {
if (.@flags & 0x1)
mes "";
- mesn l("Narrator");
+ if (!(.@flags & 0x8))
+ mesn l("Narrator");
+
for (.@i = .@start; .@i < .@argc; .@i++)
{
mes col(getarg(.@i), 9);
diff --git a/npc/functions/openbook.txt b/npc/functions/openbook.txt
index 29074bf1..8e7be072 100644
--- a/npc/functions/openbook.txt
+++ b/npc/functions/openbook.txt
@@ -7,24 +7,24 @@
// @book_name$ = The name of the book to read.
function script openbook {
- .@book_name$ = "\"" + l(@book_name$) + "\"";
+ .@book_name$ = "\"" + l(getarg(0, @book_name$)) + "\"";
narrator 4,
l("You open a book named @@.", .@book_name$),
l("Do you want to read it?");
- return (select ("Yes.", "No.") == 1);
+ return (select ("Yes.", "No.") == 1);
}
function script openbookshelf {
- .@book_name$ = "\"" + l(@book_name$) + "\"";
+ .@book_name$ = "\"" + l(getarg(0, @book_name$)) + "\"";
narrator 4,
l("You see a dust covered book on the shelf..."),
l("The name of the book is @@.", .@book_name$),
l("Do you want to read it?");
- return (select ("Yes.", "No.") == 1);
+ return (select ("Yes.", "No.") == 1);
}
function script openoldbook {
@@ -32,5 +32,5 @@ function script openoldbook {
l("You open the book, but it looks like the sea water and time damaged it severely. Some pages are not readable anymore. Some others are simply missing."),
l("The old book seems to tell about the legend of Aemil. Would you like to read it?");
- return (select ("Yes.", "No.") == 1);
+ return (select ("Yes.", "No.") == 1);
}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 5c4984e4..f1c91046 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -34,6 +34,7 @@
"npc/functions/string.txt",
"npc/functions/time.txt",
"npc/functions/asklanguage.txt",
+"npc/functions/game-rules.txt",
// quest debug
"npc/functions/quest-debug/functions.txt",