Cuberite Forum
Random spwn items - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Requests (https://forum.cuberite.org/forum-3.html)
+--- Thread: Random spwn items (/thread-2926.html)

Pages: 1 2


RE: Random spwn items - Boo - 05-16-2017

i need a my random list spawn from ini file...


RE: Random spwn items - xoft - 05-16-2017

@Boo, you need to describe what you want in a lot of details. Explain it like I'm 5 years old. Write as much as possible. We hate guessing.


RE: Random spwn items - Boo - 05-16-2017

i need to make random spawner of item, i write to ini file list of items , and put into the world random spawner item and that spawn items Every few seconds


RE: Random spwn items - xoft - 05-16-2017

Still not good enough. Does that mean that an admin places a mobspawner-like block that can spawn pickups around it, or does it mean that regular players choose where to spawn the items? Who creates the list (admin / players), what happens after a pickup is spawned from that list - does it get removed, or can it be reused?


RE: Random spwn items - Boo - 05-16-2017

Admin create the list,

items pich up around the spawner

Spawner not remove, spawn items regular (reused)


RE: Random spwn items - Seadragon91 - 05-20-2017

@Boo 

I created a plugin that should do what you want. It's ready for testing.
https://github.com/Seadragon91/ItemSpawner
  • The README on the github page contains the command and what it do, also "/itemspawner help" in-game will list them
  • The storage of the spawners is done in a sqlite db
  • The items for the spawner is in file file drop_items.ini in plugin folder in , a example one will be generated at server startup (Plugin name has to be in settings.ini)
Format of drop_items.ini:
Code:
<item type>:<amount>:<damage value>

The damage value is optional.

The file ItemSpawner.lua contains at top the variables:
  • g_DefaultRadius
  • g_DefaultInterval
As the name indicate this are default values, they are used for the command '/itemspawner create'.
Here a basic usage. The args in square brackets are optional and the values from the variables above are used.
  • /itemspawner create test
  • /itemspawner enable test
This two commands will create a item spawner at your location and enable it, currently there is nothing placed, write if you want something placed

Well then please test it  Smile  . Discover the plugin and the commands.

If an error occurs. the stack trace should be then in the console.

Edit, problem fixed:
- Fixed crash, item list was empty
- Close database, if plugin gets disabled.


RE: Random spwn items - Cl1608Ho - 05-20-2017

Can you place some type of spawner, or generally take an ID as input (and if that block is destroyed, the itemspawner is destroyed too)