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

Lua Quest chest problem!!!!!!! rep++

  • Thread starter Thread starter Evil Puncker
  • Start date Start date
E

Evil Puncker

Guest
I'm using the latest 0.4 files, but there is a big problem, all players can walk trough the quest chests and even move then lol

LUA:
local SPECIAL_QUESTS = {2001}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if(not isPlayer(cid) or
		(isContainer(item.uid) and (not isInArray(SPECIAL_QUESTS, item.actionid) and item.uid > 65535) or
		getTileInfo(position).creatures <= 1)) then
			return true
	end

	if(lastPosition.x == 0) then -- player just logged in
		lastPosition = getTownTemplePosition(getPlayerTown(cid))
		doSendMagicEffect(lastPosition, CONST_ME_TELEPORT)
	end

	doTeleportThing(cid, lastPosition, true)
	return true
end
 
I am not sure how to fix it in coding, but in remeres map, click properties and put a Unique ID that isn't in use and it won't be moveable, not sure if that will also prevent players from walking on top of it, test it and tell me please.
 
so the problem is you can move the chest?
have you edit somting in items.otb?
Have you only try with uniq id instead of both action and uniq id?
 
LUA:
local SPECIAL_QUESTS = {2001}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if(not isPlayer(cid) or
		(isContainer(item.uid) and (not isInArray(SPECIAL_QUESTS, item.actionid) and item.uid > 65535) or
		getTileInfo(position).creatures <= 1)) then
			return true
	end

	if(lastPosition.x == 0) then -- player just logged in
		lastPosition = getTownTemplePosition(getPlayerTown(cid))
		doSendMagicEffect(lastPosition, CONST_ME_TELEPORT)
	end

	doTeleportThing(cid, lastPosition, true)
	return true
end
 
Back
Top