How To LUA Script menu

User Tag List

Results 1 to 2 of 2
  1. #1
    Skuxta's Avatar Banned
    Reputation
    12
    Join Date
    Aug 2007
    Posts
    211
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How To LUA Script

    Credits go to lilnate

    -== How to make a Npc Cast a spell ==-



    Ok first here is a Template to use for it \/

    Everything in red u need to change
    How to use template look below

    Code:
    function NpcName_Event (pUnit, Event)
        pUnit:CastSpell (Spell ID)
    end  
    RegisterUnitEvent (Npc Spawn ID, 4, "NpcName_Event")

    Step 1 : All the things in red is the things u need to put in your self

    Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifying it with Steps below

    Step 3 : function NpcName_Event (pUnit, Event) = The Name of your Npc

    Step 4 : function NpcName_Event (pUnit, Event) = The event, meaning like the name of the spell Etc

    Step 5 : pUnit:CastSpell (Spell ID) = The Id of the Spell that you wont your Npc To cast

    Step 6 : RegisterUnitEvent (Npc Spawn ID, 4, "NpcName_Event") = The Spawn ID of your Npc that you wont to cast the Spell

    Step 7 : RegisterUnitEvent (Npc Spawn ID, 4, "NpcName_Event") = The same ass "Step 3" and "Step 4"

    And now Naming it

    Naming it is the hard part well kinda not really. Now when your done Modifying it go to File > Save as > and put it as all Files and call it like (If you are doing it for a mob called Slayer i would call it Slayer.lua) So like in "Step 3" The Name of your Npc just name it That and put a .lua at the end of it so it will be like " Slayer.lua "

    Saving It : save it to your Desktop or some were u know were it is

    Step 10 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/

    C:\AC Web Ultimate Repack\Ascent\scripts

    If u don't have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
    reloadscripts or in game type .reloadscripts or restart your server

    And then your Done

    -== Make a npc Talk when in Enter Combat Etc ==-


    Ok first here is a Template to use for it \/

    Everything in red u need to change
    How to use template look below





    Code:
    function NpcName_Event (pUnit, Event)
        pUnit:SendChatMessage (Type, Language, "What you wont your Npc to say")
    end
    RegisterUnitEvent (Npc Spawn ID, When, "Name_Event")

    Step 1 : All the things in red is the things u need to put in your self

    Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifying it with Steps below

    Step 3 : function NpcName_Event (pUnit, Event) = the Name of the Npc that you wont to talk on the Event

    Step 4 : function NpcName_Event (pUnit, Event) = the event of when the Npc will say what you wont it to say (Like Entercombat, Leavecombat, die, Etc)

    Step 5 : pUnit:SendChatMessage (Type, Language, "What you wont your Npc to say") = the Type of text \/





    Code:
    -1 = ADDON
     0 = SAY
     1 = PARTY
     2 = RAID
     3 = GUILD
     4 = OFFICER
     5 = YELL
     6 = WHISPER
     7 = WHISPER_INFORM
     8 = EMOTE
     9 = TEXT_EMOTE
    10 = SYSTEM
    11 = MONSTER_SAY
    12 = MONSTER_YELL
    13 = MONSTER_WHISPER
    14 = CHANNEL
    16 = CHANNEL_JOIN
    17 = CHANNEL_LEAVE
    18 = CHANNEL_LIST
    19 = CHANNEL_NOTICE
    20 = CHANNEL_NOTICE_USER
    21 = AFK
    22 = DND
    23 = COMBAT_LOG
    24 = IGNORED
    25 = SKILL
    32 = LOOT
    83 = BATTLEGROUND_EVENT
    87 = RAIDLEADER
    88 = RAIDWARNING

    Step 6 : pUnit:SendChatMessage (Type, Language, "What you wont your Npc to say") = the Type of Language \/





    Code:
     0 = UNIVERSAL
     1 = ORCISH
     2 = DARNASSIAN
     3 = TAURAHE
     6 = DWARVISH
     7 = COMMON
     8 = DEMONIC
     9 = TITAN
    10 = THELASSIAN
    11 = DRACONIC
    12 = KALIMAG
    13 = GNOMISH
    14 = TROLL
    33 = GUTTERSPEAK
    35 = DRAENEI
    Step 7 : pUnit:SendChatMessage (Type, Language, "What you wont your Npc to say") = The words that you wont your Npc to say when it enter combat Leaves combat Dies Etc

    Step 8 : RegisterUnitEvent (Npc Spawn ID, When, "Name_Event") = The Spawn id of the Npc that you wont these words to come otu of

    Step 9 : RegisterUnitEvent (Npc Spawn ID, When, "Name_Event") = When the Npc will say this Text \/
    Code:




    Code:
    1 = Enter Combat
    2 = Leave Combat
    3 = Killed Target
    4 = Died
    5 = AI Tick
    6 = Spawn
    7 = Gossip Talk
    8 = Reach Waypoint
    9 = On Leave Limbo
    10 = Player Enters Range

    Step 10 : RegisterUnitEvent (Npc Spawn ID, When, "Name_Event") = The name of the Npc like in "Step 3"

    Step 11 : RegisterUnitEvent (Npc Spawn ID, When, "Name_Event") = the Event of the Npc when it talks, it must be the same as "Step 4"


    And now Naming it

    Naming it is the hard part well kinda not really. Now when your done Modifying it go to File > Save as > and put it as all Files and call it like (If you are doing it for a mob called Slayer i would call it Slayer.lua) So like in "Step 3" The Name of your Npc just name it That and put a .lua at the end of it so it will be like " Slayer.lua "

    Saving It : save it to your Desktop or some were u know were it is

    Step 12 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/

    C:\AC Web Ultimate Repack\Ascent\scripts

    If u don't have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
    reloadscripts or in game type .reloadscripts or restart your server

    And then your Done


    -==Make a npc change size when every==--



    Ok first here is a Template to use for it \/

    Everything in red u need to change
    How to use template look below



    Code:
    function WhenScale(pUnit, Event)
        pUnit:SetScale(Size);
    end
    RegisterUnitEvent(Npc Spawn ID,When,"WhenScale")

    Step 1 : All the things in red is the things u need to put in your self

    Step 2 : Open a note Pad or Txt Document and Copy and Paste that Template into it and then start modifying it with Steps below

    Step 3 : function WhenScale(pUnit, Event) = When the Npc will Change Size (So if it was oncombat, i would put there "OnCombatScale" Etc


    Step 4 : pUnit:SetScale(Size); = The Size of your Npc will be
    When he gets to the Stage ( Chose from 0.1 - 200, any high might crash Server)

    Step 5 : RegisterUnitEvent(Npc Spawn ID,When,"WhenScale") = The Spawn Id of the Npc that you wont to grow

    Step 6 : RegisterUnitEvent(Npc Spawn ID,When,"WhenScale") = When they Npc will grow chose one from below \/




    Code:
    1 = Enter Combat
    2 = Leave Combat
    3 = Killed Target
    4 = Died
    5 = AI Tick
    6 = Spawn
    7 = Gossip Talk
    8 = Reach Waypoint
    9 = On Leave Limbo
    10 = Player Enters Range

    Step 7 : RegisterUnitEvent(Npc Spawn ID,When,"WhenScale") = When the Npc will Change Size (So if it was oncombat, i would put there "OnCombatScale" Etc The same ass what you put in "Step 3"



    And now Naming it

    Naming it is the hard part well kinda not really. Now when your done Modifying it go to File > Save as > and put it as all Files and call it like (If you are doing it for a mob called Slayer i would call it Slayer.lua) So like in "Step 3" The Name of your Npc just name it That and put a .lua at the end of it so it will be like " Slayer.lua "

    Saving It : save it to your Desktop or some were u know were it is

    Step 8 : Now were u Have to put it u must put it in your Server's Ascent scripts Folder i am using Ac web so it would be in the folder \/

    C:\AC Web Ultimate Repack\Ascent\scripts

    If u don't have a scripts folder make 1 and just put that Notepad in that Folder and then in your Ascent cmd box type
    reloadscripts or in game type .reloadscripts or restart your server

    And then your Done

    How To LUA Script
  2. #2
    Illidan1's Avatar Banned
    Reputation
    244
    Join Date
    Jul 2007
    Posts
    2,251
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry dude, lilnate stole this from my original thread
    Lua SCripting guide is Here

Similar Threads

  1. how to lua script!
    By runemaster in forum WoW EMU Guides & Tutorials
    Replies: 14
    Last Post: 11-30-2008, 08:33 AM
  2. Replies: 1
    Last Post: 03-23-2008, 11:34 PM
  3. How to make lua scripted portals
    By *Alexz* in forum WoW EMU Guides & Tutorials
    Replies: 9
    Last Post: 02-18-2008, 06:05 PM
  4. How to fix this LUA Script???
    By marcosgue in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-08-2008, 07:51 AM
  5. [GUIDE] How to activate LUA scripts
    By ~SaiLyn~ in forum WoW EMU Guides & Tutorials
    Replies: 3
    Last Post: 12-25-2007, 11:52 AM
All times are GMT -5. The time now is 06:50 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