summaryrefslogtreecommitdiff
path: root/npc/017-1/guild.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-15 10:12:18 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-15 10:12:18 -0300
commitf7735589f498c5119dd8430cc002d5626c1170b4 (patch)
tree501cb77573ee0b18e9614f58a3ac868127d79392 /npc/017-1/guild.txt
parentff000e683a9e56f96ec5613682f3711a45e529bb (diff)
downloadserverdata-f7735589f498c5119dd8430cc002d5626c1170b4.tar.gz
serverdata-f7735589f498c5119dd8430cc002d5626c1170b4.tar.bz2
serverdata-f7735589f498c5119dd8430cc002d5626c1170b4.tar.xz
serverdata-f7735589f498c5119dd8430cc002d5626c1170b4.zip
Allow access to Guild Hall, finishing the Guild System prototype (GvG/recipes not included)
Diffstat (limited to 'npc/017-1/guild.txt')
-rw-r--r--npc/017-1/guild.txt47
1 files changed, 47 insertions, 0 deletions
diff --git a/npc/017-1/guild.txt b/npc/017-1/guild.txt
new file mode 100644
index 000000000..6992cb354
--- /dev/null
+++ b/npc/017-1/guild.txt
@@ -0,0 +1,47 @@
+// Moubootaur Legends Script
+// Author:
+// Jesusalva
+// Description:
+// Guild House
+
+017-1,57,33,0 script #GDoor NPC_NO_SPRITE,0,0,{
+ end;
+OnTouch:
+ if (getcharid(2) < 1) {
+ dispbottom l("The door is locked.");
+ end;
+ }
+ // Warp you to your guild house if exist.
+ // Build the instance otherwise.
+
+ // Well, "checking if instance exist by mapname" is an illusion.
+ // So we try to build and if we fail, we warp the player to the instance.
+ .@ID=getcharid(2);
+ @MAP_NAME$="guild@"+str(.@ID); // Max 4 chars for map name
+
+ .@INSTID = instance_create("guilds@a"+(.@ID), getcharid(3), IOT_GUILD);
+ .@instanceMapName$ = instance_attachmap("guilds", .@INSTID, 0, @MAP_NAME$);
+
+ // Instance already exists, or something went wrong
+ // Let's assume it exists
+ if (.@instanceMapName$ == "") {
+ warp @MAP_NAME$, any(34,35), 48;
+ end;
+ }
+
+ // It'll be self-destroyed eventually...
+ instance_set_timeout(1000000, 1000000, .@INSTID);
+ instance_init(.@INSTID);
+ warp @MAP_NAME$, any(34,35), 48;
+ end;
+
+}
+
+017-1,58,32,0 script #GSign NPC_NO_SPRITE,{
+ mesc l("Guild Hall");
+ close;
+
+OnInit:
+ .distance=3;
+ end;
+}