Created
April 20, 2024 16:00
-
-
Save Achie72/613803ecde501f2e20ff994036f1ad00 to your computer and use it in GitHub Desktop.
Replacer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function replace() | |
-- collection for the if is it this tile | |
local tilesToCheck = {1,2,3,4,5,6} | |
-- collection to replace tile | |
local tilesToReplace = {10,20,30,40,50,60} | |
local x,y = 0,0 | |
for i=1,#tilesToCheck do | |
if mget(x,y) == tilesToCheck[i] then | |
mset(x,y, tilesToReplace[i]) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment