Thekals Lua Tutorial menu

Shout-Out

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 37
  1. #16
    bettleman's Avatar Member
    Reputation
    1
    Join Date
    Sep 2008
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the guide..

    Thekals Lua Tutorial
  2. #17
    munkenfunk's Avatar Member
    Reputation
    6
    Join Date
    Feb 2007
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the Tutorials , it helped alot, + Rep for You (:

  3. #18
    Mildan's Avatar Member
    Reputation
    10
    Join Date
    Feb 2009
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Thekal man, I have alittle request for your guide.
    Like the gossip but that some menus only show if its a special race or class and such.
    That would help me alot and alot others too I think.

  4. #19
    Scubasage's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great guide, although the spawn creature function isn't too clear.

    ex: Unit:SpawnCreature (9994, x, y, z, o, 14 ,60000)

    I assume 9994 is the creature ID, but what are the 14 and the 60000?

  5. #20
    Agent Orange's Avatar Knight-Lieutenant
    Reputation
    23
    Join Date
    Aug 2008
    Posts
    260
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks this was useful

  6. #21
    Baelzebub's Avatar Member
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    68
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice work man, helps alot.
    3x +rep

  7. #22
    Linkn's Avatar Contributor
    Reputation
    90
    Join Date
    Mar 2009
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Scubasage View Post
    Great guide, although the spawn creature function isn't too clear.

    ex: Unit:SpawnCreature (9994, x, y, z, o, 14 ,60000)

    I assume 9994 is the creature ID, but what are the 14 and the 60000?
    14 is the faction (Hostile) 60000 is how long it lasts in milliseconds. eg: 1 second = 1000 milliseconds.

  8. #23
    Ashyda's Avatar Active Member
    Reputation
    18
    Join Date
    Jan 2007
    Posts
    100
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    amazing. seriously amazing

    +2 rep

  9. #24
    Scubasage's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how long it lasts in milliseconds? So, you can only spawn timed life mobs? You can't summon a mob that lasts until it dies? Or do I have to give it a ridiculously long spawn time so that it stays?

    Also, if I wanted to spawn multiple mobs, how would I do that? Say I wanted to spawn ten mobs when the boss reaches 75%. Would I have to add the spawn Function in the phase set of functions ten times and then register it ten times?
    Last edited by Scubasage; 05-07-2009 at 07:15 PM.

  10. #25
    Linkn's Avatar Contributor
    Reputation
    90
    Join Date
    Mar 2009
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In response to Scubasage, if you put 0 for the time, the mob will last until death. As for the second part, its actually very simple. You just have the spawn listed ten times within the phase function. You then just register the phase one time. Like this:

    Code:
    Unit:RegisterEvent("Boss_Phase1", 1000, 0)
    
    function Boss_Phase1(Unit, Event)
    if Unit:GetHealthPct() <= 75 then
    Unit:RemoveEvents()
    Unit:SpawnCreature (ID, x, y, z, o, 14 ,0);
    Unit:SpawnCreature (ID, x, y, z, o, 14 ,0);
    Unit:SpawnCreature (ID, x, y, z, o, 14 ,0);
    Unit:SpawnCreature (ID, x, y, z, o, 14 ,0);
    Unit:SpawnCreature (ID, x, y, z, o, 14 ,0);
    Unit:SpawnCreature (ID, x, y, z, o, 14 ,0);
    Unit:SpawnCreature (ID, x, y, z, o, 14 ,0);
    Unit:SpawnCreature (ID, x, y, z, o, 14 ,0);
    Unit:SpawnCreature (ID, x, y, z, o, 14 ,0);
    Unit:SpawnCreature (ID, x, y, z, o, 14 ,0);
    end
    end
    That will spawn ten hostile mobs when the boss reached 75%, the mobs will also stay until killed.

  11. #26
    Scubasage's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, that's what I thought, but I didn't know about the o time thing. I was just planning to make them last much longer than the boss fight (10 min for a 5 min fight) xD

    Two last questions. I assume that the x and y coordinates are the ones you'd see in-game using a coordinate add-on, and that z would be the height, but what is the o for?

    Finally, in the boss phases, (as an example, I'll show the script for my boss), the command to start a phase based on health is like this:
    function Generalrooke_Phase1(Unit, Event)
    if Unit:GetHealthPct() <= 80 then

    If I wanted the phases to be based on time (say, after 2 min the boss enters phase 2), what would I replace the GetHealthPct() part with?
    Last edited by Scubasage; 05-08-2009 at 07:07 PM.

  12. #27
    Linkn's Avatar Contributor
    Reputation
    90
    Join Date
    Mar 2009
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, no need for coordinate addon, just do .gps while in game. o is the orientation that comes up with using .gps in game. Making timed fights wouldn't necessarily require the phase function. I think it would be based on the registers more so. I'm not totally sure this would work but its worth a shot.

    Code:
    Unit:RegisterEvent("Boss_Switch1", 120000, 0)
    That would call the next part of the script in 2 minutes. Then you could just name the function
    Code:
    function Boss_Switch1(Unit,Event)
    and act as if that were the phase. A little sample script so its easier to understand

    Code:
    function Boss_OnCombat(Unit, Event)
    Unit:SendChatMessage(14, 0, "La la laaaaaa Die.")
    Unit:RegisterEvent("G_Switch1", 120000, 0)        
    end
    
    function Boss_Switch1(Unit, Event)
    Unit:RemoveEvents()
    Unit:SendChatMessage(12, 8, "Your time is up, Die.")
    end
    Stonehary made a timed script I believe, I'll check it out and see what he did and see if its like this.

  13. #28
    Scubasage's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, I wasn't saying you'd use the coordinate add-on, I was just making a refrence as to what the x and y values are.

    I can see how what would work, but if there were more than one timed event, for example, phase 1 starts at 2 min then phase 2 starts at 4 min, in a script like that, wouldn't the phases interfere with each other?

    Thanks for all the help, now I just need to learn how to make custom spells xD

  14. #29
    Linkn's Avatar Contributor
    Reputation
    90
    Join Date
    Mar 2009
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They wouldnt interfere you would just register the the phase at the end of the first like so.

    Code:
    function Boss_OnCombat(Unit, Event)
    Unit:SendChatMessage(14, 0, "La la laaaaaa Die.")
    Unit:RegisterEvent("G_Switch1", 120000, 0)        
    end
    
    function Boss_Switch1(Unit, Event)
    Unit:RemoveEvents()
    Unit:SendChatMessage(12, 8, "2 More mins till you die.")
    Unit:RegisterEvent("G_Switch2", 120000, 0)    
    end
    
    function Boss_Switch2(Unit, Event)
    Unit:RemoveEvents()
    Unit:SendChatMessage(12, 8, "Now you die.")  
    end
    2 minutes for the first phase, then after 2 minutes being in the first phase he goes onto the second. As for custom spells, its possible in theory but I have yet to see it done. Also its tremendous amounts of work to do it and needs client-side patches to work.

  15. #30
    Scubasage's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I know, but I'm going to do it. If I can actually get the custom spells to work, then that will boost my server's popularity by a ridiculous amount. And I want the bosses to actually be unique, like real brand new bosses, not some cheap tank and spank or clone bosses (only one of my bosses will be a clone, but I need to edit his spells anyways... a lvl 60 boss with lvl 60 spells doesn't hurt much lol).

    Which would be easier? Creating new spells from scratch or editing old ones?

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [ULTIMATE] Lua Guide & Tutorial
    By Vision1000 in forum WoW EMU Guides & Tutorials
    Replies: 56
    Last Post: 08-17-2011, 10:58 AM
  2. [Lua Script] Ultimate Lua Tutorial
    By Trle94 in forum WoW EMU Guides & Tutorials
    Replies: 9
    Last Post: 01-05-2011, 10:08 PM
  3. [Tutorial] How to have colors on your menu (LUA)
    By [pwn]age in forum WoW EMU Guides & Tutorials
    Replies: 11
    Last Post: 07-18-2009, 06:20 PM
  4. [Tutorial] LUA Scripting
    By Syrup in forum WoW EMU Guides & Tutorials
    Replies: 20
    Last Post: 12-02-2008, 09:37 PM
  5. Basic Tutorial on Lua
    By [Shon3m] in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 12-09-2007, 10:26 AM
All times are GMT -5. The time now is 06:34 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search