ScriptBlock
Welcome on the ScriptBlock v0.8.0 project page !
ScriptBlock is a CraftBukkit plugin inspired by the great Fluff's plugin Annotate and CommandSign !
It allow you to bind text, commands, or MANY commands to any block (levers, buttons, doors, Signs, etc...), triggered by clicking or walking on it !
Here is a Tutorial video made by Kunoichi Kitteh ! Thanks to here !
LiekMudkipzz also made a cool video of ScriptBlock ! It's a bit outdated, some commands have changed ! but Thanks to him too !
Here is the link !
Regarding Donators
Those who help me maintain motivation for Keeping this project updated !
I really Thanks them !
S4h4rk
StefanPelskamp
Slipswhitley
About 0.8.0...
Lot of change in the codes, in the commands, to make possible and easily, for other devs, the add of Options, and the use of ScriptBlock Options for other Minecraft Event than walk , and interact trigger ! ( ask for sources, and for help if you want to do one ! )
Also a New BIG and FULLY customizable permission system. See changes log for more informations !
Features
- Adding any text, command, or set of commands to a block (levers, buttons, doors, signs, etc...) with Various Options !
- Read any Text and execute any commands or command Script. that has been bound to a block with right or left-click !
- ScriptBlock use the Vault API ! You need to download it even if you don't want to use the Economy and Permissions features !
Download Vault - Support all permissions plugins supported by Vault or if you don't like permissions, it can be Op based only !
- Most of Economy plugins support (if Vault support it, ScriptBlock support it too ! ).
- MultiWorld Support.
- Player can use a bound command, even if he usually doesn't have the permission to use it, with the help of the @bypass prefix.
- You can edit scripts with a simple Text editor like notepad
++
. - Look at Changes Logs for more Infos !
Commands
Trigger:
- /sbinteract
is used for "on block interaction triggered" scripts ! - /sbwalk
is used for "on block walk triggered" scripts !
After you've choosen the kind of trigger you want , you need to choose the type of commands you want to send to ScriptBlock !
Types:
- create
Use this command to create a script and follow displayed informations ! - add
Use this command to add a command, or a script to an already created one, or to an already bound one. - remove
Use this command to remove a script from a block. - view
Use this command to view the script you've bound to a block ! - reload
This command let you reload the save file, to refresh the scripts bound on blocks !
Usefull when editing script in the BlocksData.yml save file while server is still running !
exemples:"/sbinteract create" , "/sbwalk create", "/sbinteract remove", "/sbwalk remove", etc...
Options
There is a lot of cool options you can use for your scripts ! You MUST at least use one option with your script to make it work !
Options List
Permissions
ScriptBlock Permissions system have a lot of possible customisation. You can use simple permissions nodes if you are admin and want full power, without taking the time to set up all the permissions for your players. Or you can take the time, and fully customize the way you want your players to use ScriptBlock.
Upcoming Features
- Per Player Cooldown.
Economy plugins support- Copy/paste Scripts. (low priority)
Add a Config file to edit Script that has been bound.More Permission NodesA command that let you know what commands you've bound to a block.- WorldGuard / Residence support. (low priority)
- Custom messages
- Chat color
I still can't work on Scriptblock and reply to all of your messages for now... I will do it when I'll be back from holidays !
@riffic33
Ok, when I have time (today hopefully), I'll definitely give that idea a try. Thanks again for the advice!
I think a neat script option would be to have a set number of times a player can use the block and an option to have that script reset after a certain amount of time.
@sykefuu
Not that I know of.
ccan you do a check like
"player is not in group X" ?
In reference to my below @if upgrade:
It is possible currently to do something similiar using purely groups and I have already started implementing this. For example you could have a quest chain with a permission called quest(insertNum here) and then when a user clicks a sign and they are a registered member of your server use this command:
/sbcreate [@group:member][@group:quest(insertNum][@player Go to this location and find X]
This command will only execute if you have both groups. You could also do something as in my second example with one thing happens, but another doesn't:
/sbcreate [@group:member][@player Hello Member][@group:questNum][@player Your now on quest number X]
This would execute the first @player if they were a member, but not the second if they didn't have the questNum permission for that person.
It's a work around for the @if thought about command, but it's not quite able to do an if-else statement
@sykefuu
This is currently the server sykefuu. But you can currently get around this by say assigning a group in permissions (can be anything and not have assigned nodes) and then when the user clicks the sign use the command:
/sbcreate [@group:groupname][@bypass /permmission removegroup groupName <player>][ /whatever other command]
This would allow a player to only use this sign once because the required group to use it would be removed after the first use. Unfortunately that is the limitation of whats possible currently, but I have used this method for upgrading things 1 level at a time.
Is there a way to make it so blocks can only be triggered once PER player or just once for whole serv ?
@jm401
Not getting the reload error jm401, (the sbwalk removing has already been posted if you check the ticket area) might need to post more info in a ticket yourself. On your if-then logic idea. I have been thinking of this idea for some time and was waiting on some updates to fix some small issues already known.
Implementation includes using the permission system. You can add permissions to anyone regardless if a plugin uses them or not which allows for your "variable" in this case to test whether something is true or false.
Example of something like that using the @player already in the plugin as an extra thing:
/sbcreate [@if:permission.node.present][@if:permission.node2.present][@player Test] (or /sbcreatewalk now)
This command would only execute @player Test if both permission.node.present AND permission.node2.present were both on the player hitting or walking over the scriptblock.
Second Implementation:
/sbcreate [@if:permission.node.present][@player Test 1][@if:permission.node2.present][@player Test 2]
This second example would open things even more than the first. In this example if permission.node.present was on the player then Test 1 would print. At this point it would check if permission.node2.present was also on the player. IF the first permission wasn't there then the entire script wouldn't even run.
This type of command would require the @if statement to come before any executed command though as this is standard programming. While I know this would make this plugin more awesome than it already is (and believe me I believe to be the best utility plugin for servers at this time) it will take a lot of time to implement and is why I wouldn't suggest it until after release of the initial plugin itself. Thanks for you great work Shereis so far
Shereis, you my friend, have transcended to new heights in my book.
I have to say. This is one of the few plugins that I've put on my will not run/update my server without list. I do have a problem and some suggestions. I'll also submit a ticket if you'd like.
Problem: /sbreload spites out errors in the console and doesn't work.
Problem: /sbremove doesn't remove scripts from blocks with OnBlockWalkData. Just regular Block data.
Suggestions: Is it possible to make a variable storage and simple math operations for this plugin? ie: like on block click set a+1;.
Or possibly even an if-then or if-then-else system?
This simple programming logic... would allow many new possibilities some really awesome things. I personally already have a few ideas on how to utilize this.
Your advise to make a new group worked right also love this plugin it make sit easy to have users pick their path for the server.
Download... Installed... Scripted the world... Awesome...
I finally got to the point to install this and you go and add walk on blocks.. WOW.. This plugin has become something my server can't do with out now.
Excellent Plugin!! Can't wait to see what you add next.
@Bowarrow51
I haven't tested permissions promotions commands with scriptblock, I will see if I can do something to "fix" this .
Okay thankyou Riffic and Shereis I will definitely take that advice @bypass would work for certain commands but it seems to not give permissions if its a permission giving command which I need for my server because I plan to have players complete dungeons to unlock permissions to create things like lava furnaces, identify plugin privileges, mobrider, etc. to give an RPG feel without a major rpg plugin involved because they don't allow things like that most of the time.
@Bowarrow51
@riffic33
I don't recommand when you use @bypass:"group" to promote your players to an Admin group , there is a risk that a hacker with hacked client use it to use others commands based on permissions that are in this group... it's better to create a specified group with specified permissions relative to commands you'll use with scriptblock... or to use the simple @bypass option ( I've secured it in a previous version ).
for others issues, I will look at them when i'll be back back from holidays !
@Bowarrow51
Syntax error: use @bypass:admin /command (note the colon)
If it doesn't work it's likely because Ops don't even have permission. Also I highly recommend not using PEX as it has been known to have a lot of issues lately.
EDIT: I recently tested these commands and have found errors which I have posted in the tickets section. I would try another permissions system though regardless and test the original @bypass /command method without the group as I have done this numerous times using permissionsBukkit commands and I can add permission nodes to users easily and with costs.
/sbcreate @bypass admin /pex user <player> add mobrider.animals doesn't work and I can do /sbview and see it and then I walk over it but it shows the last /sbcreate @player message that I made and no matter how many times I /sbremove it doesn't get rid of the message also the console shows no errors. The player just shouts @bypass admin /pex user <player> add mobrider.animals into chat. Love the idea wish I could get it to work if I can then its one of the main ingredients for my server. If I try just @bypass /pex user <player> add mobrider.animals it doesn't work it says they don't have permission.
Saw the update on creating a script to run while walking over a block. Amazing job so far. I'll post feed back if any bugs come up in the ticket section
@TrinaryAtom
Thanks ; )
@Shereis
Excellent... keep up the Awesome!