Hello,
I'm trying to make a script that changes the borders and ground from an area, the idea is to check the border id, and change for the border I want.
It should check in an area (fromPos - toPos)
For example:
Borders to check
6695 -> transform to -> xxx
6696 -> transform to -> yyy
6697 -> transform to -> zzz
6698 -> transform to -> www
and so on.
I know it should be a loop, with "for", but I can't make it to check the borderid and change for the respective one.
EDIT:
I've started something.. But I wanted to make an array like script, not border by border make a "IF"
I'm trying to make a script that changes the borders and ground from an area, the idea is to check the border id, and change for the border I want.
It should check in an area (fromPos - toPos)
For example:
Borders to check
6695 -> transform to -> xxx
6696 -> transform to -> yyy
6697 -> transform to -> zzz
6698 -> transform to -> www
and so on.
I know it should be a loop, with "for", but I can't make it to check the borderid and change for the respective one.
EDIT:
I've started something.. But I wanted to make an array like script, not border by border make a "IF"
Code:
local fromPos = {x=33433, y=31523, z=11}
local toPos = {x=33448, y=31554, z=11}
local config = {
[11775] = 6695,
[11776] = 6698,
[11777] = 6697,
[11778] = 6696,
[11785] = 6699,
[11786] = 6700,
[11787] = 6702,
[11788] = 6701,
[11789] = 6703,
[11790] = 6704,
[11791] = 6706,
[11792] = 6705
}
for x = fromPos.x, toPos.x do
for y = fromPos.y, toPos.y do
for z = fromPos.z, toPos.z do
local border1 = Tile(Position(x,y,z)):getItemById(11777)
if border1 then
border1:transform(6697)
end
end
end
end
Last edited: