LUA Question menu

User Tag List

Thread: LUA Question

Results 1 to 9 of 9
  1. #1
    CairiFEA's Avatar Member
    Reputation
    36
    Join Date
    Jan 2008
    Posts
    194
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LUA Question

    I did a search, and have been looking around trying to figure out what I don't understand. But, alas I cannot find it.

    What is the value for miscunit? miliseconds? What exactly is the purpose.

    function Aran(unit, event, miscunit, misc)
    unit:RegisterEvent("Aran_Water_Elementals",1000,1)
    unit:RegisterEvent("Aran_Polymorph",1000,1)
    unit:RegisterEvent("Aran_Fireball",9000,0)
    unit:RegisterEvent("Aran_Conterspell",13000,0)
    unit:RegisterEvent("Aran_Conflagration",15000,0)
    unit:RegisterEvent("Aran_FrostBolt",17000,0)
    end
    end

    I notice they incriment; so I am guessing this is a delay between the attacks he does? Priority?

    Also, if I just want a mob to non stop shoot fireballs, how could I do that? Like a looking script.

    I am learning to use spin randoms as well as healthpct, any help would be greatly appreciated, and of course I'll be handing out +Rep.

    Thanks for taking the time to read this,

    Cairi
    Last edited by CairiFEA; 04-10-2008 at 07:06 PM. Reason: function

    LUA Question
  2. #2
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have no idea what miscunit is. However it is not what you marked in red.

    I never use it - I just write function Aran(pUnit, Event) and it works

    The red things are intervals. 1000 means it'll call the function every second.

    pUnit:GetHealthPct() get the health percent

  3. #3
    CairiFEA's Avatar Member
    Reputation
    36
    Join Date
    Jan 2008
    Posts
    194
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah thank you for clearing that up Spidey,

    so just to confirm, if I wanted a mob to just spam say, a shadowbolt I would have:


    Code:
    function wlock(unit, event, miscunit, misc)
    unit:RegisterEvent("wlock_sbolt",2000,1)
    
    end
    
    function wlock_sbolt(Unit, event, miscunit, misc)
    	Unit:CastSpellOnTarget(27209,Unit:GetClosestPlayer())
    	Unit:SendChatMessage(11, 0, "Eat Shadow!")
    end
    This would call the sbolt every 2 seconds (2000)?

  4. #4
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it would. I would write the message sending and other things in different groups with different times... otherwise the Eat Shadow would get annoying but i guess thats what you mean by spam say

  5. #5
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do recommend using the same parameters in all functions. Saves you debugging time
    pUnit and Event are what I use, though Unit is acceptable as well.
    Choose one and use it

  6. #6
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes. pUnit and Event are the ones I use also

  7. #7
    CairiFEA's Avatar Member
    Reputation
    36
    Join Date
    Jan 2008
    Posts
    194
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah yes,

    I am going to have a seperate function to only call the 'eat shadow' every 10 seconds where as he will cast the spell every 2 seconds.


    And my next question was about to be about Unit and pUnit, what is the difference?

    +Rep (gotta spread)

  8. #8
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Comfort.
    They're the parameters for the function you're declaring.

    You could even do function Arakkoa(lolwut, omghax) and it would work

  9. #9
    CairiFEA's Avatar Member
    Reputation
    36
    Join Date
    Jan 2008
    Posts
    194
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah, so just a good method of syntax. Thanks again. This can be closed.

    Ty Gents' for the quick replies and help.



    Cairi is on his way to lua awesomeness...
    Cairi
    As a Nation, we have AGREED to A GREED
    gmtricks.com

Similar Threads

  1. Unit Event Lua Question (Gossip Talk)
    By moongo in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 05-22-2008, 07:49 PM
  2. [LUA] Question
    By Algorithm in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 04-14-2008, 02:50 PM
  3. [LUA Question] Is it possible..?
    By Greeko in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 04-14-2008, 02:49 PM
  4. LUA Question (advanced?)
    By CairiFEA in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 04-13-2008, 01:57 AM
  5. script lua question
    By onilank in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 12-21-2007, 06:58 PM
All times are GMT -5. The time now is 02:10 AM. 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