kilirt
New Member
- Joined
- May 11, 2009
- Messages
- 223
- Reaction score
- 2
hello i've a probleme with a script this script do: when we clic on money this transform to:
gold -> platinum
Platinum -> crystal
Crystal -> gold nugget
Gold nugget -> crystal
Crystal -> platinum
Platinum -> gold
please can you modify this script to add: Gold nugget -> gold lingot and Gold lingot -> gold nugget
gold -> platinum
Platinum -> crystal
Crystal -> gold nugget
Gold nugget -> crystal
Crystal -> platinum
Platinum -> gold
please can you modify this script to add: Gold nugget -> gold lingot and Gold lingot -> gold nugget
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == ITEM_GOLD_COIN and item.type == ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)
doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)
elseif item.itemid == ITEM_PLATINUM_COIN and item.type == ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, 1)
doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)
elseif item.itemid == ITEM_PLATINUM_COIN and item.type < ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX)
doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_YELLOW)
elseif item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, 2157, 1)
doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_LIGHTBLUE)
elseif item.itemid == ITEM_CRYSTAL_COIN and item.type < ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_LIGHTGREEN)
elseif item.itemid == 2157 then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX)
doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_LIGHTGREEN)
else
return FALSE
end
return TRUE
end