EngineHub / EngineHub/CraftBook

Command items - randomness

Open
#928 0 comments 0 reactions 0 assignees View on GitHub
status:accepted type:feature-request
Dominant language
Java
Stars
320
Forks
166
Avg merge
6d 21h
Merged PRs (30d)
2

Description

CRAFTBOOK-3079 - Reported by Iwitrag

Hello,

I've been thinking about this possible feature of command items.

~ RANDOMNESS ~

With this you could do something like:

when item is opened:
chance 0.5% that { those commands will happen ; exit ;}
change 1.0% that { those commands will happen ; exit ;}
and so on...

This could be great feature for RPG style servers, with lot of various boxes, event items, etc...

Example:
Christmas gift box
When used by left mouse click, this item will randomly spawn item to your inventory

when item is opened:
chance 1.5% that { give diamond ; say you got a diamond ! ; exit ; }
chance 1.0% that { give emerald ; say you got an emerald ! ; exit ; }
chance 0.5% that { give diamond block ; say you got a diamond block ! ; exit ; }
else (no possibility met) { say you was unlucky, good luck next time ! ; exit ; }

I hope you understand

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.