Loading map from PNG

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Dan Owen

Member
Aug 21, 2017
15
0
1
43
So with SkQuery (I think) you used to be able to do this, just updated everything to start running 1.13.1 can this not longer works, I am sure I am just out of date

Before I spend hours of my life re working this, can anyone point out the "old" thing I used and need to change?

command /genmaps:
trigger:
overwrite map 167
erase map 167
set {_image} to image from "http://minecraft.test.com/minecraft/art/harley_quinn.png"
draw {_image} image %image% on map 167
draw image {_image} on map 167 starting from 0, 0
set {_map} to map:167 named "Harley Quinn"
set data value of {_map} to 167
 
So with SkQuery (I think) you used to be able to do this, just updated everything to start running 1.13.1 can this not longer works, I am sure I am just out of date

Before I spend hours of my life re working this, can anyone point out the "old" thing I used and need to change?

command /genmaps:
trigger:
overwrite map 167
erase map 167
set {_image} to image from "http://minecraft.test.com/minecraft/art/harley_quinn.png"
draw {_image} image %image% on map 167
draw image {_image} on map 167 starting from 0, 0
set {_map} to map:167 named "Harley Quinn"
set data value of {_map} to 167
Skript 2.3 is not recommended for anything now, it's mainly for finding bugs. Also replace %image% with the image since its not an expression.
 
  • Like
Reactions: BrettPlayMC
Best way to find the bugs is to use it :emoji_slight_smile: don't worry most of the skript on my server are mirror tweaks

Its not the end of the world when something stops just annoying lol

So I have enabled the first few lines

command /genmaps:
trigger:
overwrite map 167

But get back
Can't understand this condition/effect: overwrite map 167 (maps.sk, line 6: overwrite map 167')

Am I being dumb
 
Best way to find the bugs is to use it :emoji_slight_smile: don't worry most of the skript on my server are mirror tweaks

Its not the end of the world when something stops just annoying lol

So I have enabled the first few lines

command /genmaps:
trigger:
overwrite map 167

But get back
Can't understand this condition/effect: overwrite map 167 (maps.sk, line 6: overwrite map 167')

Am I being dumb
SkQuery doesn't work on 2.3 yet. It hasn't been updated.
 
SkQuery doesn't work on 2.3 yet. It hasn't been updated.
Ah Ha I am being dumb! chuckle cool no worries

Thanks for pointing out my error :emoji_grinning:
[doublepost=1544129246,1539801993][/doublepost]Ok so we are on 3.6.2-Lime "Recode and 2.3 Skript" but I still can't get the code to work

Am I being dumb again? (will update with more info if it's not just me being silly :emoji_stuck_out_tongue: )
 
Skript 2.3 is not recommended for anything now, it's mainly for finding bugs. Also replace %image% with the image since its not an expression.
It is usable at this point, the only annoying bug left is the one with skulls.

You can't use the <item>:<data value> format anymore, gotta set the data value manually just like you did in the line next to the one you used this.
 
It is usable at this point, the only annoying bug left is the one with skulls.

You can't use the <item>:<data value> format anymore, gotta set the data value manually just like you did in the line next to the one you used this.
That post was from October 17th, when alpha-5 just released lol
And yes, you can use it now
 
Soooooooooo maps?
[doublepost=1545482598,1545004040][/doublepost]Anyone? I can't be the only person using the maps?
 
You can use skript-mirror with maps as well
 
1: Skript addon
2: Google
 
From skript-mirror's GitHub:
skript-mirror is a robust reflection addon for advanced scripters. It aims to combine the capabilities of Java with the easy-to-use development environment of Skript.
This means you can sort of use Java in Skript, and since you use maps with Java, you can also use it in Skript with skript-mirror. You might be able to figure it out yourself, if you think you can figure it out by yourself, that's fine. However, if you don't know how to do it you can tell me what you want your Skript to do and I can create it for you if you want me to.
 
I really appreciate the help :emoji_slight_smile: I used to use SkQuery to draw png images onto maps from a URL
You can see my full code on the post at the start

Could you get me started I am sure I will get the hang of it but I don't know where to start

The picture is like the ones I load from the URLs
 

Attachments

  • crashbandicoot.png
    crashbandicoot.png
    12.5 KB · Views: 284
I seem to be a bit rusty, I am not getting any errors but it does not seem to work. I am sure I am just doing something silly

on join:
make player execute command "/genmaps"
command /genmaps:
trigger:
set {_map} to "map:167"
set {_image} to image from the file path "plugins/Maps/harley_quinn.png"
draw image {_image} on skellett map {_map}
add {_map} to player
 
You're setting the map variable to a text, not an item. I think you should also use the manage effect to be able to do something with the map
 
You're setting the map variable to a text, not an item. I think you should also use the manage effect to be able to do something with the map

That does make sense but I get an error, again I am sure I am being silly. What am I missing?

Line 6: Can't understand this expression: 'map:167' (script.sk, line 6: set {_map} to map:167')
 
Maybe something like
code_language.skript:
set {_map} to map
set data value of {_map} to 167
 
Status
Not open for further replies.