[Request] LUA Scripting menu

User Tag List

Results 1 to 13 of 13
  1. #1
    Creepfold's Avatar Contributor
    Reputation
    176
    Join Date
    Jul 2007
    Posts
    536
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Request] LUA Scripting

    Hey guys, i need some serious LUA helps, i readed illidan1's guide and it just wont work, the only thing i get is npcs casting a spell when they are dead, anyone mind giving me some sort of "Lessons" about LUA Scripting, if you can, add me on msn ([email protected]) yes its my true msn, the one who learns me how to script lua's gets + rep ofcourse but it would be wonderfull if someone who knows how to LUA could learn me it! tank and spank bosses are to damn boring
    thanks for reading
    RickAstley LUA Boss! (Rickroll)
    mmowned.com/forums/emulator-server-releases/171755-epic-release-rick-astley-rickroll-boss-lua.html#post1119442

    [Request] LUA Scripting
  2. #2
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well with his guide, you have to change this number in RegisterUnitEvent(UNIT ID,1,"Function name") if tyou change that number to one then has casts it on enter combat


  3. #3
    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)
    What Insanesk said, i will Change that now in the guide

  4. #4
    Le Froid's Avatar Contributor
    Reputation
    172
    Join Date
    Mar 2007
    Posts
    1,327
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think he posted this thread before he asked me on MSN..issue solved

  5. #5
    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)
    lol, Well it is Fixed, so the Npc will Cast when you start attacking, chnage it if you wont

  6. #6
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is an example script i have been working on, works 100%

    Gastric - TheDefias.lua
    Code:
    --[[ Gastric - TheDefias.lua
    This script makes every Defias mob say what they
    normally would on retail. Except for the fact i 
    can't record all of them and i can't really
    randomize the phrase each of them say. Data:
    121 Pathstalker
    122 Highwayman
    215 Night Runner
    449 Knuckleduster
    450 Renegade Mage
    467 The Defias Traitor *EXLUDE* He isn't a defias :<
    474 Rogue Wizard
    481 Footpad
    504 Trapper
    550 Messenger
    583 Ambusher
    589 Pillager
    590 Looter
    594 Henchman
    598 Miner
    619 Conjurer
    634 OVerseer
    636 Blackguard
    657 Pirate
    824 Digger
    909 Night Blade
    910 Enchanter
    function DefiasThug_onAgro(pUnit, Event)
     pUnit:SendChatMessage (11, 0, "Taste my blade!")
    end
    RegisterUnitEvent (38, 1, "DefiasThug_onAgro")
    function DefiasCutpurse_onAgro(pUnit, Event)
     pUnit:SendChatMessage (11, 0, "Finally, a chance to use my sharpened blade!")
    end
    RegisterUnitEvent (94, 1, "DefiasCutpurse_onAgro")
    function DefiasSmuggler_onAgro(pUnit, Event)
     pUnit:SendChatMessage (11, 0, "I'll teach you to mess with the Defias!")
    end
    RegisterUnitEvent (95, 1, "DefiasSmuggler_onAgro")
    function DefiasBandit_onAgro(pUnit, Event)
     pUnit:SendChatMessage (11, 0, "Taste my blade!")
    end
    RegisterUnitEvent (116, 1, "DefiasBandit_onAgro")
    -- By Gastricpenguin ]]
    function DefiasTalk_onAgro(pUnit, Event)
      spin = math.random (1, 11)
          if (spin == 1) then
            pUnit:SendChatMessage (11, 0, "Taste my blade!")
            pUnit:CastSpell(8091)
          elseif (spin == 2) then
            pUnit:SendChatMessage (11, 0, "Finally, a chance to use my sharpened blade!")
            pUnit:CastSpell(8091)
          elseif (spin == 3) then
            pUnit:SendChatMessage (11, 0, "I'll teach you to mess with the Defias!")
            pUnit:CastSpell(8091)
          elseif (spin == 4) then
            pUnit:SendChatMessage (11, 0, "Vengeance will be mine")
            pUnit:CastSpell(8091)
          elseif (spin == 5) then
            pUnit:SendChatMessage (11, 0, "Engarde!")
            pUnit:CastSpell(8091)
          elseif (spin == 6) then
            pUnit:SendChatMessage (11, 0, "Taste my Blade!")
            pUnit:CastSpell(8091)
          elseif (spin == 7) then
            pUnit:SendChatMessage (11, 0, "Attack!")
            pUnit:CastSpell(8091)
          elseif (spin == 8) then
            pUnit:SendChatMessage (11, 0, "For the Defias!")
            pUnit:CastSpell(8091)
          elseif (spin == 9) then
            pUnit:SendChatMessage (11, 0, "You have no chance to survive!")
            pUnit:CastSpell(8091)
          elseif (spin == 10) then
            pUnit:SendChatMessage (11, 0, "You are on your way to destruction!")
            pUnit:CastSpell(8091)
          else
             print ("Error: Gastric - TheDefias.lua: function block() - invalid number rolled")
          end
    end
    RegisterUnitEvent (38, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (94, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (95, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (116, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (121, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (122, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (215, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (449, 1, "DefiasTalk_onAgro")
    --RegisterUnitEvent (450, 1, "DefiasTalk_onAgro")
    --RegisterUnitEvent (467, 1, "DefiasTalk_onAgro")
    --RegisterUnitEvent (474, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (481, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (504, 1, "DefiasTalk_onAgro")
    --RegisterUnitEvent (550, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (583, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (589, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (590, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (594, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (598, 1, "DefiasTalk_onAgro")
    --RegisterUnitEvent (619, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (634, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (636, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (657, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (824, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (909, 1, "DefiasTalk_onAgro")
    RegisterUnitEvent (910, 1, "DefiasTalk_onAgro")
    This one is even easier to read and edit though, just makes guards yell when attacked

    Gastric - StormwindGuard.lua
    Code:
    --[[ Gastric - StormwindGuard.lua
    This script makes stormwind city guards and patrollers yell
    when a player enters combat with them. Although this isn't
    exactly what they say in retail, ill have to get that from
    someone else ><
    -- By Gastricpenguin ]]
    function StormwindGuard_onAgro(pUnit, Event)
     pUnit:SendChatMessage (11, 0, "You there, halt!")
    end
    RegisterUnitEvent (68, 1, "StormwindGuard_onAgro")
    RegisterUnitEvent (1423, 1, "StormwindGuard_onAgro")
    RegisterUnitEvent (1756, 1, "StormwindGuard_onAgro")
    RegisterUnitEvent (1976, 1, "StormwindGuard_onAgro")
    Last edited by Gastricpenguin; 12-31-2007 at 06:02 PM.
    Life Puzzler WoW - Website | Forums

  7. #7
    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)
    Nice mate, why don't you just like C++ Script them

  8. #8
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im practicing my LUA atm, my defias one works and does this:
    The defias will run at you, yell, and cast a buff on itself.

    Besides, having alot of DLLs only slows your server. for small projects, LUA does wonders

    Pic:
    Life Puzzler WoW - Website | Forums

  9. #9
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ya, I noticed even CastSpellOnTarget(npc ID, target ID) doesnt work, they still cast on themself, but i did notice that spells like arcane explosion and other AOE one work fine with that


  10. #10
    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)
    ahh true, you need to make a Core that has .lua Enabled, mine don't work..

  11. #11
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Insane, you have to use that function like this:

    Code:
    local plr = unit:GetClosestPlayer()
    unit:CastSpellOnTarget(33665, plr)
    or

    Code:
    unit:CastSpellOnTarget(33665, GetClosestPlayer())
    Life Puzzler WoW - Website | Forums

  12. #12
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah i see i have to put local in front of the variable


  13. #13
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i was usin this:

    Code:
    plr = unit:GetRandomPlayer()
    if (plr ~= nil) then
    unit:CastSpellOnTarget(1234,plr)


Similar Threads

  1. [Lua Script] Request LUA SCRIPT Burning Legion Invasion
    By Nelanaroth in forum WoW EMU Questions & Requests
    Replies: 25
    Last Post: 04-03-2013, 11:23 AM
  2. [Lua Script] [Request] LUA Script on game objects
    By Ultradethv2 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 08-10-2010, 10:17 AM
  3. [ArcEmu] [Request]Lua Script for Gameobjects
    By SupernovaHH in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 07-31-2010, 04:07 PM
  4. [Request] Lua Script Transition
    By B14d3r11 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 06-04-2009, 04:49 AM
  5. [HELP/Request] LUA Script
    By Babbaa in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 07-29-2008, 07:34 AM
All times are GMT -5. The time now is 12:29 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