I was off for a few months ago, and I couldn't make weekly updates. But here I am.
Some of these things aren't new if you was using
some beta releases. I plan to release some beta versions before release some big stuffs, so if you want to know what's new, just check there.
Tl;DR:
- Recipe support.
- Damage modifiers.
- A regex type.
- Added general stuffs.
- Fixed lot of things.
[+] Added full recipe support. Minecraft doesn't check for name and lore of ingredients of a recipe. So, with that I decided to make some stuffs to make it possible
So far, check out
this wiki to see some informations about it.
code_language.skript:
#Effects
(create|register) [new] [custom] shaped recipe with (return|result) %itemstack% using [ingredients] %itemstacks% [with shape %strings%]
(create|register) [new] [custom] shapeless recipe with (return|result) %itemstack% using [ingredients] %itemstacks%
(create|register) [new] [custom] furnace recipe with (return|result) %itemstack% using [source] %itemstack% [with experience %number%]
#Expressions:
[the] shape of %recipe%
[the] furnace level of %recipe% #This and the one above isn't too much necessary, just in case you want some recipe's info.
recipe from ingredients %itemstacks%
Note: Soonly, the expression
result item of %itemstacks/recipe% won't accept the
itemstacks anymore. Use
recipe from ingredients %itemstacks% instead.
code_language.skript:
#Previously:
set {_resultItem} to result item of stone #will return a stone buttom
#Now:
set {_resultItem} to result item of recipe from ingredients stone
Note 2: In the effects to register a
shaped or
shapeless recipe, you need to include the
custom in the pattern, so it will accept custom ingredients.
[#] Fixed the expression
recipe from ingredients %itemstacks% (previously
result item of %itemstacks%), not it can detect most of recipes easily only by its ingredients.
[+] Added a expression to get damage modifiers.
It is used in on death event.
code_language.skript:
damage [modifier] %damage modifier%
Type:
Damage modifier:
absorption - This represents the damage reduction caused by the absorption potion effect.
armor - This represents the damage reduction caused by wearing armor.
base - This represents the amount of damage being done.
blocking - This represents the damage reduction caused by blocking, only present for Players.
hard hat - This represents the damage reduced by a wearing a helmet when hit by a falling block.
magic - This represents the damage reduction caused by the combination of: Armor enchantments Witch's potion resistance
resistance - This represents the damage reduction caused by the Resistance potion effect.
Example:
code_language.skript:
on damage:
if damage magic is set:
clear damage magic #Will set the value to 0
else if damage armor is set:
add 10 to damage armor
You can
add,
remove and
set values,
clear/
delete values is the same to set to
0 and
reset will set the value to the first value before all changes.
[+] Added a type
%regex%. It is used in regex expressions to parse the regex pattern. Also added an expression to check what was wrong on last pattern.
code_language.skript:
#Expression:
[last] regex [parser] error
#Example
set {_regex} to "(.*" parsed as regex
if last regex parser error is set:
send regex error to player #It will show that the pattern doesn't have a closing bracket.
set {_result} to regex replace "(.*)" with "$3" in "whatever"
if last regex parser error is set:
send regex error to player #It will send that there isn't any group 3 in the pattern.
So this include to make a little change in all stuffs related to regex. to accept %string/regex% in the pattern, like
code_language.skript:
%string% [regex] matches %string/regex%
[+] Added general stuffs.
code_language.skript:
#Expression:
file [location] of command %string%
command %string%'[s] file location
offline player from [uuid] %string% #Only necessary in case you don't have latest Bensku's fork.
[jukebox] record of %block% #Returns an itemstack, you can set it, but only the material, setting to air make the song stop
#Effect:
eject record [(of|from)] %block% #Stop the song and pull the record off
[=] Changes:
code_language.skript:
#From
[all] commands
#To
[all] [registered] [script] commands
If you use
script in the pattern, the expression will return only the commands that came from Skript.
[#] Fixed the auto update since the previous source to check changed the link. Now it checks in the github.
Just update it with /tuske update plugin if you are 1.7-beta+.