[Easy] Help me please, bugged script : / menu

User Tag List

Results 1 to 6 of 6
  1. #1
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Easy] Help me please, bugged script : /

    Im wondering what I did wrong, please fix them and Ill give ya +2 rep. thanks.


    This is supposed to make an emote on a friendly npc by targeting itself
    Code:
    function Choke(pUnit, event)
            if pUnit:GetHealthPct() <= 100 then
    pUnit:SetEmote(383)
    end
    
    RegisterUnitEvent(92364, 18, "Choke")
    and this utility/teleporter just flat out doesnt work.

    Code:
    local NPC_ID = 133799
    
    local MallMapId = 0
    local MallMapX = -11247.885741
    local MallMapY = -1791.946289
    local MallMapZ = -19.141843 
    
    local LevMapId = 530
    local LevMapX = -1603.850098
    local LevMapY = 7751.247559
    local LevMapZ = -20.850187 
    
    
    function Tele_OnGossipTalk(pUnit, event, player)
        pUnit:GossipCreateMenu(1, player, 0)
        pUnit:GossipMenuAddItem(1,"|cFF0000FFMall", 1, 0)
        pUnit:GossipMenuAddItem(1,"|cFFFF0000World PvP", 2, 0)
        pUnit:GossipMenuAddItem(0,"|cFF800080NPC Windows", 3,0)
        pUnit:GossipMenuAddItem(0,"|cFF00FF00Player Tools", 4,0)
        pUnit:GossipMenuAddItem(0,"|cFF87CEEBShow My Honor", 5,0)
        pUnit:GossipMenuAddItem(0,"|cFFDC143CShow My Arena Points", 6,0)
        pUnit:GossipMenuAddItem(1,"|cFF808080Nevermind.", 999, 0)
        pUnit:GossipSendMenu(player)
    end
    
    function Tele_OnGossipSelect(pUnit, Event, player, id, intid, code, pMisc)
    
    if(intid == 1) then
        player:Teleport(MallMapId, MallMapX, MallMapY, MallMapZ)
        player:GossipComplete()
    end
    
    if(intid == 2) then
        player:Teleport(LevMapId, LevMapX, LevMapY, LevMapZ)
        player:GossipComplete()
    end
    
    if(intid == 3) then
        pUnit:GossipCreateMenu(3545, player, 0)
        pUnit:GossipMenuAddItem(0,"|cFFFFC0CBTrainer", 7,0)
        pUnit:GossipMenuAddItem(0,"|cFFDB7093Bank Window", 9,0)
        pUnit:GossipMenuAddItem(0,"|cFF808080Nevermind", 999,0)
        pUnit:GossipSendMenu(player)
    end
    
    if(intid == 4) then
        pUnit:GossipCreateMenu(3546, player, 0)
        pUnit:GossipMenuAddItem(0,"|cFFC0C0C0Sex Changer", 12,0)
        pUnit:GossipMenuAddItem(0,"|cFF4682B4Remove Rezz Sickness", 16,0)
        pUnit:GossipMenuAddItem(0,"|cFFD8BFD8Repair", 17,0)
        pUnit:GossipMenuAddItem(0,"|cFF808080Nevermind", 999,0)
        pUnit:GossipSendMenu(player)
    end
    
    
    if (intid == 5) then
    player:GetTotalHonor()
    player:GossipComplete()
    end
    
    if (intid == 6) then
    player:GetArenaPoints()
    player:GossipComplete()
    end
    
    if (intid == 7) then
    player:SendTrainerWindow(unit)
    player:GossipComplete()
    end
    
    if (intid == 9) then
    player:SendBankWindow(unit)
    player:GossipComplete()
    end
    
    if (intid == 16) then
                if(player:HasAura(15007) == true) then
                    player:RemoveAura(15007)
    player:SendBroadcastMessage(" Resurrection Sickness Has been removed!")
    	else
    player:SendBroadcastMessage("You do not currently have Resurrection Sickness!")
    
    player:GossipComplete()
    end
    
    if (intid == 17) then
    player:RepairAllPlayerItems()
    player:GossipComplete()
    end
    
    if (intid == 12 and Player:GetGender() == 0) then
        player:SendBroadcastMessage("Your gender has been changed!")
        Player:SetGender(1)
    elseif (Player:GetGender() == 1) then
        Player:SendBroadcastMessage("Your gender has been changed!")
        Player:SetGender(0)
    end
    
    if(intid == 999) then
        player:GossipComplete()
    end
    end
    
    RegisterUnitGossipEvent(NPC_ID, 1, "Tele_OnGossipTalk")
    RegisterUnitGossipEvent(NPC_ID, 2, "Tele_OnGossipSelect")

    thanks in advance

    [Easy] Help me please, bugged script : /
  2. #2
    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)
    You're missing an 'end' on the first snippet. You're ending the if statement but not the function..

    And though your sig says 'pro lua', I'm going to ask a fairly stupid and basic question about the second snippet:
    Did you replace NPC_ID with the actual NPC entry on the last two lines?
    Code:
    RegisterUnitGossipEvent(NPC_ID, 1, "Tele_OnGossipTalk")
    RegisterUnitGossipEvent(NPC_ID, 2, "Tele_OnGossipSelect")

  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)
    Not only what TheSpidey said but theres many other parts where you forget ends and have syntex errors, for example SetEmote is SetEmote(id, time) you can't have (id) by its self.

  4. #4
    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)
    Ouch.. If that's your 'pro lua' I'd hate to see your 'decent C++'..

  5. #5
    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)
    SetEmote() doesn't even exist. It's Emote(), and yes, it can be used without a set time.

    Try to use indentation, too. It'll help you a lot with simple errors like not ending certain statements and it's just much, much prettier on the eyes. And while you might not care about prettiness, you will come to appreciate it in bigger scripts.

  6. #6
    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 Dynashock View Post
    SetEmote() doesn't even exist. It's Emote(), and yes, it can be used without a set time.
    Ah, I always forget that the emote is different to the other functions.

    Originally Posted by Dynashock View Post
    Try to use indentation, too. It'll help you a lot with simple errors like not ending certain statements and it's just much, much prettier on the eyes. And while you might not care about prettiness, you will come to appreciate it in bigger scripts.
    I think he did try to use indentation, it just screws up copying + pasting in with some text editors.

Similar Threads

  1. Need help with a VB script will pay pm me please.
    By decaphiltrator in forum Programming
    Replies: 0
    Last Post: 03-20-2014, 01:16 AM
  2. Need help with this LUA script, please.
    By Eliteplague in forum WoW Bots Questions & Requests
    Replies: 6
    Last Post: 11-18-2011, 01:27 PM
  3. A Few Bugs I Need Help With Please
    By BillyBob31 in forum World of Warcraft Emulator Servers
    Replies: 17
    Last Post: 03-22-2008, 12:14 AM
  4. Please Help With These Bugs ... A Fix Or Tips Plz ...
    By BillyBob31 in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 03-01-2008, 02:01 AM
  5. Rogue Talents in 1.12. Help me Please...
    By Rombot in forum World of Warcraft General
    Replies: 0
    Last Post: 07-17-2006, 08:50 AM
All times are GMT -5. The time now is 06:54 PM. 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