1
0
EQ2Emu/docs/lua_functions/RemoveCoin.md
2025-05-20 08:50:00 -04:00

17 lines
619 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### Function: RemoveCoin(Spawn, Amount)
**Description:**
Deducts the specified amount of coin (in copper) from the spawns money. If the spawn does not have enough, this could reduce them to zero or potentially go negative (though typically it will not allow negative).
**Parameters:**
- `Spawn`: Spawn - The player from whom to take coin.
- `Amount`: UInt32 - The amount in copper to remove.
**Returns:** Return's true if the Player has enough coin to remove, otherwise return's false.
**Example:**
```lua
-- Example usage (charge a fee of 2 silver, 50 copper i.e., 250 copper total)
RemoveCoin(Player, 250)
```