summaryrefslogtreecommitdiff
path: root/npc/014-4
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-04-24 23:41:33 -0300
committerJesusaves <cpntb1@ymail.com>2020-04-24 23:41:33 -0300
commita7586bcc39480d612ab74de6e11e87d25689cf02 (patch)
tree7127b4d2c720805ca8bb7b281ebdfa21d7354244 /npc/014-4
parentd72d1c20ab35e684115b40ea0184e7f44f8608ac (diff)
downloadserverdata-a7586bcc39480d612ab74de6e11e87d25689cf02.tar.gz
serverdata-a7586bcc39480d612ab74de6e11e87d25689cf02.tar.bz2
serverdata-a7586bcc39480d612ab74de6e11e87d25689cf02.tar.xz
serverdata-a7586bcc39480d612ab74de6e11e87d25689cf02.zip
Guild Dungeon instance coding is much sturdier than Guild House
Diffstat (limited to 'npc/014-4')
-rw-r--r--npc/014-4/kamelot.txt32
1 files changed, 16 insertions, 16 deletions
diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt
index a3036d125..2bdcff38d 100644
--- a/npc/014-4/kamelot.txt
+++ b/npc/014-4/kamelot.txt
@@ -51,24 +51,24 @@ OnTouch:
end;
}
- // Build instance if it doesn't exists
- if (!isinstance($KAMELOT_ID[.@g])) {
- debugmes "Creating Instance";
- .@inst=instance_create("Kamelot@"+.@g, 0, IOT_GUILD);
+ // Build instance if it doesn't exists or has been reallocated
+ if (instanceowner($KAMELOT_ID[.@g]) != .@g) {
+ debugmes "Creating Instance for guild %d", .@g;
+ .@inst=instance_create("Kamelot@"+.@g, .@g, IOT_GUILD);
if (.@inst < 0)
Exception("Kamelot Instance Error", RB_DEFAULT|RB_ISFATAL);
- instance_attachmap("042-0", .@inst, 0, "042-0@"+.@g);
- instance_attachmap("042-1", .@inst, 0, "042-1@"+.@g);
- instance_attachmap("042-2", .@inst, 0, "042-2@"+.@g);
- instance_attachmap("042-3", .@inst, 0, "042-3@"+.@g);
- instance_attachmap("042-4", .@inst, 0, "042-4@"+.@g);
- instance_attachmap("042-5", .@inst, 0, "042-5@"+.@g);
- instance_attachmap("042-6", .@inst, 0, "042-6@"+.@g);
- instance_attachmap("042-7", .@inst, 0, "042-7@"+.@g);
- instance_attachmap("042-8", .@inst, 0, "042-8@"+.@g);
- instance_attachmap("042-9", .@inst, 0, "042-9@"+.@g);
- instance_attachmap("042-10", .@inst, 0, "042-10@"+.@g);
- instance_attachmap("042-11", .@inst, 0, "042-11@"+.@g);
+ instance_attachmap("042-0", .@inst, .@g, "042-0@"+.@g);
+ instance_attachmap("042-1", .@inst, .@g, "042-1@"+.@g);
+ instance_attachmap("042-2", .@inst, .@g, "042-2@"+.@g);
+ instance_attachmap("042-3", .@inst, .@g, "042-3@"+.@g);
+ instance_attachmap("042-4", .@inst, .@g, "042-4@"+.@g);
+ instance_attachmap("042-5", .@inst, .@g, "042-5@"+.@g);
+ instance_attachmap("042-6", .@inst, .@g, "042-6@"+.@g);
+ instance_attachmap("042-7", .@inst, .@g, "042-7@"+.@g);
+ instance_attachmap("042-8", .@inst, .@g, "042-8@"+.@g);
+ instance_attachmap("042-9", .@inst, .@g, "042-9@"+.@g);
+ instance_attachmap("042-10", .@inst, .@g, "042-10@"+.@g);
+ instance_attachmap("042-11", .@inst, .@g, "042-11@"+.@g);
instance_set_timeout(0, 0, .@inst);
instance_init(.@inst);
$KAMELOT_ID[.@g] = .@inst;