summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-06 20:05:46 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-06 20:05:46 -0300
commit1e32412e91d3321cc18f5966d7e8943e5da4181d (patch)
tree410f1cabd7ccd0720db581566ac384611d1192f2 /npc/functions
parentf91f7c17930746a2a29fe4fdc4f4244456aae423 (diff)
downloadserverdata-1e32412e91d3321cc18f5966d7e8943e5da4181d.tar.gz
serverdata-1e32412e91d3321cc18f5966d7e8943e5da4181d.tar.bz2
serverdata-1e32412e91d3321cc18f5966d7e8943e5da4181d.tar.xz
serverdata-1e32412e91d3321cc18f5966d7e8943e5da4181d.zip
Sacrifice some coin drop rate in exchange for no respawn and unified drops
on Siege
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/siege.txt14
1 files changed, 11 insertions, 3 deletions
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;