Difference between revisions of "LUA:AddLootCoin"

(Created page with "= LUA Functions: AddLootCoin() = Adds coin to the given spawns loot table. ==== Syntax ==== AddLootCoin(param1, param2) ==== Parameters ==== ; Required - ''param1'' (Spawn), '...")
 
 
Line 1: Line 1:
= LUA Functions: AddLootCoin() =
+
{{LUAFunction
Adds coin to the given spawns loot table.
+
|Name = AddLootCoin
 
+
|Description = Adds coin to the given spawns loot table.
==== Syntax ====
+
|Param1 = Spawn
AddLootCoin(param1, param2)
+
|Param1Desc = is the spawn to add coins to
 
+
|Param2 = int32
 
+
|Param2Desc = is the amount of coins to add
==== Parameters ====
+
|Example =
; Required - ''param1'' (Spawn), ''param2'' (int32)
 
: ''param1'' is the spawn to add coins to
 
: ''param2'' is the amount of coins to add
 
 
 
==== Usage ====
 
 
<pre>
 
<pre>
 
function cast(Caster, Target)
 
function cast(Caster, Target)
Line 18: Line 13:
 
end
 
end
 
</pre>
 
</pre>
 +
|ExampleDesc = This spell script would cause the target to drop an extra gold
 +
|Notes = 100 = 1 silver
  
This spell script would cause the target to drop an extra gold.
+
10000 = 1 gold
  
== Notes ==
+
1000000 = 1 plat
100 = 1 silver, 10000 = 1 gold 1000000 = 1 plat
+
}}

Latest revision as of 12:00, 30 January 2021


LUA:AllFunctions - AddLootCoin

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Adds coin to the given spawns loot table.

Syntax

AddLootCoin(param1, param2)

Parameters

Required - param1 (Spawn), param2 (int32)
param1 is the spawn to add coins to
param2 is the amount of coins to add


Example

function cast(Caster, Target)
    -- Add an extra gold to the targets loot
    AddLootCoins(Target, 10000)
end

This spell script would cause the target to drop an extra gold

Notes

100 = 1 silver

10000 = 1 gold

1000000 = 1 plat