Creature phasing question menu

User Tag List

Results 1 to 4 of 4
  1. #1
    Xmaily's Avatar Master Sergeant
    Reputation
    14
    Join Date
    May 2013
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creature phasing question

    Hey Ownedcore,

    I am working on this script and when the boss spawns I want him to start sending boulders down a hill. In this raid i'm creating the Alliance and Horde experience different versions of the raid. I have Alliance in phase 1 and Horde in phase 8. However, my function doesn't appear to be working I don't get any errors when running the script I simply don't see the boulders come into phase 1 or 8.

    Here is the function;

    Code:
     
    
    function UTG.VAR.BOULDERZOMGZS(pUnit)
    	local plr = pUnit:GetRandomPlayer(0)
    	if plr ~= nil then
    		local race = plr:GetPlayerRace()
    		if race == 1 or race == 3 or race == 4 or race == 7 or race == 11 then -- alliance
    	for place,creatures in pairs(pUnit:GetInRangeUnits()) do 
    if creatures:GetEntry() == 6814 and  pUnit:GetDistanceYards(creatures) < 800 then
    creatures:SetPhase(1)
    		else
    	for place,creatures in pairs(pUnit:GetInRangeUnits()) do 
    if creatures:GetEntry() == 6814 and  pUnit:GetDistanceYards(creatures) < 800 then
    creatures:SetPhase(8)
    	end
    end
    end
    end
    end
    end
    end
    Does anyone know whats wrong with it?

    Thanks!

    Creature phasing question
  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)
    I'm not sure why you are coding it in this way.

    Store in a instance variable the faction running it.

    table[instanceID].faction = 1

    Then on npc spawn, get instance ID, and set phase depending on faction variable.

  3. #3
    Xmaily's Avatar Master Sergeant
    Reputation
    14
    Join Date
    May 2013
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    I'm not sure why you are coding it in this way.

    Store in a instance variable the faction running it.

    table[instanceID].faction = 1

    Then on npc spawn, get instance ID, and set phase depending on faction variable.
    Oh, I forgot that you could do it that way! Awesome! I have seen some scripts that have done that in the past that I can look over. Just out of curiosity though what was wrong with the code above that made it not work.
    Last edited by Xmaily; 05-18-2015 at 04:08 PM.

  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 Xmaily View Post
    Oh, I forgot that you could do it that way! Awesome! I have seen some scripts that have done that in the past that I can look over. Just out of curiosity though what was wrong with the code above that made it not work.
    It could have been a number of reasons, without seeing the full context and script it would be hard to tell and even with that information it could be hard to debug. It's just not a very good way to go about doing it.

Similar Threads

  1. [Lua Script] Player phasing question.
    By DaynNight in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 10-26-2012, 05:04 AM
  2. [ArcEmu] Phasing question
    By kerovi in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 03-27-2011, 03:58 PM
  3. Creature Spawns Question
    By ardtard76 in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 01-29-2009, 04:16 AM
  4. Question: Spell to creature?
    By doraiz in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 06-19-2007, 03:52 AM
  5. Race - Creature Question
    By Aran in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 11-02-2006, 12:56 PM
All times are GMT -5. The time now is 10:23 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