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

Rubies Quest

Creon

Well-Known Member
Joined
Aug 25, 2009
Messages
708
Reaction score
92
Location
United States
So I have this script for the Small Rubies Quest, but it's giving an unlimited amount of rubies. How do I add a storage for it?

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, 10005) < 1 then
        local bag = doPlayerAddItem(cid, 2147, 6)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_ADVANCE, "You have found 6 small rubies.")
    else
        doPlayerSendTextMessage(cid, MESSAGE_INFO_ADVANCE, "It is empty.")
    end
return TRUE
end
 
Lua:
local storage  = 10005 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, storage) < 1 then
		local bag = doPlayerAddItem(cid, 2147, 6)     
		doPlayerSendTextMessage(cid, MESSAGE_INFO_ADVANCE, "You have found 6 small rubies.")
		doPlayerSetStorageValue(cid, storage, 1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_ADVANCE, "It is empty.")
	end
return TRUE
end
 
Lua:
local storage  = 23514 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerStorageValue(cid, storage) < 1 then
	local bag = doPlayerAddItem(cid, 2147, 6)     
	doPlayerSendTextMessage(cid, MESSAGE_INFO_ADVANCE, "You have found 6 small rubies.")
	doPlayerSetStorageValue(cid, storage, 1)
    else
	doPlayerSendTextMessage(cid, MESSAGE_INFO_ADVANCE, "It is empty.")
    end
    return TRUE
end

*EDIT-1*: I simply changed the storage key, as you are apparently using it already. (Bogart's one)
 
Back
Top