• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Makeing New Coins out of Scarab Coins 2159

Ravauvial

Member
Joined
Mar 19, 2009
Messages
186
Reaction score
8
Location
Stanwood, Washington, USA
I am makeing this because so many post out there are not complete.

Scarab_Coin.gif


1. you have to change in data\items\Item.xml
XML:
	<item id="2159" article="a" name="scarab coin">
		<attribute key="weight" value="10"/>
		<attribute key="worth" value="1000000"/>
	</item>
don't forget to fix the value from 100 to 10 or it will over weight you.

For (Crying Damson)
2. you have to go into data\lib\constant.lua and search for coin after ITEM_CRYSTAL_COIN = 2160 you put ITEM_SCARAB_COIN = 2159 (Crying Damson)

For (Mystic Spirit)
2. you have to go into data\global.lua and search for coin after ITEM_CRYSTAL_COIN = 2160 you put ITEM_SCARAB_COIN = 2159 (Mystic Spirit)

3. in (Crying Damson) you have to go into data\lib\function.lua and search for this
in (Mystic Spirit) you have to go into data\global.lua and search for this
Lua:
function getPlayerMoney(cid)
	return ((getPlayerItemCount(cid, ITEM_CRYSTAL_COIN) * 10000) + (getPlayerItemCount(cid, ITEM_PLATINUM_COIN) * 100) + getPlayerItemCount(cid, ITEM_GOLD_COIN))
end
were it says
return (
add this in between the ((
Lua:
(getPlayerItemCount(cid, ITEM_SCARAB_COIN) * 1000000) +

4. goto data\actions\actions.xml and look for this
<action itemid="2160" script="other/changegold.lua"/>
then add this
<action itemid="2159" script="other/changegold.lua"/>

5. goto data\actions\scripts\other\changegold.lua and do this
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_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(fromPosition, "$$$", TEXTCOLOR_TEAL)
	elseif item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then
		doChangeTypeItem(item.uid, item.type - item.type)
		doPlayerAddItem(cid, ITEM_SCARAB_COIN, 1)
		doSendAnimatedText(fromPosition, "$$$", 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(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_LIGHTBLUE)
	elseif item.itemid == ITEM_SCARAB_COIN then
		doChangeTypeItem(item.uid, item.type - 1)
		doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX)
		doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_GREEN)
	else
		return FALSE
	end
	return TRUE
end

This should allow you to buy and sell things with your new Scarab coin.


The origin Of this I have to give credit to gunmann25, his post gave me insentive to find this way to make it happen.

Origanal Post: NEW! Money ivory coins by gunmann25
 
Ahh no good script. NPCs cant accept your money.
I got a better that working with npcs, so it works with bank system too.
But nice that you are sharing. (y)
 

Similar threads

Back
Top