Boo Treasure
BooTreasure
BooTreasure allows you to have some treasure's chest spawn in you world.
The chest will be available to grab for a predefined duration, after that it disappear with its contents or if you decided to set your treasure with the 'preservecontent' flag the next treasure will gain all the non-grab stuff.
How it works ?
To create a treasure's chest launch this command in game:
/bootreasure chest create
This command launch a Conversation procedure, follow and answer the questions.
For the cron pattern asked, please report yourself here:
http://www.sauronsoftware.it/projects/cron4j/manual.php#p02
Explanations:
This plugin is a work in progress on Beta so be careful if you want to use it.
I can't be responsible of eventuakky lose on your server. Use it at your own risks.
For better performance the plugin don't search on all blocks to find a valid block where it can appear.
The plugin take one loaded chunk at random, it didn't browse all chunks. When it has a loaded chunk it searchs a block at random without browsing all the blocks. When the random block fullfill all requirements it uses it for future treasure's chest.
This is what it does :
- onlyonsurface: true
the search deal with only the highest blocks vertically - onlyonsurface: false
take a random loaded chunk and take the first block with air space
More things coming ..
TODO
- Add the support's block setup
- Add a WorldGuard condition
- Add a PreciousStones condition
- Add a fixed region condition
- Add a group only treasure
Credits
This plugin depends on :
- Vault
The plugin use a copy of:
BooTreasure-0.5
Beta release.
Please report me all errors that you'll can find.
A file 'errors.txt' will contain warning and errors, if you want to help me please provide me its content when you post errors.
Changes
- Initial Beta release, use it at your own risks, i can't be responsible for lose in your server
- for the moment the 'places' approach is not implemented
- to create a chest launch command -> /bootreasure chest create and follow the questions
Installation
Put the .jar in your 'plugins' folder.
On first start it creates its own folder with a config.yml, a messages.yml and a file 'treasures.yml'.
The treasures.yml will contain a treasure, it will be launched every minute multiple of 2 ( CronPattern: */2 * * * * ) and the chest will contains a bread.
If error or warning occured a file 'errors.txt' will be created with the error's message.
Usage
To create a treasure's chest :
/bootreasure chest create
This command launch a Conversation procedure, answer all the questions. If a question wait for a 'yes/no' answer use 'true' for 'yes' and 'false' for no. The sentences of this procedure is set on 'messages.yml'.
A serialized version of appeared treasure's chest will be stored in the folder 'lost+found'. On next restart to not let chest all other your worlds the plugin will remove this lost chests.
Warning
Please don't edit the 'treasures.yml' in the 'setup.contents' part because this is the chest's content representation except if you know what you're doing.
Need help ?
Feel free to join me at #boo on esper.net and hl me.
Perfect. I'm curious, thanks in advance for that update ♥.
Hi Finelarme2,
i'm working on the 'places' aspect and try to find an effective way to find good target support blocks in random loaded chunk.
I will not upload a release until i have a functional way to do that so.
Thanks,
Some news dude :) ?
Beta 0.5 was refused on my fault. I will clean uneeded integrated libraries and upload next version.
A Beta version is waiting approval.
Test it at your own risks, i can't be responsible of problems in your server. This is a beta version.
If you want to test it install the plugin as usual. On startup it will create all it need and a basic treasure.
To create a treasure's chest in game use the command:
This command launch a Conversation procedure, please answer all the questions and you're ready to have fun.
If a question wait for a yes/no question type 'true' for 'yes and 'false' for 'no'.
If you need to change the sentences of appear/disappear/found events you must edit the treasures.yml yourself and restart your server. Please don't touch the setup.contents part unless you know what you are doing.
In those messages you can use variables %name% for the treasure's name, %x% %y% %z% and %world%.
The 'messages.yml' contains sentences for the procedures.
When an error or warning happen this error will be stored in a file called 'errors.txt'. If you want to contribute or report error please provide its content with your message. Thank you.
This plugin will be amazing, you'll see. Believe me.
I can't wait for the worldguard regions feature! This is truly an amazing plugin!
@Finelarme2
Salut,
si ca te parle de self signed c'est que tu as choisis de te connecter en ssl. Si tu veux te connecter en ssl utilises le port 6697 il me semble et coches éventuellement la case de 'untrusted'. Le plus simple est que tu te co pas en ssl mais en normal sur le port 6667.
Hey guy :).
I have a server MCPC+ on verygames for test, or server local on my computuer, as you want. Say me. I come on IRC too.
Your version to test is in 1.6.2 ?
Mais j'ai vue que tu es français ? Cela simplifiera peut-être le beta-testing. Hum, d'ailleurs comment venir te parler sur IRC, mon soft me dit "Connection failed (self signed certificate.? (18))" quand je me co à Esper.
Hello, i need some beta testers for future version.
You must have a test server and the ability to join me on IRC:
server: irc.esper.net
port: 6667
channel: #boo
Thank you in advance,
@S1lverK3y
Hi S1lverK3y,
you can't do that for now.
With this alpha version you can only make treasure's chest that appear/disappear on a cron time based interval.
how do i make so chests don't despawn or how do i make that if they're looted or spawned they don't respawn but let others spawn, too?
Hi UnderscoreZero
you can try :
Let me know if it doesn't work, i'll plan to work again on this plugin.
How do I make it so that there are no messages when they spawn/found/dissapear?
@bee2397
Hello,
the messages part is a part of your treasures.yml. You can edit 3 sentences for 3 events:
You must edit them so :)
Hi um i was wondering how i change the language of when it spawns and such
@CJHacker
I forgot to tell something about the process.
To avoid treasure's chest to stay in the map after a reboot and before it dies there is something to know.
The plugin forget all of the treasures on reboot but serialize living chests location in files on 'losts/' folder. When a treasure's chest appear normally its file's location representation is created in 'losts/' folder and when it disappear its file is deleted.
So if your server stop before the end of treasure's living time (normal stop/crash) on the next start the plugin start by removing old treasure's chest and after it start to cache all treasures.
This is the way so if it don't do the job there is a problem on my side too. Thank you,
@boozaa
I do not remember seeing that error in my console, no.
I'm good where I've got it set now with places set and onlyonsurface to true. Just thought I'd mention the other things in case anyone else was running into that. Thanks for pointing out the different scenarios though, I can think of several times when they'd all be useful.
Thanks for a great plugin!
@CJHacker
Can you confirm me that when you want to spawn a treasure with 'onlyonsurface' and 'places' and nothing happen you don't have this kind of message in console:
Can't find a good place for spawning this chest on loaded chunks
This is how it must works, keep in mind that it operates only on loaded chunks (if it doesn't work like that something is wrong on my side):
The chest must appear on a highest empty block vertically (in y axis so) so over the existent highest block. There must be no other block than air over it.
The chest must appear over an existent block but in an air block (empty block)
The chest must appear on a highest empty block vertically (in y axis so) and over the existent highest block on a type that you fixed in places
The chest must appear over an existent block on a type that you fixed in places but in an air block (empty block)
Edit:
you can set 'duration' to 30s and cron pattern "*/1 * * *" so every minute. I think i must make a test command later.
@boozaa
Double chests work great on the new version!
I had just set it to 5 minutes because I got sick of waiting 15 minutes for it to spawn while testing. :-) I've changed it back to the default for now.
When I was first testing it, I didn't need to have any users logged in and it would spawn a chest. I logged in and did get it to spawn a chest with that config.
Here's some strange things I noticed.
With the 'places' value entered and onlyonsurface set to false, it did not appear to spawn a chest for me. With no places entered and onlyonsurface set to true, it was spawning a box with 0 players on. With no places entered and onlysurface set to false, it would spawn chests, but they appear to be replacing blocks on my world instead of on top of them. Is that how onlyonsurface should work? Or should it just be the highest block where the sky is visible?
I'll have to do some further testing to verify this.