Difference between revisions of "LUA:Say"

(Created page with "= LUA Functions: Say() = Has the given spawn say the given message ==== Syntax ==== Say(param1, param2, [param3]) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''para...")
 
 
Line 4: Line 4:
  
 
==== Syntax ====
 
==== Syntax ====
Say(param1, param2, [param3])
+
Say(param1, param2, [param3], [param4])
  
  
Line 11: Line 11:
 
: ''param1'' is the spawn we want to speak
 
: ''param1'' is the spawn we want to speak
 
: ''param2'' is the message we want the spawn to say
 
: ''param2'' is the message we want the spawn to say
; Optional - ''param3'' (Spawn)
+
; Optional - ''param3'' (Spawn), ''param4'' (int32)
 
: ''param3'' is the player to send the message to
 
: ''param3'' is the player to send the message to
 +
: ''param4'' is the language id to talk in
  
  

Latest revision as of 21:32, 10 July 2015

LUA Functions: Say()

Has the given spawn say the given message


Syntax

Say(param1, param2, [param3], [param4])


Parameters

Required - param1 (Spawn), param2 (string)
param1 is the spawn we want to speak
param2 is the message we want the spawn to say
Optional - param3 (Spawn), param4 (int32)
param3 is the player to send the message to
param4 is the language id to talk in


Usage

function hailed(NPC, Spawn)
    Say(NPC, "This is me talking")
end

When hailed the spawn will talk in the /say channel

Notes

If param3 is set the message will only go to the given player, else it will go to all players in range.