silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,484
- Solutions
- 9
- Reaction score
- 217
hello folks, I'm trying make some script that compare if have some ground in fromPos, toPos...
this is my test, I already try use the function from orts data pack but there are wrong too e.e
my call of the function is:
Code:
local function getFungusInArea(fromPos, toPos)
for x = fromPos.x, toPos.x do
for y = fromPos.y, toPos.y do
local itemIds = {13592, 13598, 13599, 13600, 13585, 13586, 13587, 13588, 13589, 13593}
for i = 0, #itemIds do
local item = Tile(x, y, 9):getItemById(itemIds[i])
if item then
player:say('true...', TALKTYPE_MONSTER_SAY)
return true
end
end
end
end
player:say('false ...', TALKTYPE_MONSTER_SAY)
return false
end
my call of the function is:
Code:
if not getFungusInArea(Position(33306, 31847, 9), Position(33369, 31919, 9)) then
Last edited: