Player phasing question. menu

User Tag List

Results 1 to 3 of 3
  1. #1
    DaynNight's Avatar Private
    Reputation
    1
    Join Date
    Jan 2012
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Player phasing question.

    Hey again, sorry for all of these posts but im pretty new to this stuff especially when it comes to player phasing in flight paths xD. So basically what I want, is when someone hits the "Fly me to the abandoned camp" button in my npc gossip menu I want him to go to phase 2, atm I have this:

    Code:
    local GetDisplay = 25579
    local NPCID = 450006
    
    function Brann_OnGossipTalk(pUnit, event, player, pMisc)
    	pUnit:GossipCreateMenu(50, player, 0)
    	pUnit:GossipMenuAddItem(2, "Get me to the abandoned camp!", 1, 0)
    	pUnit:GossipMenuAddItem(7, "Leave.", 2, 0)
    	pUnit:GossipSendMenu(player)
    end
    
    function Brann_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    	if (intid == 1) then
    		plr:SetPhase(2)
    		local GoToCamp = LuaTaxi:CreateTaxi()
    		GoToCamp:AddPathNode(603, -856.2, -130.4, 471.6)
    		GoToCamp:AddPathNode(603, -562.3, -9.171, 516.9)
    		GoToCamp:AddPathNode(603, -197.6, 34.06, 455.1)
    		GoToCamp:AddPathNode(603, -101.2, 132.1, 450.9)
    		GoToCamp:AddPathNode(603, -91.64, 160.0, 432.7)
    		player:StartTaxi(GoToCamp, GetDisplay)
    	end
    	player:GossipComplete()
    end
    
    RegisterUnitGossipEvent(NPCID, 1, "Brann_OnGossipTalk")
    RegisterUnitGossipEvent(NPCID, 2, "Brann_OnGossipSelect")
    When I hit the "Get me to the abandoned camp" button it will show in world.exe that,

    Code:
    Attempt to index upvalue 'plr' (a nil value)
    So im clueless atm about how to fix this since it has a number in "plr:SetPhase(2)" so how is it a nil value?

    Thanks in advance (again).

    Player phasing question.
  2. #2
    chaggs's Avatar Corporal
    Reputation
    5
    Join Date
    Mar 2010
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DaynNight View Post
    Hey again, sorry for all of these posts but im pretty new to this stuff especially when it comes to player phasing in flight paths xD. So basically what I want, is when someone hits the "Fly me to the abandoned camp" button in my npc gossip menu I want him to go to phase 2, atm I have this:

    Code:
    local GetDisplay = 25579
    local NPCID = 450006
    
    function Brann_OnGossipTalk(pUnit, event, player, pMisc)
    	pUnit:GossipCreateMenu(50, player, 0)
    	pUnit:GossipMenuAddItem(2, "Get me to the abandoned camp!", 1, 0)
    	pUnit:GossipMenuAddItem(7, "Leave.", 2, 0)
    	pUnit:GossipSendMenu(player)
    end
    
    function Brann_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    	if (intid == 1) then
    		plr:SetPhase(2)
    		local GoToCamp = LuaTaxi:CreateTaxi()
    		GoToCamp:AddPathNode(603, -856.2, -130.4, 471.6)
    		GoToCamp:AddPathNode(603, -562.3, -9.171, 516.9)
    		GoToCamp:AddPathNode(603, -197.6, 34.06, 455.1)
    		GoToCamp:AddPathNode(603, -101.2, 132.1, 450.9)
    		GoToCamp:AddPathNode(603, -91.64, 160.0, 432.7)
    		player:StartTaxi(GoToCamp, GetDisplay)
    	end
    	player:GossipComplete()
    end
    
    RegisterUnitGossipEvent(NPCID, 1, "Brann_OnGossipTalk")
    RegisterUnitGossipEvent(NPCID, 2, "Brann_OnGossipSelect")
    When I hit the "Get me to the abandoned camp" button it will show in world.exe that,

    Code:
    Attempt to index upvalue 'plr' (a nil value)
    So im clueless atm about how to fix this since it has a number in "plr:SetPhase(2)" so how is it a nil value?

    Thanks in advance (again).
    Forgive me if i'm wrong, but i believe the command is:

    Code:
    plr:PhaseSet(2)
    Not 100% on that. since I'm 8 months late I assume you've figured it out by now though :P

  3. #3
    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 chaggs View Post
    Forgive me if i'm wrong, but i believe the command is:

    Code:
    plr:PhaseSet(2)
    Not 100% on that. since I'm 8 months late I assume you've figured it out by now though :P
    I believe both methods work, but the one I use is SetPhase(x).

    The reason it doesn't work is because the pointer 'plr' does not exist.

    The parameters of the function define the player variable as 'player', so player should be used as plr does not exist.

    So the fix is to change it to:

    Code:
    player:SetPhase(2)

Similar Threads

  1. Creature phasing question
    By Xmaily in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 05-18-2015, 04:36 PM
  2. [ArcEmu] Phasing question
    By kerovi in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 03-27-2011, 03:58 PM
  3. question = which classes/races in player create info items,skills, spels
    By Thirsha in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-24-2008, 03:47 AM
  4. [Question] How to make players start with gear/money/items?
    By hukabuka in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 02-23-2008, 08:13 PM
  5. [QUESTION] How many players can my computer hold ?
    By EmiloZ in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 02-15-2008, 12:32 PM
All times are GMT -5. The time now is 08:40 AM. 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