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

Storage Value on Effects

Winnerandy

Experienced Web Design'er
Joined
Oct 23, 2008
Messages
2,251
Reaction score
51
Location
Tellus.
Hello there!

I need a script that shows the effects, for example on a chest with a arrow,
and if the player has the storage value 0, then the arrow shows, but after using or moves on x item, the effects that was on that place/item removes,
could be nice with some send text message too..

Also, could be nice if you made one on movement, for example for stairs, and one for globalevents, for items, like chests,
furnitures, ect..
xD

Rep for the one who makes the script :peace:
 
Code:
local t = {
	pos = { x = 1000, y = 1000, z = 7 },
	storage = 10000,
	effect = CONST_ME_TUTORIALARROW
}
function onThink(interval, lastExecution, thinkInterval)
	local spec = getSpectators(t.pos, 8, 6, true)
	if spec then
		for i = 1, #spec do
			if isPlayer(spec[i]) then
				if getPlayerStorageValue(spec[i], t.storage) > 0 then
					doSendMagicEffect(t.pos, t.effect, spec[i])
				else
					doPlayerSendCancel(spec[i], "You do not have storage key " .. t.storage .. " set to value of at least 1, post back in thread kurwa!.?.")
				end
			end
		end
	end
	return true
end
Yes.
 
Something like this:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerStorageValue(cid, 10000) == 1) then
		setPlayerStorageValue(cid, 10000, -1)
		doSendMagicEffect(fromPosition, CONST_ME_MAGIC_RED)
	end
	doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
	return true
end

The bad thing is, you haven't learnt anything.
 
Something like this:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerStorageValue(cid, 10000) == 1) then
		setPlayerStorageValue(cid, 10000, -1)
		doSendMagicEffect(fromPosition, CONST_ME_MAGIC_RED)
	end
	doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
	return true
end

The bad thing is, you haven't learnt anything.

Aff, weeeelll, now I understand :D ty for the script Cyko.
The next script with making these effect will be easy for me now..
 
Aff, I have the storagevalue.. and I didn't get any error of that script for the lever, and when I use the lever, the arrow still there ..
 
Try changing your storage value by typing: /storage name, storage, value
(Just in case the problem is in your lever script)
 
Back
Top