LUA TEMPLATES
LUATemplates.rar Download gmtricks.servegame.org/luatemplates.rar
This download has a few files for the intro scripter. It is a growing project I am working on, and any assistance or templates from players here would be greatly appreciated.
This is designed to allow players to simply open a template, edit to their liking, save and play. Templates work together, ie if you Open the 5_phase template, and then open/copy/paste the kill/die template into the 5_phase template you now have mobs that react on different levels.
Release 1.0
ReadMe
Commands
5 phase template
2 phase template
Spin/random tepmlate
On Kill / On Die template
I will be adding more and more.
Here is a snippit of how it looks,
Spin Template
Code:
--[[
This template allows for mobs to have the ability to say and cast random spells. Here we use the spin function that rolls a die. Landing on a value has the appropriate outcome.
To add more possibilities, increase the (1, 7) to larger values, (1, 10) or (1, 20) and add more "if (spin == 13) then" functions.
Enjoy :D
--]]
function [[function]](Unit, Event)
spin = math.random ([[lowest spin]], [[highest spin]]) [[for this sake, we used (1, 7)]]
if (spin == 1) then
Unit:SendChatMessage (11, 0, "[[NPC SAY]]")
Unit:CastSpell([[SpellID]])
elseif (spin == 2) then
Unit:SendChatMessage (11, 0, "[[NPC SAY]]")
Unit:CastSpell([[SpellID]])
elseif (spin == 3) then
Unit:SendChatMessage (11, 0, "[[NPC SAY]]")
5 Phase Template
Code:
-- EDIT THE INFORMATION BETWEEN THE [[ ]]'S TO ACCOMODATE YOUR SERVER--
--[[
example
function hogger_phase1(Unit, Event)
if Unit:GetHealthPct() < 50 theh
Unit:RemoveEvents
Unit:SendChatMessage(11, 0, "I wish I was a MURLOC")
Unit:CastSpell(118)
Unit:FullCastSpellOnTarget(118, Unit:GetClosestPlayer())
Unit:RegisterEvent("hogger_ph2", 1000, 0)
end
end
--]]
--5 PHASE TEMPLATE--
function [[]](Unit, Event)
if Unit:GetHealthPct() < [[]] then
Unit:RemoveEvents()
Unit:SendChatMessage(11, 0, "[[]]")
Unit:CastSpell([[]])
Unit:SendChatMessage(11, 0, "[[]]")
Unit:FullCastSpellOnTarget([[]], Unit:GetClosestPlayer())
Unit:RegisterEvent("[[]]", 1000, 0)
end
end
function [[]](Unit, Event)
if Unit:GetHealthPct() < [[]] then
Unit:RemoveEvents()
Unit:SendChatMessage(11, 0, "[[]]")
Unit:CastSpell([[]])
Unit:RegisterEvent("[[]]", 1200, 0)
end
end
These are just sections of the template.
To get what I have done so far, you can download the RAR file
HERE gmtricks.servegame.org/luatemplates.rar
Hope you enjoy.
If you want to help in the project to make LUA scripting easier for everybody, type out your template (that hasnt been covered) and either post it here and I will update my realse, or email it to me at [email protected]
Thanks for reading!