summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-10-29 20:35:48 -0200
committerJesusaves <cpntb1@ymail.com>2018-10-29 20:35:48 -0200
commit4080503bed6feda71806595ba0b2f413852cc56c (patch)
tree33253fcfbf29e7135b2b000f1621ed55d264a200
parent11362dc23857c1047cae5b9994b2aed1745551a3 (diff)
downloadserverdata-4080503bed6feda71806595ba0b2f413852cc56c.tar.gz
serverdata-4080503bed6feda71806595ba0b2f413852cc56c.tar.bz2
serverdata-4080503bed6feda71806595ba0b2f413852cc56c.tar.xz
serverdata-4080503bed6feda71806595ba0b2f413852cc56c.zip
Prepare the event core functions
-rw-r--r--npc/003-3/malindou.txt2
-rw-r--r--npc/019-2/_import.txt1
-rw-r--r--npc/019-2/guards.txt67
3 files changed, 70 insertions, 0 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index de269886e..7520d26bb 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -131,9 +131,11 @@ OnInit:
// This is a hack because I'm too lazy to be bothered with standard SQL Upgrade system
if ($UPDATE < 1539721040) {
query_sql("CREATE TABLE IF NOT EXISTS `discord` (`account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',`discord_id` VARCHAR(255) NOT NULL DEFAULT '',`discord_name` VARCHAR(255) NOT NULL DEFAULT '',`verified` ENUM('0', '1') NOT NULL DEFAULT '0') ENGINE=MyISAM");
+ $NLIB_DAY=1;
$UPDATE=1539721040;
debugmes "";
debugmes "* SQL Upgrade (no effect on new installations)";
+ debugmes "* Nivalis Liberation Day automatically started.";
debugmes "";
}
diff --git a/npc/019-2/_import.txt b/npc/019-2/_import.txt
index 1b5ef8565..432b48825 100644
--- a/npc/019-2/_import.txt
+++ b/npc/019-2/_import.txt
@@ -3,3 +3,4 @@
"npc/019-2/_mobs.txt",
"npc/019-2/_warps.txt",
"npc/019-2/angela.txt",
+"npc/019-2/guards.txt",
diff --git a/npc/019-2/guards.txt b/npc/019-2/guards.txt
new file mode 100644
index 000000000..f4fe2dcb2
--- /dev/null
+++ b/npc/019-2/guards.txt
@@ -0,0 +1,67 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Protect Nivalis
+
+019-2,44,54,0 script Guard#019-2.1 NPC_GUARD1,{
+ /*
+ legiontalk;
+ end;
+ */
+ if ($NIVALIS_LIBDATE) {
+ mesn;
+ mesq l("Nivalis was liberated @@ ago.", FuzzyTime($NIVALIS_LIBDATE));
+ // TODO
+ mesc l("Due town state, you cannot visit it. Do you want to cross?"), 1;
+ next;
+ if (askyesno == ASK_YES)
+ warp "019-1", 70, 30;
+ close;
+ } else if ($NLIB_DAY > 0) {
+ if (BaseLevel < 40) goto L_Noob;
+ if (BaseLevel >= 40) goto L_Veteran;
+ close;
+ } else if (is_admin()) {
+ mesc "Initiate Nivalis Liberation Day?", 1;
+ mesc "Event will last 7 days.", 1;
+ select
+ "Not yet.",
+ "Yes",
+ "No";
+ if (@menu == 2) {
+ $NLIB_DAY=1;
+ channelmes("#world", "Nivalis Liberation Day has started.");
+ announce "Nivalis Liberation Day has started.", bc_all|bc_npc;
+ }
+ close;
+ } else {
+ legiontalk; end;
+ }
+ end;
+// Event Selectors
+L_Noob:
+ mesn;
+ mesq l("Hey, you! We need help to get rid from some remaining monsters at Nivalis City.");
+ next;
+ mesn;
+ mesq l("Are you up for the challenge?");
+ close;
+
+L_Veteran:
+ if ($NLIB_DAY >= 7) goto L_MK;
+ mesn;
+ mesq l("Hey, you! We need help to find the Monster King.");
+ close;
+
+L_MK:
+ mesn;
+ mesq l("Today at 16:30 UTC we are going to attack the Monster King by surprise. There will be no delays.");
+ close;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+