Hey i want to know a good way to get "lavaremove" get all the tiles in the "lava" array if its possible,
im quite new to scripting.
I did make it work the way i want but that way i need to make lots of more code.
btw its used inside a onUse function
im quite new to scripting.
I did make it work the way i want but that way i need to make lots of more code.
btw its used inside a onUse function
Code:
local lava = {
[1] = {x=32805, y=32339, z=11, stackpos=0},
[2] = {x=32805, y=32338, z=11, stackpos=0},
[3] = {x=32805, y=32337, z=11, stackpos=0},
[4] = {x=32806, y=32339, z=11, stackpos=0},
[5] = {x=32806, y=32338, z=11, stackpos=0},
[6] = {x=32806, y=32337, z=11, stackpos=0},
[7] = {x=32807, y=32338, z=11, stackpos=0},
[8] = {x=32807, y=32337, z=11, stackpos=0},
[9] = {x=32807, y=32336, z=11, stackpos=0},
[10] = {x=32807, y=32335, z=11, stackpos=0},
[11] = {x=32807, y=32334, z=11, stackpos=0},
[12] = {x=32808, y=32338, z=11, stackpos=0},
[13] = {x=32808, y=32337, z=11, stackpos=0},
[14] = {x=32808, y=32336, z=11, stackpos=0},
[15] = {x=32808, y=32335, z=11, stackpos=0},
[16] = {x=32808, y=32334, z=11, stackpos=0},
[17] = {x=32809, y=32339, z=11, stackpos=0},
[18] = {x=32809, y=32338, z=11, stackpos=0},
[19] = {x=32809, y=32337, z=11, stackpos=0},
[20] = {x=32809, y=32336, z=11, stackpos=0},
[21] = {x=32809, y=32335, z=11, stackpos=0},
[22] = {x=32809, y=32334, z=11, stackpos=0},
[23] = {x=32809, y=32333, z=11, stackpos=0},
[24] = {x=32810, y=32339, z=11, stackpos=0},
[25] = {x=32810, y=32338, z=11, stackpos=0},
[26] = {x=32810, y=32337, z=11, stackpos=0},
[27] = {x=32810, y=32336, z=11, stackpos=0},
[28] = {x=32810, y=32335, z=11, stackpos=0},
[29] = {x=32810, y=32334, z=11, stackpos=0},
[30] = {x=32810, y=32333, z=11, stackpos=0},
[31] = {x=32811, y=32338, z=11, stackpos=0},
[32] = {x=32811, y=32337, z=11, stackpos=0},
[33] = {x=32811, y=32336, z=11, stackpos=0},
[34] = {x=32811, y=32335, z=11, stackpos=0},
[35] = {x=32811, y=32334, z=11, stackpos=0},
[36] = {x=32811, y=32333, z=11, stackpos=0},
[37] = {x=32812, y=32335, z=11, stackpos=0},
[38] = {x=32812, y=32334, z=11, stackpos=0},
[39] = {x=32812, y=32333, z=11, stackpos=0},
[40] = {x=32813, y=32335, z=11, stackpos=0},
[41] = {x=32813, y=32334, z=11, stackpos=0},
[42] = {x=32813, y=32333, z=11, stackpos=0},
[43] = {x=32814, y=32335, z=11, stackpos=0},
[44] = {x=32814, y=32334, z=11, stackpos=0},
[45] = {x=32814, y=32333, z=11, stackpos=0}
}
local lavaremove = getThingFromPos(lava[1]) -- make this pick 1 up to 45
if (itemEx.itemid == 1304 and itemEx.actionid == 8000) then
doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
doTransformItem(itemEx.uid, 6267)
doTransformItem(lavaremove.uid, 5815)
return true
end