Difference between revisions of "LUA:AddSpellBookEntry"

(Created page with "= LUA Functions: AddSpellBookEntry() = Adds a spell to the given player ==== Syntax ==== AddSpellBookEntry(param1, param2, param3) ==== Parameters ==== ; Required - ''param1'...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
= LUA Functions: AddSpellBookEntry() =
+
{{LUAFunction
Adds a spell to the given player
+
|Name = AddSpellBookEntry
 
+
|Description = Adds a spell to the given player
 
+
|Param1 = Spawn
==== Syntax ====
+
|Param1Desc = is the player to give the spell to, must be a player
AddSpellBookEntry(param1, param2, param3)
+
|Param2 = int16
 
+
|Param2Desc = is the id of the spell to give
 
+
|Param3 = int16
==== Parameters ====
+
|Param3Desc = is the tier of the spell to give
; Required - ''param1'' (Spawn), ''param2'' (int16), ''param3'' (int16)
+
|Example =
: ''param1'' is the player to give the spell to, must be a player
 
: ''param2'' is the id of the spell to give
 
: ''param3'' is the tier of the spell to give
 
 
 
 
 
==== Usage ====
 
 
<pre>
 
<pre>
 
function hailed(NPC, Spawn)
 
function hailed(NPC, Spawn)
Line 20: Line 14:
 
end
 
end
 
</pre>
 
</pre>
 
+
|ExampleDesc = Adds an apprentice (tier 1) spell 1000 to the player.
Adds a tier 1 spell 1000 to the player.
+
|Notes = None
 +
}}

Latest revision as of 12:09, 30 January 2021


LUA:AllFunctions - AddSpellBookEntry

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


Adds a spell to the given player

Syntax

AddSpellBookEntry(param1, param2, param3)

Parameters

Required - param1 (Spawn), param2 (int16), param3 (int16)
param1 is the player to give the spell to, must be a player
param2 is the id of the spell to give
param3 is the tier of the spell to give


Example

function hailed(NPC, Spawn)
    AddSpellBookEntry(Spawn, 1000, 1)
end

Adds an apprentice (tier 1) spell 1000 to the player.

Notes

None