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

special buy command

DestinationSer

@echo off
Joined
Mar 7, 2009
Messages
2,806
Solutions
1
Reaction score
676
You say !buy aaod and you get the item type of 2198.
The items can ONLY be bought with the item type of: 9020

Hurry
Thanks :)
 
script:
Code:
function onSay(cid, words, param)
	local c = {
	cost = 10,
	required_item = 9020,
	requited_count = 1,
	item = 2198,
	item_count = 1,
	}
	if getPlayerItemCount(cid, c.required_item) >= c.requited_count then
		if getPlayerMoney(cid) > c.cost then
		doPlayerRemoveMoney(cid, c.cost)
		doPlayerAddItem(cid, c.item, c.item_count)
		doCreatureSay(cid, "You bought ".. c.item_count .."x " .. getItemNameById(c.item) .. " for " .. c.cost .."." , TALKTYPE_ORANGE_1)
		else
		doCreatureSay(cid, "You need ".. cost .." gold coins!" , TALKTYPE_ORANGE_1)
		end
	else
	doCreatureSay(cid, "You need ".. c.item_count .."x " .. getItemNameById(c.item) .. "!" , TALKTYPE_ORANGE_1)
	end

   return true
end
 
Back
Top