ID:138130
 
How about a world.dimes variable? Whenever the world started up, it would withdraw that many dimes from the account specified by world.key (using world.password for authorization, obviously). And when the world shut down, it would deposit whatever it contained back into the account specified (authorization wouldn't be required in that case, because I'm sure a deposit is welcome).

Then you could do

mob.PayDimes(3,world)

which would give you a prompt similar to the current one, along the lines of:

Authorize Payment

Authorize payment in BYONDimes
(1 BD = $0.10 US)
------------------------------
Recipient: [world.name]
Amount (in BD): [cost]
Comments: [comment]


------------------------------
Your account password is required for authorization.
Password: [password] |View Account|

|Authorize Payment| |Cancel|



There's a minor security risk (a major if someone is foolish enough to distribute the source with world.password set!) but if it is hosted on the server, it would work flawlessly, and rather excellently if I do say so myself...

Unfortunately, it still presents a problem... what if the world was online, it withdrew money, and then it disconnected? There could be a workaround for that, though; if money disappears from an account and it doesn't have a destination, it reappears in the account if it's missing for too long, and if the world actually does send the money back after that time, the amount sent replaces the reimbursement given.


Then, you could do

world.PayDimes(3,mob.key)

to send money to players. If it goes over the world.dimes limit, it'd give a small warning to the account owner (including the recipient and how much was overdrawn, in case someone manages to create an exploit), and withdraw the required amount, paying the required amount. If the amount isn't available, it will be sent then the account owner will be billed.


Yet another brilliant idea from the Spuzz man
One question... Why would you need to do this? maybe it's in another post?
In response to Spastic
On 3/13/01 1:03 pm Spastic wrote:
One question... Why would you need to do this? maybe it's in another post?

You can't have the world pay players without your authorization; so if someone were to bet on a game and put money into a pool, then the game's creator would actually have to be present to authorize each separate payment.
In response to Spuzzum
You can't have the world pay players without your authorization; so if someone were to bet on a game and put money into a pool, then the game's creator would actually have to be present to authorize each separate payment.

Ah, good point. I wonder what non-gambling (i.e., legal :) situations would benefit from being able to automatically pay people without being present. Some brainstorming:

1) Promotion of a new game. "The first ten people to log in and play a complete game will get two BYONDimes each!"

2) Bug-finding. When you add new procs, put in "assertions" to check whether valid values are being passed to the proc, and so forth. The first time an assertion is violated, reward usr for finding the bug.

3) High scorers in a game. This could be hard to define, because technically the people who win gambling games are "high scorers" as well. But it could also be a perfectly legitimate tuning technique. For example, I have a little mini-game I'm working on right now, and I have no idea whether the rewards/challenges will be balanced properly. If someone gets a really remarkable score, then I can look at his log and find out his tactics, which helps me balance out the game, and beat you all in the GoB. I'd be willing to offer small rewards for that, even though the game itself will be free (and probably "open-source" in some form).

4) People who are the first to discover "Easter eggs" or subtle features you put into the game. This is pretty closely tied to #3 because it could effectively end up being a lottery of sorts. But if I take the time to code the fact that a certain rare circumstance will cause something extraordinary to happen, then I might legitimately want to reward the person who finds it. (Although the rare circumstance could be a reward in itself.)

Anyway, it sounds like an idea worth considering...