[Question]: Lua Commands menu

User Tag List

Results 1 to 8 of 8
  1. #1
    Muruk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question]: Lua Commands

    Ok so I have been wondering for some time now... How to get the pUnit:GetRandomPlayer(0) or pUnit:GetMainTank() working properly, because so far all i get are errors. So i just go and use the pUnit:CastSpell(---) but when i do that the creature attacks itself, is there anyway to get those other commands working again?

    [Question]: Lua Commands
  2. #2
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i use it like this

    function castspell(pUnit)
    local plr = pUnit:GetMainTank()
    pUnit:CastSpell(xxxxx, plr)
    end

    what it does is declare pUnit:GetMainTank() as "plr"
    so that way you just add a , plr) to the end of pUnit:CastSpell(xxxxx
    Lunar Gaming - Reaching For The Stars

  3. #3
    Lauren's Avatar Member
    Reputation
    14
    Join Date
    Jul 2008
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind.

  4. #4
    Muruk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok so i already have that in my script...example being i have one that looks like this

    Code:
    function ShBo_Atk(pUnit)
    local plr1 = pUnit:GetRandomPlayer(0)
     if (plr1 ~= nil) then
      pUnit:CastSpellOnTarget(xxxxx, plr1)
     end 
    end

    I dont know if thats wrong in any way or not... Im going to get on a test it out real quick just in case i missed something.

    EDIT: Ohh is it because i used the OnTarget part? and that is why it is all screwy?

    EDIT:EDIT: Ok no that didnt change anything it still doesnt cast the spells on the player...Is it something to do with the AC Web Ultimate Repack?...
    Last edited by Muruk; 07-12-2008 at 11:52 AM.

  5. #5
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do like he said,

    Code:
    function ShBo_Atk(pUnit)
    local plr = pUnit:GetRandomPlayer(0)
    pUnit:CastSpell(xxxxx, plr)
    end

  6. #6
    Flannel007's Avatar Member
    Reputation
    3
    Join Date
    Aug 2007
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no way, not all the spells target properly. Maybe its possible in C++, but not in LUA.

    Edit: I misread the question, yeah do it like the one above or below. It won't work with every spell.
    Last edited by Flannel007; 07-12-2008 at 05:38 PM.

  7. #7
    Kiyoshi's Avatar Member
    Reputation
    28
    Join Date
    Jun 2008
    Posts
    192
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh god just use it like this:
    Code:
    function ShBo_Atk(pUnit,event)
    pUnit:CastSpell(xxxxx,pUnit:GetRandomPlayer(0))
    end

  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)
    Muruk, don't double post
    Life Puzzler WoW - Website | Forums

Similar Threads

  1. [Question] LUA :P
    By Creepfold in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-28-2008, 05:00 PM
  2. question->lua mob code.
    By secretdragon008 in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 02-13-2008, 03:13 PM
  3. [Question]-Lua Problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-07-2008, 07:59 AM
  4. [Question] LUA problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-01-2008, 09:21 AM
  5. Couple questions, lua involved + other?
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 01-18-2008, 03:42 PM
All times are GMT -5. The time now is 02:55 PM. 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