[Eluna] Script help menu

User Tag List

Results 1 to 4 of 4
  1. #1
    Xmaily's Avatar Master Sergeant
    Reputation
    14
    Join Date
    May 2013
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Eluna] Script help

    Hello everyone!

    The other day I made the switch from Arcemu to Trinity. I'm starting to get used to Eluna and I'm learning the new functions. I wanted to make a teleporter that would teleport a player while putting them in a invis for a few seconds so so they don't get ganked right after porting.

    My whole script works fine with the server even the teleport works! It's just the buff and the speech right afterwards that doesn't work. I'm sure its something stupid on my part like a wrong function but does anyone know how I can make this NPC cast the invis spell and say the, "You are invisible" line after talking to him?

    Here is the part of the script:

    if (intid == 1) then
    player:Teleport(530, -3816.390137, -11477.362305, -138.452454, 4.254857) -- this works
    player:SendBroadcastMessage("You are invisible!") -- this doesn't work
    player:AddAura(29309, player) -- this doesn't work
    end

    Thanks!

    [Eluna] Script help
  2. #2
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My suggestion is to send the broadcast message and add the aura first, and then teleport. The reason for it failing can cause that player is still teleporting. Other solution could be that you add slight delay after the teleport.

    Oh wait. I would do it like this. Send the message and add aura to player. Then like 1 or 2 seconds delay and then teleport. That would look in my opinion the most professional.
    Or then you could use the server hook called OnPlayerEnterMap, or how is it called, and use map id 530. And there send message and add aura. That looks professional too tbh.

    Well there are some suggestions to you, enjoy Lua scripting!

  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)
    See above post.

    Code:
    if (intid == 1) then
      player:SendBroadcastMessage("You are invisible!")
      player:AddAura(29309, player) 
      player:Teleport(530, -3816.390137, -11477.362305, -138.452454, 4.254857)
    end

  4. #4
    DoxramosPS's Avatar Knight
    Reputation
    26
    Join Date
    Aug 2010
    Posts
    214
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Correct me if I'm wrong, but I also think that TrinityCore uses pPlayer not player

    Scratch that. Saw the switch reversed.
    Mangos and Trinity Emulation
    Windows | Linux
    Under Development : morgangreen.org WoW CMS Site

Similar Threads

  1. [Lua Script] Help with trinitycore Eluna script
    By spleee101 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 11-22-2015, 01:17 AM
  2. LUA Boss Script Help
    By neurothymia in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-05-2008, 02:57 PM
  3. Need LUA Scripting Help ?
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-04-2008, 12:36 PM
  4. Scripting help please will +rep need for a new server
    By runiker in forum WoW EMU Guides & Tutorials
    Replies: 0
    Last Post: 01-22-2008, 04:05 AM
  5. [Ascent] Boss Scripts help
    By n0t5ew in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 12-24-2007, 03:04 PM
All times are GMT -5. The time now is 07:45 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