| | Ascent Guides This section is for WoW emulated server, Ascent guides. [NO QUESTIONS HERE] |  | | 
03-08-2008
| | Sergeant Major | | | Join Date: Nov 2007
Posts: 150
Reputation: 30 Level up: 27%, 369 Points needed |   | | [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! | Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx. 
03-15-2008
|  | Knight-Lieutenant | | | Join Date: Nov 2007 Location: Alterac Valley
Posts: 372
Reputation: 70 Level up: 97%, 14 Points needed |    | | | 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 08:43 PM.
| 
03-19-2008
| | Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep) | | | Join Date: Mar 2008
Posts: 15
Reputation: 1 | | | Help! After you have made the lua script, then what do you do? Plz help, really confused, ++rep if you do | 
03-19-2008
|  | Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep) | | | Join Date: Jan 2008
Posts: 27
Reputation: 2 Level up: 7%, 465 Points needed | | | | Thanks this helps a load! | 
03-20-2008
| | Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep) | | | Join Date: May 2007 Location: where do YOU think?
Posts: 29
Reputation: 1 | | | where do i place the .lua file and how can i download it to my server? | 
03-21-2008
|  | Master Sergeant | | | Join Date: Feb 2008 Location: Waffle factory
Posts: 97
Reputation: 31 Level up: 56%, 223 Points needed |  | | | nice +rep if i could | 
03-22-2008
| | Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep) | | | Join Date: Dec 2007
Posts: 27
Reputation: 2 | | Thanks that helped me alot | 
03-27-2008
|  | Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep) | | | Join Date: Jun 2007 Location: Holland
Posts: 6
Reputation: 1 | | 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???) | 
03-27-2008
| | Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep) | | | Join Date: Nov 2007 Location: Pyramid
Posts: 12
Reputation: 1 | | 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 | 
03-28-2008
| | Master Sergeant | | | Join Date: Jul 2007 Location: In your pants
Posts: 115
Reputation: 22 Level up: 78%, 112 Points needed |    | | | | 
03-28-2008
| | Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep) | | | Join Date: Nov 2007 Location: Pyramid
Posts: 12
Reputation: 1 | | | Wow nice program man, that will save me some time. | 
03-28-2008
| | Master Sergeant | | | Join Date: Jul 2007 Location: In your pants
Posts: 115
Reputation: 22 Level up: 78%, 112 Points needed |    | | thanks its not very advance though | 
03-28-2008
|  | Contributor | | | Join Date: May 2007 Location: My house
Posts: 902
Reputation: 97 | | | You know, your forgetting to add the info to teleport_coords table | 
03-29-2008
|  | Corporal | | | Join Date: Sep 2007 Location: Sweden
Posts: 19
Reputation: 5 | | | its something with database i think | 
03-29-2008
| | Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep) | | | Join Date: Nov 2007 Location: Pyramid
Posts: 12
Reputation: 1 | | Quote:
Originally Posted by TheBetrayer 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 |  | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -4. The time now is 07:19 AM. |