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

How Add Level To Quest?

Joined
Sep 29, 2009
Messages
224
Reaction score
0
PHP:
function onUse(cid, item, frompos, item2, topos)


	if item.uid == 50036 then
		if getPlayerStorageValue(cid,50036) == -1 then
			doPlayerSendTextMessage(cid,25,"You have found a 10k.")
			doPlayerAddItem(cid,2160,1)
			setPlayerStorageValue(cid,50036,1)
		else
			doPlayerSendTextMessage(cid,25,"The is empty.")
		end

	end
	return TRUE
end

Thanks ;D
 
Code:
local t = {
--	  uid	= {itemid[, count[, level]]}
	[50036] = {2160, 1, 40}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local i = t[item.uid]
	if i then
		if getPlayerStorageValue(cid, item.uid) < 1 then
			if not i[3] or getPlayerLevel(cid) >= i[3] then
				doPlayerAddItem(cid, i[1], i[2] or 1)
				setPlayerStorageValue(cid, item.uid, 1)
				return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found " .. (i[2] and i[2] > 1 and i[2] or getItemInfo(i[2]).article) .. " " .. (i[2] and i[2] > 1 and getItemInfo(i[2]).plural or getItemInfo(i[1]).name) .. ".")
			else
				return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be over level " .. i[3] .. ".")
			end
		else
			return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The " .. getItemNameById(item.itemid) .. " is empty.")
		end
	end
end
 
Basics

Code:
function onUse(cid, item, frompos, item2, topos)
	local level = 50
	if item.uid == 50036 then
		if getPlayerStorageValue(cid, 50036) == -1 then
			if getPlayerLevel(cid) >= level then
				doPlayerSendTextMessage(cid, 25, "You have found 10k.")
				doPlayerAddItem(cid, 2160, 1)
				setPlayerStorageValue(cid, 50036, 1)
			else
				doPlayerSendTextMessage(cid, 25, "Your level is too low.")
			end
		else
			doPlayerSendTextMessage(cid, 25, "The is empty.")
		end
	end
	return true
end
 
No Work ;S ' I Use 0.3.5
Code:
local t = {
--	  uid	= {itemid[, count[, level]]}
	[50036] = {2160, 1, 40}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local i = t[item.uid]
	if i then
		if getPlayerStorageValue(cid, item.uid) < 1 then
			if not i[3] or getPlayerLevel(cid) >= i[3] then
				doPlayerAddItem(cid, i[1], i[2] or 1)
				setPlayerStorageValue(cid, item.uid, 1)
				return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found " .. (i[2] and i[2] > 1 and i[2] or getItemDescriptionsById(i[2]).article) .. " " .. (i[2] and i[2] > 1 and getItemDescriptionsById(i[2]).plural or getItemNameById(i[1])) .. ".")
			else
				return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be over level " .. i[3] .. ".")
			end
		else
			return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The " .. getItemNameById(item.itemid) .. " is empty.")
		end
	end
end
 
Back
Top