summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/003-1/lieutenantdausen.txt8
-rw-r--r--npc/009-1/guards.txt8
-rw-r--r--npc/012-1/guards.txt8
-rw-r--r--npc/020-1/guards.txt9
-rw-r--r--npc/functions/siege.txt14
5 files changed, 11 insertions, 36 deletions
diff --git a/npc/003-1/lieutenantdausen.txt b/npc/003-1/lieutenantdausen.txt
index 620a837c2..420a04e16 100644
--- a/npc/003-1/lieutenantdausen.txt
+++ b/npc/003-1/lieutenantdausen.txt
@@ -142,14 +142,6 @@ OnStartSiege:
OnGuardDeath:
end;
-// Respawn monster from $@SIEGE_TMPMOBS memory
-OnRespawn:
- getmapxy(.@m$,.@x,.@y,0);
- siege_spawn(.@m$, any_of($@SIEGE_TMPMOBS), 1, .name$+"::OnRespawn");
- if (rand(10000) <= $coinsrate+($@SIEGE_TULIM*50))
- makeitem StrangeCoin, 1, .@m$, .@x, .@y;
- end;
-
// Timers
OnTimer35000:
siege_setup("003-1");
diff --git a/npc/009-1/guards.txt b/npc/009-1/guards.txt
index 24a0652da..f34e5f406 100644
--- a/npc/009-1/guards.txt
+++ b/npc/009-1/guards.txt
@@ -59,14 +59,6 @@ L_MKControl:
}
close;
-// Respawn monster from $@SIEGE_TMPMOBS memory
-OnRespawn:
- getmapxy(.@m$,.@x,.@y,0);
- siege_spawn(.@m$, any_of($@SIEGE_TMPMOBS), 1, .name$+"::OnRespawn");
- if (rand(10000) <= $coinsrate+($@SIEGE_HURNS*50))
- makeitem StrangeCoin, 1, .@m$, .@x, .@y;
- end;
-
OnMKSiege:
$@SIEGE_HALIN=rand(1,10);
OnStartSiege:
diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt
index bbe01793e..2686808ac 100644
--- a/npc/012-1/guards.txt
+++ b/npc/012-1/guards.txt
@@ -597,14 +597,6 @@ OnInit:
012-1,0,0,0 script #HurnscaldSiege NPC_HIDDEN,{
end;
-// Respawn monster from $@SIEGE_TMPMOBS memory
-OnRespawn:
- getmapxy(.@m$,.@x,.@y,0);
- siege_spawn(.@m$, any_of($@SIEGE_TMPMOBS), 1, .name$+"::OnRespawn");
- if (rand(10000) <= $coinsrate+($@SIEGE_HURNS*50))
- makeitem StrangeCoin, 1, .@m$, .@x, .@y;
- end;
-
// Begin Siege
OnMKSiege:
$@SIEGE_HURNS=rand(1,10);
diff --git a/npc/020-1/guards.txt b/npc/020-1/guards.txt
index b9344d6aa..6d5ec7836 100644
--- a/npc/020-1/guards.txt
+++ b/npc/020-1/guards.txt
@@ -16,15 +16,6 @@
legiontalk; end;
}
-// Respawn monster from $@SIEGE_TMPMOBS memory
-OnRespawn:
- getmapxy(.@m$,.@x,.@y,0);
- siege_spawn(.@m$, any_of($@SIEGE_TMPMOBS), 1, .name$+"::OnRespawn");
- if (rand(10000) <= $coinsrate+($@SIEGE_NIVAL*50))
- makeitem StrangeCoin, 1, .@m$, .@x, .@y;
- end;
-
-
L_MKControl:
mesn;
mes "Oh noes! You've found the Nivalis control panel!";
diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt
index c528d9442..c4bb47ae1 100644
--- a/npc/functions/siege.txt
+++ b/npc/functions/siege.txt
@@ -224,15 +224,15 @@ function script siege_cast {
.@e=any_of($@SIEGE_TMPMOBS);
array_remove($@SIEGE_TMPMOBS, .@e);
- siege_spawn(.@mz$, .@e, .@a, .@n$+"::OnRespawn");
+ siege_spawn(.@mz$, .@e, .@a, "#SiegeCtrl::OnRespawn");
.@e=any_of($@SIEGE_TMPMOBS);
array_remove($@SIEGE_TMPMOBS, .@e);
- siege_spawn(.@mz$, .@e, .@a, .@n$+"::OnRespawn");
+ siege_spawn(.@mz$, .@e, .@a, "#SiegeCtrl::OnRespawn");
.@e=any_of($@SIEGE_TMPMOBS);
array_remove($@SIEGE_TMPMOBS, .@e);
- siege_spawn(.@mz$, .@e, .@a, .@n$+"::OnRespawn");
+ siege_spawn(.@mz$, .@e, .@a, "#SiegeCtrl::OnRespawn");
return;
}
@@ -241,6 +241,14 @@ function script siege_cast {
- script #SiegeCtrl NPC_HIDDEN,{
end;
+OnRespawn:
+ if (playerattached()) {
+ getmapxy(.@m$,.@x,.@y,0);
+ if (rand(10000) <= $coinsrate)
+ makeitem StrangeCoin, 1, .@m$, .@x, .@y;
+ }
+ end;
+
// Boss Death Labels
OnLieutenantDeath:
getitem StrangeCoin, 1;