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

Can somon tell me why this script will sell me a bp of runes but not set the lever ba

Joined
Apr 22, 2008
Messages
114
Reaction score
10
Can somon tell me why this script will sell me a bp of runes but not set the lever back?? giving rep++++

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 23000 and item.itemid == 1945 then
if doPlayerRemoveMoney(cid, 5000) == TRUE then

container = doPlayerAddItem(cid, 2000, 1)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doAddContainerItem(container, 2313, 6)
doPlayerSendTextMessage(cid, 22, "You bought a bp of 6x explosion runes for 5000.")
doTransformItem(item.uid,item.itemid+1)
elseif item.itemid == 1946 and item.uid == 23000 then
doPlayerSendTextMessage(cid, 22, "Lever reset")
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendTextMessage(cid,22,"A backpack of 6x explosion runes costs 5k")
end
end
return 1
end
 
Last edited:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)

	local runeID = 2313 -- rune id
	local charges = 6 -- rune charges
	local cost = 5000 -- cost if the bp runes

	if item.uid == 23000 then
		if doPlayerRemoveMoney(cid, cost) == TRUE then
			if item.itemid == 1945 then
				doTransformItem(item.uid,1946)
			elseif item.itemid == 1946 then
				doTransformItem(item.uid,1945)
			end
			container = doPlayerAddItem(cid, 2000, 1)
			for i = 1, 20 do
				doAddContainerItem(container, runeID, charges)
			end
			doPlayerSendTextMessage(cid, 22, "You bought a bp of "..charges.."x "..getItemNameById(runeID).."s for "..config.cost..".")


		else
			doPlayerSendTextMessage(cid,22,"A backpack of "..charges.."x "..getItemNameById(runeID).."s costs "..config.cost..".")
		end
	end
	return TRUE
end

Post errors ;).

Regards,
Shawak
 
Back
Top Bottom