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

1 lever for 1 item

Mithos

New Member
Joined
Sep 8, 2008
Messages
56
Reaction score
2
i will make a lever system for (Donated system) but i search but i find only a script whit a bag and normaly coins
i will have a system when u click on the lever u paid 30 donated coins or sommething
can somebody help me
 
a simple script:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local donation_coin = 6527
	local need_to_pay = 200
	local add_item = {[1] = {2472, 1}}
	if(doPlayerRemoveItem(cid, donation_coin, need_to_pay)) then
		doPlayerAddItem(cid, add_item[1][1], add_item[1][2])
		doPlayerSendCancel(cid, "You just bought ".. add_item[1][2] .."x of ".. getItemArticleById(add_item[1][1]) .." ".. getItemNameById(add_item[1][1]) ..".")
	else
		doPlayerSendCancel(cid, "You don't have enough tokens.")
	end
	return true
end

actions.xml
XML:
	<action itemid="8047" event="script" value="custom/buyitem.lua"/>
 
Last edited:
Back
Top