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

plz help me how to make 100cc ->1 GN

First, we have to edit the "Changegold.lua" to this:


--Configurations
local ITEM_NUGGET = 2157 -- 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 Nugget
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, ITEM_NUGGET,1)
doSendAnimatedText(fromPosition, "Nugget", TEXTCOLOR_YELLOW)
else
return FALSE
end
return TRUE
end
Then, make a new Lua file called "changenugget.lua" inside "actions/scripts/other"
This should be inside of it:


--Configurations
local ITEM_NUGGET = 2157 -- Nugget ID
--End of Configs

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == ITEM_NUGGET then --Nugget 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
And last: In Actions.xml you should add this line only:


<action itemid="2157" script="other/changenugget.lua"/>


REP ++ ME :)
 
why u mad then ? so if u know the way why u didnt do it ?


i hate childs only talk talk talk never do thing -,-
 
Back
Top