[LUA] Teleport on spell use menu

User Tag List

Results 1 to 11 of 11
  1. #1
    Eponyx's Avatar Banned
    Reputation
    41
    Join Date
    Sep 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [LUA] Teleport on spell use

    Hello guys, I want to teleport to a certain location once I use the spell, so for example; VIPs use 38759 and get teleported to the VIP Islands.. im noob in LUA so I need a lil bit help here, thanks alot

    What I got so far... pretty sure it aint gonna work thats why I could use some help...

    Thanks if you can help.. :-)

    function DarkShell(Unit, event, miscunit, misc)
    print "DarkShell"
    Unit:IfCastSpell(39364)
    Go:Teleport (530, 13004, -6910, 9.584)
    end

    [LUA] Teleport on spell use
  2. #2
    b!atch's Avatar Member
    Reputation
    118
    Join Date
    Oct 2007
    Posts
    726
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Erm, change the location of the spell in your db.. No lua needed here

    For example, revamp Teleport:Goldshire to Teleport:Vipisland... Go into your teleport_coords table and change the mapid/x/y/z to the map/x/y/z of vipisland


    Btw just teach "vip" people the spell you're revamping
    Last edited by b!atch; 05-24-2008 at 08:00 AM.
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  3. #3
    Eponyx's Avatar Banned
    Reputation
    41
    Join Date
    Sep 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright thanks, Also I got one more lua question..... I'm trying this:

    Spawned a Game Object on an Island, you right click the game object it spawns a boss in the middle of the island for 60 seconds, once 60 seconds passed he despawns...
    This is what I got so far....



    function NPCname_Phaseorfunction (pUnit, Event)
    pUnit:SpawnCreature(22917123, 11368.554688, -4737.251465, 5.054111, 2.497566, 1825, 60000")
    end
    RegisterUnitEvent (
    22917123, 6, "NPCname_Phaseorfunction")


    What am I missing?
    and thanks b!atch

  4. #4
    b!atch's Avatar Member
    Reputation
    118
    Join Date
    Oct 2007
    Posts
    726
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    function Mob_onUse (pUnit, Event, pMisc)
    pUnit:SpawnCreature(npcid, x, y, z, orientation, faction, 60000);
    end
    RegisterGameObjectEvent (ObjectEntryid, 6, "Mob_onUse")

    try that
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  5. #5
    Eponyx's Avatar Banned
    Reputation
    41
    Join Date
    Sep 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Server has crashed. Reason was:
    a Privileged Instruction at 0x0FE18A69
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    When I try to start the server..... the lua file looks like this:


    Code:
    function Mob_onUse (pUnit, Event, pMisc)
    pUnit:SpawnCreature(22917123, 11368.554688, -4737.251465, 5.054111, 2.497566, 1825, 60000);
    end
    RegisterGameObjectEvent (75884, 6, "Mob_onUse")

  6. #6
    b!atch's Avatar Member
    Reputation
    118
    Join Date
    Oct 2007
    Posts
    726
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try flag 2 or 7 instead:P
    Code:
    RegisterGameObjectEvent (75884, 6, "Mob_onUse")


    Red number is flag.


    EDIT: or maybe even 1.. Im not sure;d never made such a script..

    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  7. #7
    Eponyx's Avatar Banned
    Reputation
    41
    Join Date
    Sep 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks... Ok well it doesnt crash now but it doesnt spawn anything either.

  8. #8
    b!atch's Avatar Member
    Reputation
    118
    Join Date
    Oct 2007
    Posts
    726
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm..Well if you made all the numbers correct i dont see why it wouldnt work:/ Try some of the flags i wrote..


    Ill give it a test on my server
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  9. #9
    Eponyx's Avatar Banned
    Reputation
    41
    Join Date
    Sep 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, and thanks..
    I'm working on a custom start area with custom events and such this was one of them, considered as a 5 man boss but you need enough DPS to kill him in time or he will despawn.

  10. #10
    b!atch's Avatar Member
    Reputation
    118
    Join Date
    Oct 2007
    Posts
    726
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I cant really test it atm since i dont have any db and i cba to download one.. But ill test it l8r^^
    Spectrum-X is win! Rep People That Help You and Candybones Wont Eat Your Brain:>

  11. #11
    Eponyx's Avatar Banned
    Reputation
    41
    Join Date
    Sep 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, thanks.

Similar Threads

  1. [Question] Using Lua to Cast Spells: Dealing with overhead
    By nilum in forum WoW Bots Questions & Requests
    Replies: 0
    Last Post: 10-17-2011, 06:31 PM
  2. [Lua] Teleport on contact instead of use
    By freeride474 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 04-12-2010, 04:01 PM
  3. Help with lua teleporter
    By Arugos in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 09-17-2008, 09:09 AM
  4. LUA Player Cast Spell
    By Bapesy in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 06-01-2008, 01:32 AM
  5. LUA: Start event on using an item?
    By sylv100 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 01-26-2008, 10:09 PM
All times are GMT -5. The time now is 10:59 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