• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Function mapForMe(plx)

Fallen

Freelancer
Senator
Joined
Aug 21, 2009
Messages
3,712
Reaction score
249
Location
Egypt
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
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;
f50my8.jpg

commentz plxzx
 
Last edited:
yes sir, would be beast ;d
 
Last edited:
it can be useful for some things, for example tibia day/night etc winter/summer
 
The innovation keeps progress. Gotta love it, keep it up and I hope someday it'll be a saveable system :)
 
on some servers you was able to build own house so it have to be possible somehow :D
 
lol, i didnt take this idea from any server ;< it was a request from someone >;
 
@up

eeasy boy, he didn't say u thiefed idea. :DDD





THIEF!!!!!

He just wanted to clear he didn't take this idea from any server, since zakius mentioned the use of this feature in an opentibia server, so he stated it was just a request by someone, so, in my opinion, he is not a thief, but a good scripter.

:ninja:
 
the guy was just suggesting there was a way to save it. (they used a modified house system)
 
Thanks Cyko, credits to you. :thumbup:
 
He just wanted to clear he didn't take this idea from any server, since zakius mentioned the use of this feature in an opentibia server, so he stated it was just a request by someone, so, in my opinion, he is not a thief, but a good scripter.

:ninja:

in my opinion u are a bit ehmmm, idk..., since it's obvious that I was joking. :D

No offence dude, I love you, peace :thumbup::thumbup::peace::peace::peace: one love baby! yeah!


Thanks Cyko, credits to you. :thumbup:

wtf? where do u see Cyko?
 
actually what cyko did is this part;
Code:
if doTileQueryAdd(doCreateItemEx(k), v) == 1 then
	doCreateItem(k, 1, v)
else is mine but well im not stink to not give credits
 
Last edited:
Back
Top