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

Lets make new currency!!!!

MadMOOK

Hoo
Joined
Apr 20, 2011
Messages
802
Reaction score
44
Well in your mods folder if you dont have change-gold.xml make one and add this!!
Change them xxxx's to your new item id for new currency

Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="change-gold" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
    <action itemid="2148;2152;2160;xxxxx" event="script" override="yes"><![CDATA[
        local coins = {
            [ITEM_GOLD_COIN] = {
                to = ITEM_PLATINUM_COIN, effect = COLOR_YELLOW
            },
            [ITEM_PLATINUM_COIN] = {
                from = ITEM_GOLD_COIN, to = ITEM_CRYSTAL_COIN, effect = COLOR_LIGHTBLUE
            },
            [ITEM_CRYSTAL_COIN] = {
                from = ITEM_PLATINUM_COIN, to = ITEM_MILLION_COIN, effect = COLOR_TEAL
            },
            [ITEM_MILLION_COIN] = {
                from = ITEM_CRYSTAL_COIN, effect = COLOR_RED
            }
        }

        function onUse(cid, item, fromPosition, itemEx, toPosition)
            if(getPlayerFlagValue(cid, PLAYERFLAG_CANNOTPICKUPITEM)) then
                return false
            end

            local coin = coins[item.itemid]
            if(not coin) then
                return false
            end

            if(coin.to ~= nil and item.type == ITEMCOUNT_MAX) then
                doChangeTypeItem(item.uid, item.type - item.type)
                doPlayerAddItem(cid, coin.to, 1)
                doPlayerSendTextMessage(cid, MESSAGE_EXPERIENCE, "$$$", ITEMCOUNT_MAX, coins[coin.to].effect, getCreaturePosition(cid))
            elseif(coin.from ~= nil) then
                doChangeTypeItem(item.uid, item.type - 1)
                doPlayerAddItem(cid, coin.from, ITEMCOUNT_MAX)
                doPlayerSendTextMessage(cid, MESSAGE_EXPERIENCE, "$$$", ITEMCOUNT_MAX, coins[coin.from].effect, getCreaturePosition(cid))
            end

            return true
        end
    ]]></action>
</mod>

After you do this go into data/lib/constant.lua.... mine is 000-constant.lua,yours might be too
Find this!
Code:
ITEM_GOLD_COIN = 2148
ITEM_PLATINUM_COIN = 2152
ITEM_CRYSTAL_COIN = 2160
Then add this beneath other coins! you name it what you want and use item id of your choosing
Code:
ITEM_MILLION_COIN = xxxxx

Go into data/items/items.xml and find your new currency item and add
Code:
<attribute key="worth" value="1000000"/>

and BOOM your ready to rumble!!
If you change ITEM_MILLION_COIN to anything else in contant.lua then make sure you change it in change-gold.xml mod aswell!! Cheers!
 
Last edited:
There are alot of scripts of these already out there, Same with talking signs/tps.. No offence but would be nice if/when people make something of there own. They don't make things like this(for release), Try mixing it up.
WibbenZ
 
Thanks for being honest :p I will learn lua :p i also know i DO NOT KNOW lua, and theres others with servers that do not know lua that run servers. only reason i made this post was to link it to someone who had a problem WITCH I HELPED BTW. and now he's happy and im smiling, so shit on yerself.

At least ive contributed...you got 1.4k posts and its all in support.
 
Last edited:
Back
Top