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

Problem with giving key action id. Help? i give rep

Nixx

LOOT Online Soon!!!!
Joined
Feb 15, 2010
Messages
27
Reaction score
0
Location
~OTLAND~
function onUse(cid, item, frompos, item2, topos)

if item.uid == 1015 then
queststatus = getPlayerStorageValue(cid,2090)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Freedom Key.")
doPlayerAddItem(cid,2090,1)
doItemSetAttribute(2090, aid, 4200)
setPlayerStorageValue(cid,2090,1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.")
end
else
return 0
end

return 1
end

this is the script i am using, and idk whats wrong with it.
i'm running an 8.54 ot server, and you are suppost to click on the ground to get the key. the key is appearing, but the action id is 0 not 4200. can anyone help?
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, 2090) < 1 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a " .. getItemNameById(2900) .. ".")
		doItemSetAttribute(doPlayerAddItem(cid, 2090, 1), "aid", 4200)
		setPlayerStorageValue(cid, 2090, 1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The " .. getItemName(item.uid) .. " is empty.")
	end
	return true
end
 
Back
Top