• 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 Whats wrong with this script.

brendan2

Sensation black
Joined
Feb 19, 2009
Messages
507
Reaction score
1
Script is supose to let people with a certain feetcolour threw door.

PHP:
local lookFeet = 94

function onUse(cid, item, fromPosition, itemEx, toPosition)
        if(getCreatureOutfit(cid).lookFeet ~= lookFeet) then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
                return true
        
        elseif (item.uid == (item.itemid + 1)) then
        doPlayerSendCancel(cid, 'Sorry not possible.')
        end
        
        doTransformItem(item.uid, item.itemid + 1)
        doTeleportThing(cid, toPosition)
        return true
end

Video of it messing up

YouTube - glitch

i tryed switching the doors and it still does it.
 
Code:
local lookFeet = 94
local closedDoors = {9171, 9173}
local openDoors = {9172, 9174}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getCreatureOutfit(cid).lookFeet ~= lookFeet then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
	elseif isInArray(closedDoors, item.itemid) then
		doTransformItem(item.uid, item.itemid + 1)
	elseif isInArray(openDoors, item.itemid) then
		doTransformItem(item.uid, item.itemid - 1)
	end
	return true
end
 
Back
Top