| | Emulator Server Guides Guides for working with World of Warcraft Emulator servers. Learn how to create a WoW Server here.
[NO QUESTIONS HERE] |  | | 
08-13-2009
|  | Contributor | | | Join Date: Mar 2008 Location: On uranus
Posts: 797
Reputation: 237 Level up: 7%, 1,033 Points needed |     | | Extreme bumpage. | Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx. 
08-13-2009
|  | Master Sergeant | | | Join Date: Oct 2007 Location: In the U.S. of A!
Posts: 91
Reputation: 11 Level up: 26%, 371 Points needed | | | | This thread does need some epic bumpage... It's one of the most fluent, well-thought, written out, and explained guides I have seen. Not compared to those crappy "How to script a boss!" guides, which are oh so horrible, even if done by a high ranking person on MMOwned. I'm still re-reading this for the fifth time, to try and learn Lua on my own. x) I still need help though..
__________________ Motivational Posters. Why do they exist? | 
09-05-2009
| | Corporal | | | Join Date: Aug 2009
Posts: 17
Reputation: 9 Level up: 20%, 322 Points needed | | | | i got a question: can i use a flag a text message, like when i type something in, the script will get activated | 
09-05-2009
|  | Master Sergeant | | | Join Date: Oct 2007 Location: South Park
Posts: 109
Reputation: 20 Level up: 15%, 425 Points needed |    | | When your doing the part with the teleporting only GMS, I dont know if this works with LUA but I am pro C so instead of all the elseifs, try something like
elseif(playername != "GM n1" && playername != "GM n2") then
the && signifies an "and" statement instead of all the ifs, so basically what your syaing if the player here is NOT a GM and if you want ONLY gms, then based on the name change the && to || which is an "or" statement and change the != to == which is obvious what it means  . IK if ti will work or not I dont really script too much in LUA but it might work give it a try. | 
09-07-2009
|  | Sergeant Major | | | Join Date: Mar 2009 Location: Ohio
Posts: 147
Reputation: 69 Level up: 83%, 88 Points needed |  | |  but seriously stop with the LUA tuts.
__________________ Need help with your PS (private server) well PM me and I'll do the best I can to help you out. ~-L0sT-~ | 
09-11-2009
| | New User | | | Join Date: Jun 2009
Posts: 4
Reputation: 1 Level up: 20%, 320 Points needed | | | | help ok i read the variables but i don't really get what the variable does/is. Is it just there? please help | 
10-17-2009
|  | Contributor | | | Join Date: Nov 2007 Location: Darkspear
Posts: 446
Reputation: 116 Level up: 19%, 567 Points needed |     | | | Bumpification/Nomination.
__________________ The Cake is a Paradox '09
Last edited by Seethe; 10-17-2009 at 12:38 AM.
| 
10-17-2009
|  | Knight-Lieutenant | | | Join Date: Nov 2007 Location: Mmowned.com
Posts: 275
Reputation: 43 Level up: 38%, 437 Points needed |   | | Amazing. Simply Amazing, Use to be into .Lua alot, This might be what it takes to get me back into trying again.
Thank you!  | 
4 Weeks Ago
| | New User | | | Join Date: Jul 2009
Posts: 3
Reputation: 1 Level up: 14%, 346 Points needed | | | | problem.... this is my first script and i have it in my script folder and lua is enabled but it still wnt work. is there something wrong with my script? i made the boss from wow-v btw if that is any help. | 
4 Weeks Ago
| | New User | | | Join Date: Jul 2009
Posts: 3
Reputation: 1 Level up: 14%, 346 Points needed | | | | here is the script:
function Deathwing_OnCombat (Unit, Event)
pUnit:SendChatMessage (12, 0, "You will burn by the fires of the Black Dragon Flight!")
pUnit:RegisterEvent ("Deathwing_Boulder", 5000, 5)
pUnit:RegisterEvent ("Deathwing_Armageddon", 10000, 0)
end
function Deathwing_Boulder (pUnit, Event)
pUnit:CastSpellOnTarget (59732, pUnit:GetRandomPlayer (0))
end
function Deathwing_Armageddon (pUnit, Event)
pUnit:CastSpell (45915)
end
function Deathwing_OnDied (Unit, Event)
pUnit:SendChatMessage (12, 0, "No........This cannot be.....I promise all of you will burn!")
pUnit:RemoveEvents()
end
function Deathwing_OnKilledTarget (Unit, Event)
pUnit:SendChatMessage (12, 0, "HAHAHAHA. Yet another incinerated soul!")
end
function Deathwing_OnLeaveCombat (Unit, Event)
pUnit:RemoveEvents()
end
RegisterUnitEvent(50, 1, "Deathwing_OnCombat")
RegisterUnitEvent(50, 4, "Deathwing_OnDied")
RegisterUnitEvent(50, 3, "Deathwing_OnKilledTarget")
RegisterUnitEvent(50, 2, "Deathwing_OnLeaveCombat") | 
4 Weeks Ago
|  | Knight-Lieutenant | | | Join Date: Nov 2007 Location: Mmowned.com
Posts: 275
Reputation: 43 Level up: 38%, 437 Points needed |   | | Quote:
Originally Posted by xgamer08 here is the script:
function Deathwing_OnCombat (Unit, Event)
pUnit:SendChatMessage (12, 0, "You will burn by the fires of the Black Dragon Flight!")
pUnit:RegisterEvent ("Deathwing_Boulder", 5000, 5)
pUnit:RegisterEvent ("Deathwing_Armageddon", 10000, 0)
end
function Deathwing_Boulder (pUnit, Event)
pUnit:CastSpellOnTarget (59732, pUnit:GetRandomPlayer (0))
end
function Deathwing_Armageddon (pUnit, Event)
pUnit:CastSpell (45915)
end
function Deathwing_OnDied (Unit, Event)
pUnit:SendChatMessage (12, 0, "No........This cannot be.....I promise all of you will burn!")
pUnit:RemoveEvents()
end
function Deathwing_OnKilledTarget (Unit, Event)
pUnit:SendChatMessage (12, 0, "HAHAHAHA. Yet another incinerated soul!")
end
function Deathwing_OnLeaveCombat (Unit, Event)
pUnit:RemoveEvents()
end
RegisterUnitEvent(50, 1, "Deathwing_OnCombat")
RegisterUnitEvent(50, 4, "Deathwing_OnDied")
RegisterUnitEvent(50, 3, "Deathwing_OnKilledTarget")
RegisterUnitEvent(50, 2, "Deathwing_OnLeaveCombat") | Well, First off all it would be nice if you was to put it into [code] boxes, but none the less i will help you out, what you have done is placed a " " after each of the commands, which in call is probably not making them be called to work. So let me fix it up for you! Code: function Deathwing_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0, "You will burn by the fires of the Black Dragon Flight!")
Unit:RegisterEvent("Deathwing_Boulder", 5000, 5)
Unit:RegisterEvent("Deathwing_Armageddon", 10000, 0)
end
function Deathwing_Boulder(Unit, Event)
Unit:CastSpellOnTarget(59732, Unit:GetRandomPlayer (0))
end
function Deathwing_Armageddon(Unit, Event)
Unit:CastSpell(45915)
end
function Deathwing_OnDied(Unit, Event)
Unit:SendChatMessage(12, 0, "No........This cannot be.....I promise all of you will burn!")
Unit:RemoveEvents()
end
function Deathwing_OnKilledTarget(Unit, Event)
Unit:SendChatMessage(12, 0, "HAHAHAHA. Yet another incinerated soul!")
end
function Deathwing_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
end
RegisterUnitEvent(50, 1, "Deathwing_OnCombat")
RegisterUnitEvent(50, 4, "Deathwing_OnDied")
RegisterUnitEvent(50, 3, "Deathwing_OnKilledTarget")
RegisterUnitEvent(50, 2, "Deathwing_OnLeaveCombat")
Now that is just from what i can quickly see, there seems to be no noticable errors so try that one. Thanks for posting EDIT:Aha even noticed another one, you have a mix of "pUnit" and "Unit", which im guessing could also be clashing, and the fact you are sometimes calling on "Unit" and using "pUnit" instead. So, One sec ill fix it again.
There you go, that one should work.
Last edited by kiev; 4 Weeks Ago at 03:56 PM.
Reason: Correction
| 
4 Weeks Ago
| | New User | | | Join Date: Jul 2009
Posts: 3
Reputation: 1 Level up: 14%, 346 Points needed | | | | ok ive fixed wat u said was wrong but it still isnt working. ive tried making the id my entry id and the npc that i used id but neither of them works. any ideas? | 
4 Weeks Ago
|  | Contributor | | | Join Date: Mar 2008 Location: On uranus
Posts: 797
Reputation: 237 Level up: 7%, 1,033 Points needed |     | | I found a "error".
Here you state this: Code: Unit:SendChatMessage(language, channeltype, "Message")
However, here, you clearly ment to broadcast a message in universal, but you put it wrong. Code: Unit:SendChatMessage(41, 0, "Creature begins to transform!, and his minion appears!")
| 
3 Weeks Ago
|  | Master Sergeant | | | Join Date: Apr 2007 Location: Florida
Posts: 89
Reputation: 25 Level up: 74%, 130 Points needed |    | | Just was I was looking for, nice guide! when I can.
Last edited by Valmere; 3 Weeks Ago at 12:44 PM.
| 
1 Week Ago
|  | New User | | | Join Date: Oct 2008
Posts: 7
Reputation: 1 Level up: 57%, 172 Points needed | | | | After reading this through a couple of times i'm starting to get a sense of lua scripting, this guide just rock! |  | |
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 -4. The time now is 04:40 PM. |