Money: Difference between revisions

From Cleft of Dimensions Wiki
Jump to navigation Jump to search
m (added link to bank article)
mNo edit summary
Line 30: Line 30:
===Mobprogs===
===Mobprogs===


When a player 'give's gold or silver to a mobile, the money briefly turns into an object. This allows the mobprog to examine it and determine its value and act accordingly.
When a player 'give's gold or silver to a mobile, the money briefly turns into an object. This allows a mobprog with the GIVE or BRIBE triggers to examine it, determine its value, and act accordingly.


This sample mobprog, on a 'GIVE all' trigger, will cause the mob to keep anything over 3 gold or 300 silver, give back any less, and ignore any other objects.
This sample mobprog, on a 'GIVE all' trigger, will cause the mob to keep anything over 3 gold or 300 silver, give back any less, and ignore any other objects.
Line 42: Line 42:
   endif
   endif
  endif
  endif
In the case of mobprogs with BRIBE triggers, the trigger will only run the prog if the item is money, and its value, in silver, is equal to or greater the trigger's argument. In the unusual case of money objects that contain both silver (v0) and gold (v1), only the silver amount will matter!


===Item Values===
===Item Values===

Revision as of 14:19, 27 April 2020

He dives around in it like a porpoise.

Due to a combination of international agreement and happy coincidence, most currency in the Cleft of Dimensions is identical in size, composition, and weight. Prices of items are generally consistent across the whole planet; an apple is worth about 30 silver on every continent.

Types of Currency

While they may have been minted in different places at different time, nearly all coins fall into one of the following denominations:

  • Silver Coins are about 100 to the pound (approx. 4.5 grams, slightly smaller than a US nickel). Prices in shops are in silver coins.
  • Gold Coins are about 25 to the pound. (approx. 18 grams, even larger than an Australian 50c coin). One gold coin is worth 100 silver coins. In the real world, gold is worth, by weight, about sixty times more than silver. Since gold coins in the Cleft are only worth 25 times as much by weight, "gold" coins are probably not pure gold.

Money as Objects

The Money object type can exist on the ground and also briefly when money is given to a mob or player.

When a player or mob 'drop's gold or silver, a Money object is created on the ground with appropriate item values and weight. Since you can't drop gold and silver simultaneously, one of the values will always be zero.

Once a player or mob 'get's the money item, it gets abstracted into their gold and silver counts and ceases to exist as a distinct object.

Builders can create money objects with a mixture of gold and silver, and with oddball weights or names. If a player tries to 'get' a pile of 50000 gold and 50000 silver that weighs 0 pounds, they will in fact pick it up successfully.

Banking

  • For more information, see the main article at Bank.

Every player has a global bank account which they can deposit gold and silver into. It's extremely convenient that every single bank in the Cleft is in cahoots.

Priests

The Priest class can 'sacrifice' piles of money on the ground to recover mana at a rate of 1 gold/100 silver per 2 MP restored.

Other classes that sacrifice money will simply destroy it with no other affect.

Mobprogs

When a player 'give's gold or silver to a mobile, the money briefly turns into an object. This allows a mobprog with the GIVE or BRIBE triggers to examine it, determine its value, and act accordingly.

This sample mobprog, on a 'GIVE all' trigger, will cause the mob to keep anything over 3 gold or 300 silver, give back any less, and ignore any other objects.

if objtype $o money
  if objval0 $o > 300
  or objval1 $o > 3
    say Thanks for your contribution!
  else
    give $o $n
    say You'll have to give more than that.
  endif
endif

In the case of mobprogs with BRIBE triggers, the trigger will only run the prog if the item is money, and its value, in silver, is equal to or greater the trigger's argument. In the unusual case of money objects that contain both silver (v0) and gold (v1), only the silver amount will matter!

Item Values

  • [v0] Silver: Number of silver coins
  • [v1] Gold: Number of gold coins