diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-04-24 23:39:05 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-04-24 23:39:05 -0300 |
commit | d72d1c20ab35e684115b40ea0184e7f44f8608ac (patch) | |
tree | c99a7eed9f4e5e1299e7201251672b8d2b09bb50 /npc/014-4/kamelot.txt | |
parent | 46ff8ac06c683167962e25ccf43285ef49f7b9fc (diff) | |
download | serverdata-d72d1c20ab35e684115b40ea0184e7f44f8608ac.tar.gz serverdata-d72d1c20ab35e684115b40ea0184e7f44f8608ac.tar.bz2 serverdata-d72d1c20ab35e684115b40ea0184e7f44f8608ac.tar.xz serverdata-d72d1c20ab35e684115b40ea0184e7f44f8608ac.zip |
Prototype code
Diffstat (limited to 'npc/014-4/kamelot.txt')
-rw-r--r-- | npc/014-4/kamelot.txt | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt index 122b8134d..a3036d125 100644 --- a/npc/014-4/kamelot.txt +++ b/npc/014-4/kamelot.txt @@ -30,11 +30,54 @@ end; OnTouch: + // XXX STATUS: STAGING XXX if (!is_staff()) end; + + // Not in a guild: Gate is sealed (MK might be excluded as well) + if (getcharid(2) <= 0) { + dispbottom l("The gates are firmly shut. A warning is on the door, \"DO NOT ENTER. Guild Only.\""); + end; + } + + // Save your GID for reference + .@g=getcharid(2); + + // TODO: Cooldown expired? Defeat artifact? + + // Quest already started + if ($KAMELOT_QUEST[.@g] & 1) { + dispbottom l("The gates are firmly shut by some weird magical power."); + end; + } + + // Build instance if it doesn't exists + if (!isinstance($KAMELOT_ID[.@g])) { + debugmes "Creating Instance"; + .@inst=instance_create("Kamelot@"+.@g, 0, 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_set_timeout(0, 0, .@inst); + instance_init(.@inst); + $KAMELOT_ID[.@g] = .@inst; + } + + // You can enter in every other stage dispbottom l("Advised Raid Party: One Thief, one Mage"); if (is_admin()) - warp "042-0", any(59, 60), 80; + warp "042-0@"+.@g, any(59, 60), 80; end; } |