[Ascent][Help] More then 2 LUA portals?

Results 1 to 3 of 3
  1. #1
    Sorcerer Supreme nzn-muonline is offline
    Member +Rank
    Aug 2005 Join Date
    Wait! I knew this... Ummm... Don't tell me, I will answer!Location
    306Posts

    [Ascent][Help] More then 2 LUA portals?

    Hello! I have followed this guide for making a portal:

    Code:
    FIrst were gonnna make a GO object its really easy
    
    INSERT INTO `gameobject_names` (entry, Type, DisplayID, Name, spellfocus, sound1, sound2, sound3, sound4, sound5, sound6, sound7, sound8, sound9, unknown1, unknown2, unknown3, unknown4, unknown5, unknown6, unknown7, unknown8, unknown9, unknown10, unknown11, unknown12, unknown13, unknown14)
    VALUES (entry,22,DisplayID,'Name',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
    
    Change the entry, displayID and name to match what u want ur portal to be
    
    heres some good portal ID's
    
    1327 = The one for summons
    4393 = A darnassus look
    6955 = Exodar look
    4394 = ironforge look
    4395 = orgrimmar look
    6956 = silvermoon look
    4397 = thunderbluff look
    4398 = UC look
    7146 = shattrath portal look
    
    
    and now for the scripting part its easy with this info so yeah it should be done fast
    
    use .gps to learn what ur X,Y,and Z and Map Id are first and wright them down
    
    
    
    function Teleporting_onUse (pUnit, Event, pMisc)
    pMisc:Teleport (MapID, Xcoord, Ycoord, Zcoord)
    end
    RegisterGameObjectEvent (GOID, 2, "Teleporting_onUse")
    
    
    
    lets just say our X coord is supposed to be -345.49
    
    so waht would we do with that well we do this
    
    function Teleporting_onUse (pUnit, Event, pMisc)
    pMisc:Teleport (MapID,-345.49 , Ycoord, Zcoord)
    end
    RegisterGameObjectEvent (GOID, 2, "Teleporting_onUse")
    
    thats for the X point But first and formost and most needed is the MapID or u dont know where ur gonna be put
    
    in this case its 530
    
    so now after placing that it shoul be
    
    function Teleporting_onUse (pUnit, Event, pMisc)
    pMisc:Teleport (530,-345.49 , Ycoord, Zcoord)
    end
    RegisterGameObjectEvent (GOID, 2, "Teleporting_onUse")
    
    Now for the rest of the coords Z and Y well u do same as you did wtih X
    Z= -102.0
    Y= 3149.1
    
    So now we get
    
    function Teleporting_onUse (pUnit, Event, pMisc)
    pMisc:Teleport (MapID,-345.49 , 3149.1, -102.0)
    end
    RegisterGameObjectEvent (GOID, 2, "Teleporting_onUse")
    
    and last we change the GOID to the nessacry object that u want to cause you to port
    in this case its 70001
    
    function Teleporting_onUse (pUnit, Event, pMisc)
    pMisc:Teleport (530, -345.49, 3149.1, -102.0)
    end
    RegisterGameObjectEvent (70001, 2, "Teleporting_onUse")
    
    and walah (or how ever you spell it)
    
    Next just save it as like Mag.LUA or something like that and put it into you Scripts fold in your server folder and you done grats u made a scripted portal
    
    maybe ill learn more about LUA and send out another portal tell me what u think
    
    (be sure to use your info for you coords not mine
    (this guide is by the mager1794)

    And it works perfect! But sadly it works just for 1 portal :/ I cannot make 2 portals which teleport to two different locations.

    Anyone knows the way how to make two or more portals which teleport to different locations?


  2. #2
    Newbie GeoLOKY is offline
    MemberRank
    Jun 2007 Join Date
    3Posts

    Re: [Ascent][Help] More then 2 LUA portals?

    in lua script for second portal, change Teleporting_onUse on Teleporting_onUse2...
    and in every script for portal, change them to 3... 4.... 5... etc.. :) for second portal use something like this

    function Teleporting_onUse2 (pUnit, Event, pMisc)
    pMisc:Teleport (MapID, Xcoord, Ycoord, Zcoord)
    end
    RegisterGameObjectEvent (GOID, 2, "Teleporting_onUse2")

    for third

    function Teleporting_onUse3 (pUnit, Event, pMisc)
    pMisc:Teleport (MapID, Xcoord, Ycoord, Zcoord)
    end
    RegisterGameObjectEvent (GOID, 2, "Teleporting_onUse3")

    and so on :)

  3. #3
    Sorcerer Supreme nzn-muonline is offline
    Member +Rank
    Aug 2005 Join Date
    Wait! I knew this... Ummm... Don't tell me, I will answer!Location
    306Posts

    Re: [Ascent][Help] More then 2 LUA portals?

    You have tried this or just guessing? :) Because I`ve tried this, but I screwed up everything at the beginning so I dunno it didn't worked because I`ve screwed up or it`s just because doen't work :)



Advertisement