You are viewing an old version of this page. Return to the latest version.
Version of 17:21, 1 April 2009 by John
Difference between revisions of "LUA:GetLootCoin"
John Adams (talk | contribs) (New page: == LUA Functions: GetLootCoin(param) == Need info Back to LUA Functions Index === Syntax === var = GetLootCoin(param) === Parameters === Required: ''par...) |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | + | {{PageHeaderChild|LUA|GetLootCoin}} | |
| − | |||
| − | + | = LUA Functions: GetLootCoin() = | |
| + | Gets the given spawns loot coins | ||
| − | === Syntax === | + | ==== Syntax ==== |
| − | var = GetLootCoin( | + | var = GetLootCoin(param1) |
| − | === Parameters === | + | ==== Parameters ==== |
| − | Required | + | ; Required - ''param1'' (Spawn) |
| + | : ''param1'' is the spawn who's loot coins we want to get | ||
| − | === | + | ==== Returns ==== |
| − | + | ; int32 | |
| + | : The amount of loot coins | ||
| − | === Usage === | + | ==== Usage ==== |
| − | + | <pre> | |
| + | function hailed(NPC, Spawn) | ||
| + | local coins = GetLootCoin(NPC) | ||
| + | Say(NPC, "I have " .. coins .. "coins") | ||
| + | end | ||
| + | </pre> | ||
| + | |||
| + | When the NPC is hailed it will Say() how many loot coins it has | ||
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