Difference between revisions of "LUA:BreatheUnderwater"

(Created page with "= LUA Functions: IsEpic() = Checks to see if the given spawn is epic ==== Syntax ==== IsEpic(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn) : ''param1'' is the s...")
 
Line 1: Line 1:
= LUA Functions: IsEpic() =
+
= LUA Functions: BreathUnderwater() =
Checks to see if the given spawn is epic
+
Lets the given spawn breath underwater
  
 
==== Syntax ====
 
==== Syntax ====
IsEpic(param1)
+
BreathUnderwater(param1, param2)
  
  
 
==== Parameters ====
 
==== Parameters ====
; Required - ''param1'' (Spawn)
+
; Required - ''param1'' (Spawn), ''param2'' (bool)
: ''param1'' is the spawn to check
+
: ''param1'' is the spawn to breath underwater
 +
: ''param2'' is true to allow the spawn to breath underwater
  
  
Line 14: Line 15:
 
<pre>
 
<pre>
 
function hailed(NPC, Spawn)
 
function hailed(NPC, Spawn)
     if IsEpic(NPC) then
+
     BreathUnderwater(Spawn, true)
        Say(NPC, "I am epic!")
 
    end
 
 
end
 
end
 
</pre>
 
</pre>
  
When the NPC is hailed it will respond if it is epic
+
When the NPC is hailed the Player will be able to breath underwater
 +
 
 +
== Notes ==
 +
To disable pass false

Revision as of 18:05, 12 December 2013

LUA Functions: BreathUnderwater()

Lets the given spawn breath underwater

Syntax

BreathUnderwater(param1, param2)


Parameters

Required - param1 (Spawn), param2 (bool)
param1 is the spawn to breath underwater
param2 is true to allow the spawn to breath underwater


Usage

function hailed(NPC, Spawn)
    BreathUnderwater(Spawn, true)
end

When the NPC is hailed the Player will be able to breath underwater

Notes

To disable pass false