diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-05-02 16:17:50 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-05-02 16:17:50 -0400 |
commit | f8924867ee3e1020cb9fc73df98c22218a52ad2f (patch) | |
tree | 22bde1b4723e9a653722afd898354c3ef422e034 /world/map/npc/055-1/pumpkins.txt | |
parent | 2f97a15b49bf8c43ff9761e058b1a19a13856067 (diff) | |
parent | 3ad45c53e32f0700f68c429fd818372d9892c6d8 (diff) | |
download | serverdata-f8924867ee3e1020cb9fc73df98c22218a52ad2f.tar.gz serverdata-f8924867ee3e1020cb9fc73df98c22218a52ad2f.tar.bz2 serverdata-f8924867ee3e1020cb9fc73df98c22218a52ad2f.tar.xz serverdata-f8924867ee3e1020cb9fc73df98c22218a52ad2f.zip |
Merge pull request #492 from mekolat/puppet-checks
Puppet checks
Diffstat (limited to 'world/map/npc/055-1/pumpkins.txt')
-rw-r--r-- | world/map/npc/055-1/pumpkins.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/world/map/npc/055-1/pumpkins.txt b/world/map/npc/055-1/pumpkins.txt index 1c2535f7..87dfca4c 100644 --- a/world/map/npc/055-1/pumpkins.txt +++ b/world/map/npc/055-1/pumpkins.txt @@ -83,6 +83,8 @@ OnReallyDestroy: S_MakeNode: set .nID, .nID + 1; // give the node an id set .@name$, "#_Pkin" + chr(3) + .nID; + if (.nID == 2147483647) + set .nID, 0; // start over if id = 0x7FFFFFFF goto S_FindXY; S_FindXY: @@ -94,13 +96,13 @@ S_FindXY: S_ReallySpawn: set .@p, puppet(.m$[.i], .@x, .@y, .@name$, 32767); // spawn the node (but not on map, because 32767) + if (.@p < 1) goto S_MakeNode; // silently retry disablenpc .@name$; // make sure it can't be clicked by guessing the being id set .i, .i, .@p; // tell the puppet what object contains it set .death_t, rand(.death_t/2, .death_t), .@p; // tell the puppet when to die set .@timer, if_then_else(.done_initial[.i], rand(.appear_t/2, .appear_t), 0); // timer depends on if first spawn or if respawned after death addnpctimer .@timer, .@name$+"::OnAppear"; // we spawn the node instantly but it only appears after the timer - if (.nID == 2147483647) - set .nID, 0; // start over if id = 0x7FFFFFFF + set .nodes[.i], .nodes[.i] + 1; return; S_IterateObjects: @@ -112,7 +114,6 @@ S_IterateObjects: if (.nodes[.i] >= .max_nodes[.i]) goto S_NextObject; - set .nodes[.i], .nodes[.i] + 1; callsub S_MakeNode; if (.nodes[.i] < if_then_else(.done_initial[.i], .min_nodes[.i], .max_nodes[.i])) goto S_IterateObjects; |