• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

/sell "ITEM"

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,797
Reaction score
10
Location
Sweden 172
are there any talkaction to say like
/sell "AND ITEM NAME HERE"
and you got it selled ..
and i can choose item's that going to sell and price ?
i have look around ..
 
Code:
function onSay(cid, words, param, channel)
	local items = {
		["chipsen"] = {id = 2167, price = 20000},
		["rox"] = {id = 2166, price = 20000}
	}

	local now = items[param]
	if (not now) then
		doPlayerSendCancel(cid, "Item not found ='(")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		return true
	end

	local count = getPlayerItemCount(cid, now.id)
	if (count >= 1) then
		doPlayerRemoveItem(cid, now.id, count)
		doPlayerAddMoney(cid, count * now.price)
		doPlayerSendCancel(cid, "Sold ".. count .."x ".. param .." for ".. count * now.price ." gold.")
		doSendAnimatedText(getCreaturePosition(cid), "$$$$", TEXTCOLOR_GREEN)
	else
		doPlayerSendCancel(cid, "You haven't this item ='(")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end

	return true
end
 
Code:
function onSay(cid, words, param, channel)
	local items = {
		["chipsen"] = {id = 2167, price = 20000},
		["rox"] = {id = 2166, price = 20000}
	}

	local now = items[param]
	if (not now) then
		doPlayerSendCancel(cid, "Item not found ='(")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		return true
	end

	local count = getPlayerItemCount(cid, now.id)
	if (count >= 1) then
		doPlayerRemoveItem(cid, now.id, count)
		doPlayerAddMoney(cid, count * now.price)
		doPlayerSendCancel(cid, "Sold ".. count .."x ".. param .." for ".. count * now.price ." gold.")
		doSendAnimatedText(getCreaturePosition(cid), "$$$$", TEXTCOLOR_GREEN)
	else
		doPlayerSendCancel(cid, "You haven't this item ='(")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end

	return true
end
i will test it tomorrow
rep :)'
Edit :
You must spread some Reputation around before giving it to Chojrak again.
 
Back
Top