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

Lever Script Help

zakman

New Member
Joined
Feb 15, 2010
Messages
3
Reaction score
0
I need to find a script that allows me to USE a lever and RECIEVE an ITEM at a certain cost.

A tutorial would help aswell!!
 
I can try to make this :D brb

This is my first script helping some1, and it's not tested.

NOTE: You have to edit the text, items ID, and storage value.

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	winner = getPlayerStorageValue(cid,XXXXXX)
	player = getPlayerPosition(cid)
		if item.itemid == 1945 or 1946 and winner == 1 then
			doPlayerAddItem(cid, XXXX, 1)
			doSendMagicEffect(player, 29)
			doSendAnimatedText(player, "You have found a <Item>.", TALKTYPE_PRIVATE_RED)
			setPlayerStorageValue(cid, XXXXXXX, -1)
		else
			doPlayerSendCancel(cid, "You already got this item.")
			
		end
	return true
end
 
Last edited:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        queststatus = getPlayerStorageValue(cid,20152)
        Pos = getPlayerPosition(cid)
                if item.itemid == 1945 and queststatus == -1 then
                        doPlayerAddItem(cid, XXXX, 1)
                        doSendMagicEffect(Pos, 29)
                        doSendAnimatedText(player, "You have found a <Item>.", TALKTYPE_PRIVATE_RED)
                        setPlayerStorageValue(cid,20152, 1)
                        doTransformItem(item.uid,item.itemid+1)
                elseif item.itemid == 1946 and queststatus == -1 then
                        doPlayerAddItem(cid, XXXX, 1)
                        doSendMagicEffect(player, 29)
                        doSendAnimatedText(player, "You have found a <Item>.", TALKTYPE_PRIVATE_RED)
                        setPlayerStorageValue(cid,20152, 1)
                        doTransformItem(item.uid,item.itemid-1)
                else
                        doPlayerSendCancel(cid, "You already got this item.")
                        
                end
        return true
end
 
Last edited:
Back
Top