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

[TALKACTION] Change gold

Zatacka

Mapper, Basic Scripter
Joined
May 12, 2009
Messages
222
Reaction score
15
Location
Sweden
Talkaction.xml
<talkaction words="!crystaltonugget" event="script" value="changegold/Crystal to Nugget.lua"/>
<talkaction words="!nuggettocrystal" event="script" value="changegold/Nugget to Crystal.lua"/>
Data/talkaction/changegold/Crystal to Nugget.lua
function onSay(cid, words, param)
if doPlayerRemoveItem(cid,2160,100) then
doPlayerAddItem(cid,2157,1)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,21,"You have changed 100 Crystal coins to 1 Gold nugget!")
else
doPlayerSendCancel(cid,"You don't have enough money.")
doSendMagicEffect(getPlayerPosition(cid),2)

end
return TRUE
end

and change back:
function onSay(cid, words, param)
if doPlayerRemoveItem(cid,2157,1) then
doPlayerAddItem(cid,2160,100)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You have changed 1 Gold nugget to 100 Crystal coins!")
else
doPlayerSendCancel(cid,"You don't have enough money.")
doSendMagicEffect(getPlayerPosition(cid),2)

end
return TRUE
end

but what should i do to alow changing with X count? like change 500cc to 5 nuggets with:
HTML:
!crystaltonugget 5
 
Back
Top