The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Item creation after monsters death
Author Message
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #1
Item creation after monsters death
Hello, I'm trying to create an item generator. For example, there is a stone in the middle with monsters surrounding it. If a player double clicks this stone before all the monsters are killed, it will do nothing. But after all the monsters are killed, and he double clicks the stone, it will put an item in his bag. Then setting a timer on the stone after the monsters are killed for them to re spawn and resetting the stone back to step 1. I'm not asking for a full script (although that'd be nice) just a good head start on how to put this into play.

Only thing I'm stuck on is how to link the stone to the monsters, after they spawn. I thought of linking their UIDs but they change after they respawn, so that wouldnt work i dont think.

Any help is greatly appreciated, thank you!
01-26-2014 06:03 PM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #2
RE: Item creation after monsters death
If you are using default respawn items, link the stone item with spawn item and get info from it.

on=@dclick
info from ui.<link>.amount/more2

t_spawn_char
AMOUNT = The maximum amount of NPCs the spawner should create
MORE2 = The current number of creatures spawned from this point

Or store these informations + spawn time and template in the stone itself and make your own typedef.

There will be other options too.
(This post was last modified: 01-26-2014 09:41 PM by Alaric.)
01-26-2014 09:40 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)