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

getTileItemById

Ecstacy

Mothafuckaaa
Joined
Dec 26, 2008
Messages
3,836
Reaction score
108
Location
The Netherlands
Hey,

I can't get this function to work and I'd like to get some support.
how would I make this work?
It must check pos for tileid by 460, but it teleport wether it's tileID 460 or not.

I tried;
if getTileItemByID(pos, 460) then
if getTileItemByID(pos, 460) == true then
if getTileThingByPos(pos) == 460 then
;
and none works :(


Lua:
if getTileItemById(pos, 460) then
				doTeleportThing(cid, pos, false)
				if doTeleportThing(cid, pos) then
					doSendMagicEffect(pos, 10)
					doCreatureSay(cid, r.text, 19)
					return doAddCondition(cid, thisCondition)
				else

Thanks in advance,
unknown666
 
Code:
if getTileItemById(pos, 460) then
    doTeleportThing(cid, pos, false)
    doSendMagicEffect(pos, 10)
    doCreatureSay(cid, r.text, 19)
    return doAddCondition(cid, thisCondition)
else
uhm that should work I guess ;s
 
Code:
local t =   {
	[7440] = {outfit='mew', outfitn='rat', text='Fly, mew!', dtext='Go down, mew!'}
}       
local thisCondition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(thisCondition, CONDITION_PARAM_TICKS, 1800 * 1000)
addOutfitCondition(thisCondition, {lookType = 354, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v, r, s = getCreaturePosition(cid), t[item.itemid], 100
	local pos = {x = v.x, y = v.y, z = 6}
	local posd = {x = v.x, y = v.y, z = 7}
	if r then
		if v.z == 7 then
			if getTileItemById(pos, 460).uid > 0 then
				if doTeleportThing(cid, pos, false) then
					doSendMagicEffect(pos, 10)
					doCreatureSay(cid, r.text, 19)
					return doAddCondition(cid, thisCondition)
				else
					return doPlayerSendCancel(cid, 'You can\'t fly here.')
				end    
			else
				return doPlayerSendCancel(cid, 'You can\'t fly here.')
			end
		elseif v.z == 6 then
			if doTeleportThing(cid, posd, false) then
				doSendMagicEffect(posd, 10)
				doCreatureSay(cid, r.dtext, 19)
				return doRemoveCondition(cid, CONDITION_OUTFIT)
			else
				return doPlayerSendCancel(cid, 'You can\'t land here.')
			end
		else
			return doPlayerSendCancel(cid, 'You can\'t fly here.')
		end
	else
		return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'There has been some error, try contacting a staff member.')
	end
end
 
Back
Top