whats wrong here? (lua) menu

User Tag List

Results 1 to 10 of 10
  1. #1
    bomsemannen's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    whats wrong here? (lua)

    Code:
    function On_Gossip(unit, event, player)
    unit:GossipCreateMenu(100, player, 0)
    unit:GossipMenuAddItem(0,"Instances", 1, 0)
    unit:GossipMenuAddItem(0,"Arenas", 2, 0)
    unit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus(unit, event, player, id, intid, code)
    if(intid == 1) then
    unit:GossipCreateMenu(101, player, 0)
    unit:GossipMenuAddItem(0,"Shadow Instance", 50, 0)
    unit:GossipSendMenu(player)
    end
    if(intid == 50) then
    player:Teleport(530, -3361.36, 5195.32, 101.05)
    end
    end
    function Gossip_Submenus(unit, event, player, id, intid, code)
    if(intid == 2) then
    unit:GossipCreateMenu(102, player, 0)
    unit:GossipMenuAddItem(0,"Pvp Arena", 60, 0)
    unit:GossipMenuAddItem(0,"Gurubashi Arena", 61, 0)
    unit:GossipMenuAddItem(0,"Arena floor", 62, 0)
    unit:GossipMenuAddItem(0,"Circle of blood", 63, 0)
    unit:GossipSendMenu(player)
    end
    if(intid == 60) then
    player:Teleport(1, 9985.907227, 1971.155640, 1326.815674)
    end
    if(intid == 61) then
    player:Teleport(0, -5028.265137, -825.976563, 495.301575)
    end
    if(intid == 62) then
    player:Teleport(0, -9100.480469, 406.950745, 92.594185)
    end
    if(intid == 63) then
    player:Teleport(530, -4072.202393, -12014.337891, -1.277277)
    end
    end
    
    RegisterUnitGossipEvent(959591, 1, "On_Gossip")
    RegisterUnitGossipEvent(959591, 2, "Gossip_Submenus")
    thanks

    whats wrong here? (lua)
  2. #2
    bomsemannen's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when i did the the script aint even loading:S, i got the first menu up, but the problem is that it dont change to the undermenus:S

  3. #3
    Fireblast's Avatar Contributor
    Reputation
    195
    Join Date
    Aug 2008
    Posts
    883
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry about that i am nub at lua >.< well i tried


    EDIT: deleted my post ;]
    Last edited by Fireblast; 09-26-2008 at 06:33 PM.

  4. #4
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function Tele_OnGossipTalk(pUnit, event, player, pMisc)
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(0,"Instances", 1, 0)
    pUnit:GossipMenuAddItem(0,"Arenas", 2, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function Tele_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    if(intid == 1) then
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(0,"Shadow Instance", 50, 0)
    pUnit:GossipSendMenu(player)
    end
    if(intid == 2) then
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(0,"Pvp Arena", 60, 0)
    pUnit:GossipMenuAddItem(0,"Gurubashi Arena", 61, 0)
    pUnit:GossipMenuAddItem(0,"Arena floor", 62, 0)
    pUnit:GossipMenuAddItem(0,"Circle of blood", 63, 0)
    pUnit:GossipSendMenu(player)
    end
    if(intid == 50) then
    player:Teleport(530, -3361.36, 5195.32, 101.05)
    end
    if(intid == 60) then
    player:Teleport(1, 9985.907227, 1971.155640, 1326.815674)
    end
    if(intid == 61) then
    player:Teleport(0, -5028.265137, -825.976563, 495.301575)
    end
    if(intid == 62) then
    player:Teleport(0, -9100.480469, 406.950745, 92.594185)
    end
    if(intid == 63) then
    player:Teleport(530, -4072.202393, -12014.337891, -1.277277)
    end
    end
    
    RegisterUnitGossipEvent(959591, 1, "Tele_OnGossipTalk")
    RegisterUnitGossipEvent(959591, 2, "Tele_OnGossipSelect")
    Try that.

  5. #5
    _DEFiANT's Avatar Member
    Reputation
    44
    Join Date
    Aug 2008
    Posts
    240
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Geez, how many different functions for menus??
    This script has...
    Code:
    function Tele_OnGossipTalk(pUnit, event, player, pMisc)
    Code:
    function Tele_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    when its a lot easier to remember...
    Code:
    function On_Gossip(unit, event, player)
    Code:
    function Gossip_Submenus(unit, event, player, id, intid, code)
    at least for me it is ^_^

    EDIT: By the way! Decided to go through the scripts and found a few errors + I changed the functions to mine

    Code:
    local npcid = 959591
    
    function On_Gossip(unit, event, player)
    unit:GossipCreateMenu(100, player, 0)
    unit:GossipMenuAddItem(0,"Instances", 1, 0)
    unit:GossipMenuAddItem(0,"Arenas", 2, 0)
    unit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus(unit, event, player, id, intid, code)
    if(intid == 1) then
    unit:GossipCreateMenu(101, player, 0)
    unit:GossipMenuAddItem(0,"Shadow Instance", 50, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 2) then
    unit:GossipCreateMenu(102, player, 0)
    unit:GossipMenuAddItem(0,"Pvp Arena", 60, 0)
    unit:GossipMenuAddItem(0,"Gurubashi Arena", 61, 0)
    unit:GossipMenuAddItem(0,"Arena floor", 62, 0)
    unit:GossipMenuAddItem(0,"Circle of Blood", 63, 0)
    unit:GossipSendMenu(player)
    end
    
    if(intid == 50) then
    player:Teleport(530, -3361.36, 5195.32, 101.05)
    end
    if(intid == 60) then
    player:Teleport(1, 9985.907227, 1971.155640, 1326.815674)
    end
    if(intid == 61) then
    player:Teleport(0, -5028.265137, -825.976563, 495.301575)
    end
    if(intid == 62) then
    player:Teleport(0, -9100.480469, 406.950745, 92.594185)
    end
    if(intid == 63) then
    player:Teleport(530, -4072.202393, -12014.337891, -1.277277)
    end
    end
    
    RegisterUnitGossipEvent(959591, 1, "On_Gossip)
    RegisterUnitGossipEvent(959591, 2, "Gossip_Submenus")
    I also changed the "pUnit" to "unit"
    It is what I have always used and it has always worked

    Last edited by _DEFiANT; 09-27-2008 at 03:48 PM.

    Need help? add me on MSN - [email protected]
    Have questions? email me - [email protected]

  6. #6
    kreegoth's Avatar Contributor
    Reputation
    122
    Join Date
    Jun 2008
    Posts
    810
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Warlock.. Your font size makes my retinas melt...

  7. #7
    _DEFiANT's Avatar Member
    Reputation
    44
    Join Date
    Aug 2008
    Posts
    240
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lmao. I'll keep my font size normal then. :P

    Need help? add me on MSN - [email protected]
    Have questions? email me - [email protected]

  8. #8
    bomsemannen's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Sounddead View Post
    Code:
    function Tele_OnGossipTalk(pUnit, event, player, pMisc)
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(0,"Instances", 1, 0)
    pUnit:GossipMenuAddItem(0,"Arenas", 2, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function Tele_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    if(intid == 1) then
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(0,"Shadow Instance", 50, 0)
    pUnit:GossipSendMenu(player)
    end
    if(intid == 2) then
    pUnit:GossipCreateMenu(100, player, 0)
    pUnit:GossipMenuAddItem(0,"Pvp Arena", 60, 0)
    pUnit:GossipMenuAddItem(0,"Gurubashi Arena", 61, 0)
    pUnit:GossipMenuAddItem(0,"Arena floor", 62, 0)
    pUnit:GossipMenuAddItem(0,"Circle of blood", 63, 0)
    pUnit:GossipSendMenu(player)
    end
    if(intid == 50) then
    player:Teleport(530, -3361.36, 5195.32, 101.05)
    end
    if(intid == 60) then
    player:Teleport(1, 9985.907227, 1971.155640, 1326.815674)
    end
    if(intid == 61) then
    player:Teleport(0, -5028.265137, -825.976563, 495.301575)
    end
    if(intid == 62) then
    player:Teleport(0, -9100.480469, 406.950745, 92.594185)
    end
    if(intid == 63) then
    player:Teleport(530, -4072.202393, -12014.337891, -1.277277)
    end
    end
    
    RegisterUnitGossipEvent(959591, 1, "Tele_OnGossipTalk")
    RegisterUnitGossipEvent(959591, 2, "Tele_OnGossipSelect")
    Try that.
    thanks+Rep

    Warlockian +Rep for you to for telling me that

    edit:
    now i got another problem, when i am using the shadow instance teleport i spawn in mid air and fall down and die,how can i fix so i dont spawn in air but on the ground?
    Last edited by bomsemannen; 09-27-2008 at 04:52 AM.

  9. #9
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Get the proper Z coordinate of the location you wish to spawn in

  10. #10
    bomsemannen's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah i saw it now i missed the "-" thanksxD +Rep

Similar Threads

  1. What's wrong here?
    By Fejset in forum World of Warcraft General
    Replies: 3
    Last Post: 09-03-2008, 04:37 PM
  2. Whats wrong with this LUA Script?
    By controlsx2 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-20-2008, 03:03 PM
  3. Whats wrong with creature loot and my LUA Scripts
    By controlsx2 in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 05-06-2008, 01:48 PM
  4. [Question] What did i do wrong here?
    By ti0r in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 04-25-2008, 08:38 AM
All times are GMT -5. The time now is 11:25 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