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

Gold Problem

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,812
Solutions
6
Reaction score
822
Code:
[08/01/2011 22:13:41] [Error - Action Interface] 
[08/01/2011 22:13:41] data/actions/scripts/other/changegold.lua
[08/01/2011 22:13:41] Description: 
[08/01/2011 22:13:41] data/actions/scripts/other/changegold.lua:13: table index is nil
[08/01/2011 22:13:41] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/changegold.lua)


[08/01/2011 22:13:41] [Error - Action Interface] 
[08/01/2011 22:13:41] data/actions/scripts/other/changegold.lua
[08/01/2011 22:13:41] Description: 
[08/01/2011 22:13:42] data/actions/scripts/other/changegold.lua:13: table index is nil
[08/01/2011 22:13:42] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/changegold.lua)


[08/01/2011 22:13:42] [Error - Action Interface] 
[08/01/2011 22:13:42] data/actions/scripts/other/changegold.lua
[08/01/2011 22:13:42] Description: 
[08/01/2011 22:13:42] data/actions/scripts/other/changegold.lua:13: table index is nil
[08/01/2011 22:13:42] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/changegold.lua)


[08/01/2011 22:13:42] [Error - Action Interface] 
[08/01/2011 22:13:42] data/actions/scripts/other/changegold.lua
[08/01/2011 22:13:42] Description: 
[08/01/2011 22:13:42] data/actions/scripts/other/changegold.lua:13: table index is nil
[08/01/2011 22:13:42] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/changegold.lua)
rep++ for fixer
 
Code:
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_PLATINUMBLUE)
	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 then
		doChangeTypeItem(item.uid, item.type - 1)
		doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
		doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_PLATINUMBLUE)
	else
		return FALSE
	end
	return TRUE
end
 
Back
Top