diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-01-26 12:27:30 -0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-01-26 12:27:30 -0200 |
commit | 31ae85fa7150dbe25f2b4ad701dbb0acbdfc3c0d (patch) | |
tree | 1dda7c445f112eea338bedcbf6db0a32a12c5ebe | |
parent | 48a26f15ebb747e4835e57a3f5ae66e8527b7247 (diff) | |
download | serverdata-31ae85fa7150dbe25f2b4ad701dbb0acbdfc3c0d.tar.gz serverdata-31ae85fa7150dbe25f2b4ad701dbb0acbdfc3c0d.tar.bz2 serverdata-31ae85fa7150dbe25f2b4ad701dbb0acbdfc3c0d.tar.xz serverdata-31ae85fa7150dbe25f2b4ad701dbb0acbdfc3c0d.zip |
Polish a bit the Random Treasure Chest (aka. the @Krists great experiment).
Oh, did I mention special dungeon fishing testing getting in previous commit?
-rw-r--r-- | npc/007-1/treasure.txt | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/npc/007-1/treasure.txt b/npc/007-1/treasure.txt index 6547ae8ee..f4ec03d6f 100644 --- a/npc/007-1/treasure.txt +++ b/npc/007-1/treasure.txt @@ -19,14 +19,15 @@ OnInit: } /* -007-1,87,73,0 duplicate(#fishing_00710) #fishing_00711 NPC_WATER_SPLASH -007-1,31,52,0 duplicate(#fishing_00710) #fishing_00712 NPC_WATER_SPLASH -007-1,30,63,0 duplicate(#fishing_00710) #fishing_00713 NPC_WATER_SPLASH -007-1,64,127,0 duplicate(#fishing_00710) #fishing_00714 NPC_WATER_SPLASH +007-1,x,y,0 duplicate(#fishing_00710) #fishing_00711 NPC_WATER_SPLASH +007-1,x,y,0 duplicate(#fishing_00710) #fishing_00712 NPC_WATER_SPLASH */ // Animation code by Evol Team // 4144, gumi, Hal9000, Reid +// (Random) Treasure Chest +// Authored by Jesusalva +// Regenerates every 6 hours 007-1,0,0,0 script #chest_00710 NPC_CHEST,{ if (!.busy && !.empty) { @@ -73,8 +74,12 @@ OnInit: .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing .busy = true; // lock until available again initnpctimer; + } else if (!.busy) { + mesc l("Someone looted this treasure box already..."); + } else { + end; } - end; + close; OnTimer160: .dir = .dir == 6 ? 0 : 4; // closing ? closed : open @@ -93,12 +98,15 @@ OnInit: end; OnClock0156: +OnClock0756: OnClock1356: - // Try to warp randomly to a walkable spot, up to 30 attempts +OnClock1956: + // Try to warp randomly to a walkable spot, up to 20 attempts + // Otherwise, it'll stay where it already is (but will close and refill). .@e=0; .@x=0; .@y=0; while (!checkcell(.mp$, .@x, .@y, cell_chkpass)) { - if (.@e == 30) { + if (.@e == 20) { .@x=.x; .@y=.y; break; |