zxzxzx
New Member
- Joined
- Mar 12, 2011
- Messages
- 334
- Reaction score
- 3
Hello! I have error in my changegold.lua script (deprecated function , compat.lua 390 in function "doSentAnimatedText" Lines 1/34
code
using tfs 1.2 (10.77)
HELP for rep++
code
Code:
function onUse(cid, item, fromPos, itemEx, toPos)
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(fromPos, "$$$", TEXTCOLOR_LIGHTBLUE)
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(fromPos, "$$$", TEXTCOLOR_TEAL)
elseif item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, ITEM_GOLD_NUGGET, 1)
doSendAnimatedText(fromPos, "$$$", TEXTCOLOR_GREEN)
elseif item.itemid == ITEM_GOLD_NUGGET and item.type == ITEMCOUNT_MAX then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, ITEM_GOLD_INGOT, 1)
doSendAnimatedText(fromPos, "$$$", TEXTCOLOR_GREEN)
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(fromPos, "$$$", TEXTCOLOR_YELLOW)
elseif item.itemid == ITEM_CRYSTAL_COIN then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
doSendAnimatedText(fromPos, "$$$", TEXTCOLOR_LIGHTBLUE)
elseif item.itemid == ITEM_GOLD_NUGGET then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX)
doSendAnimatedText(fromPos, "$$$", TEXTCOLOR_GREEN)
elseif item.itemid == ITEM_GOLD_INGOT then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, ITEM_GOLD_NUGGET, ITEMCOUNT_MAX)
doSendAnimatedText(fromPos, "$$$", TEXTCOLOR_GREEN)
else
return FALSE
end
return TRUE
end
using tfs 1.2 (10.77)
HELP for rep++