What is wrong??? menu

User Tag List

Results 1 to 5 of 5
  1. #1
    maanuel's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is wrong???

    I wanna do a lua that when you use it , a npc will spawn but doesn't work ¬¬

    function Objeto_OnUse(pUnit, Event)
    local x = pUnit:GetX();
    local y = pUnit:GetY();
    local z = pUnit:GetZ();
    local o = pUnit:GetO();
    pUnit:SpawnCreature(17830, x, y, z, o, 14, 400000)
    end

    RegisterGameObjectEvent(182024, 2, "Objeto_OnUse")


    -----------------------------------------------------------------------------------

    How can i do a lua script that check if the target have a quest and change the faction(the faction of the npc)??

    Sorry ,becouse my english is very bad ^^

    Desde ya muchas gracias
    Last edited by maanuel; 03-01-2009 at 05:08 PM.

    What is wrong???
  2. #2
    Padlockcode's Avatar Active Member
    Reputation
    44
    Join Date
    Dec 2006
    Posts
    116
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the local X = Punit only works on NPC's but i could be wrong

  3. #3
    ZestyJ's Avatar Contributor
    Reputation
    86
    Join Date
    Mar 2008
    Posts
    169
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well first off you can't mix a Unit and an Object lua together:
    Code:
    function Objeto_OnUse(pUnit, Event) <---pUnit need to be Object
    local x = pUnit:GetX();<---pUnit need to be Object
    local y = pUnit:GetY();<---pUnit need to be Object
    local z = pUnit:GetZ();<---pUnit need to be Object
    local o = pUnit:GetO();<---pUnit need to be Object
    pUnit:SpawnCreature(17830, x, y, z, o, 14, 400000)<---pUnit need to be Object
    end
    
    RegisterGameObjectEvent(182024, 2, "Objeto_OnUse")
    This would be the correct way:
    Code:
    function Objeto_OnUse(Bbject, Event) 
    local x = Object:GetX();
    local y = Object:GetY();
    local z = Object:GetZ();
    local o = Object:GetO();
    Object:SpawnCreature(17830, x, y, z, o, 14, 400000)
    end
    
    RegisterGameObjectEvent(182024, 2, "Objeto_OnUse")
    Hope that helps.

    -KingMitch
    -Zesty
    Formerly Known as Wickedshadow/KingMitch

  4. #4
    maanuel's Avatar Member
    Reputation
    1
    Join Date
    Jan 2009
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all yours answers, i will try with

    function Objeto_OnUse(Bbject, Event)
    local x = Object:GetX();
    local y = Object:GetY();
    local z = Object:GetZ();
    local o = Object:GetO();
    Object:SpawnCreature(17830, x, y, z, o, 14, 400000)
    end

    RegisterGameObjectEvent(182024, 2, "Objeto_OnUse")

    -------------

    didint work world said attemp to index global "object" (a nil value)



    The problem could be (Bbject, Event) i will try with (Object, Event)

    Nothing happend with (object, Event) /cry
    THANKS! for your answers
    Last edited by maanuel; 03-02-2009 at 02:28 PM.

  5. #5
    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)
    See this thread: http://www.mmowned.com/forums/emulat...ect-traps.html

    May answer some of your questions, please do not reply to it as it is a very old thread.
    *looking back* I was very noob back then

    Edit: Looked up, the script you linked has "Bject" instead of "Object". Proof read it.
    Edit2: Just read entire post as I should off in first place, you did change it. Make sure it's got the correct titles and compare with the script in the link I sent as I know that works for a fact.
    Last edited by stoneharry; 03-02-2009 at 04:59 PM.

Similar Threads

  1. What is wrong with ppl and blaming WoW...?
    By Eskiimo in forum World of Warcraft General
    Replies: 5
    Last Post: 12-31-2007, 05:21 PM
  2. I don't understand what's wrong?
    By karpis in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 11-27-2007, 12:37 PM
  3. Whats gone wrong?
    By subzero1337 in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 09-26-2007, 01:45 PM
  4. What is wrong?
    By iccy in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 09-02-2007, 10:23 AM
  5. What is wrong with mywarcraft studio?...
    By xigon in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 08-03-2007, 01:13 AM
All times are GMT -5. The time now is 07:49 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