我已接管该项目,并计划将其完全复活,发挥其最强的所有功能。:) - 新作者 X_angelz_X
MCCasino
Minecraft 中的老虎机。
版本 0.2.2
此服务器模组允许你使用告示牌创建老虎机。告示牌会在其所在位置掉落物品,这些物品对应卷轴上的符号。你可以根据掉落的组合设置倍数奖励。玩家右键点击游戏告示牌时手中持有的物品将被视为赌注。同时也支持经济系统。
特性
- 设置简单且易于上手。
- 卷轴物品无法被拾取。
- 玩法简单。
- 支持权限系统。
- 支持 Vault 经济系统,这意味着只要你安装了 Vault,该插件就能与任何经济插件配合工作。
命令与权限
- mccasino.use:允许玩家使用/玩老虎机。
- mccasino.setup:允许玩家使用以下任何命令:
- /mccdel (机器名称):删除一台机器。
- /mcctest (机器名称):测试运行一台机器。
- /mccforceactive (机器名称):强制使一台机器处于活动状态。警告!这可能会导致问题。
用法
对于玩家:手持你的赌注(请记住,如果机器不使用限制或金钱赌注,整个堆叠的物品都将被拿走),然后右键点击游戏告示牌(第二行显示“Slot Machine”)。机器将开始运行,之后会停用 5 秒,接着掉落物会被删除,机器重新激活。如果机器设置为金钱赌注,你可以用任何东西右键点击来玩。
注意:由卷轴掉落的物品无法被拾取。
对于管理员:首先阅读你下载的 zip 存档中的 README.txt 文件。
现在,开始建造老虎机,如果你需要示例,请参阅截图。添加告示牌作为物品掉落的位置。为了将它们识别为卷轴,你必须遵循以下模板:
第一行:[MCCasino]
第二行:Reel
第三行:机器名称(例如:machine1)
第四行:卷轴编号(例如:2)
“卷轴编号”是可选的,但建议添加。如果卷轴被添加、移除或替换,这个数字将允许插件对它们进行重新排序。它对应于配置文件中设置的数字。
现在,在机器旁边添加一个遵循此模板的告示牌,这将是玩家与之交互的告示牌:
第一行:[MCCasino]
第二行:Slot Machine
第三行:机器名称(例如:machine1,与卷轴相同)
第四行:任意内容(或留空),未被使用。
所有告示牌都需要是墙式告示牌。
现在进入配置文件,添加/编辑“Machines:”下的条目,详见“Config”部分以获取帮助。
卷轴从 1 开始编号,直到你想要的数量,并且每个卷轴都有一个掉落列表及其掉落概率。例如,第一个卷轴掉落所有物品的几率相等(331 是红石,266 是金锭,264 是钻石)。
第二个卷轴掉落金的几率比红石大,掉落钻石的几率比金大。用于概率的数字应始终为整数,介于 1 到 100 之间,我建议这样做,尽管它是相对的:5、4 和 3 会得到与 50、40 和 30 相同的结果。
你可以拥有超过 4 个卷轴,只需为 '5' 添加一个条目即可。
关于奖励,它们分为两部分:一组掉落组合,列表中第一个属于第一个卷轴,依此类推;以及倍数奖励,这是一个整数。掉落物再次使用 ID,代表物品或方块,倍数用于乘以获胜者的赌注数量。
如果结果不匹配任何组合,默认为 0。
限制基本上是指允许的最大物品赌注。对于 machine2,这些限制已启用,因此玩家只能押注一个金锭或一个钻石。如果他持有更多,只会扣除所需的数量。
如果你启用了经济系统,机器将忽略物品,并直接从玩家的账户中扣除金钱(金额等于成本)。这里也应用倍数。你需要 Vault 才能使用经济功能。如果找不到任何经济插件,机器将使用物品赌注。
完成后,重新加载/重启服务器(或禁用并重新启用插件),然后重新登录。
接下来你需要“setup”权限:右键点击卷轴的告示牌,它们将被注册。重要提示:如果你没有在告示牌的最后一行添加卷轴编号,点击它们的顺序很重要,你应该始终从左到右点击。第一个点击的告示牌将链接到第一个卷轴,第二个到第二个,依此类推。
现在测试机器,你需要“use”权限。右键点击带有赌注的告示牌(使用泥土块或其他廉价资源),它应该开始运行。5 秒后,掉落物被删除,机器再次激活。只有当所有告示牌都存在且已注册时,机器才会首次激活。你也可以通过 "/mcctest (机器名称)" 进行快速测试。这不需要赌注。
要删除一台机器,只需破坏卷轴,然后在配置文件中删除相应的条目。你也可以使用 "/mccdel (机器名称)",但这不会修改配置文件。
如果你的机器莫名其妙地保持非活动状态,尝试使用 "/mccforceactive (机器名称)"。这将强制使其处于活动状态。我不对由此可能引起的任何问题负责。
配置
Machines:
machine1:
reels:
'1':
- 331-50
- 266-50
- 264-50
'2':
- 331-10
- 266-30
- 264-50
'3':
- 331-50
- 266-50
- 264-50
'4':
- 331-50
- 266-50
- 264-50
rewards:
- 264,264,264,264:5
- 331,266,266,331:3
- 266,264,264,266:4
- 331,266,264,331:6
- 331,331,331,331:2
- 266,266,266,266:10
economy:
use_economy: true
cost: 10
bet_limits:
enabled: false
allowed:
- 266-1
- 264-1
messaging:
message: '$6$[MCCasino] $7$$name$ won $$amount$!'
send_to: world
exclude_winner: true
radius: 20
machine2:
reels:
'1':
- 4-50
- 5-50
- 1-50
'2':
- 4-50
- 5-50
- 1-50
'3':
- 4-50
- 5-50
- 1-50
'4':
- 4-50
- 5-50
- 1-50
'5':
- 4-50
- 5-50
- 1-50
rewards:
- 1,1,1,1,1:5
- 4,5,1,5,4:3
- 5,1,4,1,5:4
- 4,5,1,5,4:6
- 4,4,4,4,4:2
- 5,5,5,5,5:10
- 5,5,5,5,5:10
- X,X,5,X,X:10 #The special character "x" is equal to any possible ID
economy:
use_economy: false
cost: 10
bet_limits:
enabled: true
allowed:
- 266-1
- 264-1
messaging:
message: '$6$[MCCasino] $7$$name$ won $amount$ $item$(s)!'
send_to: players_nearby
exclude_winner: true
radius: 15
“machine1” 应该是你在游戏里的告示牌上放置的机器的名称。
权限配置
此配置文件位于 MCCasino 文件夹中,名为 perms_config,并在插件启动时生成。对于大多数情况,你可能不需要更改它,但如果你使用的是 Permissions 3.0 及更早版本,或者不使用任何权限插件,则需要编辑它。
PermissionsSystem: SuperPerms #This config is case sensitive!!#
PlayerPerms:
- mccasino.use
“PermissionsSystem” 是要使用的权限检查系统。如果你使用的是支持 SuperPerms 的最新权限插件,请保持配置不变。
如果你不使用权限插件,请将字段设置为 “PlayerAndOP”。这将仅对 OP(管理员)设置所有权限,除非你将它们添加到 “PlayerPerms” 字段中。这基本上创建了一个简单的组系统:玩家、默认组(没有任何权限,除了添加到 “PlayerPerms” 字段的权限)以及拥有所有权限的管理员。
待添加功能
(标记为“已添加”的功能将在下一个版本中可用。)
源代码
源代码可以在这里找到:
欢迎贡献!
捐赠
如果你想为我的辛勤工作捐款,这里是链接:
在这里捐赠!
更新日志
版本 0.2.2
版本 0.2.1
- 修复了限制相关的问题,物品未能正确移除
- 修复了物品掉落时可被拾取的问题。
版本 0.2
- 添加了用于测试机器的命令。
- 添加了用于删除机器的命令。
- 添加了强制机器进入活动状态的命令。
- 添加了 Vault 经济支持,基本上就是支持所有经济插件。
- 修复了物品掉落问题。不再有水花效果。
- 添加了限制功能。
- 在结果组合中添加了特殊字符“x”。基本上,它等于任何可能的 ID。
版本 0.1
I've taken over the project, and I plan on reviving it fully to the strongest of all capabilities. :) - New Author X_angelz_X
MCCasino
Minecraft's one armed bandit.
Version 0.2.2
This server mod allows you to create a slot machine using signs. The signs will drop items at their location, these correspond to the symbols on a reel. You can set a multiplier reward according to the combination that falls out. The item the player is holding when right clicking the playing sign is considered as the bet. Economy support is also available.
Features
- Simple and easy setup.
- Reel items can't be picked up.
- Simple to play.
- Supports Permissions.
- Supports Vault economy, which mean that, as long as you install Vault, this plugin will work with every economy plugin.
Commands and permissions
- mccasino.use : allows a player to use/play slot machines.
- mccasino.setup : allows a player to use any of the following commands:
- /mccdel (machine name): delete a machine.
- /mcctest (machine name): test run a machine.
- /mccforceactive (machine name): force a machine into activity. Warning! This may cause problems.
Usage
For players: hold your bet (keep in mind that the entire stack will be taken, if the machine doesn't use limits, or a money bet), and right click the play sign (has "Slot Machine" on the second line). The machine will run, after it will be deactivated for 5 seconds, then the drops will be deleted, and it will reactivate. If the machine is set to money bets, you can right click with anything play.
Note: items dropped by the reels can't be picked up.
For admins: first read the README.txt file in the zip archive you downloaded.
Now, start by building the slot machine, if you need an example, see the screenshots. Add the signs where the items will be dropped. So they can be identified as reels, you must follow this template:
first line: [MCCasino]
second line: Reel
third line: name of the machine (example: machine1)
fourth line : number of the reel (ex: 2)
The "number of the reel" thing is optional, but it's recommended, if reels are added, removed or replaced, this number will allow the plugin to reorder them. It corresponds to the one set in the config.
Now add next to the machine a sign following this template, this will be the sign the players interact with:
first line: [MCCasino]
second line: Slot Machine
third line: name of the machine (example: machine1, same as the reels)
fourth line : anything you want (or nothing), it's not used.
ALL of the signs need to be wall signs.
Now go to your config, and add/edit an entry to "Machines:", see the "Config" section for help.
Reels are numbered 1 to whatever you want, and have a list of drops with the probability for the drop. For example, reel one has equal chances of dropping all its items (331 is redstone, 266, gold ingot and 264, diamond).
Reel 2 has more chances of dropping gold than redstone, and more of dropping diamond than gold. The number you use for the probabilities should always be whole, between 1 and 100, I suggest, although, it's relative: 5, 4 and 3 will get you the same results as 50, 40 and 30.
You can have more than 4 reels, just add an entry for '5'.
For the rewards, they're in two parts: a combination of drops, the first in the list belongs to reel one, and etc., and the multiplier reward, a whole number. The drops, again, are IDs, for items or blocks, and the multiplier is used to multiply the quantity of the bet for the winner.
If the results do not match any combination, the default is 0.
Limits are basically the maximum allowed item bets. For machine2, those are enabled, and so a player can only bet one gold or one diamond. If he's holding more, only the desired quantity will be taken.
If you enable economy, the machine will ignore items, and take money (same amount as the cost) directly from the player's account. Multipliers are applied here too. YOU NEED Vault for the economy function. If no economy plugin can be found, the machine will used item bets.
Now that you're done, reload/reboot the server (or disable and enable the plugin), and log back in.
You'll need the "setup" permission next: right click the signs for the reels, they'll be registered. IMPORTANT: the order in which you click them matters if you didn't add a reel number on the last line of the sign, you should always go from left to right. The first clicked sign will be linked to reel one, the second to two, and etc.
Now test the machine, you'll need the "use" permission for this. Right click the sign with your bet (use a dirt block or another cheap resource) and it should run. After 5 seconds, the drops are deleted, and the machine activates again. A machine is only first active if all of it signs are present and registered. You can also to a fast test with "/mcctest (machine name)". This doesn't require a bet.
To delete a machine, just punch out the reels, then erase the entry in the config. You can also use "/mccdel (machine name)", but this will not modify the config.
If you have any problems with a machine staying inexplicably inactive, try "/mccforceactive (machine name)".This will force it into activity. I am not responsible for any problems this might cause.
Config
Machines:
machine1:
reels:
'1':
- 331-50
- 266-50
- 264-50
'2':
- 331-10
- 266-30
- 264-50
'3':
- 331-50
- 266-50
- 264-50
'4':
- 331-50
- 266-50
- 264-50
rewards:
- 264,264,264,264:5
- 331,266,266,331:3
- 266,264,264,266:4
- 331,266,264,331:6
- 331,331,331,331:2
- 266,266,266,266:10
economy:
use_economy: true
cost: 10
bet_limits:
enabled: false
allowed:
- 266-1
- 264-1
messaging:
message: '$6$[MCCasino] $7$$name$ won $$amount$!'
send_to: world
exclude_winner: true
radius: 20
machine2:
reels:
'1':
- 4-50
- 5-50
- 1-50
'2':
- 4-50
- 5-50
- 1-50
'3':
- 4-50
- 5-50
- 1-50
'4':
- 4-50
- 5-50
- 1-50
'5':
- 4-50
- 5-50
- 1-50
rewards:
- 1,1,1,1,1:5
- 4,5,1,5,4:3
- 5,1,4,1,5:4
- 4,5,1,5,4:6
- 4,4,4,4,4:2
- 5,5,5,5,5:10
- 5,5,5,5,5:10
- X,X,5,X,X:10 #The special character "x" is equal to any possible ID
economy:
use_economy: false
cost: 10
bet_limits:
enabled: true
allowed:
- 266-1
- 264-1
messaging:
message: '$6$[MCCasino] $7$$name$ won $amount$ $item$(s)!'
send_to: players_nearby
exclude_winner: true
radius: 15
"machine1" should be the name of the machine you placed on the signs, in-game.
Permissions config
This config can be found in the MCCasino folder, it's called perms_config, and is generated on plugin startup. For most applications, you may not need to change it, but, if you use Permissions 3.0 and older, or if you do not use any permission plugin, you will need to edit it.
PermissionsSystem: SuperPerms #This config is case sensitive!!#
PlayerPerms:
- mccasino.use
"PermissionsSystem" is the permission checking system to use. If you use any up-to-date permissions plugin that support SuperPerms, leave the config as is.
If you do not use a permissions plugin, set the field to "PlayerAndOP". This will set all permissions at op only, unless you add them to the "PlayerPerms" field. This basically creates a simple group system: players, the default group with no permissions, except the ones added to the "PlayerPerms" field, and ops, who have all the permissions.
Features to add
(Features marked with "added" will be available in the next version.)
Source
The source code can be found here:
Feel free to contribute!
Donate
If you want to make a donation for all my hard work, here's a link:
Donate here!
Changelog
Version 0.2.2
- Added messaging
- Compatibility for the latest 1.2 builds
Version 0.2.1
- Fixed a problem with limits, items weren't being removed properly
- Fixed item being pickable as they were dropping.
Version 0.2
- Added a command to test a machine.
- Added a command to delete a machine.
- Added a command to force a machine into activity
- Added Vault economy support, basically, I added support for all economy plugins.
- Fixed items dropping. No more water stuff.
- Added limits.
- Added the special character "x" to the result combinations. Basically, it's equal to any possible ID.
Version 0.1
评论 0
登录后参与评分
还没有评论,来抢沙发吧