LUA for Noobs :D menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    Jotox's Avatar Contributor
    Reputation
    250
    Join Date
    Mar 2008
    Posts
    282
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good guide for the noobs =D

    Correct me if Im wrong, but...
    If LUA in Ascent is anything like LUA everywhere else (Which it is), youd simply get multiple LUA errors when you used this script, and if you didnt, then the scripts would simply not work.


    For one, you have to make sure that all ifs are followed by then, and that all if statements are eventually followed by an end. For example:
    Code:
     function blaaaa()
    if pUnit:GetHealthPct()<80
    bla
    bla
    bla
    end
    would become:
    Code:
     function blaaaa()
    if pUnit:GetHealthPct()<80 then
    bla;
    bla;
    bla;
    end
    end
    I know that all other occasions Ive scripted LUA, if you do not do this then the entire script doesnt build.


    Btw Zombienation yes there is a way to do that, but I dont remember the specific syntax because the Ascent wiki is down still


    Also, everybody needs to remember that you need to put a ; after every single function that is called, or else the script wont work
    Last edited by Jotox; 04-10-2008 at 10:49 AM.

    LUA for Noobs :D
  2. #17
    LordDarkling's Avatar Active Member
    Reputation
    28
    Join Date
    Jul 2007
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    umm... not really that syntax is rather old only need semicolons in severe cases

    Code:
    function Boss_Phase1(Unit, event)
    	if Unit:GetHealthPct() < 99 then
    	Unit:CastSpell(31972)
    	Unit:SendChatMessage(12, 0, "Feel the buring hatred of the legion!")
    	Unit:RegisterEvent("Boss_Phase1",15000, 0)
    	Unit:RegisterEvent("Boss_Phase2",1000, 0)
    	end
    	end
    works perfectly without semicolons
    So ya, even though Ascent LUA is basically the same the syntax can be very different.
    Certs: CCNA, CCNA Sec, Security+, A+, Network+
    Willing to help with networking problems, just send me a PM.

    Professional software developer/machine learning engineer, please PM me if you have any questions about either of the two.

  3. #18
    LordDarkling's Avatar Active Member
    Reputation
    28
    Join Date
    Jul 2007
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ya...

    The code goes in your scripts folder... open a notepad document, and then save as.. then save it as Myfristscripts.LUA and where it says Text Document select all files
    Certs: CCNA, CCNA Sec, Security+, A+, Network+
    Willing to help with networking problems, just send me a PM.

    Professional software developer/machine learning engineer, please PM me if you have any questions about either of the two.

  4. #19
    w21froster's Avatar Active Member
    Reputation
    17
    Join Date
    Dec 2007
    Posts
    110
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    would this work?

    function Chat_Oncombat(pUnit, Event)
    pUnit:SendChatMessage(11, 0, "So you come to destroy Hades? Hades will feast on your soul before that!")
    pUnit:RegisterEvent("Chat_Oncombat",50000012, 1)
    end

    function Satan_80PCT(pUnit)
    if pUnit:GetHealthPct() < 80 then
    RemoveEvents();
    x=pUnit:GetX();
    y=pUnit:GetY();
    z=pUnit:GetZ();
    pUnit:SendChatMessage(11, 0, "Come forth minions! Lets show Gods creatures our pain and misery!")
    pUnit:SpawnCreature(9999239, x, y, z, 0, 14, 3600000000000);
    end
    end

    function Satan_FireBreath(pUnit, Event)
    pUnit:SendChatMessage(11, 0, "Come Forth My Flames!")
    pUnit:CastSpell(40836)
    pUnit:RegisterEvent("Satan_FireBreath",50000012, 1)
    end

    function Satan_65PCT(pUnit)
    if pUnit:GetHealthPct() < 65 then
    RemoveEvents();
    x=pUnit:GetX();
    y=pUnit:GetY();
    z=pUnit:GetZ();
    pUnit:SendChatMessage(8, 0, "Hades Cackles Maniaclly at you!")
    pUnit:SpawnCreature(9999239, x, y, z, 0, 14, 3600000000000);
    end
    end

    RegisterUnitEvent(Satan_80PCT, 0, "50000012")
    RegisterUnitEvent(Satan_65PCT, 0, "50000012")
    Who says heinz 57 steak sauce isn't good on pancakes?

  5. #20
    LordDarkling's Avatar Active Member
    Reputation
    28
    Join Date
    Jul 2007
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes that would work perfectly i just tested nice job
    Certs: CCNA, CCNA Sec, Security+, A+, Network+
    Willing to help with networking problems, just send me a PM.

    Professional software developer/machine learning engineer, please PM me if you have any questions about either of the two.

  6. #21
    Brandon)'s Avatar Member
    Reputation
    1
    Join Date
    Apr 2008
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    i don't get it! lawl

    i really don't get it >.< help?

  7. #22
    LordDarkling's Avatar Active Member
    Reputation
    28
    Join Date
    Jul 2007
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what do you not understand?
    Certs: CCNA, CCNA Sec, Security+, A+, Network+
    Willing to help with networking problems, just send me a PM.

    Professional software developer/machine learning engineer, please PM me if you have any questions about either of the two.

  8. #23
    neonate's Avatar Member
    Reputation
    1
    Join Date
    Apr 2008
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks

    GOD THANK YOU
    im a lua newb and that helped

  9. #24
    LordDarkling's Avatar Active Member
    Reputation
    28
    Join Date
    Jul 2007
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Brandon) what dont you understand?
    Certs: CCNA, CCNA Sec, Security+, A+, Network+
    Willing to help with networking problems, just send me a PM.

    Professional software developer/machine learning engineer, please PM me if you have any questions about either of the two.

  10. #25
    LordDarkling's Avatar Active Member
    Reputation
    28
    Join Date
    Jul 2007
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does this site allow mega-necros? Jesus christ did I have no idea what was going on here. I now work as a software developer/machine learning engineer and looking at this post makes me cringe.
    Certs: CCNA, CCNA Sec, Security+, A+, Network+
    Willing to help with networking problems, just send me a PM.

    Professional software developer/machine learning engineer, please PM me if you have any questions about either of the two.

  11. #26
    Clotic's Avatar Member Authenticator enabled
    Reputation
    11
    Join Date
    Jun 2010
    Posts
    200
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If u read the rules you could seen "No Bumping/NecroPosting."

Page 2 of 2 FirstFirst 12

Similar Threads

  1. LUA scripting. For noobs.
    By Locky in forum WoW EMU Guides & Tutorials
    Replies: 17
    Last Post: 06-05-2008, 02:12 PM
  2. Easy money for noobs
    By Dimmy353 in forum World of Warcraft Guides
    Replies: 18
    Last Post: 05-07-2007, 10:02 AM
  3. Full Signature Tutorial - Even for noobs!
    By X-Gogeta in forum Art & Graphic Design
    Replies: 14
    Last Post: 03-14-2007, 04:35 AM
  4. Kiting for noobs
    By dyetitan in forum World of Warcraft General
    Replies: 6
    Last Post: 03-02-2007, 03:35 PM
  5. Fishingbuddy for noobs
    By Minimized in forum World of Warcraft Bots and Programs
    Replies: 5
    Last Post: 10-15-2006, 07:19 AM
All times are GMT -5. The time now is 05:26 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search