summaryrefslogtreecommitdiff
path: root/Npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-04-01 22:41:51 -0300
committerJesusaves <cpntb1@ymail.com>2018-04-01 22:43:21 -0300
commit9d40453aa4ec81aed8083c3aeff2863fa6bb39bb (patch)
tree6493ea2bc90d6566cef122ae59c8eb7805bb28d2 /Npc
parentf4112e4220c1cb5478431893a3451d6016581492 (diff)
downloadart-9d40453aa4ec81aed8083c3aeff2863fa6bb39bb.tar.gz
art-9d40453aa4ec81aed8083c3aeff2863fa6bb39bb.tar.bz2
art-9d40453aa4ec81aed8083c3aeff2863fa6bb39bb.tar.xz
art-9d40453aa4ec81aed8083c3aeff2863fa6bb39bb.zip
Receive Hurnscald from server data
Diffstat (limited to 'Npc')
-rw-r--r--Npc/008-1/_import.txt8
-rw-r--r--Npc/008-1/_mobs.txt15
-rw-r--r--Npc/008-1/_warps.txt13
-rw-r--r--Npc/008-1/confused-tree.txt957
-rw-r--r--Npc/008-1/doors.txt6
-rw-r--r--Npc/008-1/mapflags.txt1
-rw-r--r--Npc/008-1/wateranimation.txt9
-rw-r--r--Npc/008-2-0/_import.txt5
-rw-r--r--Npc/008-2-0/_savepoints.txt11
-rw-r--r--Npc/008-2-0/_warps.txt4
-rw-r--r--Npc/008-2-0/mapflags.txt1
-rw-r--r--Npc/008-2-1/_import.txt5
-rw-r--r--Npc/008-2-1/_savepoints.txt11
-rw-r--r--Npc/008-2-1/_warps.txt4
-rw-r--r--Npc/008-2-1/mapflags.txt1
-rw-r--r--Npc/008-2-10/_import.txt4
-rw-r--r--Npc/008-2-10/_warps.txt4
-rw-r--r--Npc/008-2-10/mapflags.txt1
-rw-r--r--Npc/008-2-11/_import.txt5
-rw-r--r--Npc/008-2-11/_savepoints.txt20
-rw-r--r--Npc/008-2-11/_warps.txt3
-rw-r--r--Npc/008-2-11/mapflags.txt1
-rw-r--r--Npc/008-2-12/_import.txt4
-rw-r--r--Npc/008-2-12/_warps.txt4
-rw-r--r--Npc/008-2-12/mapflags.txt1
-rw-r--r--Npc/008-2-13/_import.txt5
-rw-r--r--Npc/008-2-13/_savepoints.txt38
-rw-r--r--Npc/008-2-13/_warps.txt4
-rw-r--r--Npc/008-2-13/mapflags.txt1
-rw-r--r--Npc/008-2-14/_import.txt5
-rw-r--r--Npc/008-2-14/_savepoints.txt11
-rw-r--r--Npc/008-2-14/_warps.txt3
-rw-r--r--Npc/008-2-14/mapflags.txt1
-rw-r--r--Npc/008-2-2/_import.txt4
-rw-r--r--Npc/008-2-2/_warps.txt6
-rw-r--r--Npc/008-2-2/mapflags.txt1
-rw-r--r--Npc/008-2-3/_import.txt4
-rw-r--r--Npc/008-2-3/_warps.txt3
-rw-r--r--Npc/008-2-3/mapflags.txt1
-rw-r--r--Npc/008-2-4/_import.txt5
-rw-r--r--Npc/008-2-4/_savepoints.txt11
-rw-r--r--Npc/008-2-4/_warps.txt3
-rw-r--r--Npc/008-2-4/mapflags.txt1
-rw-r--r--Npc/008-2-5/_import.txt4
-rw-r--r--Npc/008-2-5/_warps.txt3
-rw-r--r--Npc/008-2-5/mapflags.txt1
-rw-r--r--Npc/008-2-6/_import.txt4
-rw-r--r--Npc/008-2-6/_warps.txt3
-rw-r--r--Npc/008-2-6/mapflags.txt1
-rw-r--r--Npc/008-2-7/_import.txt5
-rw-r--r--Npc/008-2-7/_savepoints.txt11
-rw-r--r--Npc/008-2-7/_warps.txt3
-rw-r--r--Npc/008-2-7/mapflags.txt1
-rw-r--r--Npc/008-2-8/_import.txt4
-rw-r--r--Npc/008-2-8/_warps.txt3
-rw-r--r--Npc/008-2-8/mapflags.txt1
-rw-r--r--Npc/008-2-9/_import.txt5
-rw-r--r--Npc/008-2-9/_savepoints.txt11
-rw-r--r--Npc/008-2-9/_warps.txt3
-rw-r--r--Npc/008-2-9/mapflags.txt1
60 files changed, 1269 insertions, 0 deletions
diff --git a/Npc/008-1/_import.txt b/Npc/008-1/_import.txt
new file mode 100644
index 00000000..b7797bf0
--- /dev/null
+++ b/Npc/008-1/_import.txt
@@ -0,0 +1,8 @@
+// Map 008-1: Hurnscald
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-1/_mobs.txt",
+"npc/008-1/_warps.txt",
+"npc/008-1/confused-tree.txt",
+"npc/008-1/doors.txt",
+"npc/008-1/mapflags.txt",
+"npc/008-1/wateranimation.txt",
diff --git a/Npc/008-1/_mobs.txt b/Npc/008-1/_mobs.txt
new file mode 100644
index 00000000..e8835c09
--- /dev/null
+++ b/Npc/008-1/_mobs.txt
@@ -0,0 +1,15 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-1: Hurnscald mobs
+008-1,99,39,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,100,42,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,102,40,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,105,41,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,101,44,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,104,43,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,109,40,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,108,42,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,106,44,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,109,44,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,111,42,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,112,44,0,0 monster Manana Tree 1017,1,420000,240000
+008-1,112,39,0,0 monster Manana Tree 1017,1,420000,240000
diff --git a/Npc/008-1/_warps.txt b/Npc/008-1/_warps.txt
new file mode 100644
index 00000000..44b0db66
--- /dev/null
+++ b/Npc/008-1/_warps.txt
@@ -0,0 +1,13 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-1: Hurnscald warps
+008-1,105,76,0 warp #008-1_105_76 0,0,008-2-0,26,23
+008-1,102,79,0 warp #008-1_102_79 0,0,008-2-0,23,34
+008-1,88,71,0 warp #008-1_88_71 0,0,008-2-1,33,42
+008-1,90,66,0 warp #008-1_90_66 0,0,008-2-1,38,27
+008-1,65,55,0 warp #008-1_65_55 0,0,008-2-2,28,33
+008-1,89,58,0 warp #008-1_89_58 0,0,008-2-6,27,32
+008-1,101,55,0 warp #008-1_101_55 0,0,008-2-7,36,28
+008-1,121,71,0 warp #008-1_121_71 1,0,008-2-8,36,38
+008-1,72,68,0 warp #008-1_72_68 0,0,008-2-9,30,34
+008-1,102,69,0 warp #008-1_102_69 0,0,008-2-10,37,33
+008-1,110,56,0 warp #008-1_110_56 0,0,008-2-12,30,31
diff --git a/Npc/008-1/confused-tree.txt b/Npc/008-1/confused-tree.txt
new file mode 100644
index 00000000..22d415e4
--- /dev/null
+++ b/Npc/008-1/confused-tree.txt
@@ -0,0 +1,957 @@
+// Evol scripts.
+// Author:
+// gumi
+// Based on CrazyTree, originally made by:
+// gumi
+// pclouds
+// veryape
+// wushin
+// Description:
+// emulated confused tree prototype
+
+// ~t lowercase hot word regex
+
+008-1,84,63,0 script Confused Tree NPC_CONFUSED_TREE,14,14,{
+
+ function tree_panel {
+ if (!is_staff() && #Tree_Trusted == false)
+ {
+ narrator(l("You see a tree."));
+ if (getq(HurnscaldQuests_Inspector) == 2)
+ {
+ select(
+ l("Have you seen anything strange lately?"),
+ l("Do you know anything about the recent robberies?"));
+
+ narrator(S_FIRST_BLANK_LINE,
+ l("..."),
+ l("It doesn't reply."));
+ }
+ close;
+ }
+
+ function clear_db {
+ clear();
+ mes(l("##BWARNING:##b you are about to permanently empty the quote database."));
+ next();
+ mes(l("Do you want to continue?"));
+
+ select(
+ l("Abort!"),
+ l("Empty the quote DB"));
+
+ if (@menu == 2)
+ {
+ .@sentence$ = "I am an idiot";
+ mes(l("Please write the following sentence:"));
+ mes("");
+ mesf(" ##B%s.", .@sentence$);
+ input(.@confirm$);
+
+ if (!startswith(strtoupper(.@confirm$), strtoupper(.@sentence$))) {
+ mes(l("Invalid!"));
+ close;
+ }
+
+ query_sql("TRUNCATE TABLE tree_quotes;");
+ mes(l("Database erased."));
+ next();
+ }
+
+ return;
+ }
+
+ function list_commands {
+ clear();
+ mes(l("To grab a quote:"));
+ mes(col(" ~grab ##Bplayer name##b", 7));
+ next();
+ mes(l("To get a quote:"));
+ mes(col(" ~quote anyone", 7));
+ mes(col(" ~quote ##Bplayer name##b", 7));
+ mes(col(" ~quote ##B#number##b", 7));
+ next();
+ mes(l("To remove a quote:"));
+ mes(col(" ~remove quote ##B#number##b", 7));
+ mes(col(" ~remove last quote", 7));
+ next();
+ mes(l("Last seen:"));
+ mes(col(" ~seen ##Bplayer name##b", 7));
+ next();
+ mes(l("To ignore a player:"));
+ mes(col(" ~ignore ##Bplayer name##b", 7));
+ next();
+ mes(l("To unignore a player:"));
+ mes(col(" ~unignore ##Bplayer name##b", 7));
+ next();
+
+ if (is_admin())
+ {
+ mes(l("To trust a player:"));
+ mes(col(" ~trust ##Bplayer name##b", 7));
+ next();
+ mes(l("To de-trust a player:"));
+ mes(col(" ~untrust ##Bplayer name##b", 7));
+ next();
+ }
+ return;
+ }
+
+ do
+ {
+ clear();
+ setnpcdialogtitle(l("Tree Control Panel"));
+ mes(l("Oh noes! You found my secret backdoor!"));
+ next();
+ mes(l("Please select an option:"));
+
+ select(
+ l("List the commands"),
+ rif(is_admin(), l("Empty the quote DB")),
+ l("Dance for me"));
+
+ switch (@menu)
+ {
+ case 1: list_commands(); break;
+ case 2: clear_db(); break;
+ default: speech(l("Too lazy.")); close;
+ }
+
+ } while (true);
+
+ end;
+ }
+
+ // utility functions below
+
+ function check_is_ignored {
+ .@val = htget(.ignore_ht, strcharinfo(PC_NAME), 0);
+
+ if (.@val > gettimetick(2))
+ {
+ ++.ignored_times;
+ end;
+ }
+
+ else if (.@val > 0)
+ {
+ htput(.ignore_ht, strcharinfo(PC_NAME), 0); // remove expired entries
+ }
+
+ return;
+ }
+
+ function special_name {
+ .@name$ = strcharinfo(PC_NAME);
+ .@low$ = strtolower(.@name$);
+
+ if (rand(.sname_rate) == 0)
+ {
+ for (.@i = 0; .@i < .alias; .@i += 2)
+ {
+ if (.@low$ ~= .alias$[.@i])
+ {
+ explode(.@aliases$, .alias$[.@i+1], "`");
+ .@name$ = .@aliases$[rand(getarraysize(.@aliases$))];
+ break;
+ }
+ }
+ }
+
+ return .@name$;
+ }
+
+ function face {
+ if (gettimetick(2) - .last_emote < .emote_rate)
+ {
+ ++.ignored_times;
+ return;
+ }
+
+ .last_emote = gettimetick(2);
+ return emotion(getarg(0, E_SURPRISE));
+ }
+
+ function rp {
+ // used for queries
+ return replacestr(getarg(0,""), "~t", strtolower("(?:" + .name$ + "|" + .hotwords$ + ")"));
+ }
+
+ function format_reply {
+ // used for replies
+ .@str$ = getarg(0, "");
+
+ // search for {{mustaches}}
+ while (.@str$ ~= "{{([^}]+)}}")
+ {
+ .@sub$ = replacestr($@regexmatch$[1], " ", ""); // remove whitespaces
+ .@sub$ = strtolower(.@sub$); // always lowercase the var name
+ .@capitalize = .@titlecase = .@allcaps = false;
+
+ if (charat(.@sub$, 0) == "^")
+ {
+ .@capitalize = true;
+ .@sub$ = substr(.@sub$, 1, getstrlen(.@sub$) - 1); // strip first char
+ }
+
+ else if (charat(.@sub$, 0) == "+")
+ {
+ .@titlecase = true;
+ .@sub$ = substr(.@sub$, 1, getstrlen(.@sub$) - 1); // strip first char
+ }
+
+ else if (charat(.@sub$, 0) == "!")
+ {
+ .@allcaps = true;
+ .@sub$ = substr(.@sub$, 1, getstrlen(.@sub$) - 1); // strip first char
+ }
+
+ explode(.@sub2$, .@sub$, ",");
+ .@sub$ = .@sub2$[rand(getarraysize(.@sub2$))]; // allow to have multiple variables
+
+ .@rep$ = getd(sprintf(".D_%s$[%i]", .@sub$, rand(getd(".D_" + .@sub$)))); // get he value
+
+ if (.@capitalize) .@rep$ = capitalize(.@rep$);
+ else if (.@titlecase) .@rep$ = titlecase(.@rep$);
+ else if (.@allcaps) .@rep$ = strtoupper(.@rep$);
+
+ .@str$ = replacestr(.@str$, $@regexmatch$[0], .@rep$); // remove the mustache, replace by value
+ }
+
+ // search for emotes
+ if (.@str$ ~= "%%([^ ])")
+ {
+ // only handling a few of them
+ switch (ord($@regexmatch$[1]))
+ {
+ case 73: face(any(E_WINK, E_ANGEL)); break;
+ case 83: face(any(E_SAD, E_CRYING)); break;
+ case 85: face(E_SURPRISE); break;
+ case 93: face(any(E_HEARTEYE, E_HEART)); break;
+ case 94: face(E_DISGUST); break;
+ case 99: face(E_DEAD); break;
+ case 105: face(E_CRYING); break;
+ case 106:
+ case 91: face(any(E_SPEECH, E_BLAH)); break;
+ case 107: face(E_INSULTBUBBLE); break;
+ default: .@unhandled = true;
+ }
+
+ if (.@unhandled != true)
+ {
+ if (.@str$ == $@regexmatch$[0]) end; // don't send handled, emote-only messages
+ .@str$ = replacestr(.@str$, " "+ $@regexmatch$[0], ""); // otherwise strip the emote
+ }
+ }
+
+ // built-in variables
+ .@str$ = replacestr(.@str$, "~n", .name$); // npc name
+ .@str$ = replacestr(.@str$, "~p", special_name()); // player name or special name
+ .@str$ = replacestr(.@str$, "~P", strcharinfo(PC_NAME)); // unaltered player name
+
+ return rp(.@str$);
+ }
+
+ function strip_colors {
+ .@str$ = replacestr(getarg(0, ""), "##0", "");
+ .@str$ = replacestr(.@str$, "##1", "");
+ .@str$ = replacestr(.@str$, "##2", "");
+ .@str$ = replacestr(.@str$, "##3", "");
+ .@str$ = replacestr(.@str$, "##4", "");
+ .@str$ = replacestr(.@str$, "##5", "");
+ .@str$ = replacestr(.@str$, "##6", "");
+ .@str$ = replacestr(.@str$, "##7", "");
+ .@str$ = replacestr(.@str$, "##8", "");
+ .@str$ = replacestr(.@str$, "##9", "");
+ return replacestr(.@str$, "##a", "");
+ }
+
+ function strip_formatting {
+ .@str$ = strip_colors(getarg(0, ""));
+ .@str$ = replacestr(.@str$, "##B", "");
+ return replacestr(.@str$, "##b", "");
+ }
+
+ function delayed_reply {
+ ++.answered_times;
+ @tree_reply$ = getarg(0, "");
+ addtimer(.delay_reply, .name$ + "::OnDoReply");
+ return;
+ }
+
+ function reply {
+ .@reply$ = format_reply(getarg(0, ""));
+ getmapxy(.@pc_map$, .@pc_x, .@pc_y, UNITTYPE_PC); // get char location
+
+ if (((.@reply$ == .last_reply$ && gettimetick(2) - .last_reply < .repeat_rate)
+ || gettimetick(2) - .last_reply < .talk_rate
+ || (gettimetick(2) - .blocked < .block_time && is_staff() == false)
+ || .@pc_map$ != .map$
+ || distance(.x, .y, .@pc_x, .@pc_y) > .distance
+ || .@reply$ == "")
+ && is_gm() == false)
+ {
+ ++.ignored_times;
+ return;
+ }
+
+ .last_reply = gettimetick(2);
+ .last_reply$= .@reply$;
+
+ delayed_reply(.@reply$);
+ return;
+ }
+
+ function seen_me {
+ if (playerattached() > 0 && htexists(.seen_ht))
+ {
+ htput(.seen_ht, strcharinfo(PC_NAME), gettimetick(2));
+ }
+ return;
+ }
+
+ function have_you_seen {
+ .@player$ = getarg(0, "");
+ .@player = getcharid(CHAR_ID_ACCOUNT, .@player$);
+
+ if (.@player > 0)
+ {
+ // nested if, because they don't short-circuit
+ if (checkoption(Option_Invisible, .@player) == false) {
+ delayed_reply(sprintf("Player `%s` is currently online.", .@player$));
+ end;
+ }
+ }
+
+ .@time = htget(.seen_ht, .@player$, 0);
+
+ if (.@time < 1)
+ delayed_reply(sprintf("I haven't seen player `%s` today.", .@player$));
+
+ else
+ delayed_reply(sprintf("Player `%s` was last seen %s.", .@player$, FuzzyTime(.@time)));
+
+ end;
+ }
+
+ function special_drops {
+ .@drop$ = .drops$[rand(.drops)];
+ .@name$ = strcharinfo(PC_NAME);
+ .@low$ = strtolower(.@name$);
+
+ if (rand(.sdrop_rate) == 0)
+ {
+ for (.@i = 0; .@i < .sdrops; .@i += 2)
+ {
+ if (.@low$ ~= .sdrops$[.@i])
+ {
+ explode(.@d$, .sdrops$[.@i+1], "`");
+ .@drop$ = .@d$[rand(getarraysize(.@d$))];
+ break;
+ }
+ }
+ }
+
+ return .@drop$;
+ }
+
+ function roll_dice {
+ .@dices = max(min(getarg(0, 1), 8), 1); // 1..8
+ .@sides = max((getarg(1, 6) < 1 ? 6 : getarg(1, 6)), 1); // 1..MAX_INT
+
+ .@result$ = sprintf("*rolls the dice%s: %d",
+ rif(.@dices > 1, "s"), rand(1, .@sides)); // first dice
+
+ for (.@d = 1; .@d < .@dices; ++.@d)
+ {
+ .@result$ += ", " + rand(1, .@sides);
+ }
+
+ return .@result$ + ".*";
+ }
+
+ function flip_coin {
+ .@coins = getarg(0, 1);
+
+ .@result$ = sprintf("*flips the coin%s: %s",
+ rif(.@coins > 1, "s"), (rand(2) == 1 ? "heads" : "tails")); // first coin
+
+ for (.@c = 1; .@c < .@coins; ++.@c)
+ {
+ .@result$ += ", " + (rand(2) == 1 ? "heads" : "tails");
+ }
+
+ return .@result$ + ".*";
+ }
+
+ function roulette {
+ if (.roulette == 1)
+ {
+ npctalk("*pulls the trigger: *##BBANG##b*.*");
+ delayed_reply("*reloads and spins the chambers.*");
+ .roulette = rand(1, 7); // the Nagant_M1895 has 7 chambers
+
+ // now the fun part
+ nude();
+ percentheal(-100, 0);
+ }
+
+ else
+ {
+ delayed_reply("*pulls the trigger: *click*.*");
+ .roulette = (.roulette == 7 ? 1 : .roulette + 1);
+ }
+
+ end;
+ }
+
+ function monologue_player {
+ return sprintf("Your current monologue is at least %d line%s long.",
+ @monologue, rif(@monologue != 1, "s"));
+ }
+
+ function who_player {
+ return sprintf("You seem to be ##B~P##b [%i:%i].",
+ getcharid(CHAR_ID_ACCOUNT), getcharid(CHAR_ID_CHAR));
+ }
+
+ function make_quote_table {
+ // Do not modify this
+ query_sql("CREATE TABLE IF NOT EXISTS `tree_quotes` ("
+ " `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,"
+ " `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',"
+ " `grabber` INT(11) UNSIGNED NOT NULL DEFAULT '0',"
+ " `timestamp` INT(10) UNSIGNED NOT NULL DEFAULT '0',"
+ " `message` VARCHAR(150) NOT NULL DEFAULT '',"
+ " PRIMARY KEY (`id`),"
+ " KEY `char_id` (`char_id`),"
+ " KEY `grabber` (`grabber`)"
+ ") ENGINE=MyISAM;");
+
+ .last_query = gettimetick(2);
+ return;
+ }
+
+ function grab_quote {
+ .@name$ = getarg(0, "");
+
+ if (gettimetick(2) - .last_query < (is_staff() ? .qpoll_rate : .qpoll_rate2))
+ {
+ ++.ignored_times;
+ end;
+ }
+
+ if (.@name$ == strcharinfo(PC_NAME))
+ {
+ delayed_reply("##BError: You may not grab yourself.");
+ end;
+ }
+
+ explode(.@tmp$[0], htget(.msg_ht, .@name$, ""), ":"); // get last message, if any
+ htput(.msg_ht, .@name$, ""); // ensure you can't grab twice the same message
+
+ .@char_id = atoi(.@tmp$[0]); // grab the char id part
+
+ if (.@char_id < 1)
+ {
+ delayed_reply(sprintf("##BError: I couldn't find anything to grab from player `%s`.", .@name$));
+ end;
+ }
+
+ .@msg$ = implode(.@tmp$, ":"); // put it back together
+ .@start = getstrlen(.@tmp$[0]) + getstrlen(.@tmp$[1]) + 2; // char:time:msg <= we just want the msg part
+ .@msg$ = escape_sql(strip_formatting(substr(.@msg$, .@start, getstrlen(.@msg$) - 1))); // sanitize
+
+ if (.@msg$ == "")
+ {
+ delayed_reply("##BError: Message is empty or malformed. It cannot be grabbed.");
+ end;
+ }
+
+ else if (.@msg$ ~= "^[!#~@]?(?:grab)?shield(?:ed)?(?:[:.!]? .*)?$")
+ {
+ delayed_reply("##BError: Message is shielded.");
+ end;
+ }
+
+ query_sql(sprintf("INSERT INTO tree_quotes (char_id,grabber,timestamp,message) VALUES (%i,%i,%i,'%s');",
+ .@char_id, getcharid(CHAR_ID_CHAR), gettimetick(2), .@msg$));
+
+ query_sql("SELECT MAX(id) FROM tree_quotes;", .q_last_id); // get the last quote id
+
+ .last_query = gettimetick(2);
+
+ delayed_reply(sprintf("Success: Quote grabbed. (#%i)", .q_last_id));
+ end;
+ }
+
+ function remove_quote {
+ .@tmp = getarg(0, 0);
+
+ if (gettimetick(2) - .last_query < (is_staff() ? .qpoll_rate : .qpoll_rate2))
+ {
+ ++.ignored_times;
+ end;
+ }
+
+ query_sql(sprintf("SELECT id FROM tree_quotes WHERE id = %i ORDER BY id DESC LIMIT 1;", .@tmp), .@id); // check if it exists
+
+ if (.@id < 1)
+ {
+ delayed_reply(sprintf("##BError: I couldn't find quote #%i in the database.", .@tmp));
+ end;
+ }
+
+ query_sql(sprintf("DELETE FROM tree_quotes WHERE id = %i ORDER BY id DESC LIMIT 1;", .@id));
+
+ .last_query = gettimetick(2);
+
+ delayed_reply(sprintf("Success: Quote removed. (#%i)", .@id));
+ end;
+ }
+
+ function cite_quote {
+ .@id = getarg(0,0);
+
+ if (gettimetick(2) - .last_query < (is_staff() ? .qpoll_rate : .qpoll_rate2))
+ {
+ ++.ignored_times;
+ end;
+ }
+
+ query_sql(sprintf("SELECT t.id, c.name AS grabee, d.name AS grabber, t.timestamp, t.message "
+ "FROM `tree_quotes` t "
+ "JOIN `char` c ON t.char_id = c.char_id "
+ "JOIN `char` d ON t.grabber = d.char_id "
+ "WHERE t.id=%i ORDER BY t.id DESC LIMIT 1;",
+ .@id),
+ .@nid[0], .@grabee$[0], .@grabber$[0], .@time[0], .@msg$[0]);
+
+ .last_query = gettimetick(2);
+
+ if (.@nid[0] < 1)
+ {
+ delayed_reply(sprintf("##BError: I couldn't find quote #%i in the database.", .@id));
+ end;
+ }
+
+ delayed_reply(sprintf("<%s> ##B%s##b ##a— grabbed by %s %s.",
+ .@grabee$[0], .@msg$[0], .@grabber$[0], FuzzyTime(.@time[0],0,1)));
+ end;
+ }
+
+ function random_quote {
+ .@name$ = escape_sql(getarg(0, ""));
+
+ if (gettimetick(2) - .last_query < (is_staff() ? .qpoll_rate : .qpoll_rate2))
+ {
+ ++.ignored_times;
+ end;
+ }
+
+ query_sql("SELECT t.id, c.name AS grabee, d.name AS grabber, t.timestamp, t.message "
+ "FROM `char` c "
+ "JOIN `tree_quotes` t ON t.char_id = c.char_id "
+ "JOIN `char` d ON d.char_id = t.grabber " +
+ rif(.@name$ != "", sprintf("WHERE c.name='%s' ", .@name$)) +
+ "ORDER BY RAND() LIMIT 1;",
+ .@nid[0], .@grabee$[0], .@grabber$[0], .@time[0], .@msg$[0]);
+
+ .last_query = gettimetick(2);
+
+ if (.@nid[0] < 1)
+ {
+ if (.@name$ != "")
+ delayed_reply(sprintf("##BError: I couldn't find any quote from `%s` in the database.", getarg(0, "")));
+ else
+ delayed_reply("##BError: The quote database is empty.");
+ end;
+ }
+
+ delayed_reply(sprintf("<%s> ##B%s##b ##a— grabbed by %s %s. (#%i)",
+ .@grabee$[0], .@msg$[0], .@grabber$[0], FuzzyTime(.@time[0],0,1), .@nid[0]));
+ end;
+ }
+
+ function trigger_hotword {
+ .@o$ = getarg(0, ""); // original lowercase
+ .@m$ = replacestr(.@o$, "*", ""); // original lowercase clean
+
+
+ if (.@m$ ~= "(?:^| )tell(?: (?:me|him|her|us|them))? a(?:n ?other| lame| bad| boring)? joke")
+ reply(.jokes$[rand(.jokes)]);
+
+ else if (.@m$ ~= "(?:^| )heal me(?:$|[^a-z])")
+ reply(.healing$[rand(.healing)]);
+ // XXX: maybe actually heal the player once in a while
+
+ else if (.@m$ ~= "(?:^| )(?:what|who) are you")
+ reply(.whoami$[rand(.whoami)]);
+
+ else if (.@m$ ~= rp("(?:^| )(?:hi+|hello|heya?|hiya|good (?:morning|afternoon))[^a-z]* .*~t|~t.* (?:hi+|hello|heya?|hiya)"))
+ {
+ .blocked = 0;
+ reply(.greetings$[rand(.greetings)]);
+ }
+
+ else if (.@o$ ~= rp("(?:^[*]| )(?:kicks?|shakes?) .*~t"))
+ reply(special_drops());
+
+ else if (.@o$ ~= rp("(?:^[*]| )(?:cuts?|nukes?|kills?|chops? down|saws?|hews?|murders?) .*~t"))
+ reply(.kill$[rand(.kill)]);
+
+ else if (.@o$ ~= rp("(?:^[*]| )pokes? .*~t"))
+ reply(.poke$[rand(.poke)]);
+
+ else if (.@o$ ~= rp("(?:^[*]| )(?:waters?|pees?|licks?) .*~t"))
+ reply(.disgusting$[rand(.disgusting)]);
+
+ else if (compare(.@m$, " answer ") && .@m$ ~= "(?:life|universe|everything)(?:$|[^a-z])")
+ reply(.answer$[rand(.answer)]);
+
+ else if (.@o$ ~= rp("(?:^[*]| )(?:burns?|incinerates?|ignites?) .*~t"))
+ reply(.burning$[rand(.burning)]);
+ // XXX: maybe here send a fire particle effect
+
+ else if (.@m$ ~= rp("(?:^| )die ~t"))
+ reply(.die$[rand(.die)]);
+
+ else if (.@o$ ~= rp("(?:^[*]| )bites? .*~t|(?:^[*]| )drops? .* on ~t"))
+ reply(.silly$[rand(.silly)]);
+
+ else if (.@m$ ~= rp("(?:^| )(?:loves?|hugs?|kiss(es)?) .*~t|~t.* love(?:$|[^a-z])"))
+ reply(.love$[rand(.love)]);
+
+ else if (.@m$ ~= rp("(?:^| )dance .*~t|~t.* dance(?:$|[^a-z])"))
+ reply(.dance$[rand(.dance)]);
+
+ else if (.@m$ ~= rp("(?:^| )hates? .*~t"))
+ reply(.hate$[rand(.hate)]);
+
+ else if (.@o$ ~= rp("(?:^[*]| )(?:eats?|shoots?|plucks?|tortures?|slaps?|slaps?|poisons?|breaks?|stabs?|throws?|punch(?:es)?) .*~t"))
+ reply(.pain$[rand(.pain)]);
+
+ else if (.@o$ ~= rp("(?:^[*]| )(?:climbs?|rides?|mounts?) .*~t"))
+ reply(.climb$[rand(.climb)]);
+
+ else if (.@m$ ~= "(?:^| )(?:see y(?:a|ou)|good night|(?:bye)?bye+)(?:$|[^a-z])")
+ reply(.bye$[rand(.bye)]);
+
+ else if (.@m$ ~= rp("(?:^| )bad ~t"))
+ reply(.bad$[rand(.bad)]);
+
+ else if (.@m$ ~= "(?:^| )(?:how old are you|uptime)(?:$|[^a-z])")
+ reply("%%B Server uptime: " + FuzzyTime(.uptime, 1) + ".");
+
+ else if (.@m$ ~= "(?:^| )how chatty are you(?:$|[^a-z])")
+ reply("%%B Answered " + .answered_times + " times, ignored " + .ignored_times + " times.");
+
+ else if (.@m$ ~= "(?:^| )what.* version(?:$|[^a-z])")
+ reply("%%B ~n, version " + .version + "."); // XXX: maybe return Hercules version and serverdata commit instead
+
+ else if (.@m$ ~= "(?:^| )(?:(?:8|eight)[ -]?ball|(?:should|would|will|do|does) (?:i|you|he|she|it|we|they))(?:$|[^a-z])")
+ reply(.eightball$[rand(.eightball)]);
+
+ else if (.@m$ ~= "(?:^| )roll(?: a| the)? dice(?:$|[^a-z])")
+ reply(roll_dice(1, 6));
+
+ else if (.@m$ ~= "(?:^| )roll(?: a)? ([1-8])d((?:[1-9][0-9]{0,10})?)(?:$|[^0-9a-z])")
+ reply(roll_dice(atoi($@regexmatch$[1]), atoi($@regexmatch$[2])));
+
+ else if (.@m$ ~= "(?:^| )roll ([1-8]) dices?(?:$|[^a-z])")
+ reply(roll_dice(atoi($@regexmatch$[1]), 6));
+
+ else if (.@m$ ~= "(?:^| )(?:flip|toss)(?: a| the)? coin(?:$|[^a-z])")
+ reply(flip_coin(1));
+
+ else if (.@m$ ~= "(?:^| )(?:flip|toss) ([1-8]) coins?(?:$|[^a-z])")
+ reply(flip_coin(atoi($@regexmatch$[1])));
+
+ else if (.@m$ ~= "(?:^| )(?:press|pull)(?: the)? trigger(?:$|[^a-z])")
+ roulette();
+
+ else if (.@m$ ~= "(?:^| )(?:how long|what) is(?: my)? monologue(?:$|[^a-z])")
+ reply(monologue_player());
+
+ else if (.@m$ ~= "(?:^| )who am i(?:$|[^a-z])")
+ reply(who_player());
+
+ else if (.@m$ ~= "(?:^| )shut up(?:$|[^a-z])")
+ {
+ reply(.shut_up$[rand(.shut_up)]);
+ .blocked = gettimetick(2);
+ }
+
+ else if (rand(.dunno_rate) == 0)
+ reply(.no_idea$[rand(.no_idea)]);
+
+ else
+ ++.ignored_times;
+
+ end;
+ }
+
+ function trigger_hiall {
+ if (rand(.hiall_rate) == 0)
+ reply(.greetings$[rand(.greetings)]);
+
+ else
+ ++.ignored_times;
+
+ end;
+ }
+
+OnClick:
+ tree_panel();
+ bye;
+
+
+OnTalkNearby:
+ .@no_nick$ = strip(strip_formatting(substr($@p0$, getstrlen(strcharinfo(PC_NAME)) + 3, getstrlen($@p0$) - 1))); // not very obvious stuff
+ .@no_nick_lower$ = strtolower(.@no_nick$); // FIXME: hercules doesn't have a way to do case insensitive regex yet
+ .@no_nick_clean$ = replacestr(.@no_nick_lower$, "*", "");
+
+ htput(.msg_ht, strcharinfo(PC_NAME), getcharid(CHAR_ID_CHAR) + ":" + gettimetick(2) + ":" + .@no_nick$); // log last message, for quotegrabs
+ .lastsender = getcharid(CHAR_ID_CHAR); // for monologue
+
+ .last_activity = gettimetick(2); // for the auto-janitor
+
+ if ((is_staff() || #Tree_Trusted) && charat(.@no_nick$, 0) == .symbol$)
+ {
+ if (.@no_nick$ ~= "^.grab \"?([^#:@\"]{4,23})\"?$")
+ reply(grab_quote($@regexmatch$[1]));
+
+ else if (.@no_nick$ ~= "^.(?:ungrab|remove|delete)(?: quote)? #([0-9]+)$")
+ reply(remove_quote(atoi($@regexmatch$[1])));
+
+ else if (.@no_nick$ ~= "^.(?:ungrab|remove|delete)(?: last(?: quote)?)?$")
+ reply(remove_quote(.q_last_id));
+
+ else if (.@no_nick$ ~= "^.(?:quote|cite) #([0-9]+)$")
+ reply(cite_quote(atoi($@regexmatch$[1])));
+
+ else if (.@no_nick$ ~= "^.(?:(?:random )?quote|cite)(?: anyone| someone| random)?$")
+ reply(random_quote());
+
+ else if (.@no_nick$ ~= "^.(?:quote|cite) \"?([^#:@\"]{4,23})\"?$")
+ reply(random_quote($@regexmatch$[1]));
+
+ else if (.@no_nick$ ~= "^.seen \"?([^#:@\"]{4,23})\"?$")
+ reply(have_you_seen($@regexmatch$[1]));
+
+ // to allow trusted testers to reboot without knowing the exit code
+ else if (debug && .@no_nick$ ~= "^.re(?:boot|load|start)(?:(?: the)? server)?$")
+ {
+ announce("The server is rebooting. This may take a couple minutes.", bc_all);
+ sleep2(1000);
+ atcommand("@serverexit 104");
+ }
+
+ // exit, pull all, clean, build, reboot
+ else if (debug && .@no_nick$ ~= "^.re-?build(?:(?: the)? server)?$")
+ {
+ announce("The server is rebuilding. This will take several minutes.", bc_all);
+ sleep2(1000);
+ atcommand("@serverexit 108");
+ }
+
+ else if (.@no_nick$ ~= "^.(?:add )?ignored? \"?([^#:@\"]{4,23})\"?$")
+ {
+ .@chr = getcharid(CHAR_ID_ACCOUNT, $@regexmatch$[1]);
+ if (.@chr < 1)
+ {
+ reply("##BError: Player not found or not online.");
+ end;
+ }
+ htput(.ignore_ht, strcharinfo(PC_NAME, .@chr), gettimetick(2) + 3600);
+ reply(sprintf("Success: Player `%s` is now ignored for 1 hour.",
+ strcharinfo(PC_NAME, .@chr)));
+ }
+
+ else if (.@no_nick$ ~= "^.(?:un|de-?|remove )ignored? \"?([^#:@\"]{4,23})\"?$")
+ {
+ .@chr = getcharid(CHAR_ID_ACCOUNT, $@regexmatch$[1]);
+ if (.@chr < 1)
+ {
+ reply("##BError: Player not found or not online.");
+ end;
+ }
+ htput(.ignore_ht, strcharinfo(PC_NAME, .@chr), 0);
+ reply(sprintf("Success: Player `%s` is no longer ignored.",
+ strcharinfo(PC_NAME, .@chr)));
+ }
+
+ else if (is_admin() && .@no_nick$ ~= "^.(?:add )?trust(?:ed)? \"?([^#:@\"]{4,23})\"?$")
+ {
+ .@chr = getcharid(CHAR_ID_ACCOUNT, $@regexmatch$[1]);
+ if (.@chr < 1)
+ {
+ reply("##BError: Player not found or not online.");
+ end;
+ }
+ set(getvariableofpc(#Tree_Trusted, .@chr), true);
+ reply(sprintf("Success: Player `%s` can now use restricted commands.",
+ strcharinfo(PC_NAME, .@chr)));
+ }
+
+ else if (is_admin() && .@no_nick$ ~= "^.(?:un|de-?|remove )trust(?:ed)? \"?([^#:@\"]{4,23})\"?$")
+ {
+ .@chr = getcharid(CHAR_ID_ACCOUNT, $@regexmatch$[1]);
+ if (.@chr < 1)
+ {
+ reply("##BError: Player not found or not online.");
+ end;
+ }
+ set(getvariableofpc(#Tree_Trusted, .@chr), false);
+ reply(sprintf("Success: Player `%s` can no longer use restricted commands.",
+ strcharinfo(PC_NAME, .@chr)));
+ }
+
+ else
+ reply("##BError: Command not found or invalid syntax.");
+ }
+
+ else if (.@no_nick_lower$ ~= rp("^(~t[^a-z ]* .*|(?:.* (?:~t[^a-z ]* .*|~t[^ a-z]*)))$"))
+ {
+ check_is_ignored();
+ trigger_hotword($@regexmatch$[1]);
+ }
+
+ else if (.@no_nick_clean$ ~= "^(hi(ya)?|hello|heya?) (all|friends|every(one|body))")
+ {
+ check_is_ignored();
+ trigger_hiall();
+ }
+
+ else
+ {
+ if (.lastsender == getcharid(CHAR_ID_CHAR))
+ @monologue++;
+
+ else
+ @monologue = 1;
+ }
+
+ // TODO: eliza mode, whisper eliza mode
+ end;
+
+OnTouch:
+ if (rand(.touch_rate) == 0) {
+ face();
+ }
+ end;
+
+OnDoReply:
+ if (@tree_reply$ != "") {
+ npctalk(@tree_reply$);
+ @tree_reply$ = "";
+ }
+ end;
+
+OnPCLogoutEvent:
+ seen_me();
+ end;
+
+OnTimer3600000:
+ // scheduled janitor
+ .@now = gettimetick(2);
+ initnpctimer(); // schedule next
+
+ if (.last_activity > (.@now - 3600)) {
+ end; // last activity is too recent
+ }
+
+ // cleanup routine below
+ .lastsender = 0;
+ .last_activity = 0;
+ .last_reply = 0;
+ .last_emote = 0;
+ .last_query = 0;
+ .blocked = 0;
+ .enable_janitor = 0;
+
+ htclear(.msg_ht); // empty the message table (quotegrabs)
+ htclear(.ignore_ht); // empty the ignore table
+
+ .@it = htiterator(.seen_ht); // allocate new iterator
+ for (.@key$ = htinextkey(.@it); hticheck(.@it); .@key$ = htinextkey(.@it)) {
+ if (.@key$ == "") {
+ continue;
+ }
+
+ if (htget(.seen_ht, .@key$, 0) < (.@now - 86400)) {
+ htput(.seen_ht, .@key$, 0); // remove from hash table if older than 24h
+ }
+ }
+ htidelete(.@it); // free the iterator
+
+ face(); // do an emote (because why not)
+ end;
+
+
+OnDay0320:
+ .dir = DOWNLEFT;
+ end;
+
+
+OnDay0621:
+ .dir = LEFT;
+ end;
+
+
+OnDay0922:
+ .dir = UPLEFT;
+ end;
+
+
+OnDay1221:
+ .dir = DOWN;
+ end;
+
+
+OnInit:
+ // config below
+ .hotwords$ = "tree"; // what hot words the npc should listen to, besides its own name (regex)
+ .distance = 14; // the npc will only listen to player within X tiles
+ .sex = G_OTHER; // gender of the npc
+ .dir = season_direction(); // sprite direction according to the season
+ .talk_rate = 1; // min number of seconds to wait between replies
+ .repeat_rate = 1; // min number of seconds to wait before sending the same message twice in a row
+ .block_time = 600; // how long to stay quiet after someone says shut up, in seconds
+ .emote_rate = 3; // min number of seconds to wait between emotes
+ .sdrop_rate = 8; // 1 in X chances to get a special drop
+ .sname_rate = 8; // 1 in X chances to get a special name
+ .dunno_rate = 2; // 1 in X chances to get a reply when the command is not found
+ .hiall_rate = 2; // 1 in X chances to reply to a "hi everyone"
+ .touch_rate = 4; // 1 in X chances to trigger the OnTouch action
+ .qpoll_rate = 1; // min number of seconds to wait before calling the sql db again for GMs
+ .qpoll_rate2 = 5; // min number of seconds to wait before calling the sql db again for non-GMs (currently unused)
+ .delay_reply = 250; // number of ms to wait to reply
+ .enable_janitor = true; // automatically free memory when idle
+ .symbol$ = "~"; // symbol for GM-only commands
+
+ // register some arrays
+ callfunc("TREE_dictionaries");
+
+ // do random stuff
+ make_quote_table();
+ face();
+
+ // boring stuff below
+ .version = 21; // increase this when you make a change
+ .uptime = gettimetick(2);
+ .alwaysVisible = true; // the NPC doesn't de-spawn when moving away
+ .pid = 1; // regex pattern id
+ .msg_ht = htnew(); // hashtable id for message history
+ .seen_ht = htnew(); // hashtable id for seen log
+ .ignore_ht = htnew(); // hashtable id for ignored players
+ .roulette = rand(1, 7); // spin the chambers
+ defpattern(.pid, "^(.*)$", "OnTalkNearby");
+ activatepset(.pid);
+ if (.enable_janitor) {
+ initnpctimer();
+ }
+}
+
+// Duplicates below
+//000-1,42,63,0 duplicate(Confused Tree) Confused Palm Tree NPC_NO_SPRITE,14,14
diff --git a/Npc/008-1/doors.txt b/Npc/008-1/doors.txt
new file mode 100644
index 00000000..de8ed1d8
--- /dev/null
+++ b/Npc/008-1/doors.txt
@@ -0,0 +1,6 @@
+008-1,104,27,0 script CottageDoor NPC_WARP,0,0,{
+ end;
+
+OnTouch:
+ dispbottom(l("Locked."));
+}
diff --git a/Npc/008-1/mapflags.txt b/Npc/008-1/mapflags.txt
new file mode 100644
index 00000000..f2680964
--- /dev/null
+++ b/Npc/008-1/mapflags.txt
@@ -0,0 +1 @@
+008-1 mapflag town
diff --git a/Npc/008-1/wateranimation.txt b/Npc/008-1/wateranimation.txt
new file mode 100644
index 00000000..8b66f637
--- /dev/null
+++ b/Npc/008-1/wateranimation.txt
@@ -0,0 +1,9 @@
+// Evol scripts.
+// Author:
+// gumi
+// Reid
+// Description:
+// Water animations, splash, fishes, etc...
+
+008-1,139,32,0 duplicate(#water_animation0) #water_animation16 NPC_WATER_SPLASH
+008-1,140,40,0 duplicate(#water_animation0) #water_animation17 NPC_WATER_SPLASH
diff --git a/Npc/008-2-0/_import.txt b/Npc/008-2-0/_import.txt
new file mode 100644
index 00000000..f2ecc3b8
--- /dev/null
+++ b/Npc/008-2-0/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-2-0: Chez Celestia
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-0/_savepoints.txt",
+"npc/008-2-0/_warps.txt",
+"npc/008-2-0/mapflags.txt",
diff --git a/Npc/008-2-0/_savepoints.txt b/Npc/008-2-0/_savepoints.txt
new file mode 100644
index 00000000..d9055b64
--- /dev/null
+++ b/Npc/008-2-0/_savepoints.txt
@@ -0,0 +1,11 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-0: Chez Celestia saves
+008-2-0,37,27,0 script #save_008-2-0_37_27 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
diff --git a/Npc/008-2-0/_warps.txt b/Npc/008-2-0/_warps.txt
new file mode 100644
index 00000000..72a8ab12
--- /dev/null
+++ b/Npc/008-2-0/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-0: Chez Celestia warps
+008-2-0,26,22,0 warp #008-2-0_26_22 0,0,008-1,105,75
+008-2-0,22,34,0 warp #008-2-0_22_34 0,0,008-1,101,79
diff --git a/Npc/008-2-0/mapflags.txt b/Npc/008-2-0/mapflags.txt
new file mode 100644
index 00000000..93df75f4
--- /dev/null
+++ b/Npc/008-2-0/mapflags.txt
@@ -0,0 +1 @@
+008-2-0 mapflag town
diff --git a/Npc/008-2-1/_import.txt b/Npc/008-2-1/_import.txt
new file mode 100644
index 00000000..1e5137a7
--- /dev/null
+++ b/Npc/008-2-1/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-2-1: Merchant Guild
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-1/_savepoints.txt",
+"npc/008-2-1/_warps.txt",
+"npc/008-2-1/mapflags.txt",
diff --git a/Npc/008-2-1/_savepoints.txt b/Npc/008-2-1/_savepoints.txt
new file mode 100644
index 00000000..66730940
--- /dev/null
+++ b/Npc/008-2-1/_savepoints.txt
@@ -0,0 +1,11 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-1: Merchant Guild saves
+008-2-1,42,27,0 script #save_008-2-1_42_27 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
diff --git a/Npc/008-2-1/_warps.txt b/Npc/008-2-1/_warps.txt
new file mode 100644
index 00000000..e47cbf73
--- /dev/null
+++ b/Npc/008-2-1/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-1: Merchant Guild warps
+008-2-1,37,27,0 warp #008-2-1_37_27 0,0,008-1,89,66
+008-2-1,33,43,0 warp #008-2-1_33_43 0,0,008-1,88,72
diff --git a/Npc/008-2-1/mapflags.txt b/Npc/008-2-1/mapflags.txt
new file mode 100644
index 00000000..78899489
--- /dev/null
+++ b/Npc/008-2-1/mapflags.txt
@@ -0,0 +1 @@
+008-2-1 mapflag town
diff --git a/Npc/008-2-10/_import.txt b/Npc/008-2-10/_import.txt
new file mode 100644
index 00000000..994726eb
--- /dev/null
+++ b/Npc/008-2-10/_import.txt
@@ -0,0 +1,4 @@
+// Map 008-2-10: Hurnscald City Hall
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-10/_warps.txt",
+"npc/008-2-10/mapflags.txt",
diff --git a/Npc/008-2-10/_warps.txt b/Npc/008-2-10/_warps.txt
new file mode 100644
index 00000000..25390f95
--- /dev/null
+++ b/Npc/008-2-10/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-10: Hurnscald City Hall warps
+008-2-10,37,34,0 warp #008-2-10_37_34 0,0,008-1,102,70
+008-2-10,37,25,0 warp #008-2-10_37_25 1,0,008-2-11,36,27
diff --git a/Npc/008-2-10/mapflags.txt b/Npc/008-2-10/mapflags.txt
new file mode 100644
index 00000000..7635bed5
--- /dev/null
+++ b/Npc/008-2-10/mapflags.txt
@@ -0,0 +1 @@
+008-2-10 mapflag town
diff --git a/Npc/008-2-11/_import.txt b/Npc/008-2-11/_import.txt
new file mode 100644
index 00000000..84ad9ceb
--- /dev/null
+++ b/Npc/008-2-11/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-2-11: Hurnscald City Hall
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-11/_savepoints.txt",
+"npc/008-2-11/_warps.txt",
+"npc/008-2-11/mapflags.txt",
diff --git a/Npc/008-2-11/_savepoints.txt b/Npc/008-2-11/_savepoints.txt
new file mode 100644
index 00000000..c3cf65fc
--- /dev/null
+++ b/Npc/008-2-11/_savepoints.txt
@@ -0,0 +1,20 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-11: Hurnscald City Hall saves
+008-2-11,25,27,0 script #save_008-2-11_25_27 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
+008-2-11,45,27,0 script #save_008-2-11_45_27 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
diff --git a/Npc/008-2-11/_warps.txt b/Npc/008-2-11/_warps.txt
new file mode 100644
index 00000000..6c8c4732
--- /dev/null
+++ b/Npc/008-2-11/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-11: Hurnscald City Hall warps
+008-2-11,37,28,0 warp #008-2-11_37_28 1,0,008-2-10,36,26
diff --git a/Npc/008-2-11/mapflags.txt b/Npc/008-2-11/mapflags.txt
new file mode 100644
index 00000000..3e084fc0
--- /dev/null
+++ b/Npc/008-2-11/mapflags.txt
@@ -0,0 +1 @@
+008-2-11 mapflag town
diff --git a/Npc/008-2-12/_import.txt b/Npc/008-2-12/_import.txt
new file mode 100644
index 00000000..88a854e4
--- /dev/null
+++ b/Npc/008-2-12/_import.txt
@@ -0,0 +1,4 @@
+// Map 008-2-12: Hurnscald Clinic
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-12/_warps.txt",
+"npc/008-2-12/mapflags.txt",
diff --git a/Npc/008-2-12/_warps.txt b/Npc/008-2-12/_warps.txt
new file mode 100644
index 00000000..e44e7154
--- /dev/null
+++ b/Npc/008-2-12/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-12: Hurnscald Clinic warps
+008-2-12,30,32,0 warp #008-2-12_30_32 0,0,008-1,110,57
+008-2-12,36,27,0 warp #008-2-12_36_27 1,0,008-2-13,35,31
diff --git a/Npc/008-2-12/mapflags.txt b/Npc/008-2-12/mapflags.txt
new file mode 100644
index 00000000..b52526a7
--- /dev/null
+++ b/Npc/008-2-12/mapflags.txt
@@ -0,0 +1 @@
+008-2-12 mapflag town
diff --git a/Npc/008-2-13/_import.txt b/Npc/008-2-13/_import.txt
new file mode 100644
index 00000000..a4b0330e
--- /dev/null
+++ b/Npc/008-2-13/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-2-13: Hurnscald Clinic
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-13/_savepoints.txt",
+"npc/008-2-13/_warps.txt",
+"npc/008-2-13/mapflags.txt",
diff --git a/Npc/008-2-13/_savepoints.txt b/Npc/008-2-13/_savepoints.txt
new file mode 100644
index 00000000..5c8fc22d
--- /dev/null
+++ b/Npc/008-2-13/_savepoints.txt
@@ -0,0 +1,38 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-13: Hurnscald Clinic saves
+008-2-13,29,27,0 script #save_008-2-13_29_27 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
+008-2-13,32,27,0 script #save_008-2-13_32_27 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
+008-2-13,29,31,0 script #save_008-2-13_29_31 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
+008-2-13,32,31,0 script #save_008-2-13_32_31 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
diff --git a/Npc/008-2-13/_warps.txt b/Npc/008-2-13/_warps.txt
new file mode 100644
index 00000000..f9681284
--- /dev/null
+++ b/Npc/008-2-13/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-13: Hurnscald Clinic warps
+008-2-13,36,32,0 warp #008-2-13_36_32 1,0,008-2-12,35,28
+008-2-13,25,26,0 warp #008-2-13_25_26 1,0,008-2-14,24,30
diff --git a/Npc/008-2-13/mapflags.txt b/Npc/008-2-13/mapflags.txt
new file mode 100644
index 00000000..be0ed6a2
--- /dev/null
+++ b/Npc/008-2-13/mapflags.txt
@@ -0,0 +1 @@
+008-2-13 mapflag town
diff --git a/Npc/008-2-14/_import.txt b/Npc/008-2-14/_import.txt
new file mode 100644
index 00000000..29a984e8
--- /dev/null
+++ b/Npc/008-2-14/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-2-14: Hurnscald Clinic
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-14/_savepoints.txt",
+"npc/008-2-14/_warps.txt",
+"npc/008-2-14/mapflags.txt",
diff --git a/Npc/008-2-14/_savepoints.txt b/Npc/008-2-14/_savepoints.txt
new file mode 100644
index 00000000..cbb6fd12
--- /dev/null
+++ b/Npc/008-2-14/_savepoints.txt
@@ -0,0 +1,11 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-14: Hurnscald Clinic saves
+008-2-14,31,27,0 script #save_008-2-14_31_27 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
diff --git a/Npc/008-2-14/_warps.txt b/Npc/008-2-14/_warps.txt
new file mode 100644
index 00000000..241626bb
--- /dev/null
+++ b/Npc/008-2-14/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-14: Hurnscald Clinic warps
+008-2-14,25,31,0 warp #008-2-14_25_31 1,0,008-2-13,24,27
diff --git a/Npc/008-2-14/mapflags.txt b/Npc/008-2-14/mapflags.txt
new file mode 100644
index 00000000..4f5bd95c
--- /dev/null
+++ b/Npc/008-2-14/mapflags.txt
@@ -0,0 +1 @@
+008-2-14 mapflag town
diff --git a/Npc/008-2-2/_import.txt b/Npc/008-2-2/_import.txt
new file mode 100644
index 00000000..5a896da0
--- /dev/null
+++ b/Npc/008-2-2/_import.txt
@@ -0,0 +1,4 @@
+// Map 008-2-2: The Rusty Pick
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-2/_warps.txt",
+"npc/008-2-2/mapflags.txt",
diff --git a/Npc/008-2-2/_warps.txt b/Npc/008-2-2/_warps.txt
new file mode 100644
index 00000000..8410ef2b
--- /dev/null
+++ b/Npc/008-2-2/_warps.txt
@@ -0,0 +1,6 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-2: The Rusty Pick warps
+008-2-2,28,34,0 warp #008-2-2_28_34 0,0,008-1,65,56
+008-2-2,52,25,0 warp #008-2-2_52_25 1,0,008-2-3,66,28
+008-2-2,24,29,0 warp #008-2-2_24_29 0,0,008-2-4,43,28
+008-2-2,52,32,0 warp #008-2-2_52_32 0,0,008-2-5,24,25
diff --git a/Npc/008-2-2/mapflags.txt b/Npc/008-2-2/mapflags.txt
new file mode 100644
index 00000000..8f90e197
--- /dev/null
+++ b/Npc/008-2-2/mapflags.txt
@@ -0,0 +1 @@
+008-2-2 mapflag town
diff --git a/Npc/008-2-3/_import.txt b/Npc/008-2-3/_import.txt
new file mode 100644
index 00000000..ed172cc7
--- /dev/null
+++ b/Npc/008-2-3/_import.txt
@@ -0,0 +1,4 @@
+// Map 008-2-3: The Rusty Pick
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-3/_warps.txt",
+"npc/008-2-3/mapflags.txt",
diff --git a/Npc/008-2-3/_warps.txt b/Npc/008-2-3/_warps.txt
new file mode 100644
index 00000000..957ed686
--- /dev/null
+++ b/Npc/008-2-3/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-3: The Rusty Pick warps
+008-2-3,67,29,0 warp #008-2-3_67_29 1,0,008-2-2,51,26
diff --git a/Npc/008-2-3/mapflags.txt b/Npc/008-2-3/mapflags.txt
new file mode 100644
index 00000000..947a2df3
--- /dev/null
+++ b/Npc/008-2-3/mapflags.txt
@@ -0,0 +1 @@
+008-2-3 mapflag town
diff --git a/Npc/008-2-4/_import.txt b/Npc/008-2-4/_import.txt
new file mode 100644
index 00000000..8ab4d742
--- /dev/null
+++ b/Npc/008-2-4/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-2-4: The Rusty Pick
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-4/_savepoints.txt",
+"npc/008-2-4/_warps.txt",
+"npc/008-2-4/mapflags.txt",
diff --git a/Npc/008-2-4/_savepoints.txt b/Npc/008-2-4/_savepoints.txt
new file mode 100644
index 00000000..103787d1
--- /dev/null
+++ b/Npc/008-2-4/_savepoints.txt
@@ -0,0 +1,11 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-4: The Rusty Pick saves
+008-2-4,25,27,0 script #save_008-2-4_25_27 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
diff --git a/Npc/008-2-4/_warps.txt b/Npc/008-2-4/_warps.txt
new file mode 100644
index 00000000..2d8336f7
--- /dev/null
+++ b/Npc/008-2-4/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-4: The Rusty Pick warps
+008-2-4,44,28,0 warp #008-2-4_44_28 0,0,008-2-2,25,29
diff --git a/Npc/008-2-4/mapflags.txt b/Npc/008-2-4/mapflags.txt
new file mode 100644
index 00000000..cd86a1e4
--- /dev/null
+++ b/Npc/008-2-4/mapflags.txt
@@ -0,0 +1 @@
+008-2-4 mapflag town
diff --git a/Npc/008-2-5/_import.txt b/Npc/008-2-5/_import.txt
new file mode 100644
index 00000000..74e70e1c
--- /dev/null
+++ b/Npc/008-2-5/_import.txt
@@ -0,0 +1,4 @@
+// Map 008-2-5: The Rusty Pick
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-5/_warps.txt",
+"npc/008-2-5/mapflags.txt",
diff --git a/Npc/008-2-5/_warps.txt b/Npc/008-2-5/_warps.txt
new file mode 100644
index 00000000..21b7f527
--- /dev/null
+++ b/Npc/008-2-5/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-5: The Rusty Pick warps
+008-2-5,24,24,0 warp #008-2-5_24_24 0,0,008-2-2,52,31
diff --git a/Npc/008-2-5/mapflags.txt b/Npc/008-2-5/mapflags.txt
new file mode 100644
index 00000000..435dd353
--- /dev/null
+++ b/Npc/008-2-5/mapflags.txt
@@ -0,0 +1 @@
+008-2-5 mapflag town
diff --git a/Npc/008-2-6/_import.txt b/Npc/008-2-6/_import.txt
new file mode 100644
index 00000000..4630df43
--- /dev/null
+++ b/Npc/008-2-6/_import.txt
@@ -0,0 +1,4 @@
+// Map 008-2-6: Two Guys One Bed
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-6/_warps.txt",
+"npc/008-2-6/mapflags.txt",
diff --git a/Npc/008-2-6/_warps.txt b/Npc/008-2-6/_warps.txt
new file mode 100644
index 00000000..98944d50
--- /dev/null
+++ b/Npc/008-2-6/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-6: Two Guys One Bed warps
+008-2-6,27,33,0 warp #008-2-6_27_33 0,0,008-1,89,59
diff --git a/Npc/008-2-6/mapflags.txt b/Npc/008-2-6/mapflags.txt
new file mode 100644
index 00000000..c07673a4
--- /dev/null
+++ b/Npc/008-2-6/mapflags.txt
@@ -0,0 +1 @@
+008-2-6 mapflag town
diff --git a/Npc/008-2-7/_import.txt b/Npc/008-2-7/_import.txt
new file mode 100644
index 00000000..263e5dcf
--- /dev/null
+++ b/Npc/008-2-7/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-2-7: Hurnscald Apothecary
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-7/_savepoints.txt",
+"npc/008-2-7/_warps.txt",
+"npc/008-2-7/mapflags.txt",
diff --git a/Npc/008-2-7/_savepoints.txt b/Npc/008-2-7/_savepoints.txt
new file mode 100644
index 00000000..f3faa80f
--- /dev/null
+++ b/Npc/008-2-7/_savepoints.txt
@@ -0,0 +1,11 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-7: Hurnscald Apothecary saves
+008-2-7,25,27,0 script #save_008-2-7_25_27 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
diff --git a/Npc/008-2-7/_warps.txt b/Npc/008-2-7/_warps.txt
new file mode 100644
index 00000000..3eb8538a
--- /dev/null
+++ b/Npc/008-2-7/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-7: Hurnscald Apothecary warps
+008-2-7,36,29,0 warp #008-2-7_36_29 0,0,008-1,101,56
diff --git a/Npc/008-2-7/mapflags.txt b/Npc/008-2-7/mapflags.txt
new file mode 100644
index 00000000..caeb89e9
--- /dev/null
+++ b/Npc/008-2-7/mapflags.txt
@@ -0,0 +1 @@
+008-2-7 mapflag town
diff --git a/Npc/008-2-8/_import.txt b/Npc/008-2-8/_import.txt
new file mode 100644
index 00000000..d3346591
--- /dev/null
+++ b/Npc/008-2-8/_import.txt
@@ -0,0 +1,4 @@
+// Map 008-2-8: Hurnscald Forge
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-8/_warps.txt",
+"npc/008-2-8/mapflags.txt",
diff --git a/Npc/008-2-8/_warps.txt b/Npc/008-2-8/_warps.txt
new file mode 100644
index 00000000..7e791e85
--- /dev/null
+++ b/Npc/008-2-8/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-8: Hurnscald Forge warps
+008-2-8,37,39,0 warp #008-2-8_37_39 1,0,008-1,120,72
diff --git a/Npc/008-2-8/mapflags.txt b/Npc/008-2-8/mapflags.txt
new file mode 100644
index 00000000..2bdbedb9
--- /dev/null
+++ b/Npc/008-2-8/mapflags.txt
@@ -0,0 +1 @@
+008-2-8 mapflag town
diff --git a/Npc/008-2-9/_import.txt b/Npc/008-2-9/_import.txt
new file mode 100644
index 00000000..aade14bd
--- /dev/null
+++ b/Npc/008-2-9/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-2-9: Jack's Abode
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-2-9/_savepoints.txt",
+"npc/008-2-9/_warps.txt",
+"npc/008-2-9/mapflags.txt",
diff --git a/Npc/008-2-9/_savepoints.txt b/Npc/008-2-9/_savepoints.txt
new file mode 100644
index 00000000..e2aae529
--- /dev/null
+++ b/Npc/008-2-9/_savepoints.txt
@@ -0,0 +1,11 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-9: Jack's Abode saves
+008-2-9,26,31,0 script #save_008-2-9_26_31 NPC_SAVE_POINT,{
+ savepointparticle .map$, .x, .y, CURRENT_INN;
+ close;
+
+OnInit:
+ .distance = 2;
+ .sex = G_OTHER;
+ end;
+}
diff --git a/Npc/008-2-9/_warps.txt b/Npc/008-2-9/_warps.txt
new file mode 100644
index 00000000..7021feae
--- /dev/null
+++ b/Npc/008-2-9/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-2-9: Jack's Abode warps
+008-2-9,30,35,0 warp #008-2-9_30_35 0,0,008-1,72,69
diff --git a/Npc/008-2-9/mapflags.txt b/Npc/008-2-9/mapflags.txt
new file mode 100644
index 00000000..e637ae03
--- /dev/null
+++ b/Npc/008-2-9/mapflags.txt
@@ -0,0 +1 @@
+008-2-9 mapflag town