Yet another lua dont work (teleporter) menu

User Tag List

Results 1 to 12 of 12
  1. #1
    Tikki100's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2008
    Posts
    83
    Thanks G/R
    3/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Yet another lua dont work (teleporter)

    Thankyou for your help +Rep x2 to hoever fix it.


    HTML Code:
    function LibaryGuard_OnGossipTalk(pUnit, event, player, pMisc)
    
    if (player:HasFinishedQuest(800001) == true) then
    unit:GossipCreateMenu(800000, player, 0)
    unit:GossipMenuAddItem(0, "I would like to enter the Libary", 998, 0)
    unit:GossipMenuAddItem(0, "I would like to leave the Libary", 997, 0)
    unit:GossipSendMenu(player)
    elseif (player:HasFinishedQuest(800000) == true) then
    unit:GossipCreateMenu(799999, player, 0)
    unit:GossipMenuAddItem(0, "I would like to enter the Libary", 998, 0)
    unit:GossipMenuAddItem(0, "I would like to leave the Libary", 997, 0)
    unit:GossipSendMenu(player)
    elseif (player:HasFinishedQuest(900017) == true) then
    unit:GossipCreateMenu(1, player, 0)
    unit:GossipMenuAddItem(0, "I would like to enter the Libary", 998, 0)
    unit:GossipMenuAddItem(0, "I would like to leave the Libary", 997, 0)
    unit:GossipSendMenu(player)
    else
    unit:GossipCreateMenu(900019, player, 0)
    unit:GossipSendMenu(player)
    end
    end
    
    function LibaryGuard_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    
    if(intid ==998) then
          player:Teleport(1, 9931, -9526, 18) --Inside
          pUnit:GossipComplete(player)
    end
    
    if(intid ==997) then
          player:Teleport(1, 9922, -9542, 18) --Outside
          pUnit:GossipComplete(player)
    end
    end
    
    
    RegisterUnitGossipEvent(900132, 1, "LibaryGuard_OnGossipTalk")
    RegisterUnitGossipEvent(900132, 2, "LibaryGuard_OnGossipSelect")
    Quests:

    800000 = King Quest
    800001 = Queen Quest
    900016 = Citizen quest
    Last edited by Tikki100; 06-29-2009 at 06:12 AM.

    Yet another lua dont work (teleporter)
  2. #2
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey.

    Did you get any errors in the world.exe?

  3. #3
    Tikki100's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2008
    Posts
    83
    Thanks G/R
    3/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes. Cant post pictures now, or check it since we use teamviewer to server pc and the owner is playing CoD >.<

  4. #4
    I Hypnotoad I's Avatar Contributor
    Reputation
    147
    Join Date
    Aug 2007
    Posts
    873
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I r Own yew Tikki


    Dragon[Sky] can get into our signatures, AND our pants.



  5. #5
    Tikki100's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2008
    Posts
    83
    Thanks G/R
    3/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Shut up -.-

  6. #6
    I Hypnotoad I's Avatar Contributor
    Reputation
    147
    Join Date
    Aug 2007
    Posts
    873
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    [Filler}

    NO U


    Dragon[Sky] can get into our signatures, AND our pants.



  7. #7
    B14d3r11's Avatar Sergeant Major
    Reputation
    9
    Join Date
    Jan 2007
    Posts
    179
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey i modified you code a little bit, tell me if it does anything different
    Code:
    local npcid = 0
    function LibaryGuard_OnGossipTalk(pUnit, event, player, pMisc)
    if (player:HasFinishedQuest(800001) == true) then
    unit:GossipCreateMenu(3544, player, 0)
    unit:GossipMenuAddItem(3, "I would like to enter the Libary", 998, 0)
    unit:GossipMenuAddItem(3, "I would like to leave the Libary", 997, 0)
    unit:GossipSendMenu(player)
    elseif (player:HasFinishedQuest(800000) == true) then
    unit:GossipCreateMenu(3544, player, 0)
    unit:GossipMenuAddItem(3, "I would like to enter the Libary", 998, 0)
    unit:GossipMenuAddItem(3, "I would like to leave the Libary", 997, 0)
    unit:GossipSendMenu(player)
    elseif (player:HasFinishedQuest(900017) == true) then
    unit:GossipCreateMenu(1, player, 0)
    unit:GossipMenuAddItem(3, "I would like to enter the Libary", 998, 0)
    unit:GossipMenuAddItem(3, "I would like to leave the Libary", 997, 0)
    unit:GossipSendMenu(player)
    else
    unit:GossipCreateMenu(3544, player, 0)
    unit:GossipMenuAddItem(3, "Good bye then", 999, 0)
    unit:GossipSendMenu(player)
    end
    end
    
    function LibaryGuard_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
    
    if(intid ==998) then
          player:Teleport(1, 9931, -9526, 18) --Inside
          pUnit:GossipComplete(player)
    end
    
    if(intid ==997) then
          player:Teleport(1, 9922, -9542, 18) --Outside
          pUnit:GossipComplete(player)
    
    if(intid ==999) then
          pUnit:GossipComplete(player)
          
    end
    end
    
    
    RegisterUnitGossipEvent(900132, 1, "LibaryGuard_OnGossipTalk")
    RegisterUnitGossipEvent(900132, 2, "LibaryGuard_OnGossipSelect")
    Last edited by B14d3r11; 06-29-2009 at 07:49 AM.

  8. #8
    Dynashock's Avatar Contributor

    Reputation
    176
    Join Date
    Nov 2007
    Posts
    203
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It most likely doesn't work because you use function LibaryGuard_OnGossipTalk(pUnit, event, player, pMisc) but you use unit in your script. Try changing those units to pUnit and the script should load without problems.

    As to B14d3r11, you're forgetting an end for the expression if (intid == 997). And why do you do local npcid = 0? It's not like you use the npcid variable. There's no point to it and only takes up extra loading time.

  9. #9
    Tikki100's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2008
    Posts
    83
    Thanks G/R
    3/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No diffrence

  10. #10
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    local npcid = 0
    function LibaryGuard_OnGossipTalk(pUnit, event, player, pMisc)
    if (player:HasFinishedQuest(9000017) == true ||
        player:HasFinishedQuest(800001) == true ||
        player:HasFinishedQuest(800002) == true) then
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(3, "I would like to enter the Libary", 998, 0)
    pUnit:GossipMenuAddItem(3, "I would like to leave the Libary", 997, 0)
    pUnit:GossipSendMenu(player)
    else
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(3, "Good bye then", 999, 0)
    pUnit:GossipSendMenu(player)
    end
    end
    
    function LibaryGuard_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
        if(intid ==998) then
              player:Teleport(1, 9931, -9526, 18) --Inside
              pUnit:GossipComplete(player)
        end
        if(intid ==997) then
              player:Teleport(1, 9922, -9542, 18) --Outside
              pUnit:GossipComplete(player)
        end
        if(intid ==999) then
              pUnit:GossipComplete(player)
              
        end
    end
    
    
    RegisterUnitGossipEvent(900132, 1, "LibaryGuard_OnGossipTalk")
    RegisterUnitGossipEvent(900132, 2, "LibaryGuard_OnGossipSelect")
    Try that. Post any errors and are your NPCflags correct?
    Life Puzzler WoW - Website | Forums

  11. #11
    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 always use:

    Code:
    if player:HasFinishedQuest(9000017) == true and player:HasFinishedQuest(800001) == true and player:HasFinishedQuest(800002) == true then
    do something
    else
    end
    end
    
    If Gastric's doesn't work.

  12. #12
    Tikki100's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2008
    Posts
    83
    Thanks G/R
    3/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stoneharry i own you 4 rep now xD

    if player:HasFinishedQuest(9000017) == true or player:HasFinishedQuest(800001) == true or player:HasFinishedQuest(800002) == true then

    instead of and (could't talk to him) i putted or ^^
    Stoneharry xD 4 rep.

Similar Threads

  1. [LUA] Another lua dont work >: (
    By Tikki100 in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 06-19-2009, 11:52 AM
  2. [LUA] Gamble script dont work :(
    By Tikki100 in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 06-08-2009, 06:31 AM
  3. QUEST Lua Boss dont work!
    By Tikki100 in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 04-15-2009, 10:31 AM
  4. [RELEASE] Yet another Lua script
    By Zaeran in forum WoW EMU General Releases
    Replies: 8
    Last Post: 12-06-2008, 09:12 PM
  5. Will this teleporter npc lua script work?
    By Bapes in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 05-22-2008, 11:50 AM
All times are GMT -5. The time now is 04:12 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