 |  [Release] Learner LUA ScriptsThis is a discussion on [Release] Learner LUA Scripts within the WoW Private Server Info & Help forum part of the WoW forum category; Too me this is noob stuff. It is what I did when I was first learning LUA. So to help ...  Welcome on D3scene.com! Make sure to register - it's free and very quick! You have to register before you can post and participate in our discussions with 35000 other registered members. Downloads, user profiles and some forums can only be seen by registered members. After you create your free account you will be able to customize many options, you will have the full access to new hacks, latest cheats and last but not least will see no advertisements at all. We would love to see you around in our community! 
06-09-2008, 04:18 AM
|  | The Rep Elf! | | Join Date: Jun 2007 Location: Stealing your cookies:)
Posts: 557
Reputation: 389
Rep Power: 3 | | | [Release] Learner LUA Scripts Too me this is noob stuff. It is what I did when I was first learning LUA. So to help out the community with learning all this noob stuff. I want you all to have a couple of scripts I have. Code: function Terror_Firebreath(Unit)
Unit:CastSpell(29388)
end
function Terror_HowlOfTerror(Unit)
Unit:CastSpell(18169)
end
function Terror_HeroicStrike(Unit)
Unit:CastSpell(41975)
end
function Terror_AcidBreathe(Unit)
Unit:CastSpell(24839)
end
function Terror_Scream(Unit)
Unit:CastSpell(38496)
Unit:CastSpell(40875)
end
function Terror_Phase1(Unit, event)
if Unit:GetHealthPct() < 80 then
Unit:RemoveEvents()
Unit:SendChatMessage(11, 0, "DEATH....DESTRUCTION....PWNAGE!")
Unit:RegisterEvent("Terror_Firebreath",8000, 5)
Unit:RegisterEvent("Terror_HeroicStrike",8000,5)
Unit:RegisterEvent("Terror_Phase2",1000, 0)
end
end
function Terror_Phase2(Unit, event)
if Unit:GetHealthPct() < 60 then
Unit:RemoveEvents()
Unit:SendChatMessage(11, 0, "Prepare to fell the wrath of TERROR!")
Unit:RegisterEvent("Terror_AcidBreathe",8000, 5)
Unit:RegisterEvent("Terror_Phase3",1000,0)
end
end
function Terror_Phase3(Unit, event)
if Unit:GetHealthPct() < 10 then
Unit:RemoveEvents()
Unit:SendChatMessage(11, 0, "No! No! NO MORTAL SHALL DEFEAT ME!")
Unit:RegisterEvent("Terror_HowlOfTerror",8000, 5)
Unit:RegisterEvent("Terror_Phase4",1000, 0)
end
end
function Terror_Phase4(Unit, event)
if Unit:GetHealthPct() < 5 then
Unit:RemoveEvents()
Unit:SendChatMessage(11, 0, "Silence! Let me meditate!")
Unit:RegisterEvent("Terror_Scream",8000, 5)
end
end
function Terror_OnCombat(Unit, event)
Unit:SendChatMessage(11, 0, "Haha! A nice fight! I was getting quite lonely in my corner!")
Unit:RegisterEvent("Terror_Phase1",1000, 0)
Unit:RegisterEvent("Terror_Phase2",1000, 0)
Unit:RegisterEvent("Terror_Phase3",1000, 0)
Unit:RegisterEvent("Terror_Phase4",1000, 0)
end
function Terror_OnLeaveCombat(Unit, event)
Unit:RemoveEvents()
Unit:SetScale(1)
end
function Terror_OnKilledTarget(Unit)
Unit:CastSpell(13048)
end
function Terror_Death(Unit)
Unit:RemoveEvents()
Unit:SetScale(1)
end
RegisterUnitEvent(12211, 1, "Terror_OnCombat")
RegisterUnitEvent(12211, 2, "Terror_OnLeaveCombat")
RegisterUnitEvent(12211, 3, "Terror_OnKilledTarget")
RegisterUnitEvent(12211, 4, "Terror_Death")
Code: function General_OnCombat(Unit, event)
Unit:RegisterEvent("General_LifeDrain", 24000, 0)
Unit:RegisterEvent("GEneral_Blizzard", 15000, 0)
Unit:RegisterEvent("General_Cleave", 10000, 0)
Unit:RegisterEvent("General_Enrage", 900000, 0)
Unit:RegisterEvent("General_FrostBreath", 45000, 0)
Unit:RegisterEvent("General_FrostImmune", 0, 0)
Unit:RegisterEvent("General_FrostAura", 2000, 0)
Unit:RegisterEvent("General_CloseToDeath", 500, 0)
end
function General_CloseToDeath(Unit, event)
if Unit:GetHealthPct() <= 10 then
Unit:RemoveEvents()
Unit:RegisterEvent("General_FrostImmune", 0, 0)
Unit:RegisterEvent("General_FrostAura", 2000, 0)
Unit:RegisterEvent("General_LifeDrain", 24000, 0)
Unit:RegisterEvent("General_Blizzard", 15000, 0)
Unit:RegisterEvent("General_Cleave", 10000, 0)
Unit:RegisterEvent("General_Enrage", 900000, 0)
else
end
end
function General_Iceboltstart(Unit)
Unit:RemoveEvents()
Unit:RegisterEvent("General_Icebolt",General_Icebolt_Timer,0)
end
function General_Icebolt(Unit)
local plr = Unit:GetRandomPlayer(0)
if (plr ~= nil) then
Unit:FullCastSpellOnTarget(28522, plr)
Unit:RegisterEvent("General_FrostBreath3", 9000, 0)
end
end
function General_FrostAura(Unit)
Unit:CastSpell(28531)
end
function General_FrostImmune(Unit)
Unit:CastSpell(34202)
end
function General_LifeDrain(Unit, event)
Unit:StopMovement(5000)
Unit:CastSpellOnTarget(38817, Unit:GetMainTank())
end
function General_Blizzard(Unit, event)
Unit:CastSpell(29952)
end
function General_Cleave(Unit, event)
Unit:CastSpellOnTarget(31345, Unit:GetMainTank())
end
function General_Enrage(Unit)
Unit:CastSpell(18556)
end
function General_FrostBreath(Unit, event)
Unit:RemoveEvents()
Unit:CastSpell(17131)
Unit:Emote(254)
Unit:SetCombatCapable(1)
Unit:RegisterEvent("General_FrostBreath2", 2000, 0)
end
function General_FrostBreath2(Unit, event)
Unit:RegisterEvent("General_Iceboltstart", 10000, 0)
end
function General_FrostBreath3(Unit, event)
Unit:RemoveEvents()
Unit:FullCastSpell(28524)
Unit:RemoveEvents()
Unit:RegisterEvent("General_FrostBreath4", 8000, 0)
end
function General_FrostBreath4(Unit, event)
Unit:RemoveEvents()
Unit:RemoveAura(17131)
Unit:Emote(293)
Unit:RegisterEvent("General_FrostBreath5", 4000, 0)
end
function General_FrostBreath5(Unit, event)
Unit:SetCombatCapable(0)
Unit:GetMainTank()
Unit:RegisterEvent("General_FrostBreath", 67000, 0)
Unit:RegisterEvent("General_FrostImmune", 0, 0)
Unit:RegisterEvent("General_FrostAura", 2000, 0)
Unit:RegisterEvent("General_LifeDrain", 24000, 0)
Unit:RegisterEvent("General_Blizzard", 15000, 0)
Unit:RegisterEvent("General_Cleave", 10000, 0)
Unit:RegisterEvent("General_Enrage", 900000, 0)
end
function General_OnWipe(Unit)
Unit:RemoveEvents()
end
function General_OnLeaveCombat(Unit)
Unit:RemoveEvents()
end
function General_OnDied(Unit)
Unit:RemoveEvents()
end
General_Icebolt_Timer = 1800
RegisterUnitEvent(98764, 1, "General_OnCombat")
RegisterUnitEvent(98764, 2, "General_OnLeaveCombat")
RegisterUnitEvent(98764, 3, "General_OnWipe")
RegisterUnitEvent(98764, 4, "General_OnDied")
These are two simple scripts. Enjoy them! | | D3scene |
Welcome to D3scene - probably the best location for all Gamers.
To participate in our friendly environment you have to register. After completing registration you will have full access to all threads and features. We care about members and try to make your stay as pleasant as possible. We are unique with the following feature for members - you will not see a single Advertisement!
The best: registration is completely free. It will not cost you a single penny or harm you in any way. You will lose nothing except 1 minute of your time. So why not register? We would be happy to see you around!
| 
06-09-2008, 02:01 PM
| | Banned User | | Join Date: Jul 2007
Posts: 2,476
Reputation: 1076
Rep Power: 0 | | Yep indeed I need to learn this  +rep | 
06-16-2008, 04:45 AM
|  | The Rep Elf! | | Join Date: Jun 2007 Location: Stealing your cookies:)
Posts: 557
Reputation: 389
Rep Power: 3 | | | It didn't take me long and the script I gave you is a cranky monster from my old server. Took forever to down him but drops were alright. | | D3scene |
Welcome to D3scene - probably the best location for all Gamers.
To participate in our friendly environment you have to register. After completing registration you will have full access to all threads and features. We care about members and try to make your stay as pleasant as possible. We are unique with the following feature for members - you will not see a single Advertisement!
The best: registration is completely free. It will not cost you a single penny or harm you in any way. You will lose nothing except 1 minute of your time. So why not register? We would be happy to see you around!
| | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | All times are GMT +1. The time now is 09:45 PM. |
»About D3scene - D3scene.com is a forum community which aims to provide every gamer with useful help to improve their skill in computer and console games. This help consists of so called hacks and tools giving gamers huge advantages. Nonetheless, this gaming community does not only share third party tools but also useful strategy guides which make a pro out of every noob with just a few tips and secrets.
- This help can be obtained through the specific game forums. Users share their knowledge and and help other users when they stumble across problems with their computer and console games.
|
»Navigation | | |  |