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-nmm7 (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-nmm7 (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-nmm7 (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 Spawns in Chests
Author Message
Jozack
Apprentice
*

Posts: 34
Likes Given: 15
Likes Received: 0 in 0 posts
Joined: Apr 2017
Reputation: 0



Post: #1
Item Spawns in Chests
I'm trying to get an item spawn in a chest. Can't seem to get it to work, at all. I'm setting a worldgem bit, with what I want to spawn at what intervals, placing the gem in the chest, initializing it.....but nothing. What am I doing wrong? Or is there another way to accomplish this?
04-29-2017 02:49 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Item Spawns in Chests
If i remember well, when an item is inside a container, its timer value doesn't decrease, so in your case it will never spawn.
You have to spawn instead the container that holds the items.

Example:

Code:
[DEFNAME random_template_test]
random_loot_test { i_mace 1 i_dagger 1 }


[TEMPLATE tmp_container_test]
CATEGORY=Item Templates
SUBSECTION= New Loot Templates
DESCRIPTION=Test Template
container = i_chest_metal
ITEM = random_loot_test
ITEM = i_gold,{200 300}

Then place the worldgem bit manually or by Axis2.
Remember two things when place an item spawn:
The item will disappear when its timer value reach 0
If the item is moved or activated, the spawn will generate another item.
(This post was last modified: 04-29-2017 04:29 AM by darksun84.)
04-29-2017 03:43 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes darksun84's post
Jozack
Apprentice
*

Posts: 34
Likes Given: 15
Likes Received: 0 in 0 posts
Joined: Apr 2017
Reputation: 0



Post: #3
RE: Item Spawns in Chests
Aaaah I'm such a dunce sometimes! Thank you kind sir!!

Where do I place that code??
(This post was last modified: 04-29-2017 04:49 AM by Jozack.)
04-29-2017 04:30 AM
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)