SphereCommunity
Bag restock - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Bag restock (/Thread-Bag-restock)



Bag restock - Leonidas - 12-16-2016 03:45 PM

I'm trying to have a bag on the ground restock the items inside of it. I've tried making a template and spawning that with a max amount of 1. Everytime the gembit's timer runs out it just spawns another bag. How can I do this?


RE: Bag restock - pointhz - 12-17-2016 07:30 AM

Dont use the gembit, just set a timer to the bag.


RE: Bag restock - Leonidas - 12-17-2016 09:02 AM

Yeah I tried doing that but just couldn't figure out how to get the newly created item into the bag.

Code:
ON=@TIMER
newitem = i_test
//how do i get the dagger in the bag from here? set it's p? bounce it into the bag?



RE: Bag restock - Kanibal - 12-18-2016 08:00 PM

Code:
ON=@TIMER
if (<rescount.i_reag_mandrake_root> < 50)
    serv.newitem i_reag_mandrake_root, <eval 50 - <rescount.i_reag_mandrake_root>>, <uid>, 0
endif



RE: Bag restock - rastrero - 12-19-2016 07:44 AM

serv.newitem i_reag_mandrake_root, <eval 50 - <rescount.i_reag_mandrake_root>>, <uid>, 0

This way to put all in the same lane is a new feature? or old one? didnt know it. ty


RE: Bag restock - Kanibal - 12-19-2016 08:27 AM

(12-19-2016 07:44 AM)rastrero Wrote:  This way to put all in the same lane is a new feature? or old one? didnt know it. ty

http://wiki.sphere.torfo.org/index.php?title=Chapter_7#NEWITEM


RE: Bag restock - Leonidas - 12-19-2016 01:58 PM

Thanks man, that's working perfectly.