You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:GetLootCoin"
| Line 6: | Line 6: | ||
==== Syntax ==== | ==== Syntax ==== | ||
| − | var = | + | var = GetLootCoin(param1) |
| Line 12: | Line 12: | ||
; Required - ''param1'' (Spawn) | ; Required - ''param1'' (Spawn) | ||
: ''param1'' is the spawn who's loot coins we want to get | : ''param1'' is the spawn who's loot coins we want to get | ||
| + | |||
| + | |||
| + | ==== Returns ==== | ||
| + | ; int32 | ||
| + | : The amount of loot coins | ||
| Line 17: | Line 22: | ||
<pre> | <pre> | ||
function hailed(NPC, Spawn) | function hailed(NPC, Spawn) | ||
| − | local coins = | + | local coins = GetLootCoin(NPC) |
Say(NPC, "I have " .. coins .. "coins") | Say(NPC, "I have " .. coins .. "coins") | ||
end | end | ||
Latest revision as of 17:18, 9 August 2016
LUA - GetLootCoin
Return to: LUA | Tutorials | Portal | Forum | Project Manager | Bug Tracker
LUA Functions: GetLootCoin()
Gets the given spawns loot coins
Syntax
var = GetLootCoin(param1)
Parameters
- Required - param1 (Spawn)
- param1 is the spawn who's loot coins we want to get
Returns
- int32
- The amount of loot coins
Usage
function hailed(NPC, Spawn)
local coins = GetLootCoin(NPC)
Say(NPC, "I have " .. coins .. "coins")
end
When the NPC is hailed it will Say() how many loot coins it has