Small problem, bug perhaps? menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  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)

    Small problem, bug perhaps?

    Hello Ownedcore, so I recently started to work on a new boss with some great ideas, now i've ran into an issue which I am clueless about since it does not give an error in world.exe or what so ever.

    So basicly what I want is when players get in approx 40 yard distance (or less) that the boss will say something and continue with a small cinematic. I've made a trigger npc but still it doesnt work (thought that the boss might stand to high on the throne so I made a trigger npc). Now I spawned everything but when I get into 40 yards of the trigger (or less) nothing happens, no error shown in world.exe.

    Small problem, bug perhaps?-wowscrnshot_030212_142130-jpg

    As you can see the trigger is on the ground and the boss is standing in front of the throne.

    Script I currently have which does not function right:
    Code:
    local BossEntryID = 77002
    local GuardDosEntryID = 77001
    local GuardUnoEntryID = 77000
    local TalkTriggerEntryID = 66000
    
    function TT(pUnit, event)
    	TalkTrigger = pUnit
    end
    
    function GA(pUnit, event)
    	Boss = pUnit
    end 
    
    function GAN(pUnit, event)
    	GuardDos = pUnit
    end 
    
    function GR(pUnit, event)
    	GuardUno = pUnit
    end 
    
    RegisterUnitEvent(BossEntryID, 18, "GA")
    RegisterUnitEvent(GuardDosEntryID, 18, "GAN")
    RegisterUnitEvent(GuardUnoEntryID, 18, "GR")
    RegisterUnitEvent(TalkTriggerEntryID, 18, "TT")
    
    function Boss_OnSpawn(pUnit, Event)
            Boss:SetFaction(14)
    		Boss:SetCombatCapable(1)
    		Boss:Root()
    		Boss:WipeTargetList()
    		GuardUno:SetFaction(14)
    		GuardUno:SetCombatCapable(1)
    		GuardUno:Root()
    		GuardUno:WipeTargetList()
    		GuardDos:SetFaction(14)
    		GuardDos:Root()
    		GuardDos:SetCombatCapable(1)
    		GuardDos:WipeTargetList()
            Boss:RegisterEvent("Check_For_Players_Boss", 2000, 0)
    end
    
    function Check_For_Players_Boss(pUnit)
            local plr = pUnit:GetClosestPlayer()
            if plr ~= nil then
                    if TalkTrigger:GetDistanceYards(plr) < 40 then -- Replaced "pUnit" by "TalkTrigger" both didnt work
                            Boss:SendChatMessage(14,0,"Well well, what do we have here..")
                            Boss:RegisterEvent("BossCinematic1", 4000, 1)
    		end
    	end 
    end
    I hope someone can help me out.

    -DaynNight

    Small problem, bug perhaps?
  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)
    You need to print. Print as if your life depends on it, it is the easiest way to debug!

    Code:
    function OnSpawn(pUnit, Event)
    print(pUnit) -- pUnit should be a unit value and not nil, if you see a 1 digit number you know you have the wrong data type (perhaps Event?) see why debugging helps
    local plr = pUnit:GetClosestPlayer()
    print(plr) -- Do same with plr
    if plr ~= nil then
    if plr:GetdistanceYards(pUnit) < 40 then
    print("player is within 40 yards")
    end
    end
    end

Similar Threads

  1. I solve my problem, and perhaps your
    By Gef in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 01-20-2008, 02:27 PM
  2. Small Problem?
    By llammaboi in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 01-01-2008, 09:25 PM
  3. [question] how do i tweak my server database, to sort out small problems?
    By ridders in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 11-05-2007, 03:42 PM
  4. [question] how do i tweak my server database, to sort out small problems?
    By ridders in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 11-05-2007, 03:35 PM
  5. Small Problem
    By Dryice in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 10-27-2007, 11:30 PM
All times are GMT -5. The time now is 03:00 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