[MECH] ScriptedEvents v1.7.3 - Make your own plugin-like functionality [1185]

Discussion in 'Inactive/Unsupported Plugins' started by Nopants, Jun 13, 2011.

  1. Offline

    Nopants

    ScriptedEvents - make your own plugin-like functionality:
    Version: v.1.7.3

    With this Plugin you are able to script your own events. This is the backbone of programming. The basic idea behind this plugin is to make server-admins or even players able to create their own little programms that will enhance gameplay, without any knowledge of java.
    How many different things those programms could do depends on this plugin and other plugins a server is running that provide commands.

    Features:
    • Simple copy/paste-able packages to share selfmade functionality
    • Create/delete/edit Cuboids, Triggers, Scripts and Conditions ingame or via a text-editor
    • Create/delete/edit Variables (Integer, String or Set) ingame
    • Use Triggers to execute Scripts on events
    • Use server-commands, plugin-commands, custom actions, custom functions, userdefined and predefined variables
    • Use Conditions that have to be fulfilled if a Trigger should executed a script
    • Scripts and Conditions send errors if syntax or semantics are incorrect
    • Permissions-Support
    By adding more and more events, actions, functions, conditions and more complex variable-management, the possibilities will go through the roof. Many plugin-requests can be done using this plugin and it adds another tool to creativity in playing minecraft.




    Usage:
    Run the Plugin and it will create all necessary files. Read "How things work in ScriptedEvents", "Usable Stuff", "Commands" and some Examples to understand how to use the plugin.

    How things work in ScriptedEvents (open)
    Triggers:
    If a trigger is released, it will check if it's conditions are fulfilled. If they are it executes all lines in a script-file. Triggers are stored in 'trigger.yml' in the plugin-folder.
    A trigger contains an event, an entity (depending on the event), a conditions-file and a script-file.

    Scripts:
    Script-files contain a list of commands that can be executed by a trigger. Every server-command can be used. You must start commands with the typical '/'. There are some further "actions" and "functions" that can be used, like messageTo(). They are listed below. Script-files are stored in the sub-dir 'scripts' of the plugin-dir. If you want to create them with a text-editor and you want them to contain special characters, like 'ä', you have to save them in UTF-8, not the default ANSI.

    Conditions:
    Condition-files contain a list of conditions that have to be fulfilled before a script will be executed. An example contition-file can be downloaded. Condition-files are stored in the sub-dir 'conditions' of the plugin-dir. If you want to create them with a text-editor and you want them to contain special characters, like 'ä', you have to save them in UTF-8, not the default ANSI.

    Cuboids:
    The fist two implemented events were cuboid-related, onEnter and onLeave. Cuboids are created via the common selection of two vertexes. You select the first and the secon vertex via right- and left-clicking a block with the seletion-item, which is defined in the 'config.yml'. The default item is a feather. After selection you can save a cuboid to the 'cuboids.yml'.

    Packages:
    What is the use of Packages:
    Packages will be usefull if you want to add functionality that has been created in ScriptedEvents by other people, or you want to share the functionality you've made with ScriptedEvents with others. Packages combine Cuboids, Triggers, Conditions and Scripts. Packages can be copied and pasted as a whole without any further changes to your plugin folder. This increases portability of user-created content.​
    What are Packages:
    Packages are subdirectories of the "packages" directory, which gets created in the plugin directory. Each Package derives its name from its folders name. They can simply be paste into / created in the "packages" directory and will get loaded on enable or refresh of the plugin. Each Package directory (e.g 'ScriptedEvents/packages/myPack') will have the same file- and folder-structure as the plugin directory (trigger.dat, cuboid.dat, scripts folder, etc.). Entities in Packages can have the same names as entities used in other packages or the main directory.​
    Combining Packages with your own content:
    Inside a Package (e.g. in a script contained in a Package) you can only use other entities contained in the same Package. At the same time entities contained in a Package cannot be used from the main directorie or other Packages. For now all variables have to be set up in the main directorys and they cannot get stored in Packages.​

    Usable Stuff (open)

    Events:
    • onEnter(<cuboid-name>)
    • onLeave(<cuboid-name>)
    • onCommand(<command>)
    • onInteract #works with buttons, levers, everything!
    • onDeath
    • onRespawn
    • onBlockPlace
    • onBlockBreak
    • onJoin
    • onQuit
    • onKick
    World-related Actions:
    • removeItemInHand(<player-name>)
    • removeItem(<player>,<itemID>[,<amount>]) #amount is optional. '1' is default
    • removeItemAt(<player>,<slot>[,<amount>]) #amount is optional. '1' is default
    • giveItem(<player>,<itemID>[,<amount>]) #amount is optional. '1' is default
    • giveItemAt(<player>,<slot>,<itemID>[,<amount>]) #amount is optional. '1' is default
    • setHealth(<player-name>,<new value>)
    • messageTo(<player-name>,<message>) #sends a message to a player without the additional output of the /say command
    • broadcast(<message>) #sends a message to all online players on the server
    • changeBlockType(<world-name>,<block-location>,<new Type-ID>) #changes the type of a block
    • changeBlockData(<world>,<location>,<new Data>)
    • playerCommand(<player-name>,<command>) #let a player execute a server command
    • playEffect(<player>,<effect>) #check the bottom of this spoiler for a list of effects
    • cancelEvent #can be used to cancel an interact()-Event
    • teleport(<player>,<world>,<location>)
    • toggleLever(<world>,<location>)
    • toggleDoor(<world>,<location>) #works with wooden doors, iron doors and trapdoors
    • setTime(<world>,<time>) #time reaches from '0' to '24000'
    Script-related Actions:
    • if(<condition>) #"if" can only be used if it's followed by "then" in the next action. it will execute the action included in the "then"-statement, if the condition is fulfilled
    • then(<action>) #"then" can only be used if it's preceded by an "if"-statement
    • else(<action>) #"else" can only be used if it's preceded by a "then"-statement. it will execute the action if the condition included in the "if"-statement is not fulfilled
    • delay(<milliseconds>) #pauses the script
    • trigger(<trigger-name>) #releases a trigger
    • doForCuboidBlocks(<cuboid-name>,<action>)
    • doForSetItems(<set-name>,<action>)
    • script(<script-name>)
    • do #will execute all following actions that begin with "|" as if they were one single action. use to execute mutiple lines in then() and else()
    • loop(<cycles>) #NEEDS TO BE ADDED AS THE LAST LINE
    • while(<condition>) #NEEDS TO BE ADDED AS THE LAST LINE
    Functions:
    • health(player-name) #will be dissolved to the amount health of the Player
    • itemInHand(player-name) #will be dissolved to <ItemInHandID>
    • itemAtSlot(<player>,<slot>) #will be dissolved to the itemID of the item at <slot>
    • searchItem(<player>,<itemID>[,<amount>]) #will be dissolved to a slot holding the searched item. amount is optional. '1' is default
    • slotInHand(<player>) #will be dissolved to the slot wich is in hand
    • time(<world>)
    • size(<set-name>) #will be dissolved to the number of items in the given set
    • isInBed(<player>)
    • isSneaking(<player>)
    • playerLocation(<player>)
    • playerLocationX(<player>)
    • playerLocationY(<player>)
    • playerLocationZ(<player>)
    • playerWorld(<player>)
    • blockID(<world>,<location>)
    • blockData(<world>,<location>)
    • calc(<mathematic expression>) #will be dissolved to a simple integer
    • random(<min>,<max> | <range>)
    • arg(<argument-position>) #/mycommand nopants test => arg(0) = mycommand; arg(1) = nopants; arg(2) = test
    Conditions:
    • equals(<StringX>,<StringY>) #will check if <StringX> equals <StringY>. works for integer-variables too
    • bigger(<biggerInteger>,<smallerInteger>) #will check if <biggerInteger> is bigger then <smallerInteger>
    • and(<firstCondition>,<secondCondition>) #will check if first AND second condition are met
    • or(<firstCondition>,<secondCondition>) #will check if first OR second condition is met
    • check(<condition-name>) #will check if all conditions in the condition-file are met
    • hasItem(<player>,<itemID>,<requiredAmount>) #requiredAmount is optional. '1' is default
    • isSwitchedOn(<world>,<location>) #works with levers
    • isOpen(<world>,<location>) #works with wooden doors, iron doors and trapdoors
    • isEmpty(<set>)
    • isInside(<player>,<cuboid>)
    • inGroup(<world>,<player>,<group>) #works with the Permissions plugin
    • hasPermission(<world>,<player>,<permission>) #works with the Permissions plugin
    • online(<player>)
    Premade event-related variables:
    • <triggeringPlayer> #will be dissolved to the name of the player, who releases the trigger the script is executed by
    • <triggeringCuboid> #will be dissolved to the name of the cuboid the trigger is released by
    • <cuboidBlockLocation> #will be dissolved to <x>;<y>;<z> of a block. can only be used in doForCuboidBlocks()
    • <cuboidBlockLocationX>
    • <cuboidBlockLocationY>
    • <cuboidBlockLocationZ>
    • <clickedLocation> #will be dissolved to <x>;<y>;<z> of the clicked location. if no location got clicked (air), it will get dissolved to "none"
    • <clickedLocationX>
    • <clickedLocationY>
    • <clickedLocationZ>
    • <clickedLocationID> #will be dissolved to the ID of the Block at the clicked location. If no location got clicked (air), it will get dissolved to "none"
    • <rightClick> #will be dissolved to true if the interaction-event was triggered by a right-click
    • <setItem> #will be dissolved to an item of a set. can only be used in doForSetItems()
    • <deathCause> #will be dissolved to the deathcause in onDeath events. check the bottom of this spoiler for a list of causes
    • <placedBlockLocation> #<x>,<y>,<z>
    • <placedBlockLocationX>
    • <placedBlockLocationY>
    • <placedBlockLocationZ>
    • <placedBlockID>
    • <placedBlockData>
    • <brokenBlockLocation> #<x>,<y>,<z>
    • <brokenBlockLocationX>
    • <brokenBlockLocationY>
    • <brokenBlockLocationZ>
    • <brokenBlockID>
    • <brokenBlockData>
    Permission-Nodes (case-sensitive):
    • se.debug
    • se.help
    • se.refresh
    • se.edit
      • se.edit.add
      • se.edit.delete
      • se.edit.name
      • se.edit.event
      • se.edit.entity
      • se.edit.script
      • se.edit.condition
      • se.edit.close
      • se.edit.save
    • se.cuboid
      • se.cuboid.create
      • se.cuboid.delete
      • se.cuboid.edit
    • se.trigger
      • se.trigger.create
      • se.trigger.delete
      • se.trigger.edit
    • se.script
      • se.script.create
      • se.script.delete
      • se.script.edit
    • se.condition
      • se.condition.create
      • se.condition.delete
      • se.condition.edit
    • se.variable
      • se.variable.create
      • se.variable.delete
      • se.variable.edit
    • se.customCMD
      • se.customCMD.<yourCommand>
    Effects:
    • BOW_FIRE
    • CLICK1
    • CLICK2
    • DOOR_TOGGLE
    • EXTINGUISH
    • RECORD_PLAY
    • SMOKE
    • STEP_SOUND
    Death Causes:
    • BLOCK_EXPLOSION
    • CONTACT
    • CUSTOM
    • DROWNING
    • FALL
    • FIRE
    • FIRE_TICK
    • LAVA
    • LIGHTNING
    • SUFFOCATION
    • VOID
    • SKELETON
    • GHAST
    • PVP
    • SLIME
    • WOLF
    • PIGZOMBIE
    • ZOMBIE
    • CREEPER
    • SPIDER


    Commands (open)

    If feel like creating stuff ingame needs way to many commands. I will try to provide the possibility to use less commands.
    Code:
    /SE.help [page]                                  or /se.h
    /SE.debug                                        or /se.d
    /SE.refresh                                      or /se.r
    
    /SE.cuboid.create <cuboid-name>                  or /se.c.s
    /SE.cuboid.delete <cuboid-name>                  or /se.c.d
    /SE.cuboid.edit <cuboid-name>                    or /se.c.e
    
    /SE.trigger.create <trigger-name>                or /se.t.c
    /SE.trigger.delete <trigger-name>                or /se.t.d
    /SE.trigger.edit <trigger-name>                  or /se.t.e
    
    /SE.script.create <script-name>                  or /se.s.c
    /SE.script.delete <script-name>                  or /se.s.d
    /SE.script.edit <script-name>                    or /se.s.e
    
    /SE.variable.create int|string <name> <value>    or /se.v.c
    /SE.variable.create set <name>                   or /se.v.c
    /SE.variable.delete <name>                       or /se.v.d
    /SE.variable.edit int|string <name> <value>      or /se.v.e
    /SE.variable.edit set <name> add|remove <value>  or /se.v.e
    
    /SE.edit.name <new trigger-name/new cuboid-name> or /se.e.n
    /SE.edit.script <script-name>                    or /se.e.scr
    /SE.edit.condition <condition-name>              or /se.e.co
    /SE.edit.event <trigger-event>                   or /se.e.e
    /SE.edit.entity <cuboid-name/command>            or /se.e.ent
    /SE.edit.add <action>                            or /se.e.e
    /SE.edit.save                                    or /se.e.s
    /SE.edit.close                                   or /se.e.cl
    

    Examples (open)

    Make a command-alias:
    1. Make a script that contains the command you want to have an alias of.
    /se.s.c myAliasScript #create a blank script​
    /se.s.e <script-name> #get into Edit-More​
    /se.e.a /<your Command> #add your Command to the script​
    /se.e.s #save the script​
    2. Make an onCommand(yourCommand)-trigger and link your script to it.
    /se.t.c myAliasTrigger #create a blank trigger​
    /se.t.e <trigger-name> #get into Edit-Mode​
    /se.e.e onCommand #set the trigger to get release when a command is used​
    /se.e.ent myAlias #set the trigger-entity to the new command "myAlias"​
    /se.e.scr <script-name> #link the trigger to your script​
    /se.e.s #save the trigger​

    Make a "Who am I?"-Command:
    1. Make the script that sends the players name to the triggering player:
    /se.script create whoamiScript​
    /se.script.edit whoamiScript​
    /se.edit.add messageTo(<triggeringPlayer>,Your name is <triggeringPlayer>!)​
    /se.edit.save​
    2. Make a trigger for the new Command:
    /se.trigger.create whoamiTrigger​
    /se.trigger.edit whoamiTrigger​
    /se.edit.event onCommand​
    /se.edit.entity whoami​
    /se.edit.script whoamiScript​
    /se.edit.save​

    Make a button that tells you the ID of an item:
    1. Make an onInteract()-trigger checking the following condition.
    2. Make a condition that checks if the <clickedLocation> equals the location of your button.
    3. Link a script that sends you a message containing <itemInHand>.

    Define "important places":
    1. Make a script that sends a message to the triggering player containing the name of the triggering cuboid.
    2. Make a cuboid for every important place
    3. Make a trigger for every cuboid that executes the script you've created, or if you don't have any other cuboid than the important places, make one trigger without including a trigger-cuboid.

    Code:
    # create a new cuboid with the name 'myNewCuboid'
    /SE.cuboid.create myNewCuboid
    # get into Edit-Mode for the cuboid myNewCuboid
     /SE.cuboid.edit myNewCuboid
    
    # create a new blank trigger with the name 'myNewTrigger'
    /SE.trigger.create myNewTrigger
    
    # get into Edit-Mode for the trigger myNewTrigger
     /SE.trigger.edit myNewTrigger
    # sets the name of the edited trigger or cuboid to 'newName'
    /SE.edit.name newName
    # sets the event of the edited trigger to onCommand
    /SE.edit.event onCommand
    # sets the trigger-entity, in this case the trigger-Command, to myCMD
    /SE.edit.entity myCMD
    # saves alle the changes to file
    /SE.edit.save
    
    # create a new blank script with the name 'myNewScript'
    /SE.script.create myNewScript
    
    # get into Edit-Mode for the script myNewScript
    /SE.script.edit myNewScript
    # add a new action 'messageTo(<triggeringPlayer>,Hello there!)' to the script
    /SE.edit.add messageTo(<triggeringPlayer>,Hello there!)
    # saves alle the changes to file
    /SE.edit.save
    
    # create a variable with the name 'PlayerName' and the value 'nopants'
    /SE.variable.create string PlayerName nopants
    # change the value of the variable 'PlayerName' to 'Notch'
    /SE.variable.edit string PlayerName Notch
    
    # create a new blank condition-file with the name 'myNewConditions'
    /SE.condition.create myNewConditions
    
    # get into Edit-Mode for the condition-file myNewConditions
    /SE.condition.edit myNewConditions
    # add a new condition 'equals(<triggeringPlayer>,<PlayerName>)' to the condition-file
    /SE.edit.add equals(<triggeringPlayer>,<PlayerName>)
    # saves alle the changes to file
    /SE.edit.save
    


    READ BEFORE USING:
    Some self-made scripts can send your server into an infinite loop and block changing actions will obviously change your world, so test your own scripts before running them on a public server.

    Download
    ScriptedEvents (JAR): v.1.7.3 , v.1.7.2 , v.1.6.8 , v.1.6.5 , v.1.6.1 , v.1.6 , v.1.5.9 , v.1.5.3 , v.1.5 , v.1.3.5
    An example script: HERE.
    An example condition: HERE.

    Changelog:
    • Version 1.7.3
      • updated to 1.8.1
    • Version 1.7.2
      • added function: <playerLocationX>
      • added function: <playerLocationY>
      • added function: <playerLocationZ>
      • added variable: <clickedLocationX>
      • added variable: <clickedLocationY>
      • added variable: <clickedLocationZ>
      • added variable: <placedBlockLocationX>
      • added variable: <placedBlockLocationY>
      • added variable: <placedBlockLocationZ>
      • added variable: <brokenBlockLocationX>
      • added variable: <brokenBlockLocationY>
      • added variable: <brokenBlockLocationZ>
      • added variable: <cuboidBlockLocationX>
      • added variable: <cuboidBlockLocationY>
      • added variable: <cuboidBlockLocationZ>
      • changed action: teleport(<player>,<world>,<location>)
      • added variable: <clickedLocationID> #use in interact events
      • added action: broadcast(<message>) #sends a message to all online players on the server
      • changed config flag: ErrorDestination #can now be 'PLAYER<playerName>'.
    • Version 1.7.1
      • added config flag: ErrorDestination #can be 'LOG' or 'FILE'. Will create itself. 'LOG' is default.
      • added condition: inGroup(<world>,<player>,<group>)
      • added condition: hasPermission(<world>,<player>,<permission>)
    • Version 1.7
      • added condition: isInside(<player>,<cuboid>)
      • added Premade Variable: <deathCause> #usable in onDeath-events
      • added event: onDeath
      • added event: onJoin
      • added event: onQuit
      • added event: onKick
    Further Changelog (open)


    • Version 1.6.8
      • added action: toggleLever(<world>,<location>)
      • added condition: isSwitchedOn(<world>,<location>) #works with levers
      • added action: toggleDoor(<world>,<location>) #works with wooden doors, iron doors and trapdoors
      • added condition: isOpen(<world>,<location>) #works with wooden doors, iron doors and trapdoors
      • added condition: isEmpty(<set>)
      • added condition: online(<player>)
      • added action: setTime(<world>,<time>) #time reaches from '0' to '24000'
      • fixed bug in "slotInHand()" returning null if no item is in hand
    • Version 1.6.5
      • fixed cancel Interaction-Event bug
      • fixed bracket bug inside comments
      • fixed saving trigger bug
      • added Packages
    • Version 1.6.1
      • added action: teleport(<player>,<location>)
      • added function: playerWorld(<player>)
      • fixed a couple of bugs
    • Version 1.6
      • added the possibility to mask strings with " #messageTo(<player>,"This is a masked string, that may contain a comma!")
      • added event: onRespawn
      • added event: onBlockPlace
      • added variable: <placedBlockLocation>
      • added variable: <placedBlockID>
      • added variable: <placedBlockData>
      • added event: onBlockBreak
      • added variable: <brokenBlockLocation>
      • added variable: <brokenBlockID>
      • added variable: <brokenBlockData>
    • Version 1.5.9
      • added Interpreter
      • added comments #begin with '#'
      • empty lines are okay from now on
      • changed the way server commands have to appear in scripts. they MUST begin with the typical '/' now
      • added action: removeItemAt(<player>,<slot>[,<amount>]) #amount is optional. '1' is default
      • added action: giveItem(<player>,<itemID>[,<amount>]) #amount is optional. '1' is default
      • added action: giveItemAt(<player>,<slot>[,<amount>]) #amount is optional. '1' is default
      • changed action: messageTo(<player-name>,<message>) #sends a message to a player without the
      • changed action: playerCommand(<player-name>,<command>) #let a player execute a server command
      • changed action: doForCuboidBlocks(<cuboid-name>,<action>)
      • changed action: doForSetItems(<set-name>,<action>)
      • added function: itemAtSlot(<player>,<slot>) #will be dissolved to the itemID of the item at <slot>
      • added function: searchItem(<player>,<itemID>[,<amount>]) #will be dissolved to a slot holding the searched item. amount is optional. '1' is default
      • added function: slotInHand(<player>) #will be dissolved to the slot wich is in hand
      • added function: isSneaking
      • added function: calc(<mathematic expression>) #will be dissolved to a simple integer
      • added function: size(<set-name>) #will be dissolved to the number of items in the given set
      • changed function: arg(<argument-position>) #/mycommand nopants test => arg(0) = mycommand; arg(1) = nopants; arg(2) = test
      • changed variable: <item> to <setItem>
      • changed variable: <blockLocation> to <cuboidBlockLocation>
    • Version 1.5.3
      • added set-variable-type #all set-names are strings and so are all set-items
      • changed Command: /se.v.e string <string-name> <new value> #changed from /se.v.e <string-name> <new value>
      • changed Command: /se.v.e int <int-name> <new value> #changed from /se.v.e <int-name> <new value>
      • added Command: /se.v.e set <set-name> onlinePlayers #will clear the set and add all online players names to it
      • added Command: /se.v.e set <set-name> add <item-string> #will add the item to the passed set
      • added Command: /se.v.e set <set-name> remove <item-string> #will remove the item from the passed set
      • added Command: /se.v.c set <set-name> #will create a blank set-variable
      • added Action: doForItems(<set-name>) <action> #the action will be executed for every item in the passed set. the respective item can be used with <item>
      • added Predefined Variable: <item> #use in doForItems(<set-name>)
      • added Condition: contains(<set>,<item>) #checks if a set contains the passed item
      • added getFunction: getSize(<set>) #gets resolved to the size of the passed set
    • Version 1.5
      • added Action: changeBlockData(<world>,<Location>,<new Data>)
      • added Action: playerCommand(<player-name>) <command>
      • added Action: executeScript(<script-name>)
      • added Variable: time(<world>)
      • added Variable: isInBed(<player>)
      • added Variable: playerLocation(<player>)
      • added Variable: blockID(<world>,<location>)
      • added Variable: blockData(<world>,<location>)
      • added Support: Permissions
      • whitespaces at the begining or the end of actions will be ignored
    • Version 1.4
      • changed the read- and write-method so files don't need ids and line-numbers
      • playEffect(<player>,<effect>)
      • do #will execute every following action that begins with "| " as one action. use to execute mutiple lines in then() and else()
      • changed the variables <health> and <itemInHand> to the functions "heath(<player-name>)" and "itemInHand(<player-name>)"
    • Version 1.3.5
      • added Action: cancelEvent() #can be used to cancel an interact()-Event
      • added Condition: hasItem(<player>,<itemID>,<requiredAmount>) #requiredAmount is optional. '1' is default
      • added Action: removeItem(<player>,<itemID>,<amountToRemove>) #amountToRemove is optional. '1' is default
      • added Action: loop(<cycles>) #NEEDS TO BE ADDED AS THE LAST LINE
      • added Action: while(<condition>) #NEEDS TO BE ADDED AS THE LAST LINE
      • added Action: setRandomRange(<range>) OR setRandomRange(<min>,<max>) #it will set the range for <randomInt>
      • added Variable: <randomInt> #will be dissolved to a random integer
    • Version 1.3
      • added Variable: <health>
      • added Action: setHealth(<player>, <new value>)
      • added Variable: <arg<i>> #arguments of custom commands get resolved. use <arg1> for the first and so on
      • added Action: doForCuboidBlocks(<cuboid-ID>) <action> #use with changeBlockType() and <blockLocation>
      • added Variable: <blockLocation>
    • Version 1.2
      • added command: /SE.edit.condition
      • added command: /SE.refresh
      • made the plugin catch some exceptions caused by wrong usage
    • Version 1.1
      • added multiworld-support
      • changed the event "InteractAt()" to "Interact()"
      • added variable to Interact-Event: <clickedLocation> #contains <x>;<y>;<z>
      • added variable to Interact-Event: <rightClick> #contains <true|false>
      • changed the variable <triggerItem> to <itemInHand> #contains <itemID>
      • added custom function removeItemInHand(<player-name>)
      • added custom function changeBlockType(<world-name>,<block-location>,<new Type-ID>)
      • made it impossible to create two variables (int and string) with the same name
      • added teleportation and portal-usage to the check if a player is inside a cuboid
      • got rid of the "counts" in all files
      • added the possibility to use if-then-else in scripts
    • Version 1.0
      • create/delete/edit conditions ingame
      • create/delete/edit string and integer variables ingame
      • resolve variables in scripts and in Edit-Mode
      • resolve calculations inserted as a value for an integer-variable
    • Version 0.4.9
      • conditions get loaded into the plugin
      • before a trigger executes a script it will check if it's conditions are fulfilled
      • added condition equals()
      • added condition bigger()
      • added condition and()
      • added condition or()
    • Version 0.4.5
      • scripts get loaded into the plugin
      • scripts can be created
      • actions can be added to scripts via Edit-Mode
    • Version 0.4
      • added Edit-Mode
      • reworked parts of the code
    • Version 0.3.5
      • Exceptions caused by incomplete .yml or missing .script files fixed
      • added custom function delay()
      • added custom function trigger()
      • added custom function <triggeringCuboid>
      • added custom function <triggeringItem>
      • added the ability to release more than one trigger on an event
      • added the event onInteractAt()
      • added the event onCommand()
      • added the ability to include no cuboid in onEnter() and onLeave() to get triggered by all cuboids
    • Version 0.3
      • Release as a work in progress
     
    iPeace, p3king, JustinGuy and 2 others like this.
  2. Offline

    Nopants

    I don't know exactly what you mean.

    If you are talking about coding:
    If you already know how to code java and you don't know how to make scripts with ScriptedEvents, using this plugin is more difficult than building your own plugin. Even if you don't know java, but some scripting-languages, like ruby, you can build your own plugins with those languages by using the accordant plugins (rubyBukkit).

    ScriptedEvents is heavily inspired by the Trigger Editor from Warcraft II. I made it for people who don't want to learn a programing language, but want to build up their own little functionality.

    For instance I just made a secret door out of bookshelfs and pistons, and I wanted it to open if someone clicks a torch next to the shelf. I could have posted a request and perhaps a plugin would have been built in a couple of days, but i prefer building easy things by myself. Besides that it keeps the number of plugins a bit lower.

    I hope I haven't misunderstood your point.
     
  3. Offline

    Buckethead

    hmm i guess to keep plugins low yes. however not useful to me ice job though im sure BIG servers might like it
     
  4. Offline

    p3king

    Wow, i love this plugin.. i wonder why it isn´t more popular.
    Thanks Nopants :)

    Edit:
    Lol this is great.. i just kept coding scripts the whole night.
    Converted three of our (manually triggered) events to almorst fully automated scripted events.
    This saves a whole bunch of work and nerves during the events and i can think of 3000 other things to do with this plugin.
     
  5. Offline

    Nopants

    Sounds great! If you need anything, share your ideas and I will see what I can do about it.
     
  6. Offline

    Ubermatik

    This plugin is extremely promising, and I highly appreciate the amount of time and effort you have put into it! I'm already salivating at the possibilities! Must ask, though, is there an method to restrict an event? For instance, in a dungeon scenario, if a player steps on a certain block, and it spawns some mobs inside the room, is it possible to then disable that event until a certain time has passed/all the mobs are dead? This plugin would fit in perfectly on our server, but i don't want people getting confused and spawning thousands of Skeletons everywhere.

    Anyway, can't wait to get on it and experiment a bit! The opportunities here are seemingly endless.

    Hey, just tried the Important Places example, but fell at the last hurdle - when typing /se.edit.save I get the error message: "An internal error occurred while attempting to perform this command". Any ideas?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  7. Offline

    p3king

    Yes i was also looking into something like this, at the moment i plan to make the mobspawns dependant on a variable so the spawns disable themselves. Then when the players reach the final room with rewards or die / leave the game you reset the variables.

    Hm could you perhaps explain the color codes? I tried using §3test and some other numbers but couldn´t get it to work ( the § doesnt show but the number does).
     
  8. Offline

    Nopants

    I don't get that error. Maybe you can pastebin your error-log?

    Question:
    Answer:
    This solution isn't very dynamic. I'm thinking about implementing new stuff, so you can make your own cooldown function. What do you think about that?

    ScriptedEvents doesn't handle any color codes. As in many other cases ScriptedEvents injects your input into bukkits own method. In this case Player.sendMessage("<yourmessage>"). As a result you can use whatever codes bukkit provides within this method. Here are some bukkit color codes I found using google.
    This works for me: "messageTo(<triggeringPlayer>,§5This text is purple!)"
     
  9. Offline

    p3king

    I´d also find this very useful!

    Ah ok, it must be another plugin interfering then.
    This example returns a white "5This text is purple!" for me.

    Edit: This was Towny´s chat modification.

    Another thing i was wondering is, if there could be a similar command to messageTo in order to broadcast a message. At the moment i use CommandBook for this and its no problem, but i can´t use different colors for words in one line (if i get the color thing to work).

    Hm.. and what do you think of a config setting to message script errors to a certain player?
     
  10. Offline

    Nopants

    Redownload v.1.7.2 to get your hands on those features!
    Use the keyword "PLAYER<playerName>" in the configflag "ErrorDestination". Use "broadcast(<message>)".
     
    p3king likes this.
  11. Offline

    p3king

    Thank you very much!

    I´m sorry i forgot to add that sooner but i forgot and just remembered it while creating a cuboid:
    With the default setting "feather" for selecting, my players got the vertex selected messages even though they do not have any SE permissions.
    It doesn´t matter to me anymore as i´ve configured another item but this is probably not intended.
     
  12. Offline

    Nopants

    Thanks for the bugreport. Fixed in new version of v.1.7.2.

    On a side note:
    Normaly I wouldn't release new features without increasing the version number, but as I'm currently developing small features per request, it makes sense not to have too many different official versions.
     
  13. Offline

    aolko

    maybe a video tutorial...please?
     
  14. Offline

    p3king

    Hey Nopants, there I am again ;)
    Noticed some things yesterday when creating my jail and race script, perhaps you can help:

    - What do you think about adding playerLocationX(), playerLocationZ() and playerLocationY() instead of only playerLocation()? I tried to spawn some mobs near the player location. The issue is just that CommandBooks /spawnmob seems to have another coordinate delimiter. When having them splitted up i can decide myself which delimiter to use (a optional param delimiter would also work).

    - When working with cuboids it sometimes seems the coordinates aren´t handled exactly. I have a hard time describing this... but let me try:
    I select a wall with the vertex tool. I double check the coordinates in cuboid.dat and everything is ok. Then I want to change the blocks:
    Code:
    doForCuboidBlocks(cb_rb_startwall,changeBlockType(world,<cuboidBlockLocation>,20))
    Almost all blocks are set as expected, but sometimes I am missing one column of blocks (on the x axis) and/or one row of blocks on the y axis. I can´t provide a screenshot showing this at the moment as I cannot login to the game..
    EDIT:
    Heres a screen:
    Picture
    I selected this additionally with world edit to show what I mean.
    Top picture shows how it looks before, bottom picture after.


    - Soo in this one I´m pretty clueless. I use Spout (server only) as it is required by a few plugins I use. I don´t really like it but well.. When I try to create a set, I get this error in console:
    Show Spoiler
    Code:
    2011-09-09 22:20:39 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'se.variable.create' in plugin ScriptedEvents v1.7.2
    	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    	at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
    	at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
    	at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
    	at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    	at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    	at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:478)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NoClassDefFoundError: me/nopants/ScriptedEvents/type/entities/variables/SEset
    	at me.nopants.ScriptedEvents.SEcommander.variableCreate(SEcommander.java:1154)
    	at me.nopants.ScriptedEvents.ScriptedEvents.onCommand(ScriptedEvents.java:276)
    	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    	... 13 more
    Caused by: java.lang.ClassNotFoundException: me.nopants.ScriptedEvents.type.entities.variables.SEset
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    	... 16 more

    Is there anything I could do to use sets without getting rid of spout?
     
  15. Offline

    Nopants

    I wish I had already done that. Currently I don't have the time, but I want to make one.
    Coming ASAP (tomorrow?).

    Yep, I've experienced this problem too. I think it is caused by an edge lenght of 2. I will try to fix that bug, but I think it will take some time.

    Ouch! Nice bug! I haven't used Spout yet and programing wise it is on a hole other lever. By looking at the error I have no clue what is causing this and how I should fix it, but I'm pretty sure it happens because of some messy delclarations in my code. I don't know how fast I can look into this problem.

    So am I :-(
     
  16. Offline

    Ubermatik

    This'd be a fantastic feature, and would help immensely in creating per-player like events. This way you could effectively reset an event after it's executed...?
     
  17. Offline

    Nopants

    @Ubermatik

    A simple cooldown would restrict an event from happening too often. It would not work per player. However, I will try to add the possibility to make a cooldown per player.

    I think I will add passing arguments in calling scripts. This way you could call "script(cooldown,<arg1>,<arg2>,...)" like you would enter the command "/cooldown <arg1> <arg2> ...".

    A call of the cooldown-script could be "script(cooldown,<time>,<script>,<player>)". It would create a variable that is namend something like "cooldown_<script>_<player>" and contain "false". After the entered time the cooldownscript would set the variable to true. The script you want to cooldown must have a condition checking per player. Something like "equals(cooldown_<thisScriptsName>_<triggeringPlayer>,true)".

    I hope you get the point :)

    I've added X, Y and Z specific versions of "playerLocation()", <cuboidBlockLocation>, <clickedLocation>, <placedBlockLocation> and <brokenBlockLocation> to v.1.7.2.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  18. Offline

    Ubermatik

    Yes, that would be ideal until per player events are implemented (though I don't strictly mean personal events, just events that occur once for each player). Something like this would be useful for structuring events and restricting their use, however. I can't wait to see it!
     
  19. Offline

    p3king

    Thanks, will check that out later!
     
  20. Offline

    FZFalzar

    Hi, I have used your plugin and it is an excellent tool for use in many situations like minecart station announcements etc. However, is it possible for you to include interaction with NPCs? And also include case switch break functionality? It would be very helpful for tidying code and stuff! Thanks:D
     
  21. Offline

    austin1397

    I came up with some new ideas for functions:

    Conditions:
    containsSlotItem(<world>,<location>,<slot>,<itemID>,<requiredAmount>) #will check if certain item is in chest at location, required amount is optional.

    World-related Actions:
    setSlotItem(<world>,<location>,<slot>,<itemID>,<Amount>) #will set a certain slot in a chest to a certain item with a predetermined value.
     
  22. Offline

    adamjon858

  23. Offline

    pSy

    Simply question.... I wrote a short script to make that command
    /pr PLAYERNAME info set prefix &7[&fDon&7] &x

    that
    /spielerfarbe PLAYNAMER COLORCODE
    exp. /spielername pSyCeNeTiC 2 to make my Name Green.

    Script: /pr arg(1) info set prefix &7[&fDon&7]&arg(2)

    But i need a space betweed ] and &arg(2) --> /pr arg(1) info set prefix &7[&fDon&7] &arg(2)

    How to realise it?. I'm to dump...
     
  24. Offline

    critterfluffy

    This is simply a request for a new function or action. Either the ability to directly add/reduce health and food or simply to query food level followed by the ability to set food to a new value relative to this stored value. My thought is that event onCommand(<command>) would cause a player to spend food to use the command. I am looking for a simple way to use hunger as sort of exhaustion for spells and abilities. I love this plugin and have already found many different uses for it on my server. Keep up the awesome work.
     
  25. Is this plugin still going strong? =)
    If so, I am wondering if anyone can tell me what I am doing wrong..
    All I want is a simple alias to a long (well long ish to me) command...
    This is what I have...
    Where if someone types /meFly it SHOULD put them into the command....
    But it's returning a load of errors...
    Code:
    08:22 PM [SEVERE] Exception in thread "Thread-9412"
    08:22 PM [SEVERE] java.lang.IllegalAccessError: tried to access method org.bukkit.command.ConsoleCommandSender.<init>(Lorg/bukkit/Server;)V from class me.nopants.ScriptedEvents.SEinterpreter
    08:22 PM [SEVERE] at me.nopants.ScriptedEvents.SEinterpreter.executeLine(SEinterpreter.java:505)
    08:22 PM [SEVERE] at me.nopants.ScriptedEvents.SEinterpreter.executeScript(SEinterpreter.java:436)
    08:22 PM [SEVERE] at me.nopants.ScriptedEvents.SEinterpreter.run(SEinterpreter.java:356) 
     
  26. Can anyone help? =)
     
  27. Offline

    jkcclemens

    @Woodperckersam
    What's the script? /<minecraftfolder>/plugins/ScriptedEvents/scripts/AdminCreative.script is what is needed in your post.
     
  28. Oh my bad ok here...
     
  29. Offline

    jkcclemens

    try:
    Code:
    playerCommand(<triggeringPlayer>,gamemode <triggeringPlayer> 1)
     
  30. Offline

    ladan208

    onregion plz?
     
  31. Offline

    belfedia

    Dead project ? Or this is working on 1.0/1.1 release ?
     

Share This Page