Credits;
Cykotitan for fixing my errors;
http://otland.net/f132/luadotileadditemex-77498/
And me for the rest
--
place this in data/lib/050-function.lua ; or w/e
To call it;
ScreenShot;
commentz plxzx
Cykotitan for fixing my errors;
http://otland.net/f132/luadotileadditemex-77498/
And me for the rest
--
place this in data/lib/050-function.lua ; or w/e
Code:
function mapForMe(items, fromPosition, toPosition)
for i = 1, #items do
for x = fromPosition.x, toPosition.x do
for y = fromPosition.y, toPosition.y do
for z = fromPosition.z, toPosition.z do
local v, k = {x = x, y = y, z = z}, items[math.random(#items)]
if doTileQueryAdd(doCreateItemEx(k), v) == 1 then
doCreateItem(k, 1, v)
end
end
end
end
end
return true
end
To call it;
Code:
function onSay(cid, words, param, channel)
local items = {2700, 7024, 2719, 2710, 2718, 3608, 3609, 3616, 3615, 3607}
local fromPosition = {x = 90, y = 122, z = 7}
local toPosition = {x = 98, y = 129, z = 7}
return mapForMe(items, fromPosition, toPosition)
end
ScreenShot;
commentz plxzx
Last edited: