RE: Spawn in small crate possible?
Force the worldgem bit to spawn a custom crate instead of an item.
The custom crate can be something like:
[ITEMDEF i_crate_custom_spawn]
ID=i_crate_small
ON=@CREATE
NEWITEM=I_BAG, 1, <UID> // List of items you want inside it. NEWITEM="ITEM ID", "ITEM AMOUNT", "CONTAINER"
You can test it by using this: (It will create a spawn at your feet)
[FUNCTION f_crate_custom]
SERV.NEWITEM i_worldgem_bit
NEW.P=<SRC.P>
NEW.AMOUNT=1
NEW.TYPE=t_spawn_item
NEW.MORE1=i_crate_custom_spawn
NEW.MOREP=5,10,0 // "Min spawn time in minutes","Max spawn time in minutes","Spawn distance in tiles"
NEW.DCLICK
I probably misunderstood what you asked for xD
If you want items to be spawned/restocked on a certain container every X time, instead of spawning a whole new container, then you won't be using worldgem bits but timerf function instead perhaps:
[ITEMDEF i_crate_custom_spawn]
ID=i_crate_small
ON=@CREATE
TIMERF 1, f_crate_custom_spawn
[FUNCTION f_crate_custom_spawn]
IF (<COUNT> > 0)
FORCONT <UID> 0
REMOVE
ENDFOR
ENDIF
NEWITEM=I_BAG, 1, <UID> // List of items you want inside it. NEWITEM="ITEM ID", "ITEM AMOUNT", "CONTAINER"
NEWITEM=I_BACKPACK, 1, <UID> // List of items you want inside it. NEWITEM="ITEM ID", "ITEM AMOUNT", "CONTAINER"
NEWITEM=I_SPELLBOOK, 1, <UID> // List of items you want inside it. NEWITEM="ITEM ID", "ITEM AMOUNT", "CONTAINER"
TIMERF 10, f_crate_custom_spawn // Time you want it to restock in seconds. At the moment is 10 seconds just for test.
(This post was last modified: 10-18-2015 12:58 AM by pointhz.)
|