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
Trying to make a "gift chest"
Author Message
Jozack
Apprentice
*

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



Post: #11
RE: Trying to make a "gift chest"
Using the script as is with .add i_loot_chest - the chest remains visible and does not decay. I have two regular chars logged in to test with. Both can still see and access the chest once the item inside has been taken by one of them. I'm going to try your updated script now.

OMG you're my hero!!!!! YES it works....exactly like I want it to! THANK YOU SO MUCH!!!!
(This post was last modified: 05-03-2017 09:48 AM by Jozack.)
05-03-2017 09:39 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #12
RE: Trying to make a "gift chest"
maybe the problem is not really on the script, but how you put the idea on the script, because this script is acting a bit different compared to the description on 1st post

I said about statf_decay because I thought you're trying to remove the container to let the worldgem bit create another one with another item inside, but probably this is not what you're trying to do, you just need an container that keep creating new itens inside it when someone pick the item:
Code:
[ITEMDEF i_loot_chest]
ID=i_chest_metal_brass
NAME=Loot Chest
TYPE=t_container

ON=@Create
ATTR=attr_move_never
TIMER=1

ON=@Timer
SERV.NEWITEM i_bow_vanq
NEW.CONT=<UID>
return 1

ON=@PickUp_Self
TIMER=10  //start the timer to create another item when someone pick the current item

ON=@DropOn_Self
return 1  //don't allow players drop items inside the container to avoid break the script functionality
05-03-2017 10:48 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
Post Reply 


Forum Jump:


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