Sharpjaws / SharpSK

An addon for Skript that adds lots of features and other features from your favourite plugins to skript. Supports 1.8 up to 1.12
https://forums.skunity.com/resources/72
MIT License
8 stars 12 forks source link

request #41

Closed Wqrld closed 6 years ago

Wqrld commented 6 years ago

can you add point 1/2 of wg region %string% in [world] %world% piratesk has it but it's broken and you are generally the go-to for worldedit/worldguard stuff.

Sharpjaws commented 6 years ago

Should be already included. Just make sure you have worldguard installed for this: [sharpsk] [worldguard] (point|pos[ition])[ ] 1 of region %string% in [world] %world% [sharpsk] [worldguard] (point|pos[ition])[ ] 2 of region %string% in [world] %world%

Wqrld commented 6 years ago
set {_json::mapdata::rednexuses:%loop-value-2%} to sharpsk worldguard point {_lv2} of region "%loop-value-1%rednexus%loop-value-2%" in world "%{_json::mapdata::world}%"   

give {::mapdata::world}%" is not valid item data ? broadcast "w: %{_json::mapdata::world}%" works just fine

Snow-Pyon commented 6 years ago

the number is harcoded in the syntax and therefore you can't use variables for it.

A workaround would be using skQuery's evaluate effect:

evaluate "set {_json::mapdata::rednexuses:%loop-value-2%} to sharpsk worldguard point %{_lv2}% of region ""%loop-value-1%rednexus%loop-value-2%"" in world ""%{_json::mapdata::world}%"""

or TuSKe's one:

evaluate: set {_json::mapdata::rednexuses:%loop-value-2%} to sharpsk worldguard point %{_lv2}% of region "%loop-value-1%rednexus%loop-value-2%" in world "%{_json::mapdata::world}%"

alternatively, you could just do an if-else check and execute the corresponding code depending on the value.

Wqrld commented 6 years ago

okay. Closing this issue as it was already a feature.