Couple Questions & Requests menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Willzy's Avatar Banned
    Reputation
    22
    Join Date
    Jul 2010
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Couple Questions & Requests

    I'm sort of confused on what to name a script.
    For example, I have the LK 25m 25hc 10m and 10hc (Tysvm stone.)
    But I'm not sure what I'm supposed to name it
    Could anyone answer me?
    +Rep to first answer.
    ---
    Also, I'm trying to learn Lua, but can't find any tutorials that'll somehow make sense, can anyone link me a guide? Also +Rep to the first to answer.
    Last edited by Willzy; 10-04-2010 at 08:49 PM.

    Couple Questions & Requests
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    My script clashed - you can only have one version running at once as it uses the same npc's. The merged version tries to get the instance difficulty and act upon this, but last time I checked this was bugged.

    Name it whatever you want, save it as a .LUA file (very important!) and then put it in your scripts folder. Done and dusted.

  3. #3
    Willzy's Avatar Banned
    Reputation
    22
    Join Date
    Jul 2010
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    My script clashed - you can only have one version running at once as it uses the same npc's. The merged version tries to get the instance difficulty and act upon this, but last time I checked this was bugged.

    Name it whatever you want, save it as a .LUA file (very important!) and then put it in your scripts folder. Done and dusted.
    Thank you. I'll +Rep you once I can, need to spread some.
    Anyone got a Lua tutorial or something yet?

  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Willzy View Post
    Thank you. I'll +Rep you once I can, need to spread some.
    Anyone got a Lua tutorial or something yet?
    lua-users wiki: Lua Tutorial
    lua-users wiki: Tutorial Directory
    The.Lua.Tutorial


  5. #5
    Willzy's Avatar Banned
    Reputation
    22
    Join Date
    Jul 2010
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hardest language I've ever had to learn.
    Even harder than spanish.
    The more advanced thing I know so far is:
    [spoiler]
    Code:
    for i = 1,16 do
         print("Willzy is epic.")
    end
    What comes out:
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    [/spoiler]

    ---------- Post added at 07:07 PM ---------- Previous post was at 06:38 PM ----------


    I'm going to post a lot on here to get some confirmation if my scripts I'm trying to do are good scripts, or if they won't do anything bad.
    1st Script,
    (Remember, this is Lua. Not C++ or anything.)
    This is Lord Marrowgar;
    Code:
    function LordMarrowgar_FirstEnter(pUnit, event)
    	local player = LordMarrowgar:GetClosestPlayer()
    end
    It's for as soon as a player walks in, he's supposed to aggro the closest to him.
    Is there anything wrong?
    Last edited by Willzy; 10-06-2010 at 05:42 PM.

  6. #6
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Willzy View Post

    Hardest language I've ever had to learn.
    Even harder than spanish.
    The more advanced thing I know so far is:
    [spoiler]
    Code:
    for i = 1,16 do
         print("Willzy is epic.")
    end
    What comes out:
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.
    Willzy is epic.[/spoiler]


    ---------- Post added at 07:07 PM ---------- Previous post was at 06:38 PM ----------


    I'm going to post a lot on here to get some confirmation if my scripts I'm trying to do are good scripts, or if they won't do anything bad.
    1st Script,
    (Remember, this is Lua. Not C++ or anything.)
    This is Lord Marrowgar;
    Code:
    function LordMarrowgar_FirstEnter(pUnit, event)
        local player = LordMarrowgar:GetClosestPlayer()
    end
    It's for as soon as a player walks in, he's supposed to aggro the closest to him.
    Is there anything wrong?
    Once you learn one programming language properly, the rest come easily...

    The function you have is not hooked to anything so it will not be triggered.
    All your doing is getting nearest player, your not doing anything with t he returned result.

    If his faction is hostile, he should automatically engage a player, otherwise if he's friendly and you want to make him attack:

    Code:
    function morrowgar(pUnit, Event)
    pUnit:SetFaction(35) -- Friendly, since if he has been attacked before and goes hostile, it saves hostile...
    pUnit:RegisterEvent("wait_a_sec", 1000, 0)
    end
    
    function wait_a_sec(pUnit)
    local plr = pUnit:GetClosestPlayer()
    if plr ~= nil -- if there is a result
    pUnit:RemoveEvents() -- Stops it checking by removing previous register
    pUnit:AttackReaction(plr,1,0) -- Applys aggro on creature from player
    pUnit:SetFaction(21) -- Makes the creature hostile
    end
    end
    
    RegisterUnitEvent(npcid, 18, "morrowgar") -- 18 being on spawn

  7. #7
    Meiya Stormsinger's Avatar Contributor

    Reputation
    163
    Join Date
    Mar 2009
    Posts
    196
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you ever want some help with lua or such, you can contact me on msn: [email protected]

    Harry has taught me quiet a lot aswell and since he's usually rather busy, I can help you out since i'm not

  8. #8
    Willzy's Avatar Banned
    Reputation
    22
    Join Date
    Jul 2010
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post


    Once you learn one programming language properly, the rest come easily...

    The function you have is not hooked to anything so it will not be triggered.
    All your doing is getting nearest player, your not doing anything with t he returned result.

    If his faction is hostile, he should automatically engage a player, otherwise if he's friendly and you want to make him attack:

    Code:
    function morrowgar(pUnit, Event)
    pUnit:SetFaction(35) -- Friendly, since if he has been attacked before and goes hostile, it saves hostile...
    pUnit:RegisterEvent("wait_a_sec", 1000, 0)
    end
    
    function wait_a_sec(pUnit)
    local plr = pUnit:GetClosestPlayer()
    if plr ~= nil -- if there is a result
    pUnit:RemoveEvents() -- Stops it checking by removing previous register
    pUnit:AttackReaction(plr,1,0) -- Applys aggro on creature from player
    pUnit:SetFaction(21) -- Makes the creature hostile
    end
    end
    
    RegisterUnitEvent(npcid, 18, "morrowgar") -- 18 being on spawn

    Oh, okay how about this then:
    Code:
    function LordMarrowgar_OnSpawn(pUnit, event)
    	LordMarrowgar = pUnit
    	LordMarrowgar:RegisterEvent("Marrowgar.FirstEnter", 1000, 0)
    end
    
    function LordMarrowgar_FirstEnter(pUnit, event)
    	local player = LordMarrowgar:GetClosestPlayer()
    	if player ~= nil then
    		if LordMarrowgar:GetDistanceYards(player) <= 65 then
    			LordMarrowgar:RemoveEvents()
    			LordMarrowgar:PlaySoundToSet(16950)
    			LordMarrowgar:SendChatMessage(14, 0, "This is the beginning AND the end, mortals. None may enter the master's sanctum!")
    		end
    	end
    end
    Did I get the message right? I usually always get those wrong ^^'
    @Meiya
    Alright, I'll add you, thank you very much.
    EDIT: Mei, whenever I click your profile on my msn, it automatically crashes..
    Last edited by Willzy; 10-07-2010 at 04:34 PM.

  9. #9
    Meiya Stormsinger's Avatar Contributor

    Reputation
    163
    Join Date
    Mar 2009
    Posts
    196
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Willzy View Post

    Oh, okay how about this then:
    Code:
    function LordMarrowgar_OnSpawn(pUnit, event)
    	LordMarrowgar = pUnit
    	LordMarrowgar:RegisterEvent("Marrowgar.FirstEnter", 1000, 0)
    end
    
    function LordMarrowgar_FirstEnter(pUnit, event)
    	local player = LordMarrowgar:GetClosestPlayer()
    	if player ~= nil then
    		if LordMarrowgar:GetDistanceYards(player) <= 65 then
    			LordMarrowgar:RemoveEvents()
    			LordMarrowgar:PlaySoundToSet(16950)
    			LordMarrowgar:SendChatMessage(14, 0, "This is the beginning AND the end, mortals. None may enter the master's sanctum!")
    		end
    	end
    end
    Did I get the message right? I usually always get those wrong ^^'
    @Meiya
    Alright, I'll add you, thank you very much.
    EDIT: Mei, whenever I click your profile on my msn, it automatically crashes..
    Try reinstalling msn messenger, if that doesn't work we can set up a skype chat or something.


  10. #10
    Willzy's Avatar Banned
    Reputation
    22
    Join Date
    Jul 2010
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Meiya Stormsinger View Post


    Try reinstalling msn messenger, if that doesn't work we can set up a skype chat or something.

    Alrighty, will do, I'll only get home in an hour, so I'll try to download the iPhone Messenger.

  11. #11
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    That script is fine - but you shouldn't of defined the person as a variable, just use pUnit.

    You set him to a global variable - which shouldn't work since LuaBridge was implemented.

    There is no need to handle him as a variable.

  12. #12
    Willzy's Avatar Banned
    Reputation
    22
    Join Date
    Jul 2010
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    That script is fine - but you shouldn't of defined the person as a variable, just use pUnit.

    You set him to a global variable - which shouldn't work since LuaBridge was implemented.

    There is no need to handle him as a variable.

    How about this then:
    Code:
    function LordMarrowgar_OnSpawn(pUnit, event)
    	LordMarrowgar = pUnit
    	LordMarrowgar:RegisterEvent("Marrowgar.FirstEnter", 1000, 0)
    end
    
    function LordMarrowgar_FirstEnter(pUnit, event)
    	local player = pUnit:GetClosestPlayer()
    	if player ~= nil then
    		if LordMarrowgar:GetDistanceYards(player) <= 65 then
    			LordMarrowgar:RemoveEvents()
    			LordMarrowgar:PlaySoundToSet(16950)
    			LordMarrowgar:SendChatMessage(14, 0, "This is the beginning AND the end, mortals. None may enter the master's sanctum!")
    		end
    	end
    end
    ?

  13. #13
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Willzy View Post

    How about this then:
    Code:
    function LordMarrowgar_OnSpawn(pUnit, event)
        LordMarrowgar = pUnit
        LordMarrowgar:RegisterEvent("Marrowgar.FirstEnter", 1000, 0)
    end
    
    function LordMarrowgar_FirstEnter(pUnit, event)
        local player = pUnit:GetClosestPlayer()
        if player ~= nil then
            if LordMarrowgar:GetDistanceYards(player) <= 65 then
                LordMarrowgar:RemoveEvents()
                LordMarrowgar:PlaySoundToSet(16950)
                LordMarrowgar:SendChatMessage(14, 0, "This is the beginning AND the end, mortals. None may enter the master's sanctum!")
            end
        end
    end
    ?
    That script is fine - but you shouldn't of defined the person as a variable, just use pUnit.

    You set him to a global variable - which shouldn't work since LuaBridge was implemented.

    There is no need to handle him as a variable.

    aka

    Instead of:
    X = Y
    Just use:
    pUnit: DoStuff()

  14. #14
    Willzy's Avatar Banned
    Reputation
    22
    Join Date
    Jul 2010
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Meiya Stormsinger View Post


    Try reinstalling msn messenger, if that doesn't work we can set up a skype chat or something.

    Omfg mei whenever I try logging on msn I get your chat window talking to me and get an error and then it closes me out, I can't use my msn account anymore >.<;
    @Harry
    Okay, could you demonstrate, or like, transfer my script in your words?

  15. #15
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function LordMarrowgar_OnSpawn(pUnit, event)
        pUnit:RegisterEvent("Marrowgar.FirstEnter", 1000, 0)
    end
    
    function LordMarrowgar_FirstEnter(pUnit, event)
        local player = pUnit:GetClosestPlayer()
        if player ~= nil then
            if LordMarrowgar:GetDistanceYards(player) <= 65 then
                pUnit:RemoveEvents()
                pUnit:PlaySoundToSet(16950)
                pUnit:SendChatMessage(14, 0, "This is the beginning AND the end, mortals. None may enter the master's sanctum!")
            end
        end
    end
    
    RegisterUnitEvent(npcid, 18, "LordMarrowgar_OnSpawn")

Page 1 of 2 12 LastLast

Similar Threads

  1. Couple questions, lua involved + other?
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 01-18-2008, 03:42 PM
  2. Newbie Question and Request
    By dc0ke in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 12-16-2007, 05:17 AM
  3. a couple questions please help.
    By saschielx in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 11-09-2007, 11:32 PM
  4. [READ ME] How to ask Questions and Request edits
    By Mudkip in forum WoW ME Questions and Requests
    Replies: 9
    Last Post: 11-07-2007, 04:10 PM
  5. Couple questions about post count, etc.
    By Nezdragon in forum Community Chat
    Replies: 0
    Last Post: 10-18-2006, 12:17 AM
All times are GMT -5. The time now is 08:28 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