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

Use item get x items.

NilssoN042

Banned User
Joined
Sep 8, 2008
Messages
998
Reaction score
2
Location
Sweden, Helsingborg
Hello, I wounder if someone got a script that works like this..

Click (statue, stone) or annything.
Adds x items.

Please its very simple. I hope annyone will help me!
I have searched alot
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local statue = {
		items = { {2160,100},{2152,100} },
		storage = 43415
	}
	if getPlayerStorageValue(cid, statue.storage) == -1 then
		for i = 1, #statue.items do
			doPlayerAddItem(cid, statue.items[i][1], statue.items[i][2])
		end
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have clicked the statue and found many rewards!")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS)
                setPlayerStorageValue(cid, statue.storage, 1)
	else
		doPlayerSendCancel(cid, "You have already used this before.")
	end
	return true
end
 
Last edited:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local statue = {
		items = { {2160,100},{2152,100} },
		storage = 43415
	}
	if getPlayerStorageValue(cid, statue.storage) == -1 then
		for i = 1, #statue.items do
			doPlayerAddItem(cid, statue.items[i][1], statue.items[i][2])
		end
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have clicked the statue and found many rewards!")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS)
	else
		doPlayerSendCancel(cid, "You have already used this before.")
	end
	return true
end

Its like a quest? I want it like a shop
 
Back
Top Bottom