Lua functions

RemoveCoin

Registered in this checkout as EQ2Emu_lua_RemoveCoin; implementation found at WorldServer/Lua/LuaFunctions.cpp:11818.

Historical signature: RemoveCoin(Spawn, Amount)

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: RemoveCoin(Spawn, Amount)

Description: Deducts the specified amount of coin (in copper) from the spawn’s 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.

Checked example

Active call in a local runtime Lua script. Argument count matches current fixed C++ readers. This is a contextual call pattern, not a tested standalone script.

RemoveCoin(Spawn,40)

Evidence: server/SpawnScripts/IsleRefuge1/MenderMannus.lua:48; binding EQ2Emu_lua_RemoveCoin.

Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.