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

Action (Gold Ingot) Change gold TFS 1.0 - 1.2 Client 10.96

Acrenactive

★Designer★
Joined
Mar 21, 2013
Messages
224
Reaction score
55
Location
Los Angels L.A
Hey Everyone!

I had problems with make 100 crystal coin to 1 ingot so i made a thread in support, i got many answers, but none of the script helped for me. (big thanks to @Zothion , He really did try to help me,
but the script not worked.
So I spent time to solve my problem and I did so I have chosen to share the script with everyone.


It is based on the original script but I have added gold ingot works
-----------------------------------------------------------------------------
Gold ingot id: 9971 <<< you can change this id

100 crystal coin to 1 gold ingot.
Actions.xml
search

Code:
    <!-- Gold -->
    <action itemid="2148" script="other/changegold.lua" />
    <action itemid="2152" script="other/changegold.lua" />
    <action itemid="2160" script="other/changegold.lua" />

and add under this

Code:
<action itemid="9971" script="other/changegold.lua" />


Replace this script in changegold

data\actions\scripts\other\changegold

Code:
local items = {
   [ITEM_GOLD_COIN] = {to = ITEM_PLATINUM_COIN},
   [ITEM_PLATINUM_COIN] = {from = ITEM_GOLD_COIN, to = ITEM_CRYSTAL_COIN},
   [ITEM_CRYSTAL_COIN] = {from = ITEM_PLATINUM_COIN, to = 9971},
   [9971] = {from = ITEM_CRYSTAL_COIN},
   }
function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey)
   local coin = items[item.itemid]
   if coin then
     if(item.type == 100 and coin.to ~= nil)then
       Item(item.uid):remove()
       Player(cid):addItem(coin.to, 1)
     elseif(coin.from ~= nil)then
       Item(item.uid):remove(1)
       Player(cid):addItem(coin.from, 100)
     end
   end
   return true
end
 
This has already been done and been around for years. If you just searched, you would have found.

[EDIT] Sorry, thanks for the contributions none the less. Probably good idea to re-archive it so it doesn't get lost in all the forums mess.
 
@Jeffro Perhaps it is out here somewhere, but I have not found it and help was not so good but I am grateful for all help i received. I just wanted to add the script has made by myself but based on the original, for if anyone might have the same problems as me can only find the script a little faster than that also sit several hours searching for it. But I hope that this script could be of any help to someone who does not find the older Post available here in the otland.:)
 
Ok that's working for changing from CC to Ingot, but you can't buy anything in game with ingot. To make it work it needs source edit no ?
 
Back
Top