[Help] Need LUA help? Post here! menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    EcHoEs's Avatar lol why u mad
    Reputation
    374
    Join Date
    Sep 2006
    Posts
    1,647
    Thanks G/R
    3/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] Need LUA help? Post here!

    Hi there.
    I think myself pretty good with LUA, and I'd wish to help you.
    If you have any problems with LUA scripts, post them here.
    No, I'm not gonna make scripts for you.

    -Echoes


    [Help] Need LUA help? Post here!
  2. #2
    runiker's Avatar Contributor
    Reputation
    105
    Join Date
    Nov 2007
    Posts
    501
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can u make.... no jsut kidding


    can u link a good place to learn how to
    do lua scripts like the commands for wow?

  3. #3
    EcHoEs's Avatar lol why u mad
    Reputation
    374
    Join Date
    Sep 2006
    Posts
    1,647
    Thanks G/R
    3/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.mmowned.com/forums/emulat...bossfight.html
    wiki.ascentemu.com/index.php?title=Lua
    You can also learn really much by just looking at scripts made by other people. LUA is pretty logical


  4. #4
    McMage's Avatar Member
    Reputation
    1
    Join Date
    Feb 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Couple questions for you:

    1.) I am using Phase's on my scripts and they are working, but during the phase if you only want it to happen once throughout the entire phase I am confused how to go about that. If you could clarify or point me in the right direction would be great.

    2.) On the spawncreature function I am currently setting the duration extremely high
    but is there a variable you can put in the duration to make it stay out till killed? The way I have it works but would rather do it correctly..


    Thanks for the wiki link came in really helpful....

  5. #5
    Ellenor's Avatar Active Member
    Reputation
    18
    Join Date
    Jan 2008
    Posts
    281
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i just need a boss Spell lua script when its gone to 20%or less hp to cast only 1 TIME lay of hands

    Name of the boss is Manket and enrty id is 2

  6. #6
    EcHoEs's Avatar lol why u mad
    Reputation
    374
    Join Date
    Sep 2006
    Posts
    1,647
    Thanks G/R
    3/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @ McMage :
    1. Let me see.. Unit:RemoveEvents should work
    Example :
    Code:
    function ExambleBoss_example(pUnit, Event)
    pUnit:FullCastSpell(exampleid)
    end
    
    function ExampleBoss_example1(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Oh noes")
    pUnit:RegisterEvent("ExampleBoss_example", 10000, 0)
    pUnit:RegisterEvent("ExampleBoss_example2", 1000, 0)
    end
    
    function ExampleBoss_example2(pUnit, Event)
    if pUnit:GetHealthPct() < 70 then
    pUnit:FullCastSpell(exampleid2)
    pUnit:RemoveEvents();
    end
    end
    
    RegisterUnitEvent(ExampleBossID, 1, "ExampleBoss_example1")
    Here it registers unit event when boss engages in combat, says Oh noes, and registers event ExampleBoss_example, which casts examplespell every 10 seconds. It also registers ExampleBoss_example2 every 1 second, which checks if boss' health is below 70&#37;, if it is, casts examplespell2 and Removes ExampleBoss_example event.

    2. I think there's no way to do it so. The way you are doing should work.

    @ Zenneth
    I said that I wont do scripts, but because im bored, im gonna do it for you
    Copy this into notepad and save as Manket.lua or something
    Code:
    function Manket_Phase1(pUnit, Event)
    if pUnit:GetHealthPct() < 20 then
    pUnit:FullCastSpell(27154)
    end
    end
    
    RegisterUnitEvent(2, 1, "Manket_Phase1")


  7. #7
    Romis's Avatar Contributor
    Reputation
    155
    Join Date
    Dec 2006
    Posts
    359
    Thanks G/R
    8/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got a script here for the warpNPC maker.

    Code:

    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)// warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    
    class SCRIPT_DECL WarpNPC : public GossipScript
    {
        public:
        void Destroy()
        {
                delete this;
        }
    
        void GossipHello(Object* pObject, Player * Plr, bool AutoSend)
        {
            GossipMenu *Menu;
            objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
            Menu->AddItem(5,"The Mall", 1);
            Menu->AddItem(5,"The Mall", 2);
            if(AutoSend)
                Menu->SendTo(Plr);
            }
        void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
        {
            Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
            if(pCreature==NULL)
                return ;
                GossipMenu *Menu;
            switch(IntId)
            {
                case 1: //The Mall
                {
    
                    //Check if the player is the right level.
                    if(Plr->getLevel() < 1)
                    {
    
                        //Teleport the player.
                        Plr->EventTeleport( 530, -1862.016479, 5432.329102, -9.705356);
                    }else{
                        pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Sorry, you need to be level 1 To do that.");
                    }
                    Plr->Gossip_Complete();
                }break;
                case 2: //The Mall
                {
    
                    //Check if the player is the right level.
                    if(Plr->getLevel() < 1)
                    {
    
                        //Teleport the player.
                        Plr->EventTeleport( 530, -1862.016479, 5432.329102, -9.705356);
                    }else{
                        pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Sorry, you need to be level 1 To do that.");
                    }
                    Plr->Gossip_Complete();
                }break;
            }
        }
    };
    How do I add it to a NPC?

  8. #8
    King Shaun's Avatar Member
    Reputation
    419
    Join Date
    Dec 2007
    Posts
    1,305
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice little service here mate, it will help loads considering people never stop asking about how do I do this, how do I do that, LUA is quite easy when you get to know it..


    Threads of the Week: [Errage] [Blizzard] [Rapidshare]

  9. #9
    EcHoEs's Avatar lol why u mad
    Reputation
    374
    Join Date
    Sep 2006
    Posts
    1,647
    Thanks G/R
    3/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Romis, I only do LUA things. You should ask Gastricpenguin, he knows more about C++.


  10. #10
    McMage's Avatar Member
    Reputation
    1
    Join Date
    Feb 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your time, I really do appreciate it..... Will try that when I get home!!

  11. #11
    Romis's Avatar Contributor
    Reputation
    155
    Join Date
    Dec 2006
    Posts
    359
    Thanks G/R
    8/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh was that C++? xD
    Sorry

  12. #12
    EcHoEs's Avatar lol why u mad
    Reputation
    374
    Join Date
    Sep 2006
    Posts
    1,647
    Thanks G/R
    3/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heh, np :P (For both of you)


  13. #13
    McMage's Avatar Member
    Reputation
    1
    Join Date
    Feb 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry to bother you but have yet another question, could you show me how to do a randomspell. IE (ExampleMob casts 1 of 4 spells every 20seconds) Trying to add the unknown factor. Well semi unknown...

    I seen your other post about doing scripts /bow

    Thank you yet again, I really did search on how to do this prior to asking you again

  14. #14
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mc Mage I would do it make this:

    Code:
    function Boss_Bolt (pUnit, Event)
        pUnit:CastSpell (Spell ID Here)
    
    function Boss_Bolt (pUnit, event)
        if pUnit:GetHealthPct() < 99 then
            pUnit:RemoveEvents()
            pUnit:RegisterEvent("Boss_Bolt",20000, 0)
    
        end
    end
    
    
    function Boss_OnCombat(pUnit, event)
        pUnit:RegisterEvent("Boss_Bolt",10000, 0)
    end
    
    RegisterpUnitEvent(6600002, 1, "Boss_OnCombat")
    Id Being 6600002 But im sure there is a easyer way...
    Cheese Cake?

  15. #15
    runiker's Avatar Contributor
    Reputation
    105
    Join Date
    Nov 2007
    Posts
    501
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok so here is my thing hwo to you make a player say somthing see i am amking an add on i just cant get the player to say somthing when i push the button this is needed for gm addon

Page 1 of 2 12 LastLast

Similar Threads

  1. [Helping you] Need a file scanned? post here!
    By bleaksoul123 in forum World of Warcraft General
    Replies: 0
    Last Post: 11-06-2008, 06:58 PM
  2. Need help wiht athenes method post here!
    By cooper101 in forum World of Warcraft Guides
    Replies: 14
    Last Post: 04-19-2008, 10:49 AM
  3. Need help emu help? post here
    By *Alexz* in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 02-26-2008, 07:43 PM
All times are GMT -5. The time now is 05:34 AM. 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