User Tools

Site Tools


remove_currency

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
remove_currency [2024/04/04 21:37] justinremove_currency [2024/04/05 09:33] (current) justin
Line 1: Line 1:
-======Function======+======Remove Currency======
 ---- ----
 Removes the specified amount of a currency from a [[character]]. Removes the specified amount of a currency from a [[character]].
Line 9: Line 9:
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|amount| |[[Number]]|Yes| +|amount|Amount of currency to remove.|[[Number]]|Yes| 
-|stat_id| |[[String]]|No| +|stat_id|Defaults to "currency".|[[String]]|No| 
-|character| |[[Entity]]|No|+|character|Defaults to main [[player character]].|[[Entity]]|No|
  
 ====Example:==== ====Example:====
 <code bauxite> <code bauxite>
-remove_currency();+remove_currency(100, "currency", player);
 </code> </code>
-//Results://+//Results:// Decreases the player's base currency by 100 (i.e. their "currency" stat).
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Remove Currency** function to...+Use the **Remove Currency** function to take some gold coins from the player upon buying an item from an NPC or as a penalty for failing a quest.
 </WRAP> </WRAP>
  
remove_currency.1712291822.txt.gz · Last modified: 2024/04/04 21:37 by justin