VarScript
[VarScript]
Scripting on Groovy
Version: 1.0.0
Features
- execute scripts on Groovy
- create and run script files
- autorun files
- Tab-completion (not full-featured)
- script can register events and timers. Full access to Bukkit API and other plugins
Get Started
- Download VarScript.jar and put it to
plugins/
directory - Start server
- Wait until VarScript download dependings
- use command
/>
for example:
/> println "Hello ${worlds*.name}"
Basic commands
/> script...
- run script
- Example:
/> test.groovy
/> filename arg1, arg2, ...
- run script file with parameters
/ws list
- show all workspaces
/ws set name
- set new workspace
/ws stop ?name
- stop all triggers in workspace (selected or current)
/ws remove ?name
- remove workspace (selected or current)
/ws create name
- create new workspace
/ws reload ?name
- reload workspace (selected or current)
Script files
You can create script file in directory plugins/VarScript/scripts/
and run it by command
< todo: tutorial >
Static variables
variable | description | type |
---|---|---|
me | current command sender | Player, Block, Entity, Console |
server | bukkit server | org.bukkit.Server |
this | current script | ? extends ru.dpohvar.varscript.workspace.CallerScript |
workspace | current workspace | ru.dpohvar.varscript.workspace.Workspace |
global | workspace service | ru.dpohvar.varscript.workspace.WorkspaceService |
%player name% | get player by name | org.bukkit.entity.Player |
%plugin name% | get plugin by name | org.bukkit.plugin.Plugin |
%world name% | get world by name | org.bukkit.World |
%script name% | run script file and get result | ? |
Wiki
https://github.com/DPOH-VAR/VarScript/wiki
Changelog
VarScript 1.1.2:
- fixed classloader.
- fixed auto-import in config
- fixed Grape config
VarScript 1.0.0:
- 1.X release
older versions | Github | Maven |
@DPOHVAR
Are we going to see an Update for 1.7?
@humanoidbob99
Yes, but may be problems with the varscript syntax
javascript and groovy works fine
Hey, I have used both Skript and ModDamage and loved them, but this seems even better. However, my server is 1.7.2. Will 1.6.4 VarScript work with 1.7.2?
@DoubleZ
Yes, it is possible.
You need to create 2 tasks:
1) - on PlayerDeathEvent - save deathpoint to hashmap
2) - on click to block - if deathpoint is stored - teleport player to deathpoint
hi, can this plugin let command user override op permission?
for example, In Essential, there is a command /back that send user back to death point.
I want to set a command block contains /back command without give players /back permission. Is it possible through this plugin?
@o0Julia0o
Yes
Create task:
Event:
CRON {time in cron format}
Condition:
SCRIPT "PlayerName" ISONLINE
Acrion:
"PlayerName" "Message" MSG
send some to player
send some to allor
PLAYERS ${ "Message" MSG }
is this possible?
-mesage y on DAYTIME y & if PLAYER x is online
thx
Julia :)
in the future I make another plugin with support JavaScript... maybe
@mindcat
Varscript for 1.4.5 R03 and 1.4.6 is available here: http://rubukkit.org/threads/%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D0%B0-%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD%D0%B0-varscript.21863/page-4#post-349769
Not work:
scripts in books
commands to rename item and change skullOwner
NBT editor
flag '#' replaced by 'I'
@DPOHVAR
Ok,so do you have a plan to update?
@mindcat
Plugin not work with CB 1.4.5 R0.3 or later
14:57:01 [SEVERE] Error occurred while enabling varscript v0.4 (Is it up to date
?)
java.lang.NoClassDefFoundError net/minecraft/server/Packet
at me.dpohvar.varscript.bytecode.minecraft.SubBlock.apply(SubBlock.java:
41)
at me.dpohvar.varscript.program.VarRuntime.initialize(VarRuntime.java:21
6)
at me.dpohvar.varscript.Varscript.onEnable(Varscript.java:42)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
.java:457)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
r.java:381)
at org.bukkit.craftbukkit.v1_4_6.CraftServer.loadPlugin(CraftServer.java
:278)
at org.bukkit.craftbukkit.v1_4_6.CraftServer.enablePlugins(CraftServer.j
ava:260)
at net.minecraft.server.v1_4_6.MinecraftServer.j(MinecraftServer.java:32
1)
at net.minecraft.server.v1_4_6.MinecraftServer.e(MinecraftServer.java:30
0)
at net.minecraft.server.v1_4_6.MinecraftServer.a(MinecraftServer.java:25
9)
at net.minecraft.server.v1_4_6.DedicatedServer.init(DedicatedServer.java
:149)
at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:
399)
at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:84
9)
Caused by: java.lang.ClassNotFoundException net.minecraft.server.Packet
at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader
.java:70)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
java:53)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 14 more
@joeuguce99
not yet
that's all there is: pages
in the next version I'll make instructions in English and Russian
Is there an english tutorial for it???