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

Key door, why dont work ?

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello,
Why this script dont work ?:
LUA:
function onUse(cid, item, frompos, item2, topos)
		queststatus = getPlayerStorageValue(cid,4603)
		if queststatus == -1 then
			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a key, number: 4603.")
				doSetItemActionId(doPlayerAddItem(cid,2088,1),4603)
				setPlayerStorageValue(cid,4603,1)
		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "This is empty.")
		end

		return 1

	end
The key dont have key number and actionid of doors...

TFS 0.3.6pl1
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getCreatureStorage(cid, 4603) == -1 then
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, 'You have found a key, number: 4603.')
		doItemSetAttribute(doPlayerAddItem(cid, 2088, 1), 'aid', 4603)
		doCreatureSetStorage(cid, 4603, 1)
	else
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, 'The chest is empty.')
	end
	return true
end
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, 4603) == -1 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a key, number: 4603.')
		doSetItemActionId(doPlayerAddItem(cid, 2088, 1), 4603)
		setPlayerStorageValue(cid, 4603, 1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'The chest is empty.')
	end
	return TRUE
end
 
Back
Top