• 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!

Help with this array

Exiled Pain

Fervid Learner
Joined
Jan 8, 2008
Messages
552
Reaction score
4
This would be a script for a talkaction to check were the player is standing (his position and the tile he is steping in), check if the tile is not on the array he can perform the action other way it would be cancel.


some tiles I need to check:
Code:
local watertiles = {4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4664, 4665, 4666}

local v = getTileItemById(pos, itemid).uid

I was trying to use something like:
Code:
if v.(not watertiles[watertiles.itemid]) then

Also tryed

Code:
if (not getTileItemById(pos, watertilesitemid).uid)

but it doesn't seem to be working on detecting the tile were the player is steping. And so on.
Thanks in advance, rep +
 
No, for some reasson not working even if I place the:

Code:
local watertiles = {4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4664, 4665, 4666}
local v = getCreaturePosition(cid)
local pos = {x = v.x, y = v.y, z = v.z, stackpos=1}

----and use the

if not isInArray(watertiels, getThingFromPos(pos).itemid)then

the weird thing is that if I use them separately with:

Code:
getTileItemById(pos, 4608).uid == 0 and getTileItemById(pos, 4609).uid == 0 and  SO ON

it works by them selves, but nee the array to reduce the script size.
 
Code:
local watertiles, v = {4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4664, 4665, 4666}, getThingPos(cid)
local pos = {x = v.x, y = v.y, z = v.z, stackpos=0}

if not isInArray(watertiels, getThingFromPos(pos).itemid) then
stackpos 0 is ground..
 
Back
Top