diff options
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/game-rules.txt | 59 | ||||
-rw-r--r-- | npc/functions/main.txt | 5 | ||||
-rw-r--r-- | npc/functions/openbook.txt | 10 |
3 files changed, 68 insertions, 6 deletions
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); } |