Problem with Lua scripts! menu

User Tag List

Results 1 to 3 of 3
  1. #1
    wour55's Avatar Private
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with Lua scripts!

    Hey! Im starting to get into Lua scripting, and Im having some problems with 2 of my scripts. Maybe some experienced could give me a hand here? ;D

    This one is meant to teleport you to the mall when you write #mall
    Code:
    function TeleMall(event, plr, message, type, language)
    if message == "#Mall" then
    Unit:Teleport(530, -1020.459534, 8993.460938, 266.606812, 2.87692)
    end
    end
    
    RegisterServerHook(16, TeleMall)
    And this other one just to force people to join global channel when they enter the realm.
    Code:
    function OnEnterWorld(event, plr, message, type, language)
    Unit:SendBroadcastMessage("|cFFFFCC00You have autojoined the Global channel,|r |cFFCC6600"..Unit:GetName()..".|r")
    Unit:JoinChannel(Global) 
    end
    
    RegisterServerHook(4, "OnEnterWorld")
    Hope someone can help me out.

    Problem with Lua scripts!
  2. #2
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're calling Unit:Teleport() when there is no unit in question. It would be player:Teleport()

    Same with Unit:SendBroadcastMessage() and Unit:JoinChannel().

    Unit is a npc not a player.

  3. #3
    wour55's Avatar Private
    Reputation
    1
    Join Date
    Feb 2010
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, thank you for your reply ;D

Similar Threads

  1. Problem with lua script :/ please help!
    By robinelitenn in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 10-24-2009, 05:10 PM
  2. Problem with LUA scripted Mobs
    By foamysquirl in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 07-24-2009, 02:45 PM
  3. [Help Plzzzz] LUA Problem with KJ Script
    By Arthas117 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 08-16-2008, 05:25 PM
  4. Problem with lua boss script
    By nickeg in forum WoW EMU Questions & Requests
    Replies: 13
    Last Post: 08-16-2008, 09:22 AM
  5. [Request] Ascent Revision with LUA scripts enabled
    By Greatdrak in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 12-30-2007, 06:04 PM
All times are GMT -5. The time now is 06:41 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search