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

How come my ingot wont change to 100cc.

brendan2

Sensation black
Joined
Feb 19, 2009
Messages
507
Reaction score
1
PHP:
--Configurations
local ITEM_NUGGET = 9971 -- Ingot ID
--End of Configs

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == ITEM_GOLD_INGOT then --INGOT to Crystal Coin
	doChangeTypeItem(item.uid, item.type - 1)
		doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX)
		doSendAnimatedText(fromPosition, "Crystal", TEXTCOLOR_TEAL)
	  else
		return FALSE
	end
	return TRUE
end

PHP:
--Configurations
local ITEM_GOLD_INGOT = 9971 -- Nugget ID
--End of Configs

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == ITEM_GOLD_COIN and item.type == ITEMCOUNT_MAX then --Gold Coin to Platinum Coin
		doChangeTypeItem(item.uid, item.type - item.type)
		doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)
		doSendAnimatedText(fromPosition, "Platinum", TEXTCOLOR_LIGHTBLUE)
	elseif item.itemid == ITEM_PLATINUM_COIN and item.type == ITEMCOUNT_MAX then --Platinum Coin to Crystal Coin
		doChangeTypeItem(item.uid, item.type - item.type)
		doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, 1)
		doSendAnimatedText(fromPosition, "Crystal!", TEXTCOLOR_TEAL)
	elseif item.itemid == ITEM_PLATINUM_COIN and item.type < ITEMCOUNT_MAX then --Platinum Coin to Gold Coin
		doChangeTypeItem(item.uid, item.type - 1)
		doPlayerAddItem(cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX)
		doSendAnimatedText(fromPosition, "Gold", TEXTCOLOR_YELLOW)
	elseif item.itemid == ITEM_CRYSTAL_COIN and item.type < ITEMCOUNT_MAX then --Crystal Coin to Platinum Coin
		doChangeTypeItem(item.uid, item.type - 1)
		doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
		doSendAnimatedText(fromPosition, "Platinum", TEXTCOLOR_LIGHTBLUE)
	elseif item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then --Crystal Coin to Ingot
		doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, ITEM_GOLD_INGOT,1)
        doSendAnimatedText(fromPosition, "Ingot", TEXTCOLOR_YELLOW)
	  else
		return FALSE
	end
	return TRUE
end

PHP:
ITEM_GOLD_INGOT = 9971
 

Similar threads

Back
Top