When player enters range.. menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    sora2810's Avatar Private
    Reputation
    2
    Join Date
    Nov 2010
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    When player enters range..

    under the registerunitevents, number 10 is when player enters range. How do I make that work. I want to; when a player gets close enough, an NPC says "Come here!". Thanks.

    When player enters range..
  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)
    Code:
    function Ohai_Trigger_Spawn_SPAWN(pUnit, Event)
         pUnit:RegisterEvent("aejheiojahoeaoeaog_oh_la_la", 1500, 0) 
    end
    
    function aejheiojahoeaoeaog_oh_la_la(pUnit, Event) 
        local BVZABZ = pUnit:GetClosestPlayer() 
        if BVZABZ ~= nil then
             if pUnit:GetDistanceYards(BVZABZ) < 5 then
                pUnit:RemoveEvents()
                -- do stuff
            end 
        end 
    end
    RegisterUnitEvent(158801, 18, "Ohai_Trigger_Spawn_SPAWN")
    Example snippet of code, full code this was taken from can be found here: http://subversion.assembla.com/svn/K...ortalGlade.lua

    Basically, a on spawn function that checks for whether there are nearby players and if there are whether they are close enough to continue.

  3. #3
    sora2810's Avatar Private
    Reputation
    2
    Join Date
    Nov 2010
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    Code:
    function Ohai_Trigger_Spawn_SPAWN(pUnit, Event)
         pUnit:RegisterEvent("aejheiojahoeaoeaog_oh_la_la", 1500, 0) 
    end
    
    function aejheiojahoeaoeaog_oh_la_la(pUnit, Event) 
        local BVZABZ = pUnit:GetClosestPlayer() 
        if BVZABZ ~= nil then
             if pUnit:GetDistanceYards(BVZABZ) < 5 then
                pUnit:RemoveEvents()
                -- do stuff
            end 
        end 
    end
    RegisterUnitEvent(158801, 18, "Ohai_Trigger_Spawn_SPAWN")
    Example snippet of code, full code this was taken from can be found here: http://subversion.assembla.com/svn/K...ortalGlade.lua

    Basically, a on spawn function that checks for whether there are nearby players and if there are whether they are close enough to continue.
    Thanks a bunch!

Similar Threads

  1. Replies: 2
    Last Post: 06-01-2010, 05:29 AM
  2. Pvp tokens drop when player dies
    By Psychotherapy in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 03-20-2010, 07:02 PM
  3. Disconnect when char enter world - ascent :S
    By guldkorn in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 02-24-2008, 04:30 PM
  4. [Share] Rulebook for Mangos (ingame item added when players start!)
    By latruwski in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 12-03-2007, 01:33 PM
  5. Crash when entering edited zone! :(
    By Gorge in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 09-16-2007, 02:32 PM
All times are GMT -5. The time now is 04:40 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