[GUIDE] Custom Portals menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Kirth's Avatar Active Member
    Reputation
    58
    Join Date
    Nov 2007
    Posts
    274
    Thanks G/R
    2/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [GUIDE] Custom Portals

    Hello all! In this small tutorial I'll teach you how to make a portal using Lua.

    First, we'll need a Gameobject to serve as a portal. You can use the folowing SQL querry as a base.

    Code:
    INSERT INTO gameobject_names_copy
       (`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
       (2, 1, 4396, 'Gurubashi Arena Portal', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
    Now, lets make a new Lua script. Since we're making a portal to Gurubashi Arena, lets call it "arenaportal.lua". The name doesn't realy matter, just as long it's a .lua file.

    Copy and paste the folowing piece of Lua code in the file. You might want to adjust the information to correspond to your Gameobject, and ofcourse your location (type .gps ingame for the coordinates).

    If you're taking the coordinates from the recall table in your Ascent world database be SURE to replace their commas by dots. If not, this'll cause function overflow.

    Code:
    function gurubashiarena(pGameObject, event, pMisc)
          pMisc:Teleport(0, -13228.470703, 227.919037, 32.869213)
    end
    
    RegisterUnitEvent(2, 2, "gurubashiarena")
    Code Breakdown time!

    RegisterUnitEvent(2, 2, "gurubashiarena") :: This is the "Reigsterevent". Replace the FIRST '2' by your Gameobject Id.

    function gurubashiarena(pGameObject, event, pMisc) :: This defines the function. It's the header that tells Ascent the function named "gurubashiarena" starts here.

    pMisc:Teleport(0, -13228.470703, 227.919037, 32.869213) :: Teleports in this order: mapid, x, y, z, orientation.

    end :: Tells Ascent the function "gurubashiarena" stops here.


    Thats all! I hope you've enjoyed my tutorial. And learned something with it. If you have any questions or problems, feel free to ask!

    [GUIDE] Custom Portals
  2. #2
    Blackboy0's Avatar Member
    Reputation
    70
    Join Date
    Nov 2007
    Posts
    377
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is good, except for one thing: Does the Script really need the Orientation to work? I'm making one right now to test it.

    EDIT: And also, the Type for a Portal is 22.
    Last edited by Blackboy0; 03-15-2008 at 06:43 PM.

  3. #3
    flat-down's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help!

    After you have made the lua script, then what do you do? Plz help, really confused, ++rep if you do

  4. #4
    swyfty's Avatar Member
    Reputation
    2
    Join Date
    Jan 2008
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks this helps a load!

  5. #5
    not627's Avatar Member
    Reputation
    1
    Join Date
    May 2007
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    where do i place the .lua file and how can i download it to my server?

  6. #6
    Laniax's Avatar Active Member
    Reputation
    47
    Join Date
    Feb 2008
    Posts
    187
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice +rep if i could

  7. #7
    ridderalexander's Avatar Member
    Reputation
    3
    Join Date
    Dec 2007
    Posts
    26
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks that helped me alot

  8. #8
    svenolio's Avatar Member Authenticator enabled
    Reputation
    1
    Join Date
    Jun 2007
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok it did't work for me, when I click the portal nothing happens...These are my files
    LUA script(in ascent/scripts folder):
    Code:
    function Teleport to Svenolio City(pGO, Event, pUnit)
    	pUnit:Teleport(1, 4393.419434 , -2521.211670, 1122.614136)
    end
    
    RegisterGameObjectEvent(200000, 2, "Teleport to Svenolio City")
    Gamobject_names(I used backup so that's why it shows insert into thing)
    Code:
    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('20000000','22','1327','Svenolio City','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0');
    hope you find out what prob is (I didn't use your BASE cause it inserts it in to a COPY of gamobject_names, also dunno if it matters but when ascent world runs and when you look at if all DLL's are loaded it says "LUAScripting.dll delayed load", but when u scroll down it does say it loaded al scripts so???)

  9. #9
    reyintazmaster's Avatar Member
    Reputation
    1
    Join Date
    Nov 2007
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not a lua expert, but I'm pretty sure you can have spacebars in the function name. That will screw it up

    Also, you have the "type" as 22 in the sql, I dont know if it works, but I have it as 1, and it works fine for me.

    Remake them like this and it should work
    Also, it was some other wrongs when I looked on my scripts =P

    Also, what I post now makes it a portal, dont know if you did it, but you used pUnit
    Code:
    function TeleporttoSvenolioCity(pUnit, Event, pMisc)
        pMisc:Teleport(1, 4393.419434 , -2521.211670, 1122.614136)
    end 
    RegisterGameObjectEvent(200000, 2, "TeleporttoSvenolioCity")
    Code:
    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('20000000','1','4396','Svenolio City','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0');
    If its wrong, correct me

  10. #10
    LordDarkling's Avatar Active Member
    Reputation
    28
    Join Date
    Jul 2007
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or of course use the Medititation WoW Portal creator i made :wave:

    Meditation Portal Creator!

  11. #11
    reyintazmaster's Avatar Member
    Reputation
    1
    Join Date
    Nov 2007
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow nice program man, that will save me some time.

  12. #12
    LordDarkling's Avatar Active Member
    Reputation
    28
    Join Date
    Jul 2007
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks its not very advance though

  13. #13
    Lich King's Avatar Contributor
    Reputation
    100
    Join Date
    May 2007
    Posts
    911
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You know, your forgetting to add the info to teleport_coords table

  14. #14
    Strudels's Avatar Member
    Reputation
    5
    Join Date
    Sep 2007
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its something with database i think

  15. #15
    reyintazmaster's Avatar Member
    Reputation
    1
    Join Date
    Nov 2007
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TheBetrayer View Post
    You know, your forgetting to add the info to teleport_coords table
    I dont know if that was to LordDarkling program or Kirth guide, but to use the teleport_coords table for portals is just unnessesary.
    Its better to just make a game object and a lua (just copy and changes the cords and names) then screw around in a table =) Just my minds.

    The guide works perfect
    The program works kinda perfect

Page 1 of 2 12 LastLast

Similar Threads

  1. [Guide] Custom instances
    By Chrispee in forum WoW EMU Guides & Tutorials
    Replies: 38
    Last Post: 08-11-2008, 08:56 AM
  2. Custom Portals - Help
    By MentalAssault in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 09-27-2007, 11:44 AM
  3. Adding Custom Portals?
    By lazboy in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 08-31-2007, 12:42 PM
  4. Shingles's Guide to Portals!
    By Shingles in forum World of Warcraft General
    Replies: 4
    Last Post: 09-17-2006, 07:11 PM
All times are GMT -5. The time now is 09:38 AM. 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