• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

currency in the game

Dorianek

Member
Joined
Nov 29, 2018
Messages
252
Reaction score
10
Location
Poland
Hello, I wrote a simple script but something is not compatible because:

a) 1 Gold Nuggets does not change into 1 Scrab Coins (1sc turns into 1 nuggets)

below I put the engine scripts (TFS1.3)

PS does anyone have a script how to enter these currencies into the game? because the found scripts do not work

Nugget
Code:
function onUse(cid, item, frompos, item2, topos)
       if item.itemid == 2159 and item.type == 100 then
           doRemoveItem(item.uid,item.type)
           doPlayerAddItem(cid,2157,1)
           doPlayerSendTextMessage(cid,22,"You have changed 100 scarab coins to 1 gold nugget")
       elseif item.itemid == 2157 and item.type < 1 then
           doPlayerAddItem(cid,2159,100)
           doPlayerSendTextMessage(cid,22,"You have changed 1 gold nugget  to 100 scarab coins")
       end
   end
 
Last edited:
Topic to close if anyone has a problem gives a script that I wrote and works for me just swap on your values if you have doubts about the script, please correct it because I can be wrong

Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2159 and item.type == 100 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,2157,1)
doPlayerSendTextMessage(cid,22,"Zamieniles 100 Scrab Coins na 1 Nugget")
elseif item.itemid == 2157 and item.type < 100 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2159,100)
doPlayerSendTextMessage(cid,22,"Zamieniles 1 Nugget na 100 Scrab Coins")
end
end
 

Similar threads

Back
Top