summaryrefslogtreecommitdiff
path: root/npc/015-8-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-06-03 16:16:45 -0300
committerJesusaves <cpntb1@ymail.com>2019-06-03 16:16:45 -0300
commit45ca4be7791975f0e008a8fb60aeadabec2a21c7 (patch)
tree87cbc26c00ea19a955cddd27580df3f9756d4f83 /npc/015-8-1
parentbfafc9f6b0d9cf8b02088a914a1e3680cea92957 (diff)
downloadserverdata-45ca4be7791975f0e008a8fb60aeadabec2a21c7.tar.gz
serverdata-45ca4be7791975f0e008a8fb60aeadabec2a21c7.tar.bz2
serverdata-45ca4be7791975f0e008a8fb60aeadabec2a21c7.tar.xz
serverdata-45ca4be7791975f0e008a8fb60aeadabec2a21c7.zip
Make traps more flexible, bugfix
Diffstat (limited to 'npc/015-8-1')
-rw-r--r--npc/015-8-1/campaign.txt22
-rw-r--r--npc/015-8-1/puzzle.txt5
2 files changed, 21 insertions, 6 deletions
diff --git a/npc/015-8-1/campaign.txt b/npc/015-8-1/campaign.txt
index fa3e97b9a..96a943782 100644
--- a/npc/015-8-1/campaign.txt
+++ b/npc/015-8-1/campaign.txt
@@ -16,6 +16,10 @@ OnBegin:
.@m$=getmap();
.@in=getq2(HurnscaldQuest_Sagratha);
+ //debugmes "Initialized - Inst ID %d", .@in;
+ //debugmes "Map %s.gat - NPC Name %s", .@m$, .name$;
+ //debugmes "NPC UUID %s (%s)", instance_npcname(.name$), instance_npcname(.name$, .@in);
+
setq3 HurnscaldQuest_Sagratha, 1;
// We're in an instance, ofc. Here we still have player attached.
//npctalk3 l("Open your eyes!");
@@ -28,10 +32,10 @@ OnBegin:
monster .@m$, 49, 45, "Real Monster", RedSlime, 1;
// max AI id 4. You are in 49,39
- monster .@m$, 49, 41, "AI Tx", RedSlime, 1, instance_npcname(.name$, .@in)+"::OnError", Size_Medium, 2;
- monster .@m$, 51, 41, "AI Xt", RedSlime, 1, instance_npcname(.name$, .@in)+"::OnError", Size_Medium, 2;
+ monster .@m$, 49, 41, "AI Tx", RedSlime, 1, instance_npcname(.name$)+"::OnError", Size_Medium, 2;
+ monster .@m$, 51, 41, "AI Xt", RedSlime, 1, instance_npcname(.name$)+"::OnError", Size_Medium, 2;
- addtimer(5000, instance_npcname(.name$, .@in)+"::OnError");
+ addtimer(5000, instance_npcname(.name$)+"::OnError");
end;
// Assassin, HoodedNinja, HoodedAssassin (boss)
@@ -52,13 +56,21 @@ OnInit:
// Dummy NPC to fire #SaggyDungeonCore when you get close to battle scene
015-8-1,49,39,0 script #SaggyDungeonFire NPC_HIDDEN,1,0,{
end;
+
OnTouch:
if (instance_id() < 0)
end;
- if (!getq3(HurnscaldQuest_Sagratha))
- doevent "#SaggyDungeonCore::OnBegin";
+ if (!getq3(HurnscaldQuest_Sagratha)) {
+ .@in=getq2(HurnscaldQuest_Sagratha);
+ doevent(instance_npcname("#SaggyDungeonCore", .@in)+"::OnBegin");
+ }
+ end;
+
+OnInit:
+ .distance=0;
end;
+
}
diff --git a/npc/015-8-1/puzzle.txt b/npc/015-8-1/puzzle.txt
index 2cd158e10..f0827c2cf 100644
--- a/npc/015-8-1/puzzle.txt
+++ b/npc/015-8-1/puzzle.txt
@@ -32,7 +32,10 @@ OnTouch:
OnTouchNPC:
OnTouch:
// instance_id()
- SteelTrap(rand2(10, 40), 5, any(0,0,0,1));
+ if (instance_id() >= 0)
+ SteelTrap(rand2(10, 40), 5, any(0,0,0,1), instance_npcname(.name$));
+ else
+ SteelTrap(rand2(10, 40), 5, any(0,0,0,1));
end;
OnTimer10000: